From 4ab970f0ac5abe04a7de07799d0459facc50a971 Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Tue, 3 Dec 2024 16:48:23 -0500 Subject: [PATCH 1/3] Stop using matchingKernelSize --- python/lsst/pipe/tasks/makeWarp.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/python/lsst/pipe/tasks/makeWarp.py b/python/lsst/pipe/tasks/makeWarp.py index f5baa6588..9bc0b7bd9 100644 --- a/python/lsst/pipe/tasks/makeWarp.py +++ b/python/lsst/pipe/tasks/makeWarp.py @@ -177,20 +177,10 @@ def validate(self): # present to check that. raise ValueError("Image warping cache size and CoaddPSf warping cache size do not agree.") - if self.matchingKernelSize: - if self.matchingKernelSize != self.warpAndPsfMatch.psfMatch.kernel.active.kernelSize: - raise pexConfig.FieldValidationError( - self.__class__.matchingKernelSize, self, - f"matchingKernelSize ({self.matchingKernelSize}) must match " - "warpAndPsfMatch.psfMatch.kernel.active.kernelSize " - f"({self.warpAndPsfMatch.psfMatch.kernel.active.kernelSize})" - ) - def setDefaults(self): CoaddBaseTask.ConfigClass.setDefaults(self) self.warpAndPsfMatch.warp.cacheSize = 0 self.coaddPsf.cacheSize = 0 - self.warpAndPsfMatch.psfMatch.kernel.active.kernelSize = self.matchingKernelSize class MakeWarpTask(CoaddBaseTask): From 7840321efd0043546371ba0564eba062bcd620d1 Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Wed, 25 Sep 2024 16:27:14 -0400 Subject: [PATCH 2/3] Deprecate matchingKernelSize from coaddBase --- python/lsst/pipe/tasks/coaddBase.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/lsst/pipe/tasks/coaddBase.py b/python/lsst/pipe/tasks/coaddBase.py index 3179e5930..0dace618c 100644 --- a/python/lsst/pipe/tasks/coaddBase.py +++ b/python/lsst/pipe/tasks/coaddBase.py @@ -61,11 +61,15 @@ class CoaddBaseConfig(pexConfig.Config): doc="Add photometric calibration variance to warp variance plane.", default=False ) + # TODO: Remove this field in DM-44792. matchingKernelSize = pexConfig.Field( dtype=int, doc="Size in pixels of matching kernel. Must be odd.", default=21, - check=lambda x: x % 2 == 1 + check=lambda x: x % 2 == 1, + deprecated=("This field is deprecated without a replacement. Its value has no effect. " + "Will be removed after v29." + ), ) From 94bfa7ea92bff2f610ee52d488cb896271b5d516 Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Tue, 3 Dec 2024 16:48:38 -0500 Subject: [PATCH 3/3] Make matchingKernelSize optional --- python/lsst/pipe/tasks/coaddBase.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/lsst/pipe/tasks/coaddBase.py b/python/lsst/pipe/tasks/coaddBase.py index 0dace618c..e88d89c87 100644 --- a/python/lsst/pipe/tasks/coaddBase.py +++ b/python/lsst/pipe/tasks/coaddBase.py @@ -65,7 +65,8 @@ class CoaddBaseConfig(pexConfig.Config): matchingKernelSize = pexConfig.Field( dtype=int, doc="Size in pixels of matching kernel. Must be odd.", - default=21, + default=None, + optional=True, check=lambda x: x % 2 == 1, deprecated=("This field is deprecated without a replacement. Its value has no effect. " "Will be removed after v29."