Skip to content

Commit

Permalink
Add check for missing aperture correction.
Browse files Browse the repository at this point in the history
  • Loading branch information
erykoff committed Jul 17, 2023
1 parent 59cc61a commit 40740dd
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions python/lsst/meas/base/forcedPhotCcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,14 @@ def run(self, measCat, exposure, refCat, refWcs, exposureId=None):
"""
self.measurement.run(measCat, exposure, refCat, refWcs, exposureId=exposureId)
if self.config.doApCorr:
self.applyApCorr.run(
catalog=measCat,
apCorrMap=exposure.getInfo().getApCorrMap()
)
apCorrMap = exposure.getInfo().getApCorrMap()
if apCorrMap is None:
self.log.warning("Forced exposure image does not have valid aperture correction; skipping.")
else:
self.applyApCorr.run(
catalog=measCat,
apCorrMap=apCorrMap,
)
self.catalogCalculation.run(measCat)

return pipeBase.Struct(measCat=measCat)
Expand Down

0 comments on commit 40740dd

Please sign in to comment.