Deconv2Dxy

This program allows a deconvolution of 1D spectra and stacked 1D spectra 
packed into a 2D. Its primary use is analysis of 1D spectra and 
deconvolution of stacked 1D spectra with fixed line-shape and variable 
intensity parameters. We use it for analysis of experimental data for 
example from REDOR, DQ-CT and T1-experiments.

-----------------------------------------------------------------------
Quick Howto
unpack: deconv2Dxy-0.5.tar.gz
change to the directory deconv2Dxy-0.5
click onto deconv2Dxy, deconv2Dxy.tcl or deconv2Dxy.exe

"./deconv2Dxy.tcl" is the source and requires specific libraries like blt-2.5
and tcltk-8.5.

"./deconv2Dxy" is a binary prepared with freewrap for linux, which means 
you have to install fewer additional libraries on your computer to make
deconv2Dxy work. It has been tested with Ubuntu-16.04LTS

"./deconv2Dxy.exe" is a MS windows version also prepared with freewrap.
http://freewrap.sourceforge.net/

-----------------------------------------------------------------------
Lineshape function

x	in ppm
x0	center of gl in ppm
wi	width FWHM
ar	area
gl	gauss lorentzian ratio

lineshape(x) = ar*gl*2/wi*sqrt(ln(2)/pi)*exp(-4*ln(2)/wi/wi*(x-x0)^2)+
            ar*(1-gl)*0.5/pi*wi/(wi^2/4+(x-x0)^2)

-----------------------------------------------------------------------
File formats

*.txt
Files exported from Bruker's program "topspin-2/3" may be 
loaded. Use the command "totxt". If you want to apply a first order 
phase correction, you need to include imaginary data.

*.spe
Files following the simpson spe-file format can also be loaded.

-----------------------------------------------------------------------
Usage

The program is written in TCL/TK alone and is a first-times-tk hack. 
Still it can easily fit 1-20 peaks given the spectrum size in points is 
small (<1K). If you are patient you can fit big spectra as well. The 
parameter max.iterations in "defaults" gives the number of iterations 
per fitted peak after which the program will stop fitting and warn with 
a red fit1D-button if convergence had not been reached before. If you 
have to press the fit button several times to reach convergence, you 
might consider to increase the value for "max.iterations". It is also 
possible to change the 0th order phase of a spectrum given you have a 
data set with complex numbers. Phase fitting is possible but will not 
always give stable results, especially if the spectrum is noisy or has a 
distorted baseline. An option for fitting is to use contraints. Any 
expression of the type shift0*gl0-area0+sqrt(3.0) can be typed into the 
parameter fields, excluding the one for phase.

-----------------------------------------------------------------------
Results

Peak areas, chemical shift values, line widths (FWHH) and gauss/lorentz 
ratios are put into files with the extension log1D and log2D, 
respectively. Start the program from the command line to get more 
feedback.

-----------------------------------------------------------------------
Note 

Mental support in form of gummy bears and friendly emails is always welcome.

-----------------------------------------------------------------------
Note

I am aware that fitting with tcltk is not likely to be efficient, nor 
that the simplex algorithm is a good choice and that better solutions 
are around. Anyway at the time I started it, I wasn't aware of any 
suitable native linux solutions and maybe somebody still likes it.

-----------------------------------------------------------------------
Copyright (C) 2008-2018 Joern Schmedt auf der Guenne

This program is free software; you can redistribute it and/or modify it 
under the terms of the GNU General Public License as published by the 
Free Software Foundation; either version 3 of the License, or (at your 
option) any later version. This program is distributed in the hope that 
it will be useful, but WITHOUT ANY WARRANTY; without even the implied 
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
GNU General Public License for more details. You should have received a 
copy of the GNU General Public License along with this program; if not, 
see <http://www.gnu.org/licenses/>.
