cwitools.modeling.gauss2d¶
-
cwitools.modeling.
gauss2d
(params, xx, yy)¶ General 2D Gaussian profile in the form f(parameters, x)
I(x) = I0 * exp(-a(x-x0)^2 - b(x-x0)(y-y0) - c(y-y0)^2) where a = cos^2 (theta) / 2*sig_x^2 + sin^2 (theta) / 2*sig_y^2 b = sin(2*theta) / 2*sig_x^2 - sin(2*theta) / 2*sig_y^2 c = sin^2(theta) / 2*sig_x^2 + cos^2 (theta) / 2*sig_y^2
See gauss2d_sym for symmetric 2D Gaussian.
Parameters: - params (list) – 2D Gaussian parameters (I0, x0, y0, sig_x, sig_y, theta) I0 - amplitude x0, y0 - x and y means sig_x, sig_y - x and y standard deviations theta - angle of rotation of 2D Gaussian (degrees)
- xx (numpy.ndarray) – 2D meshgrid of x position
- yy (numpy.ndarray) – 2D Meshgrid of y position
Returns: The 2D Gaussian model output
Return type: numpy.ndarray