Skip to content

Commit

Permalink
Deprecate input connection options for old deblender outputs.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Dec 2, 2024
1 parent 982ab2e commit 850ee21
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions python/lsst/pipe/tasks/multiBand.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,19 @@ def run(self, exposure, idFactory, expId):
return Struct(outputSources=sources, outputBackgrounds=backgrounds, outputExposure=exposure)


class MeasureMergedCoaddSourcesConnections(PipelineTaskConnections,
dimensions=("tract", "patch", "band", "skymap"),
defaultTemplates={"inputCoaddName": "deep",
"outputCoaddName": "deep",
"deblendedCatalog": "deblendedFlux"}):
class MeasureMergedCoaddSourcesConnections(
PipelineTaskConnections,
dimensions=("tract", "patch", "band", "skymap"),
defaultTemplates={
"inputCoaddName": "deep",
"outputCoaddName": "deep",
"deblendedCatalog": "deblendedFlux",
},
deprecatedTemplates={
# TODO[DM-47797]: remove this deprecated connection template.
"deblendedCatalog": "Support for old deblender outputs will be removed after v29."
},
):
inputSchema = cT.InitInput(
doc="Input schema for measure merged task produced by a deblender or detection task",
name="{inputCoaddName}Coadd_deblendedFlux_schema",
Expand Down Expand Up @@ -284,6 +292,7 @@ class MeasureMergedCoaddSourcesConnections(PipelineTaskConnections,
multiple=True,
deferLoad=True,
)
# TODO[DM-47797]: remove this deprecated connection.
inputCatalog = cT.Input(
doc=("Name of the input catalog to use."
"If the single band deblender was used this should be 'deblendedFlux."
Expand All @@ -293,6 +302,7 @@ class MeasureMergedCoaddSourcesConnections(PipelineTaskConnections,
"be 'mergeDet'"),
name="{inputCoaddName}Coadd_{deblendedCatalog}",
storageClass="SourceCatalog",
deprecated="Support for old deblender outputs will be removed after v29.",
dimensions=("tract", "patch", "band", "skymap"),
)
scarletCatalog = cT.Input(
Expand Down Expand Up @@ -339,6 +349,7 @@ def __init__(self, *, config=None):
del self.sourceTableHandles
if not config.propagateFlags.finalized_source_flags:
del self.finalizedSourceTableHandles
# TODO[DM-47797]: only the 'if' block contents here should survive.
if config.inputCatalog == "deblendedCatalog":
del self.inputCatalog
if not config.doAddFootprints:
Expand Down Expand Up @@ -368,6 +379,8 @@ class MeasureMergedCoaddSourcesConfig(PipelineTaskConfig,
"mergeDet": "The merged detections before deblending."
},
doc="The name of the input catalog.",
# TODO[DM-47797]: remove this config option and anything using it.
deprecated="Support for old deblender outputs will be removed after v29.",
)
doAddFootprints = Field(dtype=bool,
default=True,
Expand Down

0 comments on commit 850ee21

Please sign in to comment.