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-27177: Deprecate transitional getFilterLabel API #216

Merged
merged 1 commit into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion python/lsst/ip/isr/assembleCcdTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def postprocessExposure(self, outExposure, inExposure):
# note: don't copy PhotoCalib, because it is assumed to be unknown in
# raw data.
outExposure.info.id = inExposure.info.id
outExposure.setFilterLabel(inExposure.getFilterLabel())
outExposure.setFilter(inExposure.getFilter())
outExposure.getInfo().setVisitInfo(inExposure.getInfo().getVisitInfo())

frame = getDebugFrame(self._display, "assembledExposure")
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/ip/isr/isrFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ def checkFilter(exposure, filterList, log):
"""
if len(filterList) == 0:
return False
thisFilter = exposure.getFilterLabel()
thisFilter = exposure.getFilter()
if thisFilter is None:
log.warning("No FilterLabel attached to this exposure!")
return False
Expand Down
6 changes: 3 additions & 3 deletions python/lsst/ip/isr/isrTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ def readIsrData(self, dataRef, rawExposure):
dateObs = None

ccd = rawExposure.getDetector()
filterLabel = rawExposure.getFilterLabel()
filterLabel = rawExposure.getFilter()
physicalFilter = isrFunctions.getPhysicalFilter(filterLabel, self.log)
rawExposure.mask.addMaskPlane("UNMASKEDNAN") # needed to match pre DM-15862 processing.
biasExposure = (self.getIsrExposure(dataRef, self.config.biasDataProductName)
Expand Down Expand Up @@ -1418,7 +1418,7 @@ def run(self, ccdExposure, *, camera=None, bias=None, linearizer=None,
return self.runDataRef(ccdExposure)

ccd = ccdExposure.getDetector()
filterLabel = ccdExposure.getFilterLabel()
filterLabel = ccdExposure.getFilter()
physicalFilter = isrFunctions.getPhysicalFilter(filterLabel, self.log)

if not ccd:
Expand Down Expand Up @@ -2639,7 +2639,7 @@ def roughZeroPoint(self, exposure):
exposure : `lsst.afw.image.Exposure`
Exposure to process.
"""
filterLabel = exposure.getFilterLabel()
filterLabel = exposure.getFilter()
physicalFilter = isrFunctions.getPhysicalFilter(filterLabel, self.log)

if physicalFilter in self.config.fluxMag0T1:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_fringes.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def createFringe(width, height, xFreq, xOffset, yFreq, yOffset):
array[x, y] = np.sin(xFreq*x + xOffset) + np.sin(yFreq*y + yOffset)
mi = afwImage.makeMaskedImage(image)
exp = afwImage.makeExposure(mi)
exp.setFilterLabel(afwImage.FilterLabel(band='y', physical='FILTER'))
exp.setFilter(afwImage.FilterLabel(band='y', physical='FILTER'))
return exp


Expand Down Expand Up @@ -217,7 +217,7 @@ def testMultiple(self, pedestal=0.0):
image.scaledPlus(s, f.getMaskedImage().getImage())
mi = afwImage.makeMaskedImage(image)
exp = afwImage.makeExposure(mi)
exp.setFilterLabel(afwImage.FilterLabel(physical='FILTER'))
exp.setFilter(afwImage.FilterLabel(physical='FILTER'))

task = FringeTask(name="multiFringe", config=self.config)
self.checkFringe(task, exp, fringeList, stddevMax=1.0e-2)
Expand Down Expand Up @@ -274,7 +274,7 @@ def test_multiFringes(self):
dataRef = isrMock.FringeDataRefMock(config=config)

exp = dataRef.get("raw")
exp.setFilterLabel(afwImage.FilterLabel(physical='FILTER'))
exp.setFilter(afwImage.FilterLabel(physical='FILTER'))
medianBefore = np.nanmedian(exp.getImage().getArray())
fringes = task.readFringes(dataRef, assembler=None)

Expand Down