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.columnObject_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.

column is checked against embedded_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:
  • store_path (Path) – Path to a *.ome.zarr directory.

  • column (str) – Name of the column to project. Must appear in the store’s declared measurement_columns.

Returns:

A mapping {object_label: value}. A null cell maps to None.

Raises:
  • OSError – If the store’s root zarr.json does 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 None would hide the mismatch.

Return type:

dict[int, float | None]