From 5afa8e9e3fca6d7ac1cf2fdf27400b1728b0a773 Mon Sep 17 00:00:00 2001 From: fred3m Date: Wed, 26 Nov 2025 09:29:14 -0800 Subject: [PATCH 1/2] Always write deep coadds --- python/lsst/pipe/tasks/multiBand.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python/lsst/pipe/tasks/multiBand.py b/python/lsst/pipe/tasks/multiBand.py index 3b2eef00c..fa8db5467 100644 --- a/python/lsst/pipe/tasks/multiBand.py +++ b/python/lsst/pipe/tasks/multiBand.py @@ -170,7 +170,7 @@ class DetectCoaddSourcesConfig(PipelineTaskConfig, pipelineConnections=DetectCoa writeOnlyBackgrounds = Field(dtype=bool, default=False, doc="If true, only save the background models.") writeEmptyBackgrounds = Field( dtype=bool, - default=False, + default=True, doc=( "If true, save a placeholder background with NaNs in all bins (but the right geometry) when " "there are no pixels to compute a background from. This can be useful if a later task combines " @@ -261,9 +261,14 @@ def runQuantum(self, butlerQC, inputRefs, outputRefs): expId=idGenerator.catalog_id, patchInfo=patchInfo, ) - except (TooManyMaskedPixelsError, ExceedsMaxVarianceScaleError, InsufficientSourcesError) as e: + except ( + TooManyMaskedPixelsError, + ExceedsMaxVarianceScaleError, + InsufficientSourcesError, + ) as e: if self.config.writeEmptyBackgrounds: butlerQC.put(self._makeEmptyBackground(exposure, patchInfo), outputRefs.outputBackgrounds) + butlerQC.put(exposure, outputRefs.outputExposure) error = AnnotatedPartialOutputsError.annotate( e, self, From 83fdc4318fd26d4418cdbe48c70b71e873eb643a Mon Sep 17 00:00:00 2001 From: fred3m Date: Wed, 26 Nov 2025 15:50:16 -0800 Subject: [PATCH 2/2] Catch InsufficientSourcesError --- python/lsst/pipe/tasks/multiBand.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/lsst/pipe/tasks/multiBand.py b/python/lsst/pipe/tasks/multiBand.py index fa8db5467..e645b3c45 100644 --- a/python/lsst/pipe/tasks/multiBand.py +++ b/python/lsst/pipe/tasks/multiBand.py @@ -39,10 +39,12 @@ DynamicDetectionTask, ExceedsMaxVarianceScaleError, InsufficientSourcesError, + PsfGenerationError, ReferenceObjectLoader, ScaleVarianceTask, SetPrimaryFlagsTask, TooManyMaskedPixelsError, + ZeroFootprintError, ) from lsst.meas.base import ( SingleFrameMeasurementTask, @@ -265,6 +267,8 @@ def runQuantum(self, butlerQC, inputRefs, outputRefs): TooManyMaskedPixelsError, ExceedsMaxVarianceScaleError, InsufficientSourcesError, + PsfGenerationError, + ZeroFootprintError, ) as e: if self.config.writeEmptyBackgrounds: butlerQC.put(self._makeEmptyBackground(exposure, patchInfo), outputRefs.outputBackgrounds)