Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-9854

Disable code that skips an empty PDU when reading metadata

    Details

    • Type: Story
    • Status: Won't Fix
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw

      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.

        Attachments

          Issue Links

            Activity

            Hide
            rhl Robert Lupton added a comment -

            I withdraw this ticket. With the adoption of RFC-304 you 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)

            Show
            rhl Robert Lupton added a comment - I withdraw this ticket. With the adoption of RFC-304 you 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)

              People

              • Assignee:
                Unassigned
                Reporter:
                rhl Robert Lupton
                Watchers:
                Robert Lupton
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel