AstropyFitter1D

class glue.core.fitters.AstropyFitter1D(**params)[source]

Bases: glue.core.fitters.BaseFitter1D

A base class for wrapping astropy.modeling.

Subclasses must override model_cls fitting_cls to point to the desired Astropy model and fitter classes.

In addition, they should override label with a better label, and parameter_guesses() to generate initial guesses

Attributes Summary

fitting_cls class to fit the model
label UI Label
model_cls class describing the model
param_names

Methods Summary

fit(x, y, dy, constraints)
parameter_guesses(x, y, dy) Provide initial guesses for each model parameter.
predict(fit_result, x)
summarize(fit_result, x, y[, dy])

Attributes Documentation

fitting_cls = None

class to fit the model

label = 'Base Astropy Fitter'

UI Label

model_cls = None

class describing the model

param_names[source]

Methods Documentation

fit(x, y, dy, constraints)[source]
parameter_guesses(x, y, dy)[source]

Provide initial guesses for each model parameter.

The base implementation does nothing, and should be overridden

Parameters:
Returns:

A dict maping {parameter_name: value guess} for each parameter

predict(fit_result, x)[source]
summarize(fit_result, x, y, dy=None)[source]