Skip to content

Commit

Permalink
Merge pull request #350 from lsst/tickets/DM-47368
Browse files Browse the repository at this point in the history
DM-47368: Restrict when subtractImages sources selector raises
  • Loading branch information
isullivan authored Nov 5, 2024
2 parents 376feae + 540c42c commit dd07d4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/lsst/ip/diffim/subtractImages.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,8 @@ def _sourceSelector(self, sources, mask):
self.log.error("Too few sources to calculate the PSF matching kernel: "
"%i selected but %i needed for the calculation.",
len(selectSources), self.config.minKernelSources)
raise RuntimeError("Cannot compute PSF matching kernel: too few sources selected.")
if not self.config.allowKernelSourceDetection:
raise RuntimeError("Cannot compute PSF matching kernel: too few sources selected.")
self.metadata["nPsfSources"] = len(selectSources)

return selectSources
Expand Down

0 comments on commit dd07d4d

Please sign in to comment.