keptrim: trim pixels from Target Pixel Files

pyke.keptrim.keptrim(infile, column, row, imsize, outfile=None, kepid=None, overwrite=False, verbose=False, logfile='keptrim.log')[source]

keptrim – trim pixels from Target Pixel Files

keptrim will extract a square-shaped series of sub-images from a Target Pixel File. The simple purpose of this task is to reduce the size of large data sets such as the superstamps or two-wheel engineering data for the sake of processing efficiency. Performing a keptrim step speeds up calculations such as kepprfphot considertably and provides manual convenience for tasks such as kepmask.


infile : str

Filename for the input Target Pixel File.

column : int

The CCD column number on which to center the output subimage.

row : int

The CCD row number on which to center the output subimage.

imsize : int

The pixel size of the subimage along either the row or column dimension. The subimage will be square.

outfile : str

Filename for the output Target Pixel File. This product will be written to the same FITS format as archived light curves.

kepid : None or int

If the target is catalogued within the Kepler Input Catalog (KIC), then the pixel row and column location will be extracted from the KIC provided the Kepler ID is provided. The user must be online for this feature to execute. If provided kepid will override column and row.

overwrite : bool

Overwrite the output file?

verbose : bool

Option for verbose mode, in which informative messages and warnings to the shell and a logfile.

logfile : str

Name of the logfile containing error and warning messages.


$ keptrim ktwo251248961-c112_lpd-targ.fits 14 770 --imsize 3
--overwrite --verbose