BasicGaussianFitter#
- class glue.core.fitters.BasicGaussianFitter(**params)#
Bases:
BaseFitter1DFallback Gaussian fitter, for astropy < 0.3.
If
astropy.modelingis installed, this class is replaced bySimpleAstropyGaussianFitterAttributes Summary
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'#
Methods Documentation
- static eval(x, amplitude, mean, stddev)#
- fit(x, y, dy, constraints)#
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
constraintspropertyoptions – kwargs for model hyperparameters.
- Returns:
An object representing the fit result.
- static fit_deriv(x, amplitude, mean, stddev)#
Gaussian1D model function derivatives.
- predict(fit_result, x)#
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: