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
DataCoordinateIterableimplementation that supports the fullcollections.abc.Sequenceinterface.- Parameters:
- dataIds
collections.abc.Sequence[DataCoordinate] A sequence of
DataCoordinateinstances, with dimensions equal tograph.- graph
DimensionGraph, optional Dimensions identified by all data IDs in the collection. Ignored if
dimensionsis provided, and deprecated with removal after v27.- dimensions
Iterable[str],DimensionGroup,DimensionGraph, optional Dimensions identified by all data IDs in the collection. Must be provided unless
graphis.- hasFull
bool, optional If
True, the caller guarantees thatDataCoordinate.hasFullreturnsTruefor all given data IDs. IfFalse, no such guarantee is made, andDataCoordinateSet.hasFullwill always returnFalse. IfNone(default),DataCoordinateSet.hasFullwill be computed from the given data IDs, immediately ifcheckisTrue, or on first use ifcheckisFalse.- hasRecords
bool, optional If
True, the caller guarantees thatDataCoordinate.hasRecordsreturnsTruefor all given data IDs. IfFalse, no such guarantee is made andDataCoordinateSet.hasRecordswill always returnFalse. IfNone(default),DataCoordinateSet.hasRecordswill be computed from the given data IDs, immediately ifcheckisTrue, or on first use ifcheckisFalse.- check
bool, optional If
True(default) check that all data IDs are consistent with the givengraphand state flags at construction. IfFalse, no checking will occur.- universe
DimensionUniverse Object that manages all dimension definitions.
- dataIds
Methods Summary
subset(dimensions)Return a sequence whose data IDs identify a subset.
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:
- dimensions
DimensionGraph,DimensionGroup, orIterable[str] Dimensions to be identified by the data IDs in the returned iterable. Must be a subset of
self.dimensions.
- dimensions
- Returns:
- set
DataCoordinateSequence A
DataCoordinateSequencewithset.graph == graph. Will beselfifgraph == self.graph. Elements are equivalent to those that would be created by callingDataCoordinate.subseton all elements inself, in the same order and with no deduplication.
- set
- toSequence() DataCoordinateSequence¶
Transform this iterable into a
DataCoordinateSequence.- Returns:
- seq
DataCoordinateSequence A new
DatasetCoordinateSequencewith the same elements asself, in the same order. May beselfif it is already aDataCoordinateSequence.
- seq