[AstroPy] Opening file in PyFits, works in v2.4, not in v3.0.6
Tue Apr 3 09:26:26 CDT 2012
On 04/03/2012 10:09 AM, Erik Bray wrote:
> Specifically, the problem in this file that PyFITS is breaking on is
> that the header block is not filled with spaces. According to the FITS
> standard any extra bytes at the end of a header block must be spaces,
> and not nulls as is the case in this file.
> I'm not sure what PyFITS should do here. Should it treat a file like
> this as an error, or should it just produce a warning? Given that other
> tools (including earlier PyFITS versions) seem to be accepting of this,
> I'm leaning toward the latter. There's no reason PyFITS can't ignore
> the standard here and read the file anyways. That said, it's still
I'm strongly in favor of allowing the user to open the file unless it's
totally incomprehensible. If you can't open it you can't fix it. In
order to open a really messed-up file, it would be reasonable to require
setting a flag, of course.
I could read this file using catfits (in iraf/stsdas), and that let me
see why fverify complained about the ORIGIN keyword, which was useful:
ORIGIN = 'Miner's View Observatory'
There's a quote within the quoted string, so the value was interpreted
More information about the AstroPy