Skip to content

Commit

Permalink
Add note to SdssShape unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenam committed Dec 27, 2016
1 parent c42b4d7 commit 5dda6f0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/testSdssShape.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,15 @@ def _checkPsfShape(self, result, psfResult, psfTruth):
self.assertFalse(result.getFlag(lsst.meas.base.SdssShapeAlgorithm.PSF_SHAPE_BAD))

def testMeasureGoodPsf(self):
"""Test that we measure shapes and record the PSF shape correctly."""
"""Test that we measure shapes and record the PSF shape correctly
Note: Given that the PSF model here is constant over the entire image, this test
would not catch an error in the potition at which base_SdssShape_psf is computed.
Such a test requires a spatially varying PSF model such that different locations
can be distinguished by their different PSF model shapes. Such a test exists in
meas_algorithms (tests/testSdssShapePsf.py), making use of the PcaPsf algorithm
to build the spatially varying PSF.
"""
exposure, catalog = self._runMeasurementTask()
key = lsst.meas.base.SdssShapeResultKey(catalog.schema["base_SdssShape"])
psfTruth = exposure.getPsf().computeShape()
Expand Down Expand Up @@ -115,7 +123,7 @@ def testMeasureBadPsf(self):
self.config.plugins["base_SdssShape"].doMeasurePsf = True
task = self.makeSingleFrameMeasurementTask("base_SdssShape", config=self.config)
exposure, catalog = self.dataset.realize(10.0, task.schema)
exposure.setPsf(None) # Set Psf to None to test no psf case
exposure.setPsf(None) # Set PSF to None to test no PSF case
task.run(exposure, catalog)
key = lsst.meas.base.SdssShapeResultKey(catalog.schema["base_SdssShape"])
for record in catalog:
Expand Down

0 comments on commit 5dda6f0

Please sign in to comment.