All peaks the same while using MPF2_AutoMPFit

Dear Support,

I'm trying to fit a spectrum of 12 clearly defined peaks using a programmatic approach. For that I use MPF2_AutoMPFit with the below syntax:

 

MPF2_AutoMPFit("fitting","Lorentzian","coef","none","","root:Nicprofile","",5,doFitCurves=1,minAutoFindFraction=0.005)

I'm not getting any errors during fitting (returned value is 0), but all fitted peaks are exactly the same and the resulting ensemble fit is also one peak (see attached picture).

When I'm using the Multi-peak fit 2.0, the fitting is finished with the desired effect.

Can anyone explain what is happening?

Kind regards, Jakub

Fitting error

Hi Jakub, I am not sure I can follow what your problem is. Your MPF2_AutoMPFit() call looks mostly fine, and you forgot(?) to attach a screenshot of your AutoMPFit output (the screenshot shows only the user interface which worked fine?). What is the same: Peak type (this is expected), peak position, width etc.? You seem to get 12 peaks from AutoMPFit, so I don't think the peak guessing is problematic. Please describe your problem in more detail, and if possible attach an example experiment.

By the way, the peaks in your data do not seem to be Lorentzian, but more of the ExpModGauss or DoniachSunjic type. May I ask what kind of data this is?

In reply to by chozo

Hi and thanks for your answer. 

You can see the outcome on the left, in the data browser. The wave that is highlighted for a quick look has only one peak and should have all 12 peaks present together in one fitted function. When I scroll through all the waves that should have different fitted peaks in them, they all contain exactly the same peak. 

The data are an outcome of an aerosol mass spectrometer in, so-called, puff-by-puff regime. On the Y-axis there is a ppm concentration of the measured compound and on the Xaxis just time elapsed from start. There are 12 puffs, resulting in 12 peaks of the analyzed substance.  

By the way: the fitted function is Lorentzian - you can see it in the GUI version of the multiple peak fitting function. That was just shown to demonstrate that the GUI version works, while called stand-alone function doesn't. I'm using Igor 8. 

OK, thank you for the explanation. I am really surprised that the AutoMPFit peak finder finds 12 peaks but in the end they all turn out to be the exact same. It seems that the peak finder initially finds the correct peaks, but then something happens while fitting. As I said, your MPF2_AutoMPFit() call looks fine to me. Could you provide this one experiment file (or at least this one data set) here as an attachment or is this not possible? You could also send the file and your question directly to the support in a non-public manner.

Not sure if it matters, but it appears that in the multipeak UI you are fitting an X-Y pair, and in the function call I don't see an X-wave name.

In reply to by tony

tony wrote:

Not sure if it matters, but it appears that in the multipeak UI you are fitting an X-Y pair, and in the function call I don't see an X-wave name.

 

That was just the attempt to see if it matters. It doesn't. Neither given X wave nor _calculated doesn't change the way the called function is behaving...

Using the x-wave should only make a difference if the x values are highly non-linear or otherwise problematic. But of course, you will not get the correct positions out of the fit this way, unless your y-wave has the correct scaling already.