phenotypic.sdk_.user_metadata_headers#

phenotypic.sdk_.user_metadata_headers(columns: Iterable[str]) tuple[str, ...][source]#

Return the headers that could only have come from --metadata.

A master’s intrinsic metadata is the identity the image carries about itself: the IMAGE-owned per-image provenance block, plus EXPERIMENT.DATASET, which the CLI inserts from the dataset directory name rather than from any CSV. Everything else in the metadata namespace was joined in from the run’s metadata.csv.

Ownership, not the prefix. Metadata_Strain is a real schema member (GENETIC.STRAIN), so “carries a Metadata_* column” does not separate the two shapes – a v2 master carries Metadata_Dataset and Metadata_ImageName and would be misread as v1 by that test. Namespace detection goes through is_metadata_header() and routing through metadata_owner_for_header(), never through prefix parsing.

Parameters:

columns (Iterable[str]) – Column names of a master frame.

Returns:

The user-metadata headers present, in the order given.

Return type:

tuple[str, …]