[AstroPy] Fixing broken FITS headers
Phil Hodge
hodge at stsci.edu
Fri Aug 19 09:49:27 EDT 2016
On 08/18/2016 07:44 PM, Derek Homeier wrote:
> This was not in fact a problem of non-ASCII characters in the header as such,
> but of an illegal (2080 bytes) header length, resulting in the first 800 data bytes
> being read in as padding. Not surprisingly, those contain a fair share of non-ASCII
> bytes, but in Python2.7 they would be silently accepted, resulting in a corrupt data
> HDU read in.
That's interesting. I wonder if the author of CCDSoft just misread the
FITS block size to be 2080 instead of 2880. If so, the binary portion
might also be padded to an incorrect length. One check would be to see
whether the file size is divisible by 2080 instead of 2880.
Phil
More information about the AstroPy
mailing list