Moment.fit¶
giant.point_spread_functions.moments
:
- classmethod Moment.fit(x, y, z)[source]¶
This function identifies the centroid of the PSF for the input data using a moment algorithm (center of illumination).
\[x_0 = \frac{\sum{\mathbf{x}\mathbf{I}}}{\sum{\mathbf{I}}} \qquad y_0 = \frac{\sum{\mathbf{y}\mathbf{I}}}{\sum{\mathbf{I}}}\]- Parameters:
x (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]) – The x values underlying the surface the PSF is to be fit to
y (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]) – The y values underlying the surface the PSF is to be fit to
z (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]) – The z or “height” values of the surface the PSF is to be fit to
- Returns:
An instance of the PSF that best fits the provided data
- Return type:
Self