Bases: astropy.modeling.core.Parametric1DModel
One dimensional Gaussian model.
Parameters : | amplitude : float
mean : float
stddev : float
|
---|
See also
Gaussian2D, Box1D, Beta1D, Lorentz1D
Notes
Model formula:
f(x) = A e^{- \frac{\left(x - x_{0}\right)^{2}}{2 \sigma^{2}}}
Examples
>>> from astropy.modeling import models
>>> def tie_center(model):
... mean = 50 * model.stddev
... return mean
>>> tied_parameters = {'mean': tie_center}
Specify that ‘mean’ is a tied parameter in one of two ways:
>>> g1 = models.Gaussian1D(amplitude=10, mean=5, stddev=.3,
... tied=tied_parameters)
or
>>> g1 = models.Gaussian1D(amplitude=10, mean=5, stddev=.3)
>>> g1.mean.tied
False
>>> g1.mean.tied = tie_center
>>> g1.mean.tied
<function tie_center at 0x...>
Fixed parameters:
>>> g1 = models.Gaussian1D(amplitude=10, mean=5, stddev=.3,
... fixed={'stddev': True})
>>> g1.stddev.fixed
True
or
>>> g1 = models.Gaussian1D(amplitude=10, mean=5, stddev=.3)
>>> g1.stddev.fixed
False
>>> g1.stddev.fixed = True
>>> g1.stddev.fixed
True
Attributes Summary
amplitude | |
mean | |
param_names | list() -> new empty list |
stddev |
Methods Summary
deriv(x, amplitude, mean, stddev) | Model function derivatives Gauss1D |
eval(x, amplitude, mean, stddev) | Model function Gauss1D |
Attributes Documentation
Methods Documentation
Model function derivatives Gauss1D
Model function Gauss1D