DataCoordinateReader

class lsst.daf.butler.registry.queries.DataCoordinateReader

Bases: 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, record_caches])

Construct a concrete reader for a set of dimensions.

read(row)

Read a DataCoordinate from a query result row.

Attributes Documentation

columns_required

Methods Documentation

static make(dimensions: DimensionGroup, full: bool = True, records: bool = False, record_caches: Mapping[str, DimensionRecordSet] | None = None) DataCoordinateReader

Construct a concrete reader for a set of dimensions.

Parameters:
dimensionsDimensionGroup

Dimensions of the DataCoordinate instances the new reader will read.

fullbool, optional

Whether to expect and extract implied dimensions as well as required dimensions.

recordsbool, optional

Whether to attach dimension records.

record_cachesMapping, optional

Mapping of cached dimension records. Ignored unless records=True.

Returns:
readerDataCoordinateReader

Concrete reader instance.

abstract read(row: Mapping[ColumnTag, Any]) DataCoordinate

Read a DataCoordinate from a query result row.

Parameters:
rowMapping

Mapping with ColumnTag keys representing a query result row.

Returns:
data_coordinateDataCoordinate

New data ID.