Bases: astropy.modeling.Fittable2DModel
Two dimensional Gaussian model.
Parameters: | amplitude : float
x_mean : float
y_mean : float
x_stddev : float
y_stddev : float
theta : float, optional
cov_matrix : ndarray, optional
|
---|---|
Other Parameters: | |
fixed : a dict
tied : dict
bounds : dict eqcons : list
ineqcons : list
|
See also
Notes
Model formula:
f(x, y) = A e^{-a\left(x - x_{0}\right)^{2} -b\left(x - x_{0}\right) \left(y - y_{0}\right) -c\left(y - y_{0}\right)^{2}}
Using the following definitions:
a = \left(\frac{\cos^{2}{\left (\theta \right )}}{2 \sigma_{x}^{2}} + \frac{\sin^{2}{\left (\theta \right )}}{2 \sigma_{y}^{2}}\right) b = \left(\frac{\sin{\left (2 \theta \right )}}{2 \sigma_{x}^{2}} - \frac{\sin{\left (2 \theta \right )}}{2 \sigma_{y}^{2}}\right) c = \left(\frac{\sin^{2}{\left (\theta \right )}}{2 \sigma_{x}^{2}} + \frac{\cos^{2}{\left (\theta \right )}}{2 \sigma_{y}^{2}}\right)
f(x, y) = A e^{-0.5 \left(\vec{x} - \vec{x}_{0}\right)^{T} \Sigma^{-1} \left(\vec{x} - \vec{x}_{0}\right)}
where \vec{x} = [x, y], \vec{x}_{0} = [x_{0}, y_{0}], and \Sigma is the covariance matrix:
\Sigma = \left(\begin{array}{ccc} \sigma_x^2 & \rho \sigma_x \sigma_y \\ \rho \sigma_x \sigma_y & \sigma_y^2 \end{array}\right)
\rho is the correlation between x and y, which should be between -1 and +1. Positive correlation corresponds to a theta in the range 0 to 90 degrees. Negative correlation corresponds to a theta in the range of 0 to -90 degrees.
See [R6] for more details about the 2D Gaussian function.
References
[R6] | (1, 2) http://en.wikipedia.org/wiki/Gaussian_function |
Attributes Summary
amplitude | |
param_names | list() -> new empty list |
theta | |
x_mean | |
x_stddev | |
y_mean | |
y_stddev |
Methods Summary
eval(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
Methods Documentation
Two dimensional Gaussian function
Two dimensional Gaussian function derivative with respect to parameters