Multiple Peak Types for MPF2_AutoMPFit Function
emh613
I am using the MPF2_AutoMPFit function to simultaneously perform fits for large sets of Raman data. This is working perfectly except for one issue. In order to obtain reliable fits for my data I need to fit a Lorentzian peak and a Gaussian peak with a linear baseline over a specific range of interest. To my knowledge, it is only possible to specify a single peak type when calling MPF2_AutoMPFit. I am wondering if there is a way to somehow specify multiple peak types when calling the MPF2_AutoMPFit function, or if anyone knows how to modify the function in order to include multiple peak types?
Currently, I am entering the following command and fitting with two Gaussian peaks:
MPF2_AutoMPFit("Fit_Info", "Gauss", "Peak %d Coefs", "Linear", "Baseline Coefs", ywavelist, xwavelist, 0, StartPoint=0, EndPoint=1111)
Thanks!!
EH
No, not presently.
Of course, the GUI knows how to call MPF2_DoMPFit() in order to fit multiple peak types. And MPF2_AutoMPFit() calls MPF2_DoMPFit() (which is the engine for the whole package), so in principle it should be possible. Just to start with, the second input where you have "Gauss" would have to be changed to either a text wave or string list to allow specifying a peak type for each peak.
Since you have just two peaks and linear baseline, perhaps you could write a special-purpose user-defined fit function that does what you want. Then you could use the Batch Curve Fit package to fit your multiple data sets.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
May 11, 2016 at 12:37 pm - Permalink