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

Port HSC fix to fringe construction

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: pipe_drivers
    • Labels:
      None
    • Story Points:
      0.1
    • Epic Link:
    • Sprint:
      DRP F16-5
    • Team:
      Data Release Production

      Description

      This is a port of HSC-1421, which fixes a confusion between mask plane and mask bit.

        Attachments

          Issue Links

            Activity

            Hide
            price Paul Price added a comment -

            Ian Sullivan, would you mind reviewing this simple patch, please?

            price@price-laptop:~/LSST/pipe/drivers (tickets/DM-8033=) $ git sub-patch
            commit 16008d11330b1d20724f8bca5457c34835763cd3
            Author: Paul Price <price@astro.princeton.edu>
            Date:   Tue Oct 18 22:15:47 2016 -0400
             
                FringeTask: fix confusion between mask plane and mask bit
                
                setMaskFromFootprintList wants a mask bit, but we have been giving
                it a mask plane.
                
                Thanks to Michitaro Koike for discovering and fixing this bug.
             
            diff --git a/python/lsst/pipe/drivers/constructCalibs.py b/python/lsst/pipe/drivers/constructCalibs.py
            index e9e8269..12ed12b 100644
            --- a/python/lsst/pipe/drivers/constructCalibs.py
            +++ b/python/lsst/pipe/drivers/constructCalibs.py
            @@ -854,7 +854,7 @@ class FringeTask(CalibTask):
                     mi /= bgLevel
                     footprintSets = self.detection.detectFootprints(exposure, sigma=self.config.detectSigma)
                     mask = exposure.getMaskedImage().getMask()
            -        detected = mask.addMaskPlane("DETECTED")
            +        detected = 1 << mask.addMaskPlane("DETECTED")
                     for fpSet in (footprintSets.positive, footprintSets.negative):
                         if fpSet is not None:
                             afwDet.setMaskFromFootprintList(mask, fpSet.getFootprints(), detected)
            

            Show
            price Paul Price added a comment - Ian Sullivan , would you mind reviewing this simple patch, please? price@price-laptop:~/LSST/pipe/drivers (tickets/DM-8033=) $ git sub-patch commit 16008d11330b1d20724f8bca5457c34835763cd3 Author: Paul Price <price@astro.princeton.edu> Date: Tue Oct 18 22:15:47 2016 -0400   FringeTask: fix confusion between mask plane and mask bit setMaskFromFootprintList wants a mask bit, but we have been giving it a mask plane. Thanks to Michitaro Koike for discovering and fixing this bug.   diff --git a/python/lsst/pipe/drivers/constructCalibs.py b/python/lsst/pipe/drivers/constructCalibs.py index e9e8269..12ed12b 100644 --- a/python/lsst/pipe/drivers/constructCalibs.py +++ b/python/lsst/pipe/drivers/constructCalibs.py @@ -854,7 +854,7 @@ class FringeTask(CalibTask): mi /= bgLevel footprintSets = self.detection.detectFootprints(exposure, sigma=self.config.detectSigma) mask = exposure.getMaskedImage().getMask() - detected = mask.addMaskPlane("DETECTED") + detected = 1 << mask.addMaskPlane("DETECTED") for fpSet in (footprintSets.positive, footprintSets.negative): if fpSet is not None: afwDet.setMaskFromFootprintList(mask, fpSet.getFootprints(), detected)
            Hide
            sullivan Ian Sullivan added a comment -

            Sure, I'll have a look in the morning.

            Show
            sullivan Ian Sullivan added a comment - Sure, I'll have a look in the morning.
            Hide
            sullivan Ian Sullivan added a comment -

            Looks good, please go ahead and merge.

            Show
            sullivan Ian Sullivan added a comment - Looks good, please go ahead and merge.
            Hide
            price Paul Price added a comment -

            Thanks, Ian Sullivan.

            Merged to master.

            Show
            price Paul Price added a comment - Thanks, Ian Sullivan . Merged to master.

              People

              Assignee:
              price Paul Price
              Reporter:
              price Paul Price
              Reviewers:
              Ian Sullivan
              Watchers:
              Ian Sullivan, Paul Price
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins Builds

                  No builds found.