diff --git a/python/lsst/pipe/tasks/calibrate.py b/python/lsst/pipe/tasks/calibrate.py index ac2d6b2b8..0abec5a9a 100644 --- a/python/lsst/pipe/tasks/calibrate.py +++ b/python/lsst/pipe/tasks/calibrate.py @@ -310,6 +310,9 @@ def setDefaults(self): self.astromRefObjLoader.anyFilterMapsToThis = "phot_g_mean" # The photoRefCat connection is the name to use for the colorterms. self.photoCal.photoCatName = self.connections.photoRefCat + # Set injected pixel flags. + self.measurement.plugins["base_PixelFlags"].masksFpAnywhere.append("INJECTED") + self.measurement.plugins["base_PixelFlags"].masksFpCenter.append("INJECTED_CORE") # Keep track of which footprints contain streaks self.measurement.plugins['base_PixelFlags'].masksFpAnywhere = ['STREAK'] diff --git a/python/lsst/pipe/tasks/calibrateImage.py b/python/lsst/pipe/tasks/calibrateImage.py index b3273aa68..b5b1ad90f 100644 --- a/python/lsst/pipe/tasks/calibrateImage.py +++ b/python/lsst/pipe/tasks/calibrateImage.py @@ -274,6 +274,9 @@ def setDefaults(self): "base_GaussianFlux", "base_PsfFlux", ] + # Set injected pixel flags. + self.psf_source_measurement.plugins["base_PixelFlags"].masksFpAnywhere.append("INJECTED") + self.psf_source_measurement.plugins["base_PixelFlags"].masksFpCenter.append("INJECTED_CORE") self.psf_source_measurement.slots.shape = "ext_shapeHSM_HsmSourceMoments" # Only measure apertures we need for PSF measurement. # TODO DM-40064: psfex has a hard-coded value of 9 in a psfex-config @@ -302,6 +305,9 @@ def setDefaults(self): "base_PsfFlux", "base_CircularApertureFlux", ] + # Set injected pixel flags. + self.star_measurement.plugins["base_PixelFlags"].masksFpAnywhere.append("INJECTED") + self.star_measurement.plugins["base_PixelFlags"].masksFpCenter.append("INJECTED_CORE") self.star_measurement.slots.psfShape = "ext_shapeHSM_HsmPsfMoments" self.star_measurement.slots.shape = "ext_shapeHSM_HsmSourceMoments" # Only measure the apertures we need for star selection. diff --git a/python/lsst/pipe/tasks/multiBand.py b/python/lsst/pipe/tasks/multiBand.py index f0c1d99dc..b2b535912 100644 --- a/python/lsst/pipe/tasks/multiBand.py +++ b/python/lsst/pipe/tasks/multiBand.py @@ -447,10 +447,12 @@ def setDefaults(self): 'base_Variance', 'base_LocalPhotoCalib', 'base_LocalWcs'] - self.measurement.plugins['base_PixelFlags'].masksFpAnywhere = ['CLIPPED', 'SENSOR_EDGE', - 'INEXACT_PSF', 'STREAK'] - self.measurement.plugins['base_PixelFlags'].masksFpCenter = ['CLIPPED', 'SENSOR_EDGE', - 'INEXACT_PSF', 'STREAK'] + self.measurement.plugins['base_PixelFlags'].masksFpAnywhere = [ + 'CLIPPED', 'SENSOR_EDGE', 'INEXACT_PSF', 'STREAK', 'INJECTED' + ] + self.measurement.plugins['base_PixelFlags'].masksFpCenter = [ + 'CLIPPED', 'SENSOR_EDGE', 'INEXACT_PSF', 'STREAK', 'INJECTED_CORE' + ] class MeasureMergedCoaddSourcesTask(PipelineTask):