default fit curve not correct
tyjhit
I had a strange curve-fitting problem which I don't know the reason.
I tried to fit a curve with a user defined function through the fitting dialog.
The User defined function contains some Global waves.
When I run the fit, it seemed everything works except that the default fit curve that automatically append to the figure is not the right one.
Since it does not fit the original curve at all. The strange thing is that the residual wave shows quite good fit.
Also, if I make and chose the destination wave and append it to the graph, it fit the original curve quite well.
As shown in the figure and files that attached.
Anyone knows the reason?
Thanks a lot in advance!
Yujin
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
November 14, 2013 at 08:26 am - Permalink
It can be quite difficult to make a fit function like yours work correctly with the autodestination wave. Be sure to read carefully the second example ConvFit function in
DisplayHelpTopic "All-At-Once Fitting Functions"
An alternative is to use /D= instead of /D alone. In that case, you provide a fit wave that matches your input data exactly. Your fit function will not have to deal with waves having unexpected characteristics. I see that you have done that with your wave RealFitWave.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
November 14, 2013 at 09:31 am - Permalink
I checked this, but it should not be the reason.
Possiblely, @johnweeks is right, the default number of data point might be the reason.
I would check this now.
November 15, 2013 at 12:17 am - Permalink
I would check this data-point issue now.
For this "All-at-Once fitting", I can figure out how to circumvent this problem.
But in the Global_fit dialog, there is no such option.
Fortunately, the global fit optical pop-up a new graph indicates that my fitting works.
I would like to know, is there any similar solution for this Global_analysis package?
Do you think my problem can be solved by modifying my Fit_Function or not?
Thanks again?
Yujin
November 15, 2013 at 12:32 am - Permalink
Indeed, Global Fit assumes that your fitting function will behave correctly with any destination wave.
There is no solution other than modifying the Global Fit code. It would not be easy to do.
In general, yes, it is always possible to write your fit function to properly handle the autodestination wave. But it can be quite tricky. Since you say that the final result of Global Fit is correct, it may not be worth the trouble.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
November 18, 2013 at 10:25 am - Permalink
Your comments are quite helpful!
Yujin
November 19, 2013 at 01:03 am - Permalink