DataCoordinateReader¶
-
class
lsst.daf.butler.registry.queries.
DataCoordinateReader
¶ Bases:
abc.ABC
Base class and factory for reader objects that extract
DataCoordinate
instances from query result rows.Attributes Summary
columns_required
Methods Summary
make
(dimensions, full, records, …)Construct a concrete reader for a set of dimensions. read
(row, Any])Read a DataCoordinate
from a query result row.Attributes Documentation
-
columns_required
¶
Methods Documentation
-
static
make
(dimensions: lsst.daf.butler.core.dimensions._graph.DimensionGraph, full: bool = True, records: bool = False, record_caches: Optional[collections.abc.Mapping[lsst.daf.butler.core.dimensions._elements.DimensionElement, collections.abc.Mapping[lsst.daf.butler.core.dimensions._coordinate.DataCoordinate, lsst.daf.butler.core.dimensions._records.DimensionRecord]], None] = None) → lsst.daf.butler.registry.queries._readers.DataCoordinateReader¶ Construct a concrete reader for a set of dimensions.
Parameters: - dimensions :
DimensionGraph
Dimensions of the
DataCoordinate
instances the new reader will read.- full :
bool
, optional Whether to expect and extract implied dimensions as well as required dimensions.
- records :
bool
, optional Whether to attach dimension records.
- record_caches :
Mapping
, optional Nested mapping (outer keys are dimension elements, inner keys are data IDs for that element) of cached dimension records. Ignored unless
records=True
.
Returns: - reader :
DataCoordinateReader
Concrete reader instance.
- dimensions :
-
read
(row: Mapping[ColumnTag, Any]) → DataCoordinate¶ Read a
DataCoordinate
from a query result row.Parameters: - row :
Mapping
Mapping with
ColumnTag
keys representing a query result row.
Returns: - data_coordinate :
DataCoordinate
New data ID.
- row :
-