gaussian_2d_moments¶
-
gaussian_2d_moments(data, fitmethod)[source]¶ Guess the gaussian parameters of a distribution
Use for initial fitting parameters
the gaussian parameters of a 2D distribution by calculating its moments
Modified from : http://scipy-cookbook.readthedocs.io/items/FittingData.html
Parameters: - data (float 2D-array) – 2D distrbution to evaluate
- fitmethod (string) – fit method that will be used: ‘gaussian_2d_fixedwidth’, ‘gaussian_2d_1width’ or ‘gaussian_2d_2width’
Returns: (height, x, y), (height, x, y, sigma_x, sigma_y) or (height, x, y, sigma) depending on fitmethod
Return type: floats