Skip to content

Commit

Permalink
Merge pull request #980 from lsst/tickets/DM-44688
Browse files Browse the repository at this point in the history
DM-44688: Deprecate matchingKernelSize from coaddBase
  • Loading branch information
arunkannawadi authored Dec 4, 2024
2 parents e500ccc + 94bfa7e commit 43b1a3a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
9 changes: 7 additions & 2 deletions python/lsst/pipe/tasks/coaddBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,16 @@ 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
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."
),
)


Expand Down
10 changes: 0 additions & 10 deletions python/lsst/pipe/tasks/makeWarp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 43b1a3a

Please sign in to comment.