iterfit¶
-
pydl.pydlutils.bspline.iterfit(xdata, ydata, invvar=None, upper=5, lower=5, x2=None, maxiter=10, **kwargs)[source]¶ Iteratively fit a b-spline set to data, with rejection.
Parameters: xdata :
numpy.ndarrayIndependent variable.
ydata :
numpy.ndarrayDependent variable.
invvar :
numpy.ndarrayInverse variance of
ydata. If not set, it will be calculated based on the standard deviation.Upper rejection threshold in units of sigma, defaults to 5 sigma.
Lower rejection threshold in units of sigma, defaults to 5 sigma.
x2 :
numpy.ndarray, optionalOrthogonal dependent variable for 2d fits.
maxiter :
int, optionalMaximum number of rejection iterations, default 10. Set this to zero to disable rejection.
Returns: tuple()A tuple containing the fitted bspline object and an output mask.