05-17-2006 04:15 PM
05-17-2006 10:33 PM
Hi Brian
I do not have LV8 at hand, but did you try to compare the Gausian fit in LV8 to Matlab?
cheers
Pawel
05-18-2006 08:11 AM
05-18-2006 09:47 AM
05-18-2006 03:54 PM
I was unaware that there was so much overhead associated with the formula string version. Thanks for pointing that out. Unfortunately, I picked what at the time was the easiest method of inputting the model, but easiest is rarely best 🙂 . I have attached a zip file containing essentially the same VI that was uploaded for the thread concerning the Nonlinear Curve Fit. I changed it so that both the Nonlinear Curve Fit and Gaussian Fit vi's are used to fit the data. The model being input to the Nonlinear Curve Fit is the same as that used by the Gaussian Fit, and all of the parameters are free. Because of that, the bug in Nonlinear Curve Fit should not show up. I included a couple more example datasets. The problem I was noticing can be seen by examining the CENTER parameter that is output from each function. For the Nonlinear Curve Fit, this parameter is being calculated ok insofar that it is an interpolated value of the location of the peak. The output from the Gaussian Fit however is merely the maximum data point, which can be verified by checking the text file for the data being input. This behavior occurs for no specification of initial parameter values. If I wire in the initial guesses (which are reasonably close to the real values), the final values do not change from the initial inputs. I would ignore the time165_aug.txt file since that data is noisy. This would be the reason why I had to "help" the Nonlinear Curve Fit by determining the peak location by other means.
I will certainly get performance data on the C implementation and post the full results. Since there seems to be such a significant difference between the two Nonlinear Curve Fit input methods, I am very interested to see how this compares. For now, the timing should be considered an upper limit since I am working on linking the C version with the lower level BLAS libraries. I am curious. Since the Gaussian Peak Fit immediately calls an external library function to do the fitting, is it using a lower level implementation of Levenberg-Marquardt, or is it even using that algorithm, because there are others.
Brian.
05-18-2006 10:04 PM