[SciPy-user] using errors in scipy.optimize.leastsq

Robert Kern robert.kern at gmail.com
Sat Apr 14 18:57:05 EDT 2007


Tommy Grav wrote:
> I am using scipy.optimize.leastsq to fit a sinusoid function to a set of
> observations given by three arrays atime,amag,aerr. I am able to make
> the leastsq function find what seems to be the appropriate solution,
> but I am now wondering how to use the amerr (the array of errors in
> the measurement to weight the individual points used in the solution.
> Does anyone have any hints for doing this?

diff /= merr

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco



More information about the SciPy-User mailing list