kepfilter: bandpass filtering of Kepler light curve data

pyke.kepfilter.kepfilter(infile, passband, outfile=None, datacol='SAP_FLUX', function='boxcar', cutoff=1.0, plot=False, overwrite=False, verbose=False, logfile='kepfilter.log')[source]

kepfilter – bandpass filtering of Kepler light curve data

kepfilter applies a bandpass filter to Kepler light curve data. In the low bandpass option, the data is convolved with a function of user-specified width. Choices of convolution function are boxcar, Gaussian or sinc. In the high bandpass option the convolution minus the median of the convolution is subtracted from the original data. The filtered data is copied to a new FITS file with the same structure as the input file.


infile : str

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

passband : str

The type of filter to be applied. A low bandpass filter will suppress high-frequency signal shorter than the cutoff. A high bandpass filter will suppress low-frequency signal longer than the cutoff. The options are:

  • low
  • high

outfile : str

The name of the output FITS file. The output file is identical in format to the input file. The data to be filtered will be overwritten in the output file by its filtered version.

datacol : str

The name of the data column in the input FITS file to be filtered, e.g. SAP_FLUX, PDCSAP_FLUX, MOM_CENTR1 etc. A full list of archived data columns is provided in the Kepler Archive Manual.

function : string

The functional form of the bandpass convolution function. The options are:

  • boxcar
  • gauss
  • sinc

cutoff : float

The frequency of the bandpass cutoff in units of days-1.

plot : bool

Plot the original light curve and the result of the filter?

overwrite : bool

Overwrite the output file? if overwrite is False and an existing file has the same name as outfile then the task will stop with an error.

verbose : bool

Print informative messages and warnings to the shell and logfile?

logfile : str

Name of the logfile containing error and warning messages.


$ kepfilter kplr002436324-2009259160929_llc.fits --datacol 'SAP_FLUX' --function 'boxcar'
--plot --verbose --overwrite