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-41646: Fix logging when all visits rejected in BestSeeingSelectVisitsTask. #861

Merged
merged 2 commits into from
Nov 9, 2023
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
13 changes: 11 additions & 2 deletions python/lsst/pipe/tasks/selectImages.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,17 @@ def run(self, visitSummaries, skyMap, dataId):
output = sortedVisits
else:
output = sortedVisits[:self.config.nVisitsMax]
self.log.info("%d images selected with FWHM range of %f--%f arcseconds",
len(output), fwhmSizes[visits.index(output[0])], fwhmSizes[visits.index(output[-1])])

if len(output) == 0:
self.log.info("All images rejected in BestSeeingSelectVisitsTask.")
raise pipeBase.NoWorkFound(f"No good images found for {dataId}")
else:
self.log.info(
"%d images selected with FWHM range of %f--%f arcseconds",
len(output),
fwhmSizes[visits.index(output[0])],
fwhmSizes[visits.index(output[-1])],
)
erykoff marked this conversation as resolved.
Show resolved Hide resolved

# In order to store as a StructuredDataDict, convert list to dict
goodVisits = {key: True for key in output}
Expand Down