Lightkurve v2.0
The lightkurve.targetpixelfile module provides classes which represent FITS files that store the original pixel data (images) obtained by the Kepler or TESS telescopes. These classes provide methods to visualize these data and extract custom light curves.
lightkurve.targetpixelfile
KeplerTargetPixelFile(path[, quality_bitmask])
KeplerTargetPixelFile
Class to read and interact with the pixel data products (“Target Pixel Files”) created by NASA’s Kepler pipeline.
TessTargetPixelFile(path[, quality_bitmask])
TessTargetPixelFile
Represents pixel data products created by NASA’s TESS pipeline.
KeplerTargetPixelFile.hdu
KeplerTargetPixelFile.ra
Right Ascension of target (‘RA_OBJ’ header keyword).
KeplerTargetPixelFile.dec
Declination of target (‘DEC_OBJ’ header keyword).
KeplerTargetPixelFile.column
CCD pixel column number (‘1CRV5P’ header keyword).
KeplerTargetPixelFile.row
CCD pixel row number (‘2CRV5P’ header keyword).
KeplerTargetPixelFile.pos_corr1
Returns the column position correction.
KeplerTargetPixelFile.pos_corr2
Returns the row position correction.
KeplerTargetPixelFile.pipeline_mask
Returns the optimal aperture mask used by the pipeline.
KeplerTargetPixelFile.shape
Return the cube dimension shape.
KeplerTargetPixelFile.time
Returns the time for all good-quality cadences.
KeplerTargetPixelFile.cadenceno
Return the cadence number for all good-quality cadences.
KeplerTargetPixelFile.nan_time_mask
Returns a boolean mask flagging cadences whose time is nan.
nan
KeplerTargetPixelFile.flux
Returns the flux for all good-quality cadences.
KeplerTargetPixelFile.flux_err
Returns the flux uncertainty for all good-quality cadences.
KeplerTargetPixelFile.flux_bkg
Returns the background flux for all good-quality cadences.
KeplerTargetPixelFile.flux_bkg_err
KeplerTargetPixelFile.quality
Returns the quality flag integer of every good cadence.
KeplerTargetPixelFile.wcs
Returns an astropy.wcs.WCS object with the World Coordinate System solution for the target pixel file.
astropy.wcs.WCS
KeplerTargetPixelFile.get_coordinates([cadence])
KeplerTargetPixelFile.get_coordinates
Returns two 3D arrays of RA and Dec values in decimal degrees.
KeplerTargetPixelFile.to_lightcurve([method])
KeplerTargetPixelFile.to_lightcurve
Performs photometry on the pixel data and returns a LightCurve object.
KeplerTargetPixelFile.create_threshold_mask([…])
KeplerTargetPixelFile.create_threshold_mask
Returns an aperture mask creating using the thresholding method.
KeplerTargetPixelFile.estimate_background([…])
KeplerTargetPixelFile.estimate_background
Returns an estimate of the median background level in the FLUX column.
KeplerTargetPixelFile.estimate_centroids([…])
KeplerTargetPixelFile.estimate_centroids
Returns the flux center of an object inside aperture_mask.
aperture_mask
KeplerTargetPixelFile.query_solar_system_objects([…])
KeplerTargetPixelFile.query_solar_system_objects
Returns a list of asteroids or comets which affected the target pixel files.
KeplerTargetPixelFile.plot([ax, frame, …])
KeplerTargetPixelFile.plot
Plot the pixel data for a single frame (i.e.
KeplerTargetPixelFile.to_fits([output_fn, …])
KeplerTargetPixelFile.to_fits
Writes the TPF to a FITS file on disk.
KeplerTargetPixelFile.interact([…])
KeplerTargetPixelFile.interact
Display an interactive Jupyter Notebook widget to inspect the pixel data.
KeplerTargetPixelFile.interact_sky([…])
KeplerTargetPixelFile.interact_sky
Display a Jupyter Notebook widget showing Gaia DR2 positions on top of the pixels.
KeplerTargetPixelFile.to_corrector([method])
KeplerTargetPixelFile.to_corrector
Returns a Corrector instance to remove systematics.
Corrector
KeplerTargetPixelFile.cutout([center, size])
KeplerTargetPixelFile.cutout
Cut a rectangle out of the Target Pixel File.
KeplerTargetPixelFile.from_fits_images(…)
KeplerTargetPixelFile.from_fits_images
Creates a new Target Pixel File from a set of images.
KeplerTargetPixelFile.plot_pixels([ax, …])
KeplerTargetPixelFile.plot_pixels
Show the light curve of each pixel in a single plot.
KeplerTargetPixelFile.get_header([ext])
KeplerTargetPixelFile.get_header
Returns the metadata embedded in the file.
KeplerTargetPixelFile.get_keyword(keyword[, …])
KeplerTargetPixelFile.get_keyword
Returns a header keyword value.