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 fullcollections.abc.Sequence
interface.- Parameters:
- dataIds
collections.abc.Sequence
[DataCoordinate
] A sequence of
DataCoordinate
instances, with dimensions equal todimensions
.- dimensions
Iterable
[str
],DimensionGroup
Dimensions identified by all data IDs in the collection.
- hasFull
bool
, optional If
True
, the caller guarantees thatDataCoordinate.hasFull
returnsTrue
for all given data IDs. IfFalse
, no such guarantee is made, andDataCoordinateSet.hasFull
will always returnFalse
. IfNone
(default),DataCoordinateSet.hasFull
will be computed from the given data IDs, immediately ifcheck
isTrue
, or on first use ifcheck
isFalse
.- hasRecords
bool
, optional If
True
, the caller guarantees thatDataCoordinate.hasRecords
returnsTrue
for all given data IDs. IfFalse
, no such guarantee is made andDataCoordinateSet.hasRecords
will always returnFalse
. IfNone
(default),DataCoordinateSet.hasRecords
will be computed from the given data IDs, immediately ifcheck
isTrue
, or on first use ifcheck
isFalse
.- check
bool
, optional If
True
(default) check that all data IDs are consistent with the givendimensions
and 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: DimensionGroup | Iterable[str]) DataCoordinateSequence ¶
Return a sequence whose data IDs identify a subset.
- Parameters:
- dimensions
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
DataCoordinateSequence
withset.dimensions == dimensions
. Will beself
ifdimensions == self.dimensions
. Elements are equivalent to those that would be created by callingDataCoordinate.subset
on 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
DatasetCoordinateSequence
with the same elements asself
, in the same order. May beself
if it is already aDataCoordinateSequence
.
- seq