Warning: this page is no longer updated and may contain outdated information.

Please refer to the new Kepler/K2 science website at http://keplerscience.arc.nasa.gov

NASA - National Aeronautics and Space Administration Follow this link to skip to the main content + Contact NASA
Kepler Guest Observer Program

Contributed Software - KEPTRIM

Software: PyKE
Version: 1.0.0

keptrim -- create a series of subimages from a Target Pixel File

keptrim   infile   outfile   kepid   column   row   imsize   clobber   verbose   logfile

infile = string
Filename for the input Target Pixel File.

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

kepid = integer
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 provieded. kepid will override column and row.

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

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

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

clobber = boolean (optional)
Option to overwrite the output file. If clobber = no and an existing file has the same name as outfile then the task will stop with an error.

verbose = boolean (optional)
Option for verbose mode, in which informative messages and warnings to the shell and a logfile.

logfile = string (optional)
Name of the logfile containing error and warning messages.

status = integer
Exit status of the script. It will be non-zero if the task halted with an error. This parameter is set by the task and should not be modified by the user.

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.


  • keptrim   infile=kplr060017806-2014044044430_lpd-targ.fits   outfile=keptrim.fits   column=573   row=317   imsize=10   clobber=y   verbose=y   logfile=keptrim.log

Execution of this program for 1 quarter of long cadence data using a 3.06 GHz Intel Core 2 Duo Mac running OS 10.6.4 takes a few seconds.

Please send bug reports and suggestions to keplergo@mail.arc.nasa.gov.


Initial software release (MS)


Questions concerning Kepler's science opportunities and open programs, public archive or community tools? Contact us via the email address.
FirstGov - Your First Click to the US Government
+ Freedom of Information Act
+ Budgets, Strategic Plans and Accountability Reports
+ The President's Management Agenda
+ NASA Privacy Statement, Disclaimer,
and Accessibility Certification

+ Inspector General Hotline
+ Equal Employment Opportunity Data Posted Pursuant
to the No Fear Act

+ Information-Dissemination Priorities and Inventories
NASA - National Aeronautics and Space Administration
Editor: Martin Still
NASA Official: Jessie Dotson
Last Updated: Jan 11, 2013
+ Contact NASA