[AstroPy] Gaussian with constant background

Ian Crossfield ianc at ucla.edu
Wed Jun 27 17:36:31 EDT 2012

I have also had good results with the Kapteyn package, which has an 
updated implementation of MPFIT.


On 6/27/12 1:15 PM, Taro Sato wrote:
> On Wed, Jun 27, 2012 at 1:10 PM, Vivienne Baldassare
> <vivienne.baldassare at gmail.com>  wrote:
>> Hello,
>> I've been trying to figure out how to fit a gaussian with a constant
>> (non-zero) background.  Aside from just subtracting off the background, I
>> haven't been able to do it, and googling around was not particularly
>> helpful.  I'd appreciate any tips!
> Why don't you learn how to use some generic non-linear fitting routine
> like scipy.optimize.leastsq?  Once you learn how to do this, you can
> basically fit any analytical function you like.  A few good examples
> in the following page:
> http://www.scipy.org/Cookbook/FittingData

Ian Crossfield
UCLA Astronomy and
Max-Planck Institüt für Astronomie

More information about the AstroPy mailing list