kepconvert: convert Kepler FITS time series to or from a different file format

pyke.kepconvert.kepconvert(infile, conversion, columns, timeformat='jd', outfile=None, baddata=True, overwrite=False, verbose=False, logfile='kepconvert.log')[source]

kepconvert – Convert Kepler FITS time series to or from a different file format

The Kepler PyRAF tasks perform exclusively upon a standardized FITS file format. kepconvert converts tabular data to or from FITS format. Currently, only ASCII conversions are supported.


infile : str

The name of an input file, e.g. a MAST standard format FITS file containing a Kepler light curve within the first data extension, or an ASCII table.

outfile : str

The name of the output file, e.g. a FITS structure, ASCII table or CSV file.

conversion : str

Define the type of file conversion:

  • fits2asc
  • fits2csv
  • asc2fits

columns : str

A comma-delimited list of data column names or descriptors.

timeformat: str

You can convert the Barycentric Julian Date (BJD) given by FITS files into any subformat supported by Astropy.Time:

  • jd
  • mjd
  • decimalyear
  • unix
  • cxcsec
  • gps
  • plot_date
  • datetime
  • iso
  • isot
  • yday
  • fits
  • byear
  • jyear
  • byear_str
  • jyear_str

Be careful that these subformat are for Solar System Barycenter and are not Earth-centered.

baddata : bool

If True, all the rows from the input FITS file are output to an ascii file. If False then only rows with SAP_QUALITY equal to zero will be outputed. This option is only applicable if conversion is fits2asc.

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.


$ kepconvert kplr002436324-2009259160929_llc.fits fits2asc