This directory contains the Rutishauser Algorithm version of the 2D fitting
programs.  A convenient tar file (NL2DR.tar) was created with the command:
"tar -cvf .NL2DR.tar *;mv .NL2DR.tar NL2DR.tar".

The files contained in this directory allow least squares fitting of a
2D-FTESR spectrum.  The command make nlspr will produce an executable file,
nlspr, that may be used to fit the example files included in the DEMO
directory provided with these files.  We provide two versions of the include
file nlsdim.inc that specify the matrix dimensions that may be used
(nlsdim.large and nlsdim.small).  To recompile the desired version of the
program, copy either the small or large version of nlsdim to nlsdim.inc and
recompile the program.  The executable nlspr should then be copied to either
nlspr.large or nlspr.small to identify the allowed matrix size.  We
recommend starting with the small version which will work with most
intermediate to fast motional spectral simulations and migrating to
nlspr.large for slow motional simulations and their larger basis sets.  The
large version will require considerable memory to load and run properly.  

The source code for the least squares fit is provided in the current
directory. The programs for pruning the basis set are provided in the
directory BASIS and examples are given in the directory DEMO.

The sample data sets in DEMO may be run as follows: in a directory
containing the .run files, the .indx basis set files and the .spc
experimental data files, start the program nslpr.small, type "read
demo1.run" and the program should read the data and basis set files and wait
for user input.  You may then type fit to generate a simulation with the
fixed parameters contained in the .run file, vary a single parameter with
the command "search parameter-name" or do a full optimization of several
parameters by typing "vary parm1", "vary parm2" etc. followed by the command
"fit".  The specifics of the files on the DEMO directory are discussed in
the readme file contained there.  

The format of the data file (.spc) must be as follows.  A copy of the top of
that file reads:

         0
       130         1       130     f2 (MHz)                      
       130         1       130     f1 (MHz)                      
-1.016e+02 1.575e+00-1.016e+02 1.575e+00 0.000e+00 9.610e+06
 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00
0.000e+00


Here, the first 0 indicates there are no comment lines between the 0 and the
start of information.  The numbers indicate the file size is 130 in f2 by
130 in f1, f2 goes from -101.6 MHz in steps of 0.1575 MHz and f1 has the
same limits (f2 is first on the 4th line).  The data minimum and maximum are 
0 and 9.610e+06.  The data follows.  The adjacent values are increasing f2.

Sample matlab macros to stack plot and contour plot the data are provided in
the DEMO directory.  Further a macro to resize a .fit file produced by the
nlspr program to a format that may be used as a data file is provided.  


