KeplerTargetPixelFile.estimate_centroids(aperture_mask='default', method='moments')#

Returns the flux center of an object inside aperture_mask.

Telescopes tend to smear out the light from a point-like star over multiple pixels. For this reason, it is common to estimate the position of a star by computing the geometric center of its image. Astronomers refer to this position as the centroid of the object, i.e. the term centroid is often used as a generic synonym to refer to the measured position of an object in a telescope exposure.

This function provides two methods to estimate the position of a star:

  • method='moments' will compute the “center of mass” of the light based on the 2D image moments of the pixels inside aperture_mask.

  • method='quadratic' will fit a two-dimensional, second-order polynomial to the 3x3 patch of pixels centered on the brightest pixel inside the aperture_mask, and return the peak of that polynomial. Following Vakili & Hogg 2016 (ArXiv:1610.05873, Section 3.2).

aperture_mask‘pipeline’, ‘threshold’, ‘all’, ‘default’, or array-like

Which pixels contain the object to be measured, i.e. which pixels should be used in the estimation? If None or ‘all’ are passed, all pixels in the pixel file will be used. If ‘pipeline’ is passed, the mask suggested by the official pipeline will be returned. If ‘threshold’ is passed, all pixels brighter than 3-sigma above the median flux will be used. If ‘default’ is passed, ‘pipeline’ mask will be used when available, with ‘threshold’ as the fallback. Alternatively, users can pass a boolean array describing the aperture mask such that True means that the pixel will be used.

method‘moments’ or ‘quadratic’

Defines which method to use to estimate the centroids. ‘moments’ computes the centroid based on the sample moments of the data. ‘quadratic’ fits a 2D polynomial to the data and returns the coordinate of the peak of that polynomial.

columns, rowsQuantity, Quantity

Arrays containing the column and row positions for the centroid for each cadence, or NaN for cadences where the estimation failed.