Ideas for Sparky development
----------------------------

Alias when synchronizing Views (Gwan-Su Yi)
-------------------------------------------
When view axes are synchronized and one view has larger ppm range then
the other, use aliasing so I don't try to show an out of bounds region
of a spectrum.

Change spectrum background color (Youlin Xia)
---------------------------------------------
Command to change spectrum background color.
Wanted for printing strip plots with white background.
Have second command to change all views to specified background color.

Show assignment distance in Chimera (Marco Tonelli)
---------------------------------------------------
Make the Chimera interface show the distance for selected assignment
or constraint lines.  The Midas emulator dist command will do this.
The command "dist sel" will show the distance between two selected atoms.

Multiple strip plot windows
---------------------------
Permit multiple strip plot windows.  Difficulty is strip plot accelerators
won't know which window to act on.

Change view name (Thomas Merritt)
---------------------------------
Be able to change view names in view settings dialog.
Especially helpful for Bruker files 2rr, 2rr:1, ....

Mac OS X port (Jacqueline McGourty)
-----------------------------------
Simplest would be to have X server running on Mac.
A port to native Mac Tk would likely require replacing some X calls.

Assignment guessing for 4D spectra (Alex Drohat)
------------------------------------------------
For a 4D 13C,13C NOESY want to have i,i,j,j assignment guessing to restrict
the protons and attached heavy atoms to be in the same residues.

Control crosshair correspondence between spectra (Alexander Alexandrovich)
--------------------------------------------------------------------------
Wants w3 axis in N15 noesy (H,H,N <-> w3,w2,w1) to control w2 axis in
N15 HSQC (H,N <-> w2,w1).  The current behaviour maps w2 in the noesy to w2
in the HSQC.  Maybe displaying two w2 HSQC crosshairs to show both
possibilities would be a good fix.  That would be a mess from one homonuclear
spectrum to another.  Probably better to allow user specified axis matching.

Show peak labels for all assigned peaks (Kazuo Kuwata)
------------------------------------------------------
The pl command brings up a dialog which only applies to one peak.
This is easy to do in Python.  Wrote a trial version labelpeaks.py.

Print 1D slices (Eric Paulson)
------------------------------
Print 1D slices without showing spectrum.

Tile plot for 2D spectrum (Jasmin Faraone Mennella)
---------------------------------------------------
  Specify a set of shifts and show tile plot of contoured regions around
all intersection points.

Copy contour levels, integration params, ... (Jasmin Faraone Mennella)
----------------------------------------------------------------------
  Command to copy all types of view settings from a view to one or more
other views.

Overlay strips (Markus Seifert)
-------------------------------

  Want to overlay one strip on other strips.  The contour overlays would
not align ppm scales as the current overlay mechanism does.
But I don't have the overlay capability.  It seems sensible to
make some modification to allow a ppm offset when doing a spectrum
overlay.  A Python interface to that capability could be provided.
Then some user interface to do the desired strip overlays would need
to be designed in Python.  I don't know how you would specify which
strips to overlay onto which other ones and how you would get rid of
those overlays when you no longer want them.  Maybe you just select
one strip and use a strip plot overlay command to overlay it on all
other strips.  And there would be a command to remove the strip plot
overlays.  Do you need to be able to slide one strip over the other or
can I just align the center vertical lines?  Would it be better to use
the "backpack" type interface?  You could have a command to put the
strip in your backpack.  Then you could select any view and overlay it
onto that view with vertical center lines aligned using another command.
I guess both interfaces would be handy.  Maybe the overlay should be
fixed when the underlying spectrum is scrolled?

AutoAssign interface import from file (Kimmo Paakkonen)
-------------------------------------------------------
Add ability for AutoAssign interface to read resonances from a file without
running AutoAssign.  On Windows I can't run AutoAssign because my code
uses os.fork().  I should separate the AutoAssign viewer from the controller.
Also I should use spawn() instead of fork() on Windows.

bruk2ucsf NC_proc parameter (Markus Seifert)
--------------------------------------------
NC_proc in proc file indicates scaling of data values.
Need to apply this to compare intensities from different spectra.

Strip plot add strips in sequence order (Grant Langdon)
-------------------------------------------------------
Have a checkbutton that controls whether adding strips for selected peaks
puts them at the end or inserts them in sequence order.  Probably would
want a command to sort the strips in sequence order as well.

Multicolumn menus (Grant Langdon)
---------------------------------
The View and Spectrum menus go off the bottom of the screen.
Tk 8.4a2 does not offer any automatic handling for long menus.
I have seen two solutions to this problem in other programs.
One is the more... button at the bottom.  The other is a menu
with a scrollbar.  Both of these are quite complex to implement.
They are generally implemented by the graphical user interface
toolkit.  Sparky uses Tcl/Tk and it has neither of these solutions.
Using the Tk multicolumn menu feature is somewhat painful to do
efficiently.  I looked into adding a maximum height option to Tk
menus and submitting it to the Tcl/Tk maintainers.  But it is not
a very adequate solution since there still can be too many menu
entries so they do not fit on the screen.

