The FitSpec function allows restriction of fit variables, either by establishing allowed ranges for those variables or by locking variables in place. If an initial fit is given, then the 'fit0' structure may contain the field ‘fit0.fixed’ (or alternatively, 'par' may contain ‘par.fixed’). This variable allows one to lock all intensities, peak positions, and/or linewidths separately for each dimension. Also, if an initial fit is given, then ‘fit0’ may have fields ‘fit0.rangeX’ and ‘fit0.lw_rangeX’ which give upper and lower bounds for peak position and linewidth, respectively, for each peak (X is the dimension number). Then, one may restrict each peak differently if desired. Typically, it is not a good idea to use these options if the peak list is not fixed (i.e. peaks are going to be added during the fit), although it is possible.
Alternatively, one may specify restrictions on fit variables in the ‘par’ structure. ‘par.rangeX’ and ‘par.lw_rangeX’ restrict peak position and linewidth, but are a single element in the ‘par’ structure, and restrict the variation of peak position and linewidth from its initial position (+/– half the value given in ‘par.rangeX’ or ’par.lw_rangeX’). One may also restrict the maximum and minimum linewidths of all peaks using ‘par.max_lwX’ and ‘par.min_lwX’. These options may be used with non-fixed peak lists, but care should be taken to not over-restrict the fit.