Fits a spectrum to a set of Gaussian peaks. This class is independent of the
Mca class library, except that the "fit" and "peak" objects used must have
the fields defined as they are for the McaFit and McaPeak classes.
Mark Rivers, October 21, 1998.
This is the latest re-write of a routine which has a long history, begun
at X-26 at the NSLS. The original version was written in a program called
SPCALC, and was then ported to IDL.
These early versions used IMSL for the least-squares routine. The port to
CURVEFIT, so that no external software package is required, was done in
Mark Rivers, Nov. 12, 1998.
Significant re-write to use MPFITFUN in place of CURVEFIT
Mark Rivers, Feb. 1, 2001.
Changed amplitude ratio calculation so that the AREA of the two peaks
has the specified ratio, rather than the AMPLITUDE. This is done by
adjusting the constrained ratio by the relative peak widths.
Mark Rivers, Sept 18, 2002.
Converted from IDL to Python.
Sept 25., 2002 MLR
- Previously several fields in the peaks could be clobbered if a
peak was outside the energy range of the spectrum. Added new .ignore
field to McaPeak to work around this problem and use that field here.
|__file__ = './fitPeaks.pyc'|
__name__ = 'fitPeaks'