help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gaussian fit of a peak


From: Rob Mahurin
Subject: Re: Gaussian fit of a peak
Date: Wed, 24 Sep 2008 11:26:23 -0400

On Sep 24, 2008, at 4:04 AM, Andrea Cimatoribus wrote:
Unfortunately, I am not sure I will be able to keep "central" area only, since I am fitting something that resembles a phonon spectra. In fact, I have multiple peakes to the left and right with respect to the "zero", but fitting everything with a gaussian balanced to the zero energy pretty well. I need to do this in order to sum spectra together. I will let you know if and how I solve this problem if it is of any intereset.
AC

The leasqr wrapper I mentioned can handle multiple overlapping Gaussians. You might wonder, for instance, whether a fit to two unresolved peaks gives a smaller chi-squared per degree of freedom than a fit to a single peak. This is what the "demo" does for a dodgy problem with two exponentials. (Though you have to find the chi2 yourself, sum( ((y-f5)./errscale).^2 ), after the demo runs, because I wasn't thinking of this when I wrote it).

If you have some constant background you'll have to subtract it by hand for now.

code, again, at
        http://sns.phys.utk.edu/~mahurin/octave/

Cheers,
Rob

--
Rob Mahurin
Dept. of Physics & Astronomy
University of Tennessee         phone: 865 207 2594
Knoxville, TN 37996             email: address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]