Skip to content

Commit

Permalink
Throw better error message for PSF shape fails
Browse files Browse the repository at this point in the history
  • Loading branch information
arunkannawadi committed Oct 13, 2022
1 parent 5f450c7 commit 9f0cd3c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/lsst/meas/deblender/sourceDeblendTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ def deblend(self, exposure, srcs, psf):
center = fp.getCentroid()
psf_fwhm = self._getPsfFwhm(psf, center)

if not (psf_fwhm > 0):
raise ValueError(f"PSF at {center} has an invalid FWHM value of {psf_fwhm}")

self.log.trace('Parent %i: deblending %i peaks', int(src.getId()), len(pks))

self.preSingleDeblendHook(exposure, srcs, i, fp, psf, psf_fwhm, sigma1)
Expand Down

0 comments on commit 9f0cd3c

Please sign in to comment.