Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: meas_algorithms
-
Labels:None
-
Story Points:2
-
Epic Link:
-
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.
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")