Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions python/lsst/pipe/tasks/multiBand.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@
DynamicDetectionTask,
ExceedsMaxVarianceScaleError,
InsufficientSourcesError,
PsfGenerationError,
ReferenceObjectLoader,
ScaleVarianceTask,
SetPrimaryFlagsTask,
TooManyMaskedPixelsError,
ZeroFootprintError,
)
from lsst.meas.base import (
SingleFrameMeasurementTask,
Expand Down Expand Up @@ -170,7 +172,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 "
Expand Down Expand Up @@ -261,9 +263,16 @@ def runQuantum(self, butlerQC, inputRefs, outputRefs):
expId=idGenerator.catalog_id,
patchInfo=patchInfo,
)
except (TooManyMaskedPixelsError, ExceedsMaxVarianceScaleError, InsufficientSourcesError) as e:
except (
TooManyMaskedPixelsError,
ExceedsMaxVarianceScaleError,
InsufficientSourcesError,
PsfGenerationError,
ZeroFootprintError,
) as e:
if self.config.writeEmptyBackgrounds:
butlerQC.put(self._makeEmptyBackground(exposure, patchInfo), outputRefs.outputBackgrounds)
butlerQC.put(exposure, outputRefs.outputExposure)
error = AnnotatedPartialOutputsError.annotate(
e,
self,
Expand Down