Sat, 08/01/2020 - 11:10 am
I was just wondering is there any scope to do a Gaussian fit to the 2 or 3 peaks that correspond to the highest peak values among all the peaks in a waveform and extract the fit values?
Let me clear it a little bit.
My fit function is like y=A+Bx+C*exp^-((x-x0)/w)^2 and I want to fit it to the 2 or 3 highest peaks in the waveform.
Notice that I need to do it for hundreds of waveforms that reside in a single wave and extract the fit values, so I understand I need to use a loop to go through all the waveforms.
I found one scope in Igor which is for multipeak fitting and good for just one fit at once but don't think that would be conevenient to use as a loop that will read hundreds of waveforms in a single wave.
In the attached experiment, CutDFrmRealWF (y value), CutTimFrmRealT (x value) are examples of a single waveform and they are one cut from RealWaveForms and RealWavTime waves which contain hundreds of them. I want to do the fit for 2/3 highest peaks in the CutDFrmRealWF vs CutTimFrmRealT plot and iterate it for for all waveforms residing RealWaveForms and RealWavTime waves and extract the fit values.
I guess the alogorithm should be like look for all peaks in each waveform and then fit to the highest 2 or 3 peaks (whatever I choose the number) and then use a loop to do it for all waveforms. Or, is there any simple way to do it?