Uploaded image for project: 'Request For Comments'
  1. Request For Comments
  2. RFC-177

Enforce Astropy-compliant strings for units in afw.table

    Details

    • Type: RFC
    • Status: Implemented
    • Resolution: Done
    • Component/s: DM
    • Labels:
      None

      Description

      With DM-5641, we'll soon be able to get astropy.table views into afw.table objects. That will be more useful if astropy can understand the unit strings we give it, and since we currently don't use those strings as anything more than textual information for humans, we might as well standardize on the terms they've already selected (see http://docs.astropy.org/en/stable/units/). This standardisation is covered by DM-5642.

      I propose that enforcement of compatible units will be turned on by default.

      This will have three related benefits:

      1. Minimises potential parsing problems by defining and enforcing a standard format for units.
      2. Will allow for easier interoperability with astropy (e.g. with quantities) in the future.
      3. Prevents misuse of unit field for storage of non-unit related information.

        Attachments

          Issue Links

            Activity

            Hide
            jbosch Jim Bosch added a comment -

            One side question I'd like to get some feedback on: Astropy supports both "count" and "adu" (but considers them separate units). It does not support "dn", which we've traditionally used. Which of "count" and "adu" should we use (or is there some subtle distinction between them that implies we should use both in different contexts)?

            Show
            jbosch Jim Bosch added a comment - One side question I'd like to get some feedback on: Astropy supports both "count" and "adu" (but considers them separate units). It does not support "dn", which we've traditionally used. Which of "count" and "adu" should we use (or is there some subtle distinction between them that implies we should use both in different contexts)?
            Hide
            pschella Pim Schellart [X] (Inactive) added a comment - - edited

            Since there already was a distinction between adu and dn in the code I have left adu in and replaced dn by count everywhere. Bob Armstrong thought count made most sense.

            Show
            pschella Pim Schellart [X] (Inactive) added a comment - - edited Since there already was a distinction between adu and dn in the code I have left adu in and replaced dn by count everywhere. Bob Armstrong thought count made most sense.
            Hide
            tjenness Tim Jenness added a comment - - edited

            The FITS standard for units (see table 4 in Pence et al 2010) allows "count" and "adu". The VOUnit paper has a very complete overview of different unit schemes in astronomy (http://www.ivoa.net/documents/VOUnits/20140523/VOUnits-REC-1.0-20140523.pdf). Interestingly "dn" is not listed there at all.

            Show
            tjenness Tim Jenness added a comment - - edited The FITS standard for units (see table 4 in Pence et al 2010) allows "count" and "adu". The VOUnit paper has a very complete overview of different unit schemes in astronomy ( http://www.ivoa.net/documents/VOUnits/20140523/VOUnits-REC-1.0-20140523.pdf ). Interestingly "dn" is not listed there at all.
            Hide
            wmwood-vasey Michael Wood-Vasey added a comment - - edited

            Show
            wmwood-vasey Michael Wood-Vasey added a comment - - edited
            Hide
            pschella Pim Schellart [X] (Inactive) added a comment -

            No remaining objections, RFC adopted. Implementation will be part of DM-5642.
            As an aside the consensus seems to be to use "count" (instead of "dn") for flux values and "adu" for gain only (as before).

            Show
            pschella Pim Schellart [X] (Inactive) added a comment - No remaining objections, RFC adopted. Implementation will be part of DM-5642 . As an aside the consensus seems to be to use "count" (instead of "dn") for flux values and "adu" for gain only (as before).

              People

              • Assignee:
                pschella Pim Schellart [X] (Inactive)
                Reporter:
                pschella Pim Schellart [X] (Inactive)
                Watchers:
                Jim Bosch, John Parejko, Michael Wood-Vasey, Pim Schellart [X] (Inactive), Tim Jenness
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Planned End:

                  Summary Panel