tkp.utility.fits – Some FITS routines

tkp.utility.fits.combine(fitsfiles, outputfile, method='average')[source]

Combine a set of FITS files, taking care of header keywords

Parameters:
  • fitsfiles (list) – FITS filenames to combine
  • outputfile (str) – output FITS filename
Keyword Arguments:
 

method – average or sum the images

Returns:

None

tkp.utility.fits.convert(casa_image, ms, fits_filename=None)[source]

Convert a CASA image to FITS, taking care of header keywords

Parameters:
  • casa_image (casacore.images.image) – CASA image
  • ms (casacore.tables.table) – CASA measurement set
Keyword Arguments:
 

fits_filename – FITS output filename

Returns:

None

tkp.utility.fits.fix_reference_dec(imagename)[source]

If the FITS file specified has a reference dec of 90 (or pi/2), make it infinitesimally less. This works around problems with ill-defined coordinate systems at the north celestial pole.