Skip to content

Commit

Permalink
Merge pull request #502 from lsst/tickets/DM-29862
Browse files Browse the repository at this point in the history
DM-29862: Handle case where no bright stars are extracted
  • Loading branch information
MorganSchmitz committed May 10, 2021
2 parents 62ad60b + d5e3a42 commit 0c551f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/lsst/pipe/tasks/processBrightStars.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,9 @@ def run(self, inputExposure, refObjLoader=None, dataId=None, skyCorr=None):
self.log.info("Extracting bright stars from exposure %s", dataId)
# Extract stamps around bright stars
extractedStamps = self.extractStamps(inputExposure, refObjLoader=refObjLoader)
if not extractedStamps.starIms:
self.log.info("No suitable bright star found.")
return None
# Warp (and shift, and potentially rotate) them
self.log.info("Applying warp and/or shift to %i star stamps from exposure %s",
len(extractedStamps.starIms), dataId)
Expand Down Expand Up @@ -500,4 +503,5 @@ def runQuantum(self, butlerQC, inputRefs, outputRefs):
refCats=inputs.pop("refCat"),
config=self.config.refObjLoader)
output = self.run(**inputs, refObjLoader=refObjLoader)
butlerQC.put(output, outputRefs)
if output:
butlerQC.put(output, outputRefs)

0 comments on commit 0c551f4

Please sign in to comment.