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-40846: Exclude injected sources during astrometric fitting #873

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions python/lsst/pipe/tasks/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
6 changes: 6 additions & 0 deletions python/lsst/pipe/tasks/calibrateImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
10 changes: 6 additions & 4 deletions python/lsst/pipe/tasks/multiBand.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down