lightkurve.KeplerTargetPixelFile.from_fits_images#

static KeplerTargetPixelFile.from_fits_images(images_flux, position, images_raw_cnts=None, images_flux_err=None, images_flux_bkg=None, images_flux_bkg_err=None, images_cosmic_rays=None, size=(11, 11), extension=1, target_id='unnamed-target', hdu0_keywords=None, **kwargs)#

Creates a new Target Pixel File from a set of images.

This method is intended to make it easy to cut out targets from Kepler/K2 “superstamp” regions or TESS FFI images.

Parameters
images_fluxlist of str, or list of fits.ImageHDU objects

Sorted list of FITS filename paths or ImageHDU objects to get the flux data from.

positionastropy.SkyCoord

Position around which to cut out pixels.

images_raw_cntslist of str, or list of fits.ImageHDU objects

Sorted list of FITS filename paths or ImageHDU objects to get the raw counts data from.

images_flux_errlist of str, or list of fits.ImageHDU objects

Sorted list of FITS filename paths or ImageHDU objects to get the flux error data from.

images_flux_bkglist of str, or list of fits.ImageHDU objects

Sorted list of FITS filename paths or ImageHDU objects to get the background data from.

images_flux_bkg_errlist of str, or list of fits.ImageHDU objects

Sorted list of FITS filename paths or ImageHDU objects to get the background error data from.

images_cosmic_rayslist of str, or list of fits.ImageHDU objects

Sorted list of FITS filename paths or ImageHDU objects to get the cosmic rays data from.

size(int, int)

Dimensions (cols, rows) to cut out around position.

extensionint or str

If images is a list of filenames, provide the extension number or name to use. This should be the same for all flux inputs provided. Default: 1.

target_idint or str

Unique identifier of the target to be recorded in the TPF.

hdu0_keywordsdict

Additional keywords to add to the first header file.

**kwargsdict

Extra arguments to be passed to the TargetPixelFile constructor.

Returns
tpfTargetPixelFile

A new Target Pixel File assembled from the images.