03-19-2007 10:29 AM
03-19-2007 11:10 AM
03-19-2007 11:31 AM
My data sets aren't very big, it's just that there are lots of them.
The data is usually about 40 to 80 data points, but there are 600 graphs which i would like to fit.
Memory shouldn't be a problem, i'm just curious whether i could fit these peaks in labview
aleks.
03-19-2007 11:54 AM
@labuda wrote:
I have an immense data set.I would like to automate a curve fitting algorithm into labview. Is it possible:1. To curve fit a Lorentzian +Gaussian function to a graph?2. To curve fit a Lorentzian Convoluted by a Gaussian + a Gaussian simultaneously to a graph?
The answer by Eleno seem to deal with the statement "I have an immense data set". This seems secondary to your question and only a side-issue. The abiilty to fit to a gaussian, Loretzian, or Voight Lineshape should not really depend on the size of the dataset, as long as you have enough datapoints to fully describe the function. 🙂
I also don't know the colloquial conversion factors. What is "immense"? 1E4? 1E5? 1E6? ...???
YES, you can fit whatever function you want. Since we have a nonlinear function, you should use the levenberg-Marquardt method with a subVI model (not formula!).
What is your LabVIEW version? Fitting the convolution in LabVIEW 7.1 or lower will not be easy, because the function needs to be calculated point-by-point. A convolution however acts on the entire data array at once, so you would need quite a bit of extra code to deal with it. It is doable, but probably painful.
If you have LabVIEW 8.0 or higher, the fitting works directly with arrays and many other improvements have been made over earlier versions. It should be no problem to fit your function.
Back you the science of your question:
@labuda wrote:
1. To curve fit a Lorentzian +Gaussian function to a graph?2. To curve fit a Lorentzian Convoluted by a Gaussian + a Gaussian simultaneously to a graph?
Again, I assume your problem is with the fitting, and not with the graphing.
What do you mean by (1). e.g.:
For (2), what do you mean by "simultaneously"? You just need to fit with multiple models, then display all the results at once.
How does your data look like?
03-19-2007 11:59 AM
@labuda wrote:
Memory shouldn't be a problem, i'm just curious whether i could fit these peaks in labview
03-19-2007 02:35 PM
Hi,
I have labview 7.1, but my friend has 8.0, so i could program it on his computer.
My data is basically 41 or 61 or 81 data points that look like a gaussian peak. However, physics tells us that there should be 1 small gaussian peak, centered at zero, and one large lorentzian peak, which is convoluted by a gaussian. The reason that the lorentzian is convoluted by a gaussian is because the resolution of the instrument was limited, so the lorentzian is slightly broadened.
How would i go about programming this fit in labview 8.0?
Thanks
aleks.
03-19-2007 03:40 PM - edited 03-19-2007 03:40 PM
@labuda wrote:
My data is basically 41 or 61 or 81 data points that look like a gaussian peak. However, physics tells us that there should be 1 small gaussian peak, centered at zero, and one large lorentzian peak, which is convoluted by a gaussian. The reason that the lorentzian is convoluted by a gaussian is because the resolution of the instrument was limited, so the lorentzian is slightly broadened.
How many adjustable parameters do you need to fit? What parameters are fixed and known?
In any case, in LabVIEW 8.0 you would use "Nonlinear Curve Fit LM" from the fitting palette. Right-click it to find examples.
Let me know if you get stuck!
Message Edited by altenbach on 03-19-2007 01:40 PM
03-19-2007 09:55 PM
03-19-2007 11:41 PM - edited 03-19-2007 11:41 PM



Message Edited by altenbach on 03-19-2007 09:43 PM