Skip to content

Commit

Permalink
Test that NoPixelError is raised and flags are set
Browse files Browse the repository at this point in the history
  • Loading branch information
arunkannawadi committed Jan 10, 2024
1 parent 29b92e5 commit 65718d2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_gaap.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,14 @@ def testFlags(self, sigmas=[0.4, 0.5, 0.7], scalingFactors=[1.15, 1.25, 1.4, 100
except InvalidParameterError:
self.assertTrue(record[baseName + "_flag_bigPsf"])

# Set an empty footprint and check that no_pixels flag is set.
record = catalog[1]
record.setFootprint(afwDetection.Footprint())
with self.assertRaises(lsst.meas.extensions.gaap._gaap.NoPixelError):
algorithm.measure(record, exposure)
self.assertTrue(record[algName + "_flag"])
self.assertTrue(record[algName + "_flag_no_pixel"])

# Ensure that the edge flag is set for the source at the corner.
record = catalog[2]
algorithm.measure(record, exposure)
Expand Down

0 comments on commit 65718d2

Please sign in to comment.