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

Add normalize method to Defects

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: meas_algorithms
    • Labels:
      None
    • Story Points:
      2
    • Sprint:
      DRP S20-6 (May)
    • Team:
      Data Release Production
    • Urgent?:
      No

      Description

      There have recently been discussions regarding Defects where new defects are appended to the existing list of defects. This works fine but can result in a situation where lots of tiny bounding boxes could be represented by a few large bounding boxes. Many things become more efficient if the minimal set of bounding boxes is used by downstream processing.

      This ticket will add a normalize method to Defects that will recalculate the defect bounding boxes. One implementation could be to generate a mask from the defects and then recalculate the defects from the mask. This would have the side effect of allowing direct comparison of two different Defects instances.

        Attachments

          Issue Links

            Activity

            Hide
            czw Christopher Waters added a comment -

            From a discussion in the Monday calibration products call, this probably is just something like this out-of-class snippet:

            myDefects = Defects.readFits(filenameToRead)
            mi = afwImage.MaskedImageF(bboxMatchingDefects)
            myDefects.maskPixels(mi, maskName="defectNorm")
            myNewDefects = Defects.fromMask(mi, "defectNorm")

            Show
            czw Christopher Waters added a comment - From a discussion in the Monday calibration products call, this probably is just something like this out-of-class snippet: myDefects = Defects.readFits(filenameToRead) mi = afwImage.MaskedImageF(bboxMatchingDefects) myDefects.maskPixels(mi, maskName="defectNorm") myNewDefects = Defects.fromMask(mi, "defectNorm")
            Hide
            tjenness Tim Jenness added a comment -

            Exactly. Internally you wouldn't need the readFits and then you would replace the internal list of bounding boxes. You do have to decide whether this is a mutable method or something that returns a new Defects object to the caller.

            Show
            tjenness Tim Jenness added a comment - Exactly. Internally you wouldn't need the readFits and then you would replace the internal list of bounding boxes. You do have to decide whether this is a mutable method or something that returns a new Defects object to the caller.
            Show
            plazas Andrés Alejandro Plazas Malagón added a comment - Latest Jenkins: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/31774/pipeline
            Hide
            mfisherlevine Merlin Fisher-Levine added a comment -

            Comments left on PRs.

            Show
            mfisherlevine Merlin Fisher-Levine added a comment - Comments left on PRs.
            Show
            plazas Andrés Alejandro Plazas Malagón added a comment - Latest Jenkins: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/31802/pipeline
            Hide
            plazas Andrés Alejandro Plazas Malagón added a comment -

            Expected defects in tests of cp_pipe had to be modified accordingly (due to normalization). See: DM-19903

            Latest Jenkins: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/31825/

            Show
            plazas Andrés Alejandro Plazas Malagón added a comment - Expected defects in tests of cp_pipe had to be modified accordingly (due to normalization). See: DM-19903 Latest Jenkins: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/31825/
            Hide
            plazas Andrés Alejandro Plazas Malagón added a comment -

            There's a new version of falke8 that brings to light new errors that can only be found, for now, via Travis. After fixing a few of those, latest Jenkins: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/31834/pipeline

            Show
            plazas Andrés Alejandro Plazas Malagón added a comment - There's a new version of falke8 that brings to light new errors that can only be found, for now, via Travis. After fixing a few of those, latest Jenkins: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/31834/pipeline
            Hide
            mfisherlevine Merlin Fisher-Levine added a comment -

            Just reread it all - looks great Minor comment on one of the PRs.

            Show
            mfisherlevine Merlin Fisher-Levine added a comment - Just reread it all - looks great Minor comment on one of the PRs.

              People

              Assignee:
              plazas Andrés Alejandro Plazas Malagón
              Reporter:
              tjenness Tim Jenness
              Reviewers:
              Merlin Fisher-Levine
              Watchers:
              Andrés Alejandro Plazas Malagón, Christopher Waters, John Swinbank, Merlin Fisher-Levine, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins Builds

                  No builds found.