Skip to content

Commit

Permalink
Fix bbox issue behind the untrimmed unit test failures.
Browse files Browse the repository at this point in the history
Although CrosstalkExtractTask had a config parameter for the trimmed
state, it wasn't using it consistently.
  • Loading branch information
czwa committed Apr 8, 2021
1 parent 434b3eb commit c64ba88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion python/lsst/cp/pipe/measureCrosstalk.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ def run(self, inputExp, sourceExps=[]):

for sourceAmp in sourceDetector:
sourceAmpName = sourceAmp.getName()
sourceAmpImage = sourceIm[sourceAmp.getBBox()]
sourceAmpBBox = sourceAmp.getBBox() if self.config.isTrimmed else sourceAmp.getRawDataBBox()
sourceAmpImage = sourceIm[sourceAmpBBox]
sourceMask = sourceAmpImage.mask.array
select = ((sourceMask & detected > 0)
& (sourceMask & bad == 0)
Expand Down
4 changes: 1 addition & 3 deletions tests/test_measureCrosstalk.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ def testMeasureCrosstalkTaskUntrimmed(self):
"""
goodFitMask = self.setup_measureCrosstalk(isTrimmed=False, nSources=8)

# DM-26031 This doesn't always fully converge, so be permissive
# for now.
self.assertTrue(np.any(goodFitMask))
self.assertTrue(np.all(goodFitMask))


class MemoryTester(lsst.utils.tests.MemoryTestCase):
Expand Down

0 comments on commit c64ba88

Please sign in to comment.