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 (Union[Sequence, numpy.ndarray]) – The x values underlying the surface the PSF is to be fit to
y (Union[Sequence, numpy.ndarray]) – The y values underlying the surface the PSF is to be fit to
z (Union[Sequence, numpy.ndarray]) – 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