Parameters for Fano fit

88 views
Skip to first unread message

Praveen Selvakumar

unread,
Jun 25, 2024, 6:53:48 AM6/25/24
to lmfit-py
Hi all,

I'm new to LMFIT and I'm trying to fit my Raman data using Lorentzian and BWF fit. I'm not sure about the right parameters for my BWF fit q-value. If I chose a negative value (left side asymmetry) it fit well with the experimental data. But when you compare the height of the BWF peak, it is larger than the Lorentzian peak, which is not true from the experimental measurement. Is there any way to assess the good curve fit?

Please guide me. Thanks!

BWF2.png
BWF1.png
BWF fit.txt

Matthew Newville

unread,
Jun 25, 2024, 12:29:44 PM6/25/24
to lmfi...@googlegroups.com

Hi Praveen,

 

> I'm new to LMFIT and I'm trying to fit my Raman data using Lorentzian and BWF fit. I'm not sure about the right parameters for my BWF fit q-value. If I chose a negative value (left side asymmetry) it fit well with the experimental data. But when you compare the height of the BWF peak, it is larger than the Lorentzian peak, which is not true from the experimental measurement. Is there any way to assess the good curve fit?

 

It looks like the isolated Lorentzian peak really is shorter than the Breit-Wigner-Fano peak.  In the full model (and so probably also in the data), the BWF peak has a persistent tail in the region of the Lorentzian peak.  There is also the quadratic background, though that looks about equal at the two peaks in the data.

 

For assessing the quality of the fit, a plot like you have made is an important step.  The fit statistics in the report are also very useful, especially for comparing two different fits.   Ideally, the absolute values of chi-square and reduced chi-square can be used as objective “Goodness of Fit measures”, but that requires scaling the misfit by the size of the uncertainty in the data. 

 

But I think it is also very common in the physical sciences to be a little more informal and say that because there is some (but not too much) noise in your data, and because the fitted model matches the data at “about the noise level”, that this is a reasonably good fit.  I would also say that: you get uncertainties estimated in the parameters, and they are not absurdly high, so that gives some confidence that the fit is not a terrible modeling of the data.  

 

--Matt

 

 

--
You received this message because you are subscribed to the Google Groups "lmfit-py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lmfit-py+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lmfit-py/01198771-0b8b-4f71-b81a-0d638ecc744bn%40googlegroups.com.

Praveen Selvakumar

unread,
Jun 27, 2024, 7:35:59 AM6/27/24
to lmfit-py
Hi Matt,

Thanks for the quick response. I really appreciate your help. 

But I'm still not sure about selecting the right q-value for BWF fit. Here is another example in which I used a positive q-value and you can see from the result that it estimated to the maximum value (and increase in reduced chi-square). I'm not sure about the reason behind this. 

Is there any way to estimate the right q-value based on the asymmetry of the peak?

Looking forward to it. Thanks. 
PositiveBWF.txt
download.png

Matt Newville

unread,
Jun 29, 2024, 12:10:20 PM6/29/24
to lmfi...@googlegroups.com
On Thu, Jun 27, 2024 at 6:35 AM Praveen Selvakumar <pravee...@gmail.com> wrote:
Hi Matt,

Thanks for the quick response. I really appreciate your help. 

But I'm still not sure about selecting the right q-value for BWF fit. Here is another example in which I used a positive q-value and you can see from the result that it estimated to the maximum value (and increase in reduced chi-square). I'm not sure about the reason behind this. 


It looks like the fit pushed the value of Q to the bound of 100 that you defined and stopped there.  It also looked like the fit push the peak center far outside the data range -- If a component essentially ends up being zero over the whole range of the data, its parameters won't affect the fit.  Do pay attention to that warning in the report of 
       Warning: uncertainties could not be estimated

Some of the parameters are having no impact on the fit.

I don't know why some peaks would use Lorentzian lineshapes and others use BWF lineshapes, but maybe that is expected and understood for these data.

This data looks different from the earlier example you posted.  Comparing chi-square between datasets is not easy to do unless you are careful about setting the uncertainties.   So, there is not an easy way to tell whether that chi-square is "good" or not.

Is there any way to estimate the right q-value based on the asymmetry of the peak?

I don't use the BWF lineshape much except in examples.  I suggest playing around with the values and seeing what it does or looking at the Raman spectroscopy literature.

--Matt

Reply all
Reply to author
Forward
0 new messages