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

Software: PyKE
Version: 2.0.2

keprange -- Define time ranges interactively for use with other PyKE tasks. series data

keprange infile rinfile outfile column clobber verbose logfile status

infile = string
The name of a MAST standard format FITS file containing a Kepler light curve within the first data extension.

rinfile = string (optional)
An existing ASCII file containing time ranges in Barycentric Julian Date (BJD) can be uploaded into the task. This can be used as a basis for a new set of time ranges. This argument is optional and is not prompted for automatically. If no ascii file will be input then rinfile=None will clear the argument buffer after a previous use.

outfile = string
The name of the output ASCII file storing time ranges for future use in other PyKE tools.

column = string
The column name containing data stored within extension 1 of infile. This data will be plotted against time so that the user can choose appropriate time ranges.

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.

A number of PyKE tasks, e.g. kepdetrend, kepoutlier, require the user to specify ranges in time over which to operate. keprange provides a visual and interactive tool with which to define time ranges and store them within an ASCII file. Choices are made using a GUI. The first and last times within a range are chosen by positioning your mouse and then tapping the 'x' key on your keyboard.'s' saves the current plot to a file. 'z' closes the plotting window. An existing ASCII file can be loaded, a new ASCII file can be written, the list of times can be cleared or printed using the buttons on the GUI.


  1. Create an ASCII file containing time ranges chosen with the interactive GUI.
    • keprange infile=kplr002436324-2009259160929_llc.fits outfile=range.txt column=SAP_FLUX

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.

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 to Kepler FITS v2.0. Replaced flaky right click mouse control with keyboard key stroke control (MS)
Replaced mouse event listener with button event listener to avoid mouse incompatibilities between mac and linux (MS)
Replaced pylab.ioff() call with pylab.draw() in order to avoid issues with plot rendering in subsequent tasks (MS)
Code can now be run from the command line (TB)
more reliable plot rendering on linux operating systems (MS)
Bug in interactive range selection fixed (MS)

kepdetrend, kepoutlier, kepcotrend

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