[ TODO list and tentative development plan ]
[ // = done, but not tested/documented     ]

* ? history (data / sum / view / all) [IMPORTANT]
   i don't exactly know how to implement it yet

* GUI: use wxStopWatch instead of  ::wxGetElapsedTime

* GUI: sidebar, function's parameter values - do something when value
  is changed (by typing) and Enter is _not_ pressed.

* GUI: Function Definition Manager layout: "Remove" button takes too 
  much space; perhaps "change name" button

* GUI: some problems with "Copy F to next dataset" button
  
* GUI?: when loading many datasets from command line, set view to show all

* should it work? "$foo = {y[0]}" (it was working, now gives syntax error)

* exporting gnuplot compatible formulae ('^'->'**', 1/2 -> 1./2),
  when option formula-export-gnuplot-style (?) is set

* auto-scaling should not include x/y=0, unless it's
  in, say, 20% plot margin. "[:]" is an exception and includes 0.
  GUI: "Auto-zooms shows y=0"

* (?)exporting data with info "info @n () [range] > file"
       should display ... [1234 lines more] rather than everything

* small (eg. 1e-14) values of parameters are not handled properly.
   - make EPSILON an option when in configure script
   - warning if variable is set value: 0 < |value| < EPSILON

* formula simplifications: "3/x" is changed to more complex "3*1/x"

* user defined functions:
      - more sophisticated simplifications of expressions and CSE(!)
      - calculating limits, width, area, etc. for UDF(!)

* un-strip background: what to do if active dataset is different than the one
  the background was removed for.

* link to "On-line tutorial" and the tutorial itself(!)
   perhaps screencast (eg. using Wink)

* EMG function: how to calculate it? Now there are some problems with
  this function. There must be smarter way to implement it...

* settings: Nelder-Mead and GA fitting options, 
  a way to "shake" parameters for L-M
  constrained L-M option

* (GUI) redrawing for many datasets (~100) takes noticable time.
  Kind of plot buffering (as a bitmap).

* (GUI) finish script debugger dialog -- add command editing, inserting
  and deleting commands, and changing the order of command

------------------ next release here 0.7.6

* build engine (everything but GUI/CLI interface) as a library
  with more or less documented API.

* CVS -> Subversion transition

------------------ next release here 0.8.0

* python scripts  -- built-in Python interpreter which allows to extend 
  Fityk using user-written scripts, optional modules, etc. 
  [IMPORTANT]

* rewrite crystallographic part in python
  [IMPORTANT]

------------------ next release here 

* (GUI) plot horizontal/vertical lines (X/Y | pos=2.34 | 100%)
     can be used to show theoretical peak positions in XRD

* clean up verbosity levels of messages. There should be 6 kind of messages:
  debug, vinfo (more verbose info), info, rinfo (explicitely requested info),
  warning, error
  and 7 levels of verbosity: debug, verbose, normal, terse, only-warnings,
  only-errors, silent

* [BUG]: program crashes (MS Win 9x) when data contains NaN (as a result
  of asin(x) x>1) and "Zoom all" is called.

* (GUI) data-range mode: if all points are active, left mouse button
  should "select", not "activate", ie. it should do A = (left<x<right)  (?)

* (GUI) when printing, everything is first rescaled and rounded(!) for
  plot window at the screen, and then rescaled to the paper size. 
  This rounding causes visible artefacts at the printout.
  (wxDC.GetSize instead of plot.GetClientSize() ?)

* info -- more informations about error, confidence limits, etc.
  graphical interface Fit > Info

* (GUI) vertical scaling using mouse on main plot near to left edge of the plot 

* GUI [BUG] aux. plot - when program is called with script as an argument
   aux. plot looks strange at the start of the program until it is replotted

* improve Voigt function (cut-tails, better approx?) 

* (GUI) use numeric pad keys (WXK_NUMPAD_*) as shortcuts for changing 
	function parameters.

* GUI: it should be possible to constrain two parameters of two peak,
     at least to make them equal.

* GUI: easy way to do: F[hwhm]=..., F[shape]=...;

* GUI: button 'freeze' on variables pane

* Fitting 
	simulated annealing (it can replace LM shake_before option)
	perhaps also BFGS, conjugate gradients methods
	autoplot option -> fitting tab, checkbox: replot-after-fit-iteration
	                   perhaps also in Fit->Run dialog

* GUI: menu Functions:
  Functions > Peak-Find Info -> animation
  Functions > Multidata P-F Info -> window with list of parameters (Xview-like)

* Function: check_parameters_out_of_domain() ?  
             eg. in Pearson shape > 0.5 , shape < 1e9
	     called from fitting iteration?
	     what if parameter is out-of-domain? change? disable function?
	                                          change and freeze?
	     set fit-fix-parameters-times = 5
	    simple-var bounds?
	    ? $$simple = ~{min2(max2($simple, -1e9), 1e9)}

* GUI: Data Editor - left/right/top/bottom - magic keywords: user would be
       asked to select point/range/rectangle in plot

* cmd/GUI: plot peak-groups: ==> plot (%a+%b+%c)  

* (GUI) different peak-draft for sigmoids/steps (new function category), 
         and for other functions

* (GUI) where config files should be stored on MS Windows? Registry or file?

* (INTERNAL) use smart pointers: 
  http://www.boost.org/libs/smart_ptr/smart_ptr.htm
  (the library will be distributed in 3rdparty/boost)

* there are problems with refreshing plots and output window when program
  is busy (ie. when running script or fitting). It seems to be platform
  dependent.

* auto-freezing of peaks at disactivated range

* loading data -- use Difdaf library (when it will be ready) for powder
  diffraction data import.
  other formats (from survey): .jdx JCAMP-DX (www.jcamp.org)
		         Galactic (GRAMS/32) SPC files (especially multifiles)
			 Vamas (vms), 
			 multipart Siemens .raw data files
			 uxd,udf
  perhaps OPJ with liborigin and XLS with another library

* (GUI) single dialog for configuring main plot(?)
  data point size and other properties can be put on data pane(?)

* (GUI, BUG) in Configure axes / peak labels: fonts are changed event
  if Apply is not pressed

* (GUI) stopping fitting interactively (when user don't want to wait longer);
  use threads? or wxTimer?

* automatic background substraction - what are good algorithms?

* more sophisticated algorithms for peak detection

* fitting: it should be separated even more from the rest of the program.
  Perhaps it fitting functions should be in extern library (COOOL,
  GAUL, WNLIB, netlib, OOL.sf.net, levmar)
  are there any other such libraries? 
  I haven't investigated the possibility of using mentioned libs yet. 
  Links: 
  http://coool.mines.edu/ 
  http://gaul.sourceforge.net/, 
  http://www.willnaylor.com/wnlib.html
  http://sal.jyu.fi/B/3/index.shtml, http://coin-or.org
  http://www-unix.mcs.anl.gov/otc/Guide/faq/nonlinear-programming-faq.html 
  http://www.ics.forth.gr/~lourakis/levmar/

* fitting: robust fit - other error distributions then Gaussian, 
  eg. Lorenzian...; so called 'maximum-likelihood method' -- using Poisson
  error distribution.

* Now only '.' is supported as a decimal separator. ',' should also
  be an option.

* investigate LLVM - can it be used for faster calculation of 
  user-defined functions?

* [BUG] (GUI) (MS Win) <br> does not work in vertical peak labels 

