[SciPy-User] Fitting Gaussian in spectra
J. David Lee
johnl at cs.wisc.edu
Thu Oct 4 08:57:13 EDT 2012
Hi,
I know I'm a bit late to the discussion, but I have some experience
fitting emission lines. Here's what I've found to work:
*) Fit the lines and background together
*) Use the simplest reasonable model for the background: constant,
linear, etc.
--> You could measure the background and construct a model using
linear interpolation
*) Put the characteristics of your detector in your model:
-> Line-width (fwhm) vs energy
-> Detector efficiency vs energy
*) If you know the possible lines you'll be looking for, put those in
your model as well
If you don't know what lines to expect, but know the shape of the peaks
you're looking for, you might look at using MPOC-MLE, which is described
reasonably well in the paper "Pileup Correction Algorithms for
Very-High-Count-Rate Gamma-Ray Spectrometry With NaI(Tl) Detectors" by
M. Bolic. I've implemented a modified version of the algorithm for
counting x-rays from detectors in pulse-mode, and it's the most robust
algorithm I've been able to find for that purpose.
I hope this helps.
David
On 09/30/2012 03:54 AM, Jerome Kieffer wrote:
> On Sat, 29 Sep 2012 00:15:21 +0530
> Joe Philip Ninan<indiajoe at gmail.com> wrote:
>
>> 1) fit the continuum and subtract it.
>> Or is there any other module in python/scipy which i should give a try?
>> Thanking you.
> Iteratively apply a Savitsky-Golay filter with a large width(>10) and a low order (2).
> at the begining you will only smear out the noise then start removing peaks.
>
> SG filter are really fast to apply.
>
More information about the SciPy-User
mailing list