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 - KEPSTITCH

Software: PyKE
Version: 2.0.1

kepstitch -- Append short cadence months and/or long cadence quarters

kepstitch infiles outfile clobber verbose logfile status

infiles = string
A list of individual FITS files. Most commonly these will contain data from the same target obtained over different months or quarters. Short cadence and long cadence data can be mixed within this list. The list of files provided directly must be comma-separated. Alternatively an ASCII file containing file names can parsed to this argument if the path and name of the file are preceded by a '@' character. The ASCII file must be formatted to have one FITS filename per line.

outfile = string
The name of the output FITS file with concatenated time series data.

clobber = boolean (optional)
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)
Print informative messages and warnings to the shell and 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.

kepstitch takes a list of FITS light curves obtained from the MAST archive and concatenates them into one long table. Be aware that this task currently does not sort the table by time. If users must ensure that the input file list is ordered by increasing time. Also no attempt is made to correct for aperture and PSF differences across quarterly rolls. Light curves spanning multiple quarters are likely to be discontinuous at the quarterly boundaries. Both issues will be addressed in the future.


  1. Provide a direct list of Kepler time series files to concatenate:
    • kepstitch infiles=kplr007659570-2009259162342_slc.fits,kplr007659570-2009291181958_slc.fits,
      kplr007659570-2009322144938_slc.fits,kplr007659570-2009350160919_slc.fits outfile=stitched.fits

  2. Provide a list within an ASCII file of Kepler time series files to concatenate:
    • kepstitch infiles=@KeplerFiles.lis outfile=stitched.fits clobber=y

Full completion upon one quarter of Kepler long cadence target using a 3.06 GHz Intel Core 2 Duo Mac running OS 10.6.4 takes a few seconds. Running times increase by several factors if input data contains NaNs. These will be filtered out before task execution.

Although the target pixel mask will change from quarter to quarter, kepstitch does not track that change. The target pixel mask in the output file of kepstitch belongs to the first file in the list of input files. The Kepler PyRAF package is privately-developed software made available to the community through the contributed software page of the GO program at http://keplergo.arc.nasa.gov/ContributedSoftware.shtml. It is not an official software product of the Kepler mission. Bugs and errors are not the responsibility of NASA or the Kepler Team. Please send bug reports and suggestions to keplergo@mail.arc.nasa.gov.


Initial software release (MS)
Updated for Kepler FITS v2.0 (MS)
Code can now be run from the command line (TB)
more reliable plot rendering on linux operating systems (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