BasicGaussianFitter#
- class glue.core.fitters.BasicGaussianFitter(**params)[source]#
Bases:
BaseFitter1D
Fallback Gaussian fitter, for astropy < 0.3.
If
astropy.modeling
is installed, this class is replaced bySimpleAstropyGaussianFitter
Attributes Summary
A short label for the fit, used by the GUI
Methods Summary
eval
(x, amplitude, mean, stddev)fit
(x, y, dy, constraints)Fit the model to data.
fit_deriv
(x, amplitude, mean, stddev)Gaussian1D model function derivatives.
predict
(fit_result, x)Evaluate the model at a set of locations.
summarize
(fit_result, x, y[, dy])Return a textual summary of the fit.
Attributes Documentation
- label = 'Gaussian'#
A short label for the fit, used by the GUI
Methods Documentation
- fit(x, y, dy, constraints)[source]#
Fit the model to data.
This must be overriden by a subclass.
- Parameters:
x (
numpy.ndarray
) – The x values of the datay (
numpy.ndarray
) – The y values of the datady (
numpy.ndarray
) – 1 sigma uncertainties on each datum (optional)constraints – The current value of the
constraints
propertyoptions – kwargs for model hyperparameters.
- Returns:
An object representing the fit result.
- predict(fit_result, x)[source]#
Evaluate the model at a set of locations.
This must be overridden in a subclass.
- Parameters:
fit_result – The result from the fit method
x (
numpy.ndarray
) – Locations to evaluate model at
- Returns:
model(x)
- Return type: