[SciPy-user] scipy.optimize.leastsq error estimates

Ewald Zietsman ewald.zietsman at gmail.com
Tue Feb 6 03:02:26 EST 2007


Hi all,

I want to fit a sinusoid of the form A*cos(2*pi*f*t) + B*sin(2*pi*f*t) to
irregularly spaced data so that I can get a wave of the  form C*cos(2*pi*f*t
+ phi) where C**2 = A**2 + B**2 and phi = arctan(-B/A). I have implemented
this using the leastsq function but, I'd would like to also know the
variances ( or standard errors ) of A,B and f. Is there a way I can get the
variance-covariance matrix out from leastsq? or at least get a good estimate
of the standard errors of my unknowns?

-Ewald Zietsman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20070206/a8719bcf/attachment.html>


More information about the SciPy-User mailing list