Skip to content

Commit

Permalink
Fix logging when all visits rejected in BestSeeingSelectVisitsTask.
Browse files Browse the repository at this point in the history
  • Loading branch information
erykoff committed Nov 8, 2023
1 parent 7e5a809 commit 2949656
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions python/lsst/pipe/tasks/selectImages.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,16 @@ 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.")
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])],
)

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

0 comments on commit 2949656

Please sign in to comment.