Skip to content

Commit 1c5cce2

Browse files
authored
Merge pull request #1173 from lsst/tickets/DM-52921
DM-52921: Catch more errors as AnnotatedPartialOutputsError
2 parents 34f47c7 + f57ded2 commit 1c5cce2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

python/lsst/pipe/tasks/multiBand.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,15 @@
3535
)
3636
import lsst.pipe.base.connectionTypes as cT
3737
from lsst.pex.config import Field, ConfigurableField, ChoiceField
38-
from lsst.meas.algorithms import DynamicDetectionTask, ReferenceObjectLoader, ScaleVarianceTask, \
39-
SetPrimaryFlagsTask
40-
from lsst.meas.algorithms.subtractBackground import TooManyMaskedPixelsError
38+
from lsst.meas.algorithms import (
39+
DynamicDetectionTask,
40+
ExceedsMaxVarianceScaleError,
41+
InsufficientSourcesError,
42+
ReferenceObjectLoader,
43+
ScaleVarianceTask,
44+
SetPrimaryFlagsTask,
45+
TooManyMaskedPixelsError,
46+
)
4147
from lsst.meas.base import (
4248
SingleFrameMeasurementTask,
4349
ApplyApCorrTask,
@@ -254,7 +260,7 @@ def runQuantum(self, butlerQC, inputRefs, outputRefs):
254260
expId=idGenerator.catalog_id,
255261
patchInfo=patchInfo,
256262
)
257-
except TooManyMaskedPixelsError as e:
263+
except (TooManyMaskedPixelsError, ExceedsMaxVarianceScaleError, InsufficientSourcesError) as e:
258264
if self.config.writeEmptyBackgrounds:
259265
butlerQC.put(self._makeEmptyBackground(exposure, patchInfo), outputRefs.outputBackgrounds)
260266
error = AnnotatedPartialOutputsError.annotate(

0 commit comments

Comments
 (0)