From 7e73bec00574aebc868e78c85858c97457073473 Mon Sep 17 00:00:00 2001 From: Ian Sullivan Date: Mon, 30 Jun 2025 17:11:35 -0700 Subject: [PATCH] Catch a broader set of psf exceptions --- python/lsst/ip/diffim/subtractImages.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/lsst/ip/diffim/subtractImages.py b/python/lsst/ip/diffim/subtractImages.py index d45bf775f..d01b53eda 100644 --- a/python/lsst/ip/diffim/subtractImages.py +++ b/python/lsst/ip/diffim/subtractImages.py @@ -871,7 +871,12 @@ def _prepareInputs(self, template, science, visitSummary=None): try: self.templatePsfSize = getPsfFwhm(template.psf) self.sciencePsfSize = getPsfFwhm(science.psf) - except (lsst.pex.exceptions.InvalidParameterError, lsst.pex.exceptions.RangeError): + except lsst.pex.exceptions.Exception: + # Catch a broad range of exceptions, since some are C++ only + # Catching: + # - lsst::geom::SingularTransformException + # - lsst.pex.exceptions.InvalidParameterError + # - lsst.pex.exceptions.RangeError self.log.info("Unable to evaluate PSF at the average position. " "Evaluting PSF on a grid of points." )