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

getPlaneBitMask and the like should return MaskPixel in Python, not int

    XMLWordPrintable

    Details

    • Type: Story
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: afw
    • Labels:

      Description

      Mask routines that return a scalar integer that can be used as a mask (as opposed to a bit number) should be modified to natively return the exact appropriate NumPy scalar type (which now has an afw.image.MaskPixel alias. This should save users from having to explicitly cast the results of these function calls to the appropriate type before performing operations on arrays with them. These casts are currently sometimes necessary to avoid coercing the arrays to larger integer types.

      This can easily be done (albeit verbosely) in continueClass additions, though it may be possible to do with a lambda in the pybind11 wrappers themselves as well.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jbosch Jim Bosch
            Watchers:
            Jim Bosch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: