DataCoordinateSequence

class lsst.daf.butler.DataCoordinateSequence(dataIds: Sequence[DataCoordinate], graph: DimensionGraph | None = None, *, dimensions: Iterable[str] | DimensionGroup | DimensionGraph | None = None, hasFull: bool | None = None, hasRecords: bool | None = None, check: bool = True, universe: DimensionUniverse | None = None)

Bases: _DataCoordinateCollectionBase, Sequence[DataCoordinate]

Iterable supporting the full Sequence interface.

A DataCoordinateIterable implementation that supports the full collections.abc.Sequence interface.

Parameters:
dataIdscollections.abc.Sequence [ DataCoordinate ]

A sequence of DataCoordinate instances, with dimensions equal to graph.

graphDimensionGraph, optional

Dimensions identified by all data IDs in the collection. Ignored if dimensions is provided, and deprecated with removal after v27.

dimensionsIterable [ str ], DimensionGroup, DimensionGraph, optional

Dimensions identified by all data IDs in the collection. Must be provided unless graph is.

hasFullbool, optional

If True, the caller guarantees that DataCoordinate.hasFull returns True for all given data IDs. If False, no such guarantee is made, and DataCoordinateSet.hasFull will always return False. If None (default), DataCoordinateSet.hasFull will be computed from the given data IDs, immediately if check is True, or on first use if check is False.

hasRecordsbool, optional

If True, the caller guarantees that DataCoordinate.hasRecords returns True for all given data IDs. If False, no such guarantee is made and DataCoordinateSet.hasRecords will always return False. If None (default), DataCoordinateSet.hasRecords will be computed from the given data IDs, immediately if check is True, or on first use if check is False.

checkbool, optional

If True (default) check that all data IDs are consistent with the given graph and state flags at construction. If False, no checking will occur.

universeDimensionUniverse

Object that manages all dimension definitions.

Methods Summary

subset(dimensions)

Return a sequence whose data IDs identify a subset.

toSequence()

Transform this iterable into a DataCoordinateSequence.

Methods Documentation

subset(dimensions: DimensionGraph | DimensionGroup | Iterable[str]) DataCoordinateSequence

Return a sequence whose data IDs identify a subset.

Parameters:
dimensionsDimensionGraph, DimensionGroup, or Iterable [ str ]

Dimensions to be identified by the data IDs in the returned iterable. Must be a subset of self.dimensions.

Returns:
setDataCoordinateSequence

A DataCoordinateSequence with set.graph == graph. Will be self if graph == self.graph. Elements are equivalent to those that would be created by calling DataCoordinate.subset on all elements in self, in the same order and with no deduplication.

toSequence() DataCoordinateSequence

Transform this iterable into a DataCoordinateSequence.

Returns:
seqDataCoordinateSequence

A new DatasetCoordinateSequence with the same elements as self, in the same order. May be self if it is already a DataCoordinateSequence.