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-36958: Deprecate deblend configs in characterizeImage #729

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
22 changes: 8 additions & 14 deletions python/lsst/pipe/tasks/characterizeImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,14 @@ class CharacterizeImageConfig(pipeBase.PipelineTaskConfig,
)
doDeblend = pexConfig.Field(
dtype=bool,
default=True,
doc="Run deblender input exposure"
default=False,
doc="Run deblender input exposure",
deprecated="This field is no longer used and will be removed after v25."
)
deblend = pexConfig.ConfigurableField(
target=SourceDeblendTask,
doc="Split blended source into their components"
doc="Split blended source into their components",
deprecated="This field is no longer used and will be removed after v25."
)
measurement = pexConfig.ConfigurableField(
target=SingleFrameMeasurementTask,
Expand All @@ -145,7 +147,9 @@ class CharacterizeImageConfig(pipeBase.PipelineTaskConfig,
doApCorr = pexConfig.Field(
dtype=bool,
default=True,
doc="Run subtasks to measure and apply aperture corrections"
doc="Run subtasks to measure and apply aperture corrections. "
"Note: measuring and applying aperture correction are disabled until "
"the final measurement, after the PSF is measured."
)
measureApCorr = pexConfig.ConfigurableField(
target=MeasureApCorrTask,
Expand Down Expand Up @@ -223,11 +227,6 @@ def setDefaults(self):
self.detection.thresholdValue = 5.0
self.detection.includeThresholdMultiplier = 10.0
self.detection.doTempLocalBackground = False
# do not deblend, as it makes a mess
self.doDeblend = False
# measure and apply aperture correction; note: measuring and applying aperture
# correction are disabled until the final measurement, after PSF is measured
self.doApCorr = True
# minimal set of measurements needed to determine PSF
self.measurement.plugins.names = [
"base_PixelFlags",
Expand Down Expand Up @@ -314,8 +313,6 @@ def __init__(self, butler=None, refObjLoader=None, schema=None, **kwargs):
self.makeSubtask("ref_match", refObjLoader=refObjLoader)
self.algMetadata = dafBase.PropertyList()
self.makeSubtask('detection', schema=self.schema)
if self.config.doDeblend:
self.makeSubtask("deblend", schema=self.schema)
self.makeSubtask('measurement', schema=self.schema, algMetadata=self.algMetadata)
if self.config.doApCorr:
self.makeSubtask('measureApCorr', schema=self.schema)
Expand Down Expand Up @@ -509,9 +506,6 @@ def detectMeasureAndEstimatePsf(self, exposure, exposureIdInfo, background):
for bg in detRes.fpSets.background:
background.append(bg)

if self.config.doDeblend:
self.deblend.run(exposure=exposure, sources=sourceCat)

self.measurement.run(measCat=sourceCat, exposure=exposure, exposureId=exposureIdInfo.expId)

measPsfRes = pipeBase.Struct(cellSet=None)
Expand Down