lightkurve.KeplerTargetPixelFile.estimate_background#

KeplerTargetPixelFile.estimate_background(aperture_mask='background')#

Returns an estimate of the median background level in the FLUX column.

In the case of official Kepler and TESS Target Pixel Files, the background estimates should be close to zero because these products have already been background-subtracted by the pipeline (i.e. the values in the FLUX_BKG column have been subtracted from the values in FLUX). Background subtraction is often imperfect however, and this method aims to allow users to estimate residual background signals using different methods.

Target Pixel Files created by the MAST TESSCut service have not been background-subtracted. For such products, or other community- generated pixel files, this method provides a first-order estimate of the background levels.

This method estimates the per-pixel background flux over time by computing the median pixel value across the aperture mask.

Parameters
aperture_mask‘background’, ‘all’, or array-like

Which pixels should be used to estimate the background? If None or ‘all’ are passed, all pixels in the pixel file will be used. If ‘background’ is passed, all pixels fainter than the median flux will be used. Alternatively, users can pass a boolean array describing the aperture mask such that True means that the pixel will be used.

Returns
lcLightCurve object

Median background flux in units electron/second/pixel.