DataCoordinateSequence

class lsst.daf.butler.DataCoordinateSequence(dataIds: Sequence[DataCoordinate], *, dimensions: Iterable[str] | DimensionGroup | 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 dimensions.

dimensionsIterable [ str ], DimensionGroup

Dimensions identified by all data IDs in the collection.

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 dimensions 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: DimensionGroup | Iterable[str]) DataCoordinateSequence

Return a sequence whose data IDs identify a subset.

Parameters:
dimensionsDimensionGroup 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.dimensions == dimensions. Will be self if dimensions == self.dimensions. 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.