BasicGaussianFitter¶
-
class
glue.core.fitters.
BasicGaussianFitter
(**params)[source]¶ Bases:
glue.core.fitters.BaseFitter1D
Fallback Gaussian fitter, for astropy < 0.3.
If
astropy.modeling
is installed, this class is replaced bySimpleAstropyGaussianFitter
Attributes Summary
Methods Summary
eval
(x, amplitude, mean, stddev)fit
(self, x, y, dy, constraints)Fit the model to data.
fit_deriv
(x, amplitude, mean, stddev)Gaussian1D model function derivatives.
predict
(self, fit_result, x)Evaluate the model at a set of locations.
summarize
(self, fit_result, x, y[, dy])Return a textual summary of the fit.
Attributes Documentation
-
label
= 'Gaussian'¶
Methods Documentation
-
fit
(self, 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
(self, 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
-