kephead: search for and list FITS keywords in Kepler data files

pyke.kephead.kephead(infile, keyname, outfile=None, overwrite=False, verbose=False, logfile='kephead.log')

kephead – search for and list FITS keywords in Kepler data files

The Kepler archive contains science data in Flexible Image Transport System (FITS) format. Images are stored in binary arrays, time series data in binary tables and scalar data as binary keywords. Tools such as kepmask and kepconvert read Kepler image and table data. kephead displays scalar data or converts it from binary to ASCII format. kephead can display all keywords in a file, display individual keywords, or search for character combinations in keywords names.

Parameters:

infile : str

The name of a standard format FITS file.

keyname : str

The name of a keyword, value and description to print or store within the output file. Partial completions for the keyword are allowed. For example keyname='mag' will return all instances of magnitude keywords (BMAG, VMAG, KEPMAG etc) and their values within the light curves stored at MAST. keyname='all' will return every keyword and their values stored in all extensions within the input FITS file.

outfile : str

The name of the output ASCII file for storing search results.

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.

Examples

$ kephead kplr002436324-2009259160929_llc.fits 'mag' --verbose --overwrite
--------------------------------------------------------------
KEPHEAD --  infile=kplr002436324-2009259160929_llc.fits outfile=.txt keyname=mag
overwrite=True verbose=True logfile=kephead.log

KEPHEAD started at: : Tue Jun 13 15:26:58 2017

---------------------------------------
kplr002436324-2009259160929_llc.fits[0]
---------------------------------------

GMAG    =               16.334 / [mag] SDSS g band magnitude
RMAG    =               16.789 / [mag] SDSS r band magnitude
IMAG    =               17.112 / [mag] SDSS i band magnitude
ZMAG    =                      / [mag] SDSS z band magnitude
D51MAG  =                      / [mag] D51 magnitude,
JMAG    =                8.176 / [mag] J band magnitude from 2MASS
HMAG    =                7.262 / [mag] H band magnitude from 2MASS
KMAG    =                6.874 / [mag] K band magnitude from 2MASS
KEPMAG  =               16.879 / [mag] Kepler magnitude (Kp)

KEPHEAD ended at: : Tue Jun 13 15:26:58 2017