How to make a Gaussian Fit?

Will Henney w.henney at astrosmo.unam.mx
Mon Feb 9 09:31:33 EST 2004


"Xcal" <paxcalpt at sapo.pt> wrote in message news:<40258ecd$0$16818$a729d347 at news.telepac.pt>...
> Anyone knows how to make a Gaussian fit to a histogram data using Python, or
> where I can find a library that helps me in this task?

This is a special case of non-linear fitting, which you can do with
the modules in ScientificPython. See
http://starship.python.net/~hinsen/ScientificPython/

Here is an extract from the relevant docs...

-----------------------------------------------------------------------
Module Scientific.Functions.LeastSquares
Functions

    * leastSquaresFit()

      General non-linear least-squares fit using the
Levenberg-Marquardt algorithm and automatic derivatives.
...
-----------------------------------------------------------------------

Cheers

Will



More information about the Python-list mailing list