Skip to content

Commit

Permalink
fixup: I forgot we had a method for this test
Browse files Browse the repository at this point in the history
  • Loading branch information
parejkoj committed Jul 7, 2023
1 parent 885b446 commit 3b0a285
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/test_exposure.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,15 +776,12 @@ def testGetCutoutPixel(self):
# Getting a cutout with a bbox should produce the same result.
box = lsst.geom.Box2D.makeCenteredBox(cutoutCenter, lsst.geom.Extent2D(cutoutSize))
cutout2 = self.exposureMiOnly.getCutout(box)
# NOTE: not testing variance, as it is inf beyond edge.
self.assertFloatsEqual(cutout.image.array, cutout2.image.array, ignoreNaNs=True)
self.assertFloatsEqual(cutout.mask.array, cutout2.mask.array, ignoreNaNs=True)
self.assertMaskedImagesEqual(cutout.maskedImage, cutout2.maskedImage)

# Similarly for Box2I
# Similarly for Box2I.
box = lsst.geom.Box2I.makeCenteredBox(cutoutCenter, lsst.geom.Extent2I(cutoutSize))
cutout3 = self.exposureMiOnly.getCutout(box)
self.assertFloatsEqual(cutout.image.array, cutout3.image.array, ignoreNaNs=True)
self.assertFloatsEqual(cutout.mask.array, cutout3.mask.array, ignoreNaNs=True)
self.assertMaskedImagesEqual(cutout.maskedImage, cutout3.maskedImage)
else:
with self.assertRaises(pexExcept.InvalidParameterError, msg=msg):
self.exposureMiOnly.getCutout(cutoutCenter, cutoutSize)
Expand Down

0 comments on commit 3b0a285

Please sign in to comment.