cwitools.measurement.moment2d¶
-
cwitools.measurement.
moment2d
(x_grid, y_grid, p, q, fxy)¶ Calculate image moment of order p in x and q in y.
Mpq = SUM(x_grid^p * y_grid^q * fxy) / SUM(fxy)
Parameters: - x_grid (numpy.ndarray) – 2D meshgrid of x-values
- y_grid (numpy.ndarray) – 2D meshgrid of y-values
- p (int) – Moment order in x.
- q (int) – Moment order in y.
- fxy (numpy.ndarray) – Array of weights representing the 2D distribution being measured; e.g. flux or surface brightness.
Returns: The value of the requested image moment.
Return type: float