SALTFIT is a Module to provide general fitting of arrays by SALT talks. The task will provide non-interactiving fitting of 1- and 2-D arrays and allow fitting of general functions to the parameters.
It will provide an easy function to call to fit 1-D arrays of data including fitting with errors in both dimensions, iterative fitting, and fitting an array of functions. The functions to allow fitting include legendry, chebyshev, polynomial, and spline functions.
Given an x and y data arrays, find the best fitting curve
x - list or array of x data
y - list or array of y data
yerr - error on y data
coef - Initial coefficients for fit
options include polynomial, legendre, chebyshev, or spline
order - order of the function that is fit
Return the chi^2 of the fit
Error function to be minimized in least-squares fit
Fit the function to the data
Set the coefficients for the fits for poly, legendre, and chebyshev
Set the function that will be used. * function - name of function to be used
It will throw an error if an inappropriate function is given
Set the weighting for spline fitting
Return the RMS of the fit
Bases: saltfit.curfit
x - list or array of x data
y - list or array of y data
yerr - error on y data
coef - Initial coefficients for fit
options include polynomial, legendre, chebyshev, or spline
order - order of the function that is fit
thresh - threshold for rejection
niter - number of times to iterate
Fit a function and then iterate it to reject possible outlyiers
set the arrays using a mask
Set the mask according to the values for rejecting points
linear least square polynomial fit with sigma-clipping
This is currently used in SALTBIAS and should be made obselete
A class to produce a polynomial term of power n.
This has similar behavior to scipy.special.legendre