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

Determine what astropy.io.fits does with FITS header cards for missing data

    XMLWordPrintable

Details

    • Improvement
    • Status: Done
    • Resolution: Done
    • None
    • Third Party Software
    • None
    • 1
    • Arch 2019-04-08
    • Architecture

    Description

      As part of implementing RFC-239 determine how astropy.io.fits handles FITS header cards with missing (unknown) values. I am virtually certain it cannot write such cards, but what happens when it tries to read them?

      This will inform implementation of RFC-239.

      Attachments

        Issue Links

          Activity

            tjenness Tim Jenness added a comment -

            Astropy does it by having a astropy.io.fits.card.Undefined special value. That strikes me as really unhelpful since it doesn't behave like any other value that you might expect. It also acts like it's True so you can't say if "FILTER" in header and header["FILTER"]: but have to have special code for dealing with is Undefined.

            tjenness Tim Jenness added a comment - Astropy does it by having a astropy.io.fits.card.Undefined special value. That strikes me as really unhelpful since it doesn't behave like any other value that you might expect. It also acts like it's True so you can't say if "FILTER" in header and header ["FILTER"] : but have to have special code for dealing with is Undefined .
            tjenness Tim Jenness added a comment -

            I have filed a pull request on Astropy to change the behavior such that FITS undefined value maps to None in python: https://github.com/astropy/astropy/pull/8572

            tjenness Tim Jenness added a comment - I have filed a pull request on Astropy to change the behavior such that FITS undefined value maps to None in python: https://github.com/astropy/astropy/pull/8572
            tjenness Tim Jenness added a comment -

            Astropy accepted my pull request. Now Astropy and PropertyList translate python None to FITS undefined and vice versa.

            tjenness Tim Jenness added a comment - Astropy accepted my pull request. Now Astropy and PropertyList translate python None to FITS undefined and vice versa.

            People

              tjenness Tim Jenness
              rowen Russell Owen
              Fritz Mueller, Kian-Tat Lim, Russell Owen, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Jenkins

                  No builds found.