Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: sinusoidfitter.eval - Function Up: sinusoidfitter - Tool Previous: sinusoidfitter - Tool


sinusoidfitter.fit - Function



Package utility
Module mathematics
Tool sinusoidfitter


Fit a sinusoid to data


Synopsis
fit(state, x, y, sigma)


Arguments

state   The state of the fitter after the fit. (Output)
x   (Input)
y   Must be the same length as ``x''. (Input)
sigma   Errors in the ``y'' values. (Input)
    Default: 1.0


Returns
Bool -- did the function call succeed


Description
Fit a sinusoid to data. If sigma does not have the same number of elements as x and y (which is the case with the default value for this argument) then the fitter assumes that all y values have the same sigma. The state record has the following fields:
converged
A boolean. When true, the fit has converged.
curriter
The number of iterations actually used in the most recent fit.
maxiter
The maximum number of iterations to perform during any invocation of the fit function. The default value is 10
criteria
The convergence criteria. If the change in the value of $ \chi^{2}_{}$ between two subsequent iteration is less than this value, then the fit is considered to have converged. The default value is 0.001
chisq
The $ \chi^{2}_{}$ for this fit.
amplitude
The amplitude of the sinusoid.
period
The x distance between peaks of the sinusoid.
x0
The x location of one peak of the sinusoid.
amplitude_error
The 1-sigma error in the amplitude, from the covariance matrix.
period_error
The 1-sigma error in the period, from the covariance matrix.
x0_error
The 1-sigma error in x0, from the covariance matrix.
covariance
The covariance matrix, the diagonal is used to determine the errors in the parameters.





next up previous contents index
Next: sinusoidfitter.eval - Function Up: sinusoidfitter - Tool Previous: sinusoidfitter - Tool   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15