Details
-
Type:
Story
-
Status: Won't Fix
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: afw
-
Labels:
Description
There is code in afw's FITS support that skips empty PDUs when you just ask to read a file. This is convenient, but unfortunately it is applied to afwImage.readMetadata(), meaning that it is impossible to read the metadata from an empty PDU.
Part of the problem is that we overload 0 to mean, "the first real dataset"; I'm filing an RFC to change that.
I withdraw this ticket. With the adoption of
RFC-304you can read HDU 0 (the magic is moved to hdu==INT_MIN, which is not easily available from python; but this shouldn't be a problem as named arguments mean that you never need enter it. If this becomes a problem please file an issue to accept None, but this seems likely to be a nuisance as there are many many occurrences of "hdu"_a=INT_MIN in the codebase)