dofit

sofia_redux.toolkit.fitting.fitpeaks1d.dofit(fitter, model, x, y, **kwargs)[source]

A simple wrapper to fit model to the data

This is a convenience function that throws out the masking array returned by astropy.fitting.FittingWithOutlierRemoval and just returns the actual fit.

Parameters:
fitterfitting object
modelastropy.modeling.Fittable1DModel

The model that the solver will use to fit the data.

xarray_like of float

(N,) array of independent data to fit

yarray_like of float

(N,) array of dependent data to fit

Returns:
astropy.modeling.Fittable1DModel

A new model containing the fitted parameters.