From f8d2e04b38ab4a057fdb6944db44a0cf3f59112b Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Tue, 3 Dec 2024 17:49:40 -0500 Subject: [PATCH 1/4] Fix the typo in ScaleZeroPoint documentation name --- ....rst => lsst.pipe.tasks.scaleZeroPoint.ScaleZeroPointTask.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/lsst.pipe.tasks/tasks/{lsst.pipe.tasks.scaleVariance.ScaleZeroPointTask.rst => lsst.pipe.tasks.scaleZeroPoint.ScaleZeroPointTask.rst} (100%) diff --git a/doc/lsst.pipe.tasks/tasks/lsst.pipe.tasks.scaleVariance.ScaleZeroPointTask.rst b/doc/lsst.pipe.tasks/tasks/lsst.pipe.tasks.scaleZeroPoint.ScaleZeroPointTask.rst similarity index 100% rename from doc/lsst.pipe.tasks/tasks/lsst.pipe.tasks.scaleVariance.ScaleZeroPointTask.rst rename to doc/lsst.pipe.tasks/tasks/lsst.pipe.tasks.scaleZeroPoint.ScaleZeroPointTask.rst From 40f99a9bbfa015d9c8d95ad400a420b15cca1c7c Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Tue, 3 Dec 2024 17:46:25 -0500 Subject: [PATCH 2/4] Remove scaleVariance method from coaddBase --- python/lsst/pipe/tasks/coaddBase.py | 35 ----------------------------- 1 file changed, 35 deletions(-) diff --git a/python/lsst/pipe/tasks/coaddBase.py b/python/lsst/pipe/tasks/coaddBase.py index e88d89c87..01a2aa768 100644 --- a/python/lsst/pipe/tasks/coaddBase.py +++ b/python/lsst/pipe/tasks/coaddBase.py @@ -27,7 +27,6 @@ import lsst.geom as geom from lsst.afw.geom import Polygon -from lsst.meas.algorithms import ScaleVarianceTask from .selectImages import PsfWcsSelectImagesTask from .coaddInputRecorder import CoaddInputRecorderTask @@ -156,40 +155,6 @@ def makeSkyInfo(skyMap, tractId, patchId): ) -def scaleVariance(maskedImage, maskPlanes, log=None): - """Scale the variance in a maskedImage - - This is deprecated. Use the ScaleVarianceTask instead. - - Parameters - ---------- - maskedImage : `lsst.afw.image.MaskedImage` - MaskedImage to operate on; variance will be scaled. - maskPlanes : `list` - List of mask planes for pixels to reject. - log : `Unknown` - Log for reporting the renormalization factor; or None. - - Returns - ------- - task.run : `Unknown` - Renormalization factor. - - Notes - ----- - The variance plane in a convolved or warped image (or a coadd derived - from warped images) does not accurately reflect the noise properties of - the image because variance has been lost to covariance. This function - attempts to correct for this by scaling the variance plane to match - the observed variance in the image. This is not perfect (because we're - not tracking the covariance) but it's simple and is often good enough. - """ - config = ScaleVarianceTask.ConfigClass() - config.maskPlanes = maskPlanes - task = ScaleVarianceTask(config=config, name="scaleVariance", log=log) - return task.run(maskedImage) - - def reorderAndPadList(inputList, inputKeys, outputKeys, padWith=None): """Match the order of one list to another, padding if necessary From f507f797704acb2967af9599567364a02c12d7ae Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Tue, 3 Dec 2024 17:48:53 -0500 Subject: [PATCH 3/4] Remove documentation for ScaleVarianceTask --- ....tasks.scaleVariance.ScaleVarianceTask.rst | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 doc/lsst.pipe.tasks/tasks/lsst.pipe.tasks.scaleVariance.ScaleVarianceTask.rst diff --git a/doc/lsst.pipe.tasks/tasks/lsst.pipe.tasks.scaleVariance.ScaleVarianceTask.rst b/doc/lsst.pipe.tasks/tasks/lsst.pipe.tasks.scaleVariance.ScaleVarianceTask.rst deleted file mode 100644 index bd9a2b782..000000000 --- a/doc/lsst.pipe.tasks/tasks/lsst.pipe.tasks.scaleVariance.ScaleVarianceTask.rst +++ /dev/null @@ -1,31 +0,0 @@ -.. lsst-task-topic:: lsst.pipe.tasks.scaleVariance.ScaleVarianceTask - -################# -ScaleVarianceTask -################# - -.. _lsst.pipe.tasks.scaleVariance.ScaleVarianceTask-api: - -Python API summary -================== - -.. lsst-task-api-summary:: lsst.pipe.tasks.scaleVariance.ScaleVarianceTask - -.. _lsst.pipe.tasks.scaleVariance.ScaleVarianceTask-subtasks: - -Retargetable subtasks -===================== - -.. lsst-task-config-subtasks:: lsst.pipe.tasks.scaleVariance.ScaleVarianceTask - -.. _lsst.pipe.tasks.scaleVariance.ScaleVarianceTask-configs: - -Configuration fields -==================== - -.. lsst-task-config-fields:: lsst.pipe.tasks.scaleVariance.ScaleVarianceTask - -Python API reference -==================== - -.. automodapi:: lsst.pipe.tasks.scaleVariance From 7f9d96dfd7f9307a53da2ac61b03096aaaddfccd Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Tue, 3 Dec 2024 17:17:52 -0500 Subject: [PATCH 4/4] Remove the deprecated ScaleVarianceTask --- python/lsst/pipe/tasks/scaleVariance.py | 44 ------------------------- 1 file changed, 44 deletions(-) delete mode 100644 python/lsst/pipe/tasks/scaleVariance.py diff --git a/python/lsst/pipe/tasks/scaleVariance.py b/python/lsst/pipe/tasks/scaleVariance.py deleted file mode 100644 index 2ea6ca239..000000000 --- a/python/lsst/pipe/tasks/scaleVariance.py +++ /dev/null @@ -1,44 +0,0 @@ -# This file is part of pipe_tasks. -# -# Developed for the LSST Data Management System. -# This product includes software developed by the LSST Project -# (https://www.lsst.org). -# See the COPYRIGHT file at the top-level directory of this distribution -# for details of code ownership. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -__all__ = ["ScaleVarianceConfig", "ScaleVarianceTask"] - -from deprecated.sphinx import deprecated - -import lsst.meas.algorithms - - -class ScaleVarianceConfig(lsst.meas.algorithms.ScaleVarianceConfig): - pass - - -@deprecated( - reason="Please use lsst.meas.algorithms.ScaleVarianceTask instead. Will be removed after v24.", - version="v24.0", - category=FutureWarning, -) -class ScaleVarianceTask(lsst.meas.algorithms.ScaleVarianceTask): - """Scale the variance in a MaskedImage - - This version of ``ScaleVarianceTask`` is deprecated, and the Task - in ``lsst.meas.algorithms`` should be used instead. - """ - _DefaultName = "scaleVarianceDeprecated"