DatasetTypeNode#

class lsst.pipe.base.pipeline_graph.DatasetTypeNode(dataset_type: DatasetType, is_initial_query_constraint: bool, is_prerequisite: bool, producing_edge: WriteEdge | None, consuming_edges: Collection[ReadEdge])#

Bases: object

A node in a pipeline graph that represents a resolved dataset type.

Notes#

A dataset type node represents a common definition of the dataset type across the entire graph - it is never a component, and the storage class is the registry dataset type’s storage class or (if there isn’t one) the one defined by the producing task.

Dataset type nodes are intentionally not equality comparable, since there are many different (and useful) ways to compare these objects with no clear winner as the most obvious behavior.

Attributes Summary

consuming_edges

The edges to tasks that consume this dataset type (collection [lsst.pipe.base.pipeline_graph.ReadEdge]).

dataset_type

Common definition of this dataset type for the graph (DatasetType).

dimensions

Dimensions of the dataset type (DimensionGroup).

is_calibration

Whether this dataset type can be included in CALIBRATION collections (bool).

is_initial_query_constraint

Whether this dataset should be included as a constraint in the initial query for data IDs in QuantumGraph generation (bool).

is_prerequisite

Whether this dataset type is a prerequisite input that must exist in the Registry before graph creation (bool).

key

Key that identifies this dataset type in internal and exported networkx graphs (NodeKey).

name

Name of the dataset type (str).

producing_edge

The edge to the task that produces this dataset type (lsst.pipe.base.pipeline_graph.WriteEdge or None).

storage_class

Storage class for this dataset type (StorageClass).

storage_class_name

String name of the storage class for this dataset type (str).

Methods Summary

generalize_ref(ref)

Convert a DatasetRef with the dataset type associated with some task to one with the common dataset type defined by this node.

Attributes Documentation

consuming_edges: Collection[ReadEdge] = <dataclasses._MISSING_TYPE object>#

The edges to tasks that consume this dataset type (collection [lsst.pipe.base.pipeline_graph.ReadEdge]).

dataset_type: DatasetType = <dataclasses._MISSING_TYPE object>#

Common definition of this dataset type for the graph (DatasetType).

dimensions#

Dimensions of the dataset type (DimensionGroup).

is_calibration#

Whether this dataset type can be included in CALIBRATION collections (bool).

is_initial_query_constraint: bool = <dataclasses._MISSING_TYPE object>#

Whether this dataset should be included as a constraint in the initial query for data IDs in QuantumGraph generation (bool).

This is only True for dataset types that are overall regular inputs, and only if none of those input connections had deferQueryConstraint=True.

is_prerequisite: bool = <dataclasses._MISSING_TYPE object>#

Whether this dataset type is a prerequisite input that must exist in the Registry before graph creation (bool).

key#

Key that identifies this dataset type in internal and exported networkx graphs (NodeKey).

name#

Name of the dataset type (str).

This is always the parent dataset type, never that of a component.

producing_edge: WriteEdge | None = <dataclasses._MISSING_TYPE object>#

The edge to the task that produces this dataset type (lsst.pipe.base.pipeline_graph.WriteEdge or None).

storage_class#

Storage class for this dataset type (StorageClass).

storage_class_name#

String name of the storage class for this dataset type (str).

Methods Documentation

generalize_ref(ref: DatasetRef) DatasetRef#

Convert a DatasetRef with the dataset type associated with some task to one with the common dataset type defined by this node.

Parameters#

reflsst.daf.butler.DatasetRef

Reference whose dataset type is convertible to this node’s, either because it is a component with the node’s dataset type as its parent, or because it has a compatible storage class.

Returns#

reflsst.daf.butler.DatasetRef

Reference with exactly this node’s dataset type.