[SciPy-user] linear (polynomial) fit with error bars
Gerard Vermeulen
gav451 at gmail.com
Tue Apr 8 14:15:05 EDT 2008
On Tue, 08 Apr 2008 18:13:04 +0200
massimo sandal <massimo.sandal at unibo.it> wrote:
> Fabrice Silva ha scritto:
> > Le mardi 08 avril 2008 à 13:00 +0200, massimo sandal a écrit :
> >> Hi,
> >>
> >> Is there a scipy implementation of linear fit that keeps into
> >> account the existence and width of error bars for each point? I
> >> googled but I can't find that.
> >
> > What about computing least squares approximation using weightening
> > coefficients inversely proportional to value incertainty (i.e.
> > length of each error bars) ?
>
> Yes, that's what I was trying to ask.
> But I can't find the function that does it (if it exists).
>
> m.
>
You are looking for scipy.odr (requires scipy-0.6 or later).
It is much more useful to fit experimental data than leastsq.
Gerard
More information about the SciPy-User
mailing list