From 5a726028d0989f6ed256a8bc4e16a9beda7549ea Mon Sep 17 00:00:00 2001 From: Ian Sullivan Date: Sun, 11 May 2025 12:42:48 -0700 Subject: [PATCH] Always include background fitting in the PSF kernel fit --- python/lsst/ip/diffim/subtractImages.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/lsst/ip/diffim/subtractImages.py b/python/lsst/ip/diffim/subtractImages.py index 2e8a8acff..05d1e644a 100644 --- a/python/lsst/ip/diffim/subtractImages.py +++ b/python/lsst/ip/diffim/subtractImages.py @@ -242,7 +242,9 @@ class AlardLuptonSubtractBaseConfig(lsst.pex.config.Config): def setDefaults(self): self.makeKernel.kernel.name = "AL" - self.makeKernel.kernel.active.fitForBackground = self.doSubtractBackground + # Always include background fitting in the kernel fit, + # even if it is not subtracted + self.makeKernel.kernel.active.fitForBackground = True self.makeKernel.kernel.active.spatialKernelOrder = 1 self.makeKernel.kernel.active.spatialBgOrder = 2 self.sourceSelector.doUnresolved = True # apply star-galaxy separation