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-30831: DcrAssembleCoaddConnections should inherit from AssembleCoaddConnections #600

Merged
merged 1 commit into from
Nov 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 12 additions & 18 deletions python/lsst/pipe/tasks/dcrAssembleCoadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
import lsst.pex.config as pexConfig
import lsst.pipe.base as pipeBase
import lsst.utils as utils
from lsst.skymap import BaseSkyMap
from lsst.utils.timer import timeMethod
from .assembleCoadd import (AssembleCoaddTask,
from .assembleCoadd import (AssembleCoaddConnections,
AssembleCoaddTask,
CompareWarpAssembleCoaddConfig,
CompareWarpAssembleCoaddTask)
from .coaddBase import makeSkyInfo
Expand All @@ -45,35 +45,24 @@
__all__ = ["DcrAssembleCoaddConnections", "DcrAssembleCoaddTask", "DcrAssembleCoaddConfig"]


class DcrAssembleCoaddConnections(pipeBase.PipelineTaskConnections,
class DcrAssembleCoaddConnections(AssembleCoaddConnections,
dimensions=("tract", "patch", "band", "skymap"),
defaultTemplates={"inputCoaddName": "deep",
defaultTemplates={"inputWarpName": "deep",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the inputWarpName template here in case you want to have different warps and coadds? Is that a possible or expected mode of operation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, these will be different in general. I'll add a comment.

"inputCoaddName": "deep",
"outputCoaddName": "dcr",
"warpType": "direct",
"warpTypeSuffix": "",
"fakesType": ""}):
inputWarps = pipeBase.connectionTypes.Input(
doc=("Input list of warps to be assembled i.e. stacked."
"Note that this will often be different than the inputCoaddName."
"WarpType (e.g. direct, psfMatched) is controlled by the warpType config parameter"),
name="{inputCoaddName}Coadd_{warpType}Warp",
name="{inputWarpName}Coadd_{warpType}Warp",
storageClass="ExposureF",
dimensions=("tract", "patch", "skymap", "visit", "instrument"),
deferLoad=True,
multiple=True
)
skyMap = pipeBase.connectionTypes.Input(
doc="Input definition of geometry/bbox and projection/wcs for coadded exposures",
name=BaseSkyMap.SKYMAP_DATASET_TYPE_NAME,
storageClass="SkyMap",
dimensions=("skymap", ),
)
brightObjectMask = pipeBase.connectionTypes.PrerequisiteInput(
doc=("Input Bright Object Mask mask produced with external catalogs to be applied to the mask plane"
" BRIGHT_OBJECT."),
name="brightObjectMask",
storageClass="ObjectMaskCatalog",
dimensions=("tract", "patch", "skymap", "band"),
)
templateExposure = pipeBase.connectionTypes.Input(
doc="Input coadded exposure, produced by previous call to AssembleCoadd",
name="{fakesType}{inputCoaddName}Coadd{warpTypeSuffix}",
Expand All @@ -99,6 +88,11 @@ def __init__(self, *, config=None):
super().__init__(config=config)
if not config.doWrite:
self.outputs.remove("dcrCoadds")
if not config.doNImage:
self.outputs.remove("dcrNImages")
# Remove outputs inherited from ``AssembleCoaddConnections`` that are not used
self.outputs.remove("coaddExposure")
self.outputs.remove("nImage")


class DcrAssembleCoaddConfig(CompareWarpAssembleCoaddConfig,
Expand Down