fitPeaks | index /usr/local/python/epics/fitPeaks.py |
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.
Author:
Mark Rivers
Modification history:
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
1998.
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.
Modules | ||||||
|
Data | ||
__file__ = './fitPeaks.pyc' __name__ = 'fitPeaks' |