diff --git a/python/lsst/pipe/tasks/skyCorrection.py b/python/lsst/pipe/tasks/skyCorrection.py index 588b69812..d1d2a8fc4 100644 --- a/python/lsst/pipe/tasks/skyCorrection.py +++ b/python/lsst/pipe/tasks/skyCorrection.py @@ -402,8 +402,8 @@ def _restoreOriginalBackgroundRefineMask(self, calExps, calBkgs): return calExps, skyCorrBases def _undoInitialBackground(self, calExps, calBkgs): - """Restores the full focal-plane background to a visit. - Runs after _subtractSkyFrame() if doBgModel1=False. + """Undo the initial background subtraction (bgModel1) after sky frame + subtraction. Parameters ---------- @@ -419,7 +419,7 @@ def _undoInitialBackground(self, calExps, calBkgs): for calExp, calBkg in zip(calExps, calBkgs): image = calExp.getMaskedImage() - # Restore full focal-plane background in calexp; remove from BGList + # Remove bgModel1 from the background list; restore in the image skyCorrBase = calBkg[-2][0].getImageF() image += skyCorrBase calBkg._backgrounds.pop(-2)