Eliminate Extension menu (Vladimir Likic)
------------------------
The Extension menu entries are implemented in Python and the File, View,
Peak menu entries are implemented in C++.  But the user doesn't care about
the implementation.  Python extensions would be easier to find under the
View and Peak top level menus.

Default directories for extensions (Vladimir Likic)
----------------------------------
Would be useful if Read Peak List used ~/Sparky/Lists as default directory.
Other extensions also should use sensible default directories.

Autoscale slices to selected peak (Marco)
---------------------------------
Have mode for autoscaling slices to scale to max height of selected peaks.
Useful for seeing small peak integration fit next to a big peak.

Separate axis name from nucleus type (Grant)
------------------------------------
Allow spectrum axis names like CACB, CO, HN and have separate derived
nucleus type 1H, 13C, 15N.  Change all Sparky features to use the
appropriate one.

Slices along one axis (Grant)
---------------------
Be able to show slices just along the horizontal or just the vertical axis.
Would be useful for strip plots.

Restricted peak picking (Hunter Moseley, Dani Monleon)
-----------------------
Restrict the picking of 4D noesy-hsqc spectra (C13-H-H-C13, C13-H-H-N15,
or (N15-H-H-N15) using two 2D HSQC spectra.  

Incompatibility with _tkinter thread support
--------------------------------------------
Starting Sparky from Chimera causes a core dump if the _tkinter.so being used
was compiled with thread support (standard on Windows).  Sparky Tk event
dispatching is not compatible with _tkinter thread handling.  Making it
compatible would require replacing Sparky's winsystem-all.cc Tcl_DoOneEvent()
calls with a call to the Tkinter dooneevent function.  This could be setup
with a hook which would directly use Tcl_DoOneEvent() when Sparky is run
w/o Python.  Also it would require making C++ callbacks to Python in
python.cc instead invoke a Tkinter registered python function.  These steps
are necessary to avoid violating _tkinter.c assumptions used in maintaining
the Python interpretter and Tcl thread locks.  It might be useful for
extensions that launch another program (like AutoAssign) to be able to
start a second thread that waits for that program to complete.  Additional
threads would be limitted in what they can do because Sparky is not thread
safe so only one thread can use the Sparky interface.

Homo-dimers and multimers
-------------------------
Nick wants basic homo-dimer support.  Not clear what this requires.
Wants to be able to generate peak lists for Mardigras handling intra-
and inter-monomer assignments.  Not clear how to record whether an
assignment is intra- or inter-monomer or both.

Find unassigned resonances from NOESY plus model
------------------------------------------------
Choose an unassigned atom.  Find all nearby assigned atoms
and display strips for each to find resonance with which they all
have crosspeaks.  Strip plot should be generalized to show 2D spectra.

Separate non-NOE feature from distance.py
-----------------------------------------
This needs maximum signal/noise parameter.  Also should have switch
to exclude resonances with no peak assignments (for exchangeable protons
in a D2O spectrum).  It doesn't require the ppm tolerances.  And it is
basically different than all the other distance.py capabilities that
look at alternative assignments for a peak.

Better file selection dialog
----------------------------
Peak list and assignment distance pdb files should use multiple file
selection dialog.  Other places I use open or save dialog where not
appropriate because for 'open' file must exist and for save it must
not or confirmation of overwrite is requested.  And I can't select
a directory in AutoAssign interface.  The Tk file selection dialog is
junk.  I should look for an alternative implemented in Python for
Tkinter.

Slices should track crosshair from other view
---------------------------------------------
To compare the same slice in two views you now have to move the pointer
back and forth between them.  Would be better if slice in other view
followed crosshair from other view.  Also might be useful for peak info.
How about resonance panel highlighting, and scale crosshair position display?

Save dialog state if session file
---------------------------------
Need to cache dialog options like in chimera extension so I'm not always
retyping the same file paths.  Maybe make attached session data and use it
extensively.  Also I want to be typing the same paths less often.  So
if no reasonable default pdb path exists but user has specified a save
file path use the save file path as a first guess??

Strip plot slice display
------------------------
Add toggle button to strip plot that replaces spectrum views with
1-D slices.  1-D slices can be drawn on canvases occupying same
spaces as view windows.

Strip plot printing
-------------------
Reimplement spectrum printing with simple drawing primitives
and with flexibility to put multiple spectra on a page.

Realtime spectrum reprocessing
------------------------------
Locally reprocess spectrum and update contour plot in real time
to control trade off between resolution and sensitivity.  Multiply
by an exponential in the time domain with time constant controlled
by a slider.  Need to fourier transform to time domain, compose,
and then fourier transform back.  This is equivalent to doing a
convolution.  Need to define a range so I can do this locally.
That will be an input parameter (entry field).  Range will determine
cutoff of convolution function.  I'll need independent time constant
control and range control for each axis.

Write Python lint program
-------------------------
Ensuring the reliability of the Python part of Sparky is more difficult
than the C++ because I do not have the equivalent of compile time checking.
Because of the ability to modify everything at run-time in Python it looks
impossible to do useful checking rigorously.  Instead heuristics will be
needed to find functions that are being invoked.  I looked at kwpylint
by Aaron Waters but it appears to only do trivial heuristic checks like
whether a variable is ever used.  It would be a nice contribution to the
Python community in addition to helping me maintain my Python to write
a simple useful heuristic code checking program.  It should check whether
methods, member variables, local variables, ie references exist.  It
should check that the right number of function arguments are passed.
It would be great to try to type variable, arguments, return types and
look for inconsistent use.  Use the Python parser module.

Projects
--------

Interface automatic noesy assignment program CAR to Sparky.
Improve Sparky/Chimera interface.
Enhance AutoAssign interface for newer AutoAssign.

Requests
--------
Show in peak table peaks assigned in one spectrum but not other (Bill Bauer)
Change spectral width, spectrometer freq, ..., with ucsfdata (Vladimir)
Midas peak selection showing midas line is not in Python version

Things to test
--------------

Things to fix
-------------

Need an easy way to align two spectra.
View windows saved when not mapped don't have position remembered correctly

Write extension to produce correct peak lists for mardigras, dyana, amber, ...
Fix vnmr2ucsf problem with long lines.
Mardigras / Corma planning

Duplicate project - duplicates save files?
Display peak height on slices
pipe2ucsf provide error messages on bad input eg spectrometer freq = 0
Interrupt handling for Python.
Interactive font size choice.
Sparky icon?  Mini spectrum view?

Use GC cache to improve speed of cached contour display.
Transpose volume field in peak lists not updated.
Copied ornaments still shown as integrated with zero volume.
Command to align spectra by lining up assigned peaks (Patrick).

Application modal warning or quit dialog gets buried and Sparky appears hung.

Save sparky data as executable python?

Axis map choice as option menu.

Copy and paste from one peak to one peak ignores limits?

Do full cleanup on quit - file pointers and memory.
Eliminate project Unload(), mReset().

Use purify on spin to eliminate memory errors.

Set default color for labels (Shauna).

Add zero line on slices.
Don't display peak fit in slices if all zeros.
Show peak height in slice panels when pointer over peak.

Data being displayed outside z range.
If z is outside spectrum edge plane is displayed.  Should leave blank.

Pointer over peak should recenter reson panels (Patrick)

Status line on views to show when accelerators goofed up (Anwer).

Resonance list dialog (Patrick)
Peak list - show only peaks above diagonal (Alessandro).

Assignment format (eg. %a1-%a2-%a3) set in assignment options, effects
  labels, peak lists.  Peak list file output header needs format to be
  read by Nick's program:
	%a1-%a2-%a3    Frequency    Volume
			w1  w2  w3

User preferences saved in each save file instead of project
  -- most recent load overrides
View buttons

Add file info to open dialog.
Could put # of key strokes, mouse clicks into log file to measure use.
Make return key equivalent to clicking OK in dialogs.

Spreadsheet interface instead of ornament dialog.
Comment header files of view window code.
Find better way to produce vertical text.
Draw a data structure schematic.
Try PIPP assignment program

Tried
-----

Porting baseline program to SGIs
--------------------------------
Port baseline program to SGIs.  Tried compiling source on picasso but
found source code

	picasso:/oldLOCAL/src/nmr/baseline
	picasso:/oldLOCAL/src/nmr/libs/nmr for libcnmr
	picasso:/oldLOCAL/src/lib for libutil

were inconsistent.  All had been modified up to about 1994 while the
baseline binary on picasso was from Apr 1993.  Looks like baseline
modifications were intended to make it work with libcnmr and libutil
but was never completed.  Makefiles and 2 of 3 baseline source files
are not under RCS making restoration of older versions impossible.

Done
----

New shorter clearer Sparky license agreement
--------------------------------------------
Current license asks for machines you will use program on,
limits backups and has other unreasonable clauses.

Switch to passwords for license holders
---------------------------------------
Host name authentication increasing fails because of firewalls
and web cache machines.  Our web server sees the request for a
licensed Sparky distribution coming from these intervening machines.
These firewalls and caches are added without user knowing so the
problem arises from nowhere.

Spectrum region RMSD (Edward d'Auvergne)
----------------------------------------
Dialog to compute mean and rmsd for region of spectrum selected with mouse.

Strip plot scroll bar resize problem (Markus Seifert)
-----------------------------------------------------
zi in a strip does not result in rescaling scrollbar.

Removing overlays bug (Markus Seifert)
--------------------------------------
Selecting overlay from list and pressing remove is said to remove
wrong overlay sometimes -- usually the first one.

Step upfield/downfield commands  (Vladimir Likic)
-------------------------------
Add commands to move up or down one plane in a 3D spectrum.

Update Tkinter code distributed with Sparky
-------------------------------------------
Should update the Tkinter Python code and _tkinter.c used in the Sparky
distribution to what comes with Python 1.5.2.  This will require testing
of all Sparky extensions under the new Tkinter.
