pyhrs:docs

iterfit1D

pyhrs.iterfit1D(x, y, fitter, model, yerr=None, thresh=5, niter=5)[source] [edit on github]

Iteratively fit a function.

Outlyiers will have a reduced weight in the fit, and then the fit will be repeated niter times to determine the best fits

Parameters:

x: numpy.ndarray

Arrray of x-values

y: numpy.ndarray

Arrray of y-values

fitter: ~astropy.modeling.fitting

Method to fit the model

model: ~astropy.modeling.model

A model to be fit

Returns:

m: ~astropy.modeling.model

Model fit after reducing the weight of outlyiers

Page Contents