centroid_epsf

photutils.centroids.centroid_epsf(data, mask=None, oversampling=4, shift_val=0.5)[source]

Deprecated since version 1.2: The centroid_epsf function is deprecated and may be removed in a future version.

Calculate centering shift of data using pixel symmetry, as described by Anderson and King (2000; PASP 112, 1360) in their ePSF-fitting algorithm.

Calculate the shift of a 2-dimensional symmetric image based on the asymmetry between f(x, N) and f(x, -N), along with the differential df/dy(x, shift_val) and df/dy(x, -shift_val). Non-finite values (e.g., NaN or inf) in the data array are automatically masked.

Parameters
dataarray_like

The input n-dimensional array.

maskarray_like (bool), optional

A boolean mask, with the same shape as data, where a True value indicates the corresponding element of data is masked.

oversamplingint or tuple of two int, optional

Oversampling factors of pixel indices. If oversampling is a scalar this is treated as both x and y directions having the same oversampling factor. Otherwise it is treated as (x_oversamp, y_oversamp).

shift_valfloat, optional

The undersampled value at which to compute the shifts. Default is half a pixel. It must be a strictly positive number.

Returns
centroidtuple of floats

The (x, y) coordinates of the centroid in pixel order.