The ‘FullSpecCalc’ function generates spectra from a list of peak positions, linewidths, and intensities for arbitrary spectrum dimensions. This information is provided in a structure, ‘spec_par’. Then, ‘spec_par’ must have fields ‘spec_par.I’ to specify the intensity, and for each dimension, X, it must have the field ‘spec_par.deltaX’ to specify the position and either ‘spec_par.lwX’ or ‘spec_par.FWHMX’ to specify the linewidth. These fields follow the same formatting as in the ‘fit’ variable . One must also provide processing and acquisition information, and signal decay information. This is provided in a ‘par’ variable, which contains fields ‘par.dX’ for each dimension, X. Alternatively, one may provide a ‘shapes0’ structure, either being user generated, or generated by FitSpec. Finally, the lowest ppm value in each dimension must be provided in a vector, ‘f’, so that ‘f’ has one entry for each dimension. This is required because the ‘par’ variable or the ‘shapes0’ variable provide information on spectrum breadth and number of points in the spectrum, but do not specify its position.
To calculate a spectrum from ‘spec_par’ and ‘par’ variables:
calc_spec=FullSpecCalc(spec_par,par,f);
To calculate a spectrum from ‘spec_par’ and ‘shapes0’ variables:
calc_spec=FullSpecCalc(spec_par,shapes0,f);
Alternatively, if the ‘spec_par’ variable can be replaced by a ‘fit’ variable (the output from ‘FitSpec’). Then, INFOS can determine ‘f’ and ‘par’ from information stored in ‘fit’ (assuming it has not been deleted by the user). The user may edit the positions, intensities, and linewidths in the ‘fit’ to calculate differences in the spectrum.