Skip to content

Commit 518ce33

Browse files
committed
Squash into afd61b0
afd61b didn't write out successful diffIms or partial outputs when algo error raised
1 parent 1ebd689 commit 518ce33

1 file changed

Lines changed: 5 additions & 16 deletions

File tree

python/lsst/ip/diffim/subtractImages.py

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -405,22 +405,17 @@ def _applyExternalCalibrations(self, exposure, visitSummary):
405405
def runQuantum(self, butlerQC, inputRefs, outputRefs):
406406
inputs = butlerQC.get(inputRefs)
407407

408-
subtractResults = lsst.pipe.base.Struct()
409408
try:
410-
self.run(**inputs, subtractResults=subtractResults)
409+
results = self.run(**inputs)
411410
except lsst.pipe.base.AlgorithmError as e:
412-
error = lsst.pipe.base.AnnotatedPartialOutputsError.annotate(
413-
e,
414-
self,
415-
log=self.log
416-
)
417-
butlerQC.put(subtractResults, outputRefs)
411+
error = lsst.pipe.base.AnnotatedPartialOutputsError.annotate(e, self, log=self.log)
412+
# No partial outputs for butler to put
418413
raise error from e
419414

420-
butlerQC.put(subtractResults, outputRefs)
415+
butlerQC.put(results, outputRefs)
421416

422417
@timeMethod
423-
def run(self, template, science, sources, visitSummary=None, subtractResults=None):
418+
def run(self, template, science, sources, visitSummary=None):
424419
"""PSF match, subtract, and decorrelate two images.
425420
426421
Parameters
@@ -437,10 +432,6 @@ def run(self, template, science, sources, visitSummary=None, subtractResults=Non
437432
Exposure catalog with external calibrations to be applied. Catalog
438433
uses the detector id for the catalog id, sorted on id for fast
439434
lookup.
440-
subtractResults : `lsst.pipe.base.Struct`, optional
441-
Result struct that is modified to allow saving of partial outputs
442-
for some failure conditions. If the task completes successfully,
443-
this is also returned.
444435
445436
Returns
446437
-------
@@ -458,8 +449,6 @@ def run(self, template, science, sources, visitSummary=None, subtractResults=Non
458449
Sources from the input catalog that were used to construct the
459450
PSF-matching kernel.
460451
"""
461-
if subtractResults is None:
462-
subtractResults = lsst.pipe.base.Struct()
463452
self._prepareInputs(template, science, visitSummary=visitSummary)
464453

465454
convolveTemplate = self.chooseConvolutionMethod(template, science)

0 commit comments

Comments
 (0)