
MultiPeak Fit results in waves?

After doing a multipeak fit, I would like to have waves containing the coefficients from the fit. For example, if I fit to a wave that has several lorentzian peeks, I would like one wave with all the peak locations, another wave with all the peak areas, etc. Very much like the columns in the notebook created by MPF2_TabDelimitedResultsBtnProc. (Why does that button generate a notebook and not a table?)
We can generate that notebook and copy and paste into a way, but 1) that isn't very elegant, and 2) we lose information from the rounding that happens.
I think the answer is that I need to write a function patterned off of MPF2_TabDelimitedResultsBtnProc, but if you have already done something like that, please let me know.
Michael
Welcome to the forum.
First, you might want to discern between coefficients (directly used as parameters in the fit) and derived values (such as FWHM or area). There about a hundred ways you can access the data and similarly many ways users might want their output formatted. Multipeak Fit offers a few of the most common ones. But there are several ways to achieve what you want very easily:
I usually do the last option for convenience. Here is a small script which should give you the idea:
Note that, and this is important, MPF2_ResultsListWave only is updated when you press the Peak Results button and not when you do the fit. This wave is for displaying results after all and was not intended for extracting results.
July 8, 2025 at 09:36 pm - Permalink