Skip to content
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
14 changes: 14 additions & 0 deletions python/lsst/ip/diffim/getTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
import collections
import dataclasses

import numpy as np

Expand Down Expand Up @@ -86,6 +87,13 @@ class GetTemplateConnections(
name="{fakesType}{coaddName}Diff_templateExp{warpTypeSuffix}",
)

def __init__(self, *, config=None):
if config.requireCoaddAtGraphBuild:
self.coaddExposures = dataclasses.replace(
self.coaddExposures,
deferGraphConstraint=False,
)


class GetTemplateConfig(
pipeBase.PipelineTaskConfig, pipelineConnections=GetTemplateConnections
Expand Down Expand Up @@ -120,6 +128,12 @@ class GetTemplateConfig(
doc="Minimum fraction of unmasked pixels needed to set the"
" HIGH_VARIANCE mask plane.",
)
requireCoaddAtGraphBuild = pexConfig.Field(
dtype=bool,
default=False,
doc="If True, include the coadd dataset existence in the"
"initial butler query during QuantumGraph generation.",
)

def setDefaults(self):
# Use a smaller cache: per SeparableKernel.computeCache, this should
Expand Down
Loading