Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-29862: Handle case where no bright stars are extracted #502

Merged
merged 1 commit into from
May 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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)