Skip to content

Commit

Permalink
Do not raise an error in source selection if allowKernelSourceDetecti…
Browse files Browse the repository at this point in the history
…on=True
  • Loading branch information
isullivan committed Nov 4, 2024
1 parent 376feae commit c4c4304
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 ~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 c4c4304

Please sign in to comment.