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

removeMaskPlane function in multiband.py does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw
    • Labels:
      None
    • Story Points:
      3
    • Sprint:
      DRP F18-6
    • Team:
      Data Release Production

      Description

      In perusing the stack for examples of mask usage and manipulation, I came across this funtction:

      https://github.com/lsst/afw/blob/master/python/lsst/afw/image/image/multiband.py#L481-L490

      It looks like there are two issues with it:

      1) lsst.afw.image.MaskX has no attribute removeMaskPlaneDict, so any call to the function results in:

      AttributeError: type object 'lsst.afw.image.image.image.MaskX' has no attribute 'removeMaskPlaneDict'
      

      The fix appears to be removeMaskPlaneDict --> removeMaskPlane

      2) the function ignores the variable name, i.e. does not pass it to the call to [_sic_!] removeMaskPlaneDict(). Having corrected the function name to removeMaskPlane, the we get the following:

      TypeError: removeMaskPlane(): incompatible function arguments. The following argument types are supported:
          1. (arg0: str) -> None
      

      The fix here is to pass name to the function.

      Finally, I also noticed that the MultibandMask class is missing the removeAndClearMaskPlane() function. I don't think this was intentional, so one should be added.

        Attachments

          Activity

            People

            Assignee:
            lauren Lauren MacArthur
            Reporter:
            lauren Lauren MacArthur
            Reviewers:
            Ian Sullivan
            Watchers:
            Ian Sullivan, Jim Bosch, John Swinbank, Lauren MacArthur, Yusra AlSayyad
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.