11.6.7. astroML.stats.fit_bivariate_normal

astroML.stats.fit_bivariate_normal(x, y, robust=False)[source]

Fit bivariate normal parameters to a 2D distribution of points

Parameters
x, yarray_like

The x, y coordinates of the points

robustboolean (optional, default=False)

If True, then use rank-based statistics which are robust to outliers Otherwise, use mean/std statistics which are not robust

Returns
mutuple

(x, y) location of the best-fit bivariate normal

sigma_1, sigma_2float

The best-fit gaussian widths in the uncorrelated frame

alphafloat

The rotation angle in radians of the uncorrelated frame