(TODO from Fityk 1.0.2)

* GUI: a single dialog for Model > Export... options and for "info models"

* GUI: definition mgr - checkbox - show in the list on toolbar

* GUI: definition mgr - show formula images from the manual, if available

* handle gzipped fit files

* CLI/GUI: use sigaction() instead of signal() to handle SIGINT
  print a message from interrupt_handler()

* subtracting datasets (with interpolation of the subtrahend): @2 = @0 - @1;
  for consistency, `+' should add interpolated data, and 'U' can stand
  for a sum of sets.

* add functions cot and coth

* GUI: pre-defined GUI configuration `black-on-white`

* refactor sidebar; use wxDataViewCtrl for the lists at the sidebar,
  rewrite ListWithColors::populate(), add sorting by clicking on column
  header (use case: sort functions by centers)

* GUI, printing (hardcopy): this part has been neglected for some time.
  Make sure it works fine on all platforms and add more options:
  it should be possible to add text to the graph (data title or fit info)

* GUI: draw points (handles) for dragging peak width at half height

* Mac, GUI: "Session > New Window" that would start an independent process
  (equivalent of clicking the program icon again on Windows and Linux)

---

* embed the Lua interpreter

---

* syntax enhancements:  $min = @*.min(y if a)
                        print all: F[*](x) # print all components as columns

* finish the powder diffraction add-on (Pawley fitting)

* allow all the functions from data transformation in variable/UDF definition

* FFT data transformation using either KISS FFT or FFTW library,
  fft[-inv]-xx, where xx is re, im, amp, e.g. @n = fft-re @3 

* convolution and deconvolution of two datasets or a dataset with Gaussian:
  convolve @0 @1; convolve @0 2.3; deconvolve @0 3.4

* fitting the functions Spline nad Polyline (the derivatives of these
  functions are not implemented yet and the L-M method does not fit them)
  
* GUI: there is ugly vertical line (a part of the fitted curve) in points
  where the value is undefined (e.g. in ReadShockley function for x=0).

* GUI: when dataset is changed and the active function (i.e. the function
  in the bottom of the sidebar) is not in the new active dataset, the active
  function should also be changed (to the function that was active last time
  this dataset was active)

* (?) GUI: possibility to plot horizontal/vertical lines on the main plot
  (for example to show theoretical peak positions in XRD or to mark simulation
  restarts in data from MD. Syntax: plot line x=42.2 label="foo"

* fitting: add stopping criterium based on elapsed time

* GUI: a simple (for the user) way to interrupt fitting. Requires two threads.

* "info fit" should also print standard deviation of residuals

* plot histogram of resiudals:
  http://www.itl.nist.gov/div898/handbook/eda/section3/normprpl.htm

* confidence bands

* data smoothing (Savitzky-Golay and/or other methods)

* GUI: constraining parameters of two peak using the peak-top menu

* add a new function category: sigmoids/steps (now function can be guessed as
  "peak" and "linear"). (GUI): drawing drafts for the new category.

* GUI: add alpha channel to the toolbar icons

* user defined functions:
      - calculating limits, width, area, etc. for UDF
      - ?? use LLVM for faster calculation of user-defined functions

* Use a better approximation of Voigt function than the one used now.
  There are dozens of papers on Voigt calculation, mostly in JQSRT.

* info dpeak [range]: show parameters of selected data range assuming that
  this range contains a peak: area, center, FWHM, max, peak-area, backgr-area
  (like in the Xview program)

* more sophisticated algorithms for peak detection
    - compare methods from origin pkfind, peakfit and other programs
    - research papers: http://dx.doi.org/10.1016/j.chroma.2004.11.073
                       http://dx.doi.org/10.1002/cem.1005
                       http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2631518/

* fitting: consider using 3rd-party library for nonlinear fitting/optimization.
  The list of libraries in this category:
    NLopt: http://ab-initio.mit.edu/wiki/index.php/NLopt
    ALGLIB: http://www.alglib.net/ (lsfitcreatewfg)
    MINUIT
    COOOL: http://coool.mines.edu/ 
    GAUL: http://gaul.sourceforge.net/, 
    WNLIB: http://www.willnaylor.com/wnlib.html
    GSL and 3rd-party extensions to GSL,
    netlib: http://www.netlib.org/ 
    OOL: http://OOL.sf.net, 
    scitbx::lbfgs http://cctbx.sourceforge.net/
    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 
    levmar: http://www.ics.forth.gr/~lourakis/levmar/
    OpenOpt: http://openopt.org/
    http://www.applied-mathematics.net/optimization/rosenbrock.html

* fitting: in addition to the least squares fit, add so-called robust fit 
  (it is called robust fit in the Numerical Recipes book), i.e. optimize
  assuming the error distribution is other then Gaussian, eg. Lorenzian...;
  there is also a literature about so called 'maximum-likelihood method'
  in which the exact Poisson error distribution is handled.

* fitting: box-constrained parameters (simple-variables)
           the constraints could be automatic for some function parameters,
	   e.g. "guess PseudoVoigt" could give shape with bounds <0,1>

* GUI: custom control in the log file dialogs: "log also output" checkbox (wx3)

