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

SpanSet.fromMask produces larger spans than image

    Details

    • Type: Story
    • Status: Done
    • Priority: Undefined
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw
    • Labels:
    • Templates:
    • Team:
      External

      Description

      Producing a SpanSet from a Mask resulted in SpanSet.getArea() > Mask.getBBox().getArea(), which is "impossible".

      (Pdb) lsst.afw.geom.SpanSet.fromMask(mask, mask.getPlaneBitMask(config.mask)).getArea()
      6611104
      (Pdb) mask.getBBox().getArea()
      699678
      (Pdb) (mask.array & mask.getPlaneBitMask(config.mask) > 0).sum()
      153623
      (Pdb) mask.getBBox()
      Box2I(minimum=Point2I(12345, 67890), dimensions=Extent2I(1234, 567))
      (Pdb) lsst.afw.geom.SpanSet.fromMask(mask, mask.getPlaneBitMask(config.mask)).getBBox()
      Box2I(minimum=Point2I(9735, 67893), dimensions=Extent2I(3841, 561))
      

      This comes from playing fast and loose with types.

        Attachments

          Container Issues

            Issue Links

              Activity

                People

                • Assignee:
                  price Paul Price
                  Reporter:
                  price Paul Price
                  Reviewers:
                  Nate Lust
                  Watchers:
                  Nate Lust, Paul Price
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Summary Panel