[Numpy-discussion] Gaussian fits? Sum of Gaussians?

konrad.hinsen at laposte.net konrad.hinsen at laposte.net
Tue Mar 8 09:53:31 CST 2005


On Mar 7, 2005, at 9:08, Christian Meesters wrote:

> I was wondering whether there are scripts or modules around which can 
> calculate, on a given 1D-Numarray or Numeric array, a sum of 
> Gaussians? E.g. something

That doesn't look like a well-defined problem. At the very least, you 
will have to provide the code with the number of Gaussians that you 
want to fit. But even then, unless your data has particular properties, 
this is likely to result in an ill-defined fit problem. While the sum 
of several Gaussians is not a Gaussian itself, it can look very very 
similar, depending on the parameter combinations.

I don't think that the kind of black-box function you are looking for 
exists, and I think that in the long run this is good for you.  There 
is code for the tough part of the task, nonlinear curve fitting (both 
in my ScientificPython library and in SciPy, with different strong and 
weak points). If you make the effort to formulate your problem in terms 
that such routines can handle, you can be reasonably sure that you have 
understood your problem and the solution approach, i.e. you know what 
you are doing.

Konrad.
--
---------------------------------------------------------------------
Konrad Hinsen
Laboratoire Léon Brillouin, CEA Saclay,
91191 Gif-sur-Yvette Cedex, France
Tel.: +33-1 69 08 79 25
Fax: +33-1 69 08 82 61
E-Mail: khinsen at cea.fr
---------------------------------------------------------------------





More information about the Numpy-discussion mailing list