diff --git a/python/lsst/pipe/tasks/multiBand.py b/python/lsst/pipe/tasks/multiBand.py index 6b8ed0c71b..0f4b07961b 100644 --- a/python/lsst/pipe/tasks/multiBand.py +++ b/python/lsst/pipe/tasks/multiBand.py @@ -33,6 +33,7 @@ CatalogCalculationTask, SkyMapIdGeneratorConfig, ) +from lsst.meas.extensions.scarlet.io import updateCatalogFootprints from lsst.meas.astrom import DirectMatchTask, denormalizeMatches from lsst.pipe.tasks.fakes import BaseFakeSourcesTask from lsst.pipe.tasks.setPrimaryFlags import SetPrimaryFlagsTask @@ -577,12 +578,13 @@ def runQuantum(self, butlerQC, inputRefs, outputRefs): redistributeImage = inputs['exposure'].image else: redistributeImage = None - modelData.updateCatalogFootprints( + updateCatalogFootprints( + modelData=modelData, catalog=sources, band=inputRefs.exposure.dataId["band"], - psfModel=inputs['exposure'].getPsf(), redistributeImage=redistributeImage, removeScarletData=True, + updateFluxColumns=True, ) table = sources.getTable() table.setMetadata(self.algMetadata) # Capture algorithm metadata to write out to the source catalog. diff --git a/tests/test_isPrimaryFlag.py b/tests/test_isPrimaryFlag.py index 2473ceb3ea..6e6a530a9e 100755 --- a/tests/test_isPrimaryFlag.py +++ b/tests/test_isPrimaryFlag.py @@ -33,6 +33,7 @@ from lsst.pipe.tasks.characterizeImage import CharacterizeImageTask, CharacterizeImageConfig from lsst.pipe.tasks.calibrate import CalibrateTask, CalibrateConfig from lsst.meas.algorithms import SourceDetectionTask, SkyObjectsTask +import lsst.meas.extensions.scarlet as mes from lsst.meas.extensions.scarlet.scarletDeblendTask import ScarletDeblendTask from lsst.meas.base import SingleFrameMeasurementTask from lsst.pipe.tasks.setPrimaryFlags import SetPrimaryFlagsTask, getPseudoSources @@ -251,11 +252,13 @@ def testIsScarletPrimaryFlag(self): # deblend catalog, modelData = deblendTask.run(coadds, catalog) # Attach footprints to the catalog - modelData.updateCatalogFootprints( + mes.io.updateCatalogFootprints( + modelData=modelData, catalog=catalog, band="test", - psfModel=coadds["test"].getPsf(), - redistributeImage=None, + redistributeImage=coadds.image["test"], + removeScarletData=True, + updateFluxColumns=True ) # measure measureTask.run(catalog, self.exposure)