kepwindow: calculate and store the window function for a Kepler time series

pyke.kepwindow.kepwindow(infile, outfile=None, datacol='SAP_FLUX', nyqfactor=0.01, plot=False, noninteractive=False, overwrite=False, verbose=False, logfile='kepwindow.log')[source]

kepwindow – Calculate and store the window function for a Kepler time series

Kepler time stamps are not perfectly uniform. There are gaps in the data due to operational pauses and issues, and timestamps are corrected to the barycenter of the solar system. The size of the barycenter correction is time-dependent. kepwindow calculates a discrete window function for a user-provided Kepler time series. This is calculated using a Lomb-Scargle periodogram. The result is stored in a new FITS file that is a direct copy of the input file but with an additional table extension containing the window function.


infile : str

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

outfile : str

The name of the output FITS file with a new extension containing the window function.

datacol : str

The name of the FITS table column in extension 1 of infile with which the window function should be coupled to. While the window function ostensibly requires the timing information, this particular piece of information is required so that the task can search the datacol array for bad data such as instances of NaN. These will be rejected before the window function is calculated.

nyqfactor : int

The number of nyquist factors up to which to evaluate. Kepler data is fairly regular and so the default will usually encompass most of the window.

plot : bool

Plot the output window function?

non-interactive : bool

If True, prevents the matplotlib window to pop up.

overwrite : bool

Overwrite the output file?

verbose : bool

Print informative messages and warnings to the shell and logfile?

logfile : str

Name of the logfile containing error and warning messages.


$ kepwindow kplr002436324-2009259160929_llc.fits --datacol SAP_FLUX
--nyqfactor 0.02 --plot --verbose