LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fitting a Lorentzian function to xy data

Solved!
Go to solution

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?

0 Kudos
Message 1 of 6
(5,800 Views)

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.

0 Kudos
Message 2 of 6
(5,772 Views)

Ah, I see! It's still a nice program though. Thanks I will take a look at these posts as you suggest.

0 Kudos
Message 3 of 6
(5,765 Views)
Solution
Accepted by topic author QuantumPenguin

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 😄

 

 

 

 

Message 4 of 6
(5,760 Views)

That's really excellent, it fit the data first time with no effort at all -- top man!!

0 Kudos
Message 5 of 6
(5,757 Views)

thanks, really helpful...

0 Kudos
Message 6 of 6
(5,688 Views)