Sum of fits:funfit

Dear Helpers,

Thank you in advance for whatever assistance you may provide me with.
I read the manual about sum of several fits on a wave and I have failed to understand how to do it so given my specific problem.

THE PROBLEM:

We have to waves: we call one of them as ywave and the other one xwave. Both ywave and xwave are translated in space by a certain unknown quantity, lets say y0 and x0 respectively. To find these quantities,recurring to the Levenberg–Marquardt algorithm, I would like to do several fits on discrete regions of corresponding sections of ywave and xwave and let the sum of fits determine automatically the values for y0 and x0.
To illustrate with and example, lets imagine we have 5 discrete regions that we would like to fit with a given function. We shall call each discrete region as "peak". Each peak has then 3 fitting parameters and one independent variable (xwave). The fitting parameters are: L,x0,y0. L is different for each of these peaks but x0 and y0 should be the same. If I would do individual fits on each of these peaks I would get a different vale for L,x0,and y0. I would like to know how to use the funcfit command to do this so in the end I will have x0 and y0 from all fits altogether, and the 5 different values for L.
From what I read from the manual this should be possible, but I have been quite confused on how to do it.

Again, thank you in advance.
I look forward to hearing from you.

Sincerely,

John
Your use of the word "peak" suggests that you might be able to use the MultipeakFit package. For a demo, File->Example Experiments->Curve Fitting->Multi-peak Fit 2 Demo.pxp.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
johnweeks wrote:
Your use of the word "peak" suggests that you might be able to use the MultipeakFit package. For a demo, File->Example Experiments->Curve Fitting->Multi-peak Fit 2 Demo.pxp.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com


Thank you for your suggestion John. The problem here is the following: my "xwaves" are not monotonic, not even when you smooth them heavily (not in my best interest anyway). The other problem is that I need to cycle through around 4000 different pairs of "ywaves" and "xwaves" to find these peaks. Therefore I would rather have an automated routine that could potentially find these peak positions in a more automated fashion.
chungadaddy wrote:
The problem here is the following: my "xwaves" are not monotonic, not even when you smooth them heavily (not in my best interest anyway). The other problem is that I need to cycle through around 4000 different pairs of "ywaves" and "xwaves" to find these peaks. Therefore I would rather have an automated routine that could potentially find these peak positions in a more automated fashion.

OK, my "easy" answer didn't work out :)

I re-read your original posting more carefully. It sounds like you have two data sets with peaks in them that you expect to be at the same place in both. But something about the measurement results in errors in the positions, and you want to determine that error by fitting.

So now my understanding is this: you have two data sets with certain peaks that you expect to be in certain positions. You want to do a fit that determines an offset between the expected position and the measured position. You expect the offset to be the same for all the peaks in a given data set, but the uncertainties involved cause small variations unless you fit all peaks together. I am certain that we can come up with something, but I think perhaps you should send me an example of your data. It would be helpful if you could annotate a graph with notes about the features that you are trying to fit. Send an Igor experiment file to support@wavemetrics.com.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com