Gaussian2D¶
-
class
astropy.modeling.functional_models.
Gaussian2D
(amplitude=1, x_mean=0, y_mean=0, x_stddev=None, y_stddev=None, theta=None, cov_matrix=None, **kwargs)[source] [edit on github]¶ Bases:
astropy.modeling.Fittable2DModel
Two dimensional Gaussian model.
Parameters: amplitude : float
Amplitude of the Gaussian.
x_mean : float
Mean of the Gaussian in x.
y_mean : float
Mean of the Gaussian in y.
x_stddev : float or None
Standard deviation of the Gaussian in x before rotating by theta. Must be None if a covariance matrix (
cov_matrix
) is provided. If nocov_matrix
is given,None
means the default value (1).y_stddev : float or None
Standard deviation of the Gaussian in y before rotating by theta. Must be None if a covariance matrix (
cov_matrix
) is provided. If nocov_matrix
is given,None
means the default value (1).theta : float, optional
Rotation angle in radians. The rotation angle increases counterclockwise. Must be None if a covariance matrix (
cov_matrix
) is provided. If nocov_matrix
is given,None
means the default value (0).cov_matrix : ndarray, optional
A 2x2 covariance matrix. If specified, overrides the
x_stddev
,y_stddev
, andtheta
defaults.Other Parameters: fixed : a dict
A dictionary
{parameter_name: boolean}
of parameters to not be varied during fitting. True means the parameter is held fixed. Alternatively thefixed
property of a parameter may be used.tied : dict
A dictionary
{parameter_name: callable}
of parameters which are linked to some other parameter. The dictionary values are callables providing the linking relationship. Alternatively thetied
property of a parameter may be used.bounds : dict
eqcons : list
A list of functions of length
n
such thateqcons[j](x0,*args) == 0.0
in a successfully optimized problem.ineqcons : list
A list of functions of length
n
such thatieqcons[j](x0,*args) >= 0.0
is a successfully optimized problem.See also
Notes
Model formula:
Using the following definitions:
- If using a
cov_matrix
, the model is of the form:
where , , and is the covariance matrix:
is the correlation between
x
andy
, which should be between -1 and +1. Positive correlation corresponds to atheta
in the range 0 to 90 degrees. Negative correlation corresponds to atheta
in the range of 0 to -90 degrees.See [R13] for more details about the 2D Gaussian function.
References
[R13] (1, 2) http://en.wikipedia.org/wiki/Gaussian_function Attributes Summary
amplitude
input_units
param_names
theta
x_fwhm
Gaussian full width at half maximum in X. x_mean
x_stddev
y_fwhm
Gaussian full width at half maximum in Y. y_mean
y_stddev
Methods Summary
evaluate
(x, y, amplitude, x_mean, y_mean, ...)Two dimensional Gaussian function fit_deriv
(x, y, amplitude, x_mean, y_mean, ...)Two dimensional Gaussian function derivative with respect to parameters Attributes Documentation
-
amplitude
¶
-
input_units
¶
-
param_names
= ('amplitude', 'x_mean', 'y_mean', 'x_stddev', 'y_stddev', 'theta')¶
-
theta
¶
-
x_fwhm
¶ Gaussian full width at half maximum in X.
-
x_mean
¶
-
x_stddev
¶
-
y_fwhm
¶ Gaussian full width at half maximum in Y.
-
y_mean
¶
-
y_stddev
¶
Methods Documentation
-
static
evaluate
(x, y, amplitude, x_mean, y_mean, x_stddev, y_stddev, theta)[source] [edit on github]¶ Two dimensional Gaussian function
-
static
fit_deriv
(x, y, amplitude, x_mean, y_mean, x_stddev, y_stddev, theta)[source] [edit on github]¶ Two dimensional Gaussian function derivative with respect to parameters
- If using a