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 (Sequence | ndarray) – The x values underlying the surface the PSF is to be fit to

  • y (Sequence | ndarray) – The y values underlying the surface the PSF is to be fit to

  • z (Sequence | 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:

Moment