Package ComboCode :: Package cc :: Package tools :: Package readers :: Module FitsReader
[hide private]
[frames] | no frames]

Module FitsReader

source code

A module for reading and managing fits-based line profile data files.

Author: R. Lombaert

Classes [hide private]
  FitsReader
A FITS file reader for line profile data.
Functions [hide private]
 
fixFits(fn)
Fix fits files in case opening them with FitsReader complains about trailing spaces and nonstandard values.
source code
 
changeFitsHeader(fn_old, fn_new, key, value, comment=None, **kwargs)
Change a key in the header of a fits file and save to a new file.
source code
Variables [hide private]
  __package__ = 'ComboCode.cc.tools.readers'
Function Details [hide private]

fixFits(fn)

source code 

Fix fits files in case opening them with FitsReader complains about trailing spaces and nonstandard values.

Parameters:
  • fn (str) - The filename and path to the fitsfile

changeFitsHeader(fn_old, fn_new, key, value, comment=None, **kwargs)

source code 

Change a key in the header of a fits file and save to a new file.

Additionali just keywords for the writeto pyfits function can be passed along with kwargs. eg output_verify='ignore'.

Parameters:
  • fn_old (str) - The old filename of the fits file
  • fn_new (str) - The new filename of the fits file
  • key (str) - The header key to be changed. Has to be present already (for now)
  • value (str, int, float) - The new value
  • comment (str) - If desired, the comment for the keyword can be changed here. By default, no change is made.

    (default: None)