Skip to content

Commit 9a2052a

Browse files
committed
Preserve aperture corrections when building multi-band exposures
1 parent 8ba255a commit 9a2052a

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

python/lsst/pipe/tasks/measurementDriver.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,9 +1139,9 @@ def _ensureValidInputs(
11391139
processed by this multi-band driver.
11401140
bands :
11411141
List of bands associated with the exposures in ``mExposure`` after
1142-
potential adjustments. If not provided in the input, it will be set
1143-
to a list containing only the provided (or inferred as "unknown")
1144-
``refBand`` value.
1142+
potential adjustments. If not provided for single-band input when
1143+
using this multi-band driver, it will be set to a list containing
1144+
only the provided (or inferred as "unknown") ``refBand`` value.
11451145
"""
11461146

11471147
# Perform basic checks that are shared with all driver tasks.
@@ -1375,12 +1375,14 @@ def _buildMultibandExposure(
13751375
# function's signature, even when using a single band.
13761376
mExposure = afwImage.MultibandExposure.fromExposures(bands, [mExposureData])
13771377

1378-
# Attach the WCS from each input exposure to the corresponding band of
1379-
# the multi-band exposure; otherwise, their WCS will be None,
1380-
# potentially causing issues downstream. Note that afwImage does not do
1381-
# this when constructing a MultibandExposure from exposures.
1378+
# Attach the WCS and ApCorrMap from each input exposure to the
1379+
# corresponding band of the multi-band exposure; otherwise, their WCS
1380+
# and ApCorrMap will be None, potentially causing issues downstream.
1381+
# Note that afwImage does not handle this when constructing a
1382+
# MultibandExposure from exposures.
13821383
for band, exposure in zip(bands, mExposureData):
13831384
mExposure[band].setWcs(exposure.getWcs())
1385+
mExposure[band].setApCorrMap(exposure.getInfo().getApCorrMap())
13841386

13851387
return mExposure
13861388

0 commit comments

Comments
 (0)