phenotypic.sdk_.read_embedded_measurement_column#
- phenotypic.sdk_.read_embedded_measurement_column(store_path: Path, column: str) dict[int, float | None][source]#
Project one measurement column out of a store’s embedded table.
Returns the column keyed by the descriptor’s own
target.column–Object_Label– rather than by a positional index or an assumed key name, so the value a caller paints onto a colony is the value measured for that object. The join key is read from the store; it is never assumed.columnis checked againstembedded_measurement_columns()before the Parquet is opened. A name the store does not declare therefore never reaches the filesystem, which is what lets a request-facing caller pass a user-supplied name through without it becoming a probe.Only two of the table’s ~130 columns are read. Parquet is columnar, so the other 128 are never decoded – that is what makes a per-request projection affordable.
- Parameters:
- Returns:
A mapping
{object_label: value}. A null cell maps toNone.- Raises:
OSError – If the store’s root
zarr.jsondoes not exist.KeyError – If the store declares no measurement-table descriptor.
ValueError – If column is not one the store declares.
TypeError – If column holds values that are not numbers – a colour hex string, say. Measurement display scales them, and a silent
Nonewould hide the mismatch.
- Return type: