Currently, I am doing a lab in school on atomic spectroscopy. After taking readings of strong emission lines of various elements, I have fit the data using a Voigt Profile function from lmfit. The function minimizes the reduced chi-squared and returns the best fit along with fitting parameter values (center, amplitude, sigma, gamma). I am mainly interested in the center of the line profile. But, what is the uncertainty in this reported center? Or how would I report the measurement and its uncertainty.
1 Answer
If you are doing chi-squared fitting, then a value for the uncertainty (or an estimate) should have been returned by the software. If not, you could perhaps manually estimate by fixing the line centre at various values, allowing the other parameters to be fitted, and seeing where the minimum chi-squared increases by 1 over the global minimum.
Failing that, output your spectrum as an ASCII file and fit it with something that does provide uncertainties like gnuplot.
Failing that, here's a rule of thumb. The line centre is determined with a precision given by the FWHM divided by the signal to noise ratio per pixel.
Note that none of the above take any account of uncertainties in the wavelength calibration.
EDIT: It appears that lmfit does estimate uncertainties. https://lmfit.github.io/lmfit-py/confidence.html
-
$\begingroup$ I would add that the OP should take the time to learn in detail what the particular python tool he's using does, how it does it, and why. I might start by telling him to use scipy because it's a more reliable (vetted, reviewed) package than some random GitHub tool. $\endgroup$ Dec 2, 2019 at 15:03
-
$\begingroup$ I left this comment in review before seeing your answer. I know that strong correlations are "bad" and can cause problems especially when the quality of the fit is poor, but I don't know how to articulate that accurately. $\endgroup$– uhohDec 3, 2019 at 2:28
out.fit_report()
method shown in your linked documentation? Search for "+/-" I think that's what you are looking for. However, I am not sure that's the whole story because when strong correlations are present (those are also included in the fit_report) then a poor fit may have worse uncertainties than the +/- might suggest. Now that's a question for Cross Validated SE! $\endgroup$