11-13-2017 02:02 PM - edited 11-13-2017 02:03 PM
Hello all,
I am trying to fit a lorentzian to my data (see attached for a sample). The peak, is extremely narrow, but it is for sure a lorentzian. I was trying to make the example I found in this post from altenbach work:
https://forums.ni.com/t5/LabVIEW/Lorentzian-Curve-fitting/m-p/208738#M118192
Unfortunately I can't get anything out of this
Can anyone suggest or provide a rough example?
Solved! Go to Solution.
11-13-2017 03:51 PM - edited 11-13-2017 03:53 PM
No, don't use this ancient code. This is from a time where the LabVIEW nonlinear fitting tools were a bit limited.
If you have a single lorentzian, you can estimate the position, vertical offset, height and width easily from the data. All you need is "nonlinear curve fit" and a model VI that generates a lorentzian from the same x-values as your data.
You probably need at least 4 parameters: area, position, width, offset.
I would recommend to start here.
11-13-2017 04:37 PM
Ah, I see! It's still a nice program though. Thanks I will take a look at these posts as you suggest.
11-13-2017 04:47 PM
Here's a very rough draft that seems to work just fine (LabVIEW 2014). It is hard to define a Lorentzian with about 5 noisy points 😄
11-13-2017 04:50 PM
That's really excellent, it fit the data first time with no effort at all -- top man!!
11-17-2017 04:04 PM
thanks, really helpful...