Skip to content

Commit

Permalink
Merge pull request #325 from lsst/tickets/DM-44491
Browse files Browse the repository at this point in the history
DM-44491: Exclude more mask planes from detection
  • Loading branch information
isullivan authored May 29, 2024
2 parents b065fdd + 2ca02c6 commit d356a49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion python/lsst/ip/diffim/detectAndMeasure.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def setDefaults(self):
self.detection.thresholdValue = 5.0
self.detection.reEstimateBackground = False
self.detection.thresholdType = "pixel_stdev"
self.detection.excludeMaskPlanes = ["EDGE"]
self.detection.excludeMaskPlanes = ["EDGE", "SAT", "BAD", "INTRP"]

# Add filtered flux measurement, the correct measurement for pre-convolved images.
self.measurement.algorithms.names.add("base_PeakLikelihoodFlux")
Expand Down
7 changes: 2 additions & 5 deletions tests/test_detectAndMeasure.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def test_sky_sources(self):
# Catalog ids should be very large from this id generator.
self.assertTrue(all(output.diaSources['id'] > 1000000000))

def test_edge_detections(self):
def test_exclude_mask_detections(self):
"""Sources with certain bad mask planes set should not be detected.
"""
# Set up the simulated images
Expand Down Expand Up @@ -508,9 +508,6 @@ def test_fake_mask_plane_propagation(self):

# Now check that detection of fakes have the correct flag for injections
detectionTask = self._setup_detection()
excludeMaskPlanes = detectionTask.config.detection.excludeMaskPlanes
nBad = len(excludeMaskPlanes)
self.assertEqual(nBad, 1)

output = detectionTask.run(subtraction.matchedScience,
subtraction.matchedTemplate,
Expand Down Expand Up @@ -788,7 +785,7 @@ def test_sky_sources(self):
# Catalog ids should be very large from this id generator.
self.assertTrue(all(output.diaSources['id'] > 1000000000))

def test_edge_detections(self):
def test_exclude_mask_detections(self):
"""Sources with certain bad mask planes set should not be detected.
"""
# Set up the simulated images
Expand Down

0 comments on commit d356a49

Please sign in to comment.