Skip to main content

How to avoid that FITS files created with CASA 4.7.0 have invalid CR characters in their headers - Knowledgebase / Offline Data Reduction and/or CASA - ALMA Science

How to avoid that FITS files created with CASA 4.7.0 have invalid CR characters in their headers

Authors list

Due to a very subtle bug in CASA 4.7.0 which was introduced in the packaging of the release tarball after all tests had passed, exportfits writes FITS files which contain a carriage return (CR) character. This is illegal according to the FITS standard and while it does not hurt the CASA viewer or ds9, there are other viewers which have a problem with this.

A special new release 4.7.0-1 was created on 21 Oct 2016 which only addresses this issue. Please download this via the CASA website and use it instead of CASA 4.7.0.

If you need to use 4.7.0 instead of 4.7.0-1, the workaround for the problem is to run the following command before using exportfits (needs to be run only once for each CASA session):

os.unsetenv('CASAVERSION')

The FITS files created from then on will have correct headers.