Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-36486: Remove the deprecated prepareCalibratedExposures #805

Merged
merged 1 commit into from
Jun 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 0 additions & 31 deletions python/lsst/pipe/tasks/makeWarp.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

__all__ = ["MakeWarpTask", "MakeWarpConfig"]

from deprecated.sphinx import deprecated
import logging
import numpy

Expand Down Expand Up @@ -402,12 +401,6 @@ def run(self, calExpList, ccdIdList, skyInfo, visitId=0, dataIdList=None, **kwar
for calExpInd, (calExp, ccdId, dataId) in enumerate(zip(calExpList, ccdIdList, dataIdList)):
self.log.info("Processing calexp %d of %d for this Warp: id=%s",
calExpInd+1, len(calExpList), dataId)
# TODO: The following conditional is only required for backwards
# compatibility with the deprecated prepareCalibratedExposures()
# method. Can remove with its removal after the deprecation
# period.
if isinstance(calExp, DeferredDatasetHandle):
calExp = calExp.get()
try:
warpedAndMatched = self.warpAndPsfMatch.run(calExp, modelPsf=modelPsf,
wcs=skyInfo.wcs, maxBBox=skyInfo.bbox,
Expand Down Expand Up @@ -492,30 +485,6 @@ def filterInputs(self, indices, inputs):
inputs[key] = [inputs[key][ind] for ind in indices]
return inputs

@deprecated(reason="This method is deprecated in favor of its leading underscore version, "
"_prepareCalibratedfExposures(). Will be removed after v25.",
version="v25.0", category=FutureWarning)
def prepareCalibratedExposures(self, calExpList, backgroundList=None, skyCorrList=None,
externalSkyWcsCatalog=None, externalPhotoCalibCatalog=None,
finalizedPsfApCorrCatalog=None,
**kwargs):
"""Deprecated function.

Please use _prepareCalibratedExposure(), which this delegates to and
noting its slightly updated API, instead.
"""
# Read in all calexps.
calExpList = [ref.get() for ref in calExpList]
# Populate wcsList as required by new underscored version of function.
wcsList = [calexp.getWcs() for calexp in calExpList]

indices = self._prepareCalibratedExposures(calExpList=calExpList, wcsList=wcsList,
backgroundList=backgroundList, skyCorrList=skyCorrList,
externalSkyWcsCatalog=externalSkyWcsCatalog,
externalPhotoCalibCatalog=externalPhotoCalibCatalog,
finalizedPsfApCorrCatalog=finalizedPsfApCorrCatalog)
return indices

def _prepareCalibratedExposures(self, calExpList=[], wcsList=None, backgroundList=None, skyCorrList=None,
externalSkyWcsCatalog=None, externalPhotoCalibCatalog=None,
finalizedPsfApCorrCatalog=None, **kwargs):
Expand Down