coco_pipe.descriptors.naming#
Descriptor column-name contract.
The descriptor extractors emit column names of the form
{family}_{feature}_{ch|chgrp}-{sensor} (see
DescriptorPipeline). Parsing that contract
is descriptor-domain knowledge, so it lives here next to the family QC that
consumes it (coco_pipe.descriptors.qc) and shares the single
DESCRIPTOR_SCOPE_RE.
Functions#
|
Split |
|
Strictly parse one descriptor column into its constituent parts. |
Module Contents#
- coco_pipe.descriptors.naming.split_family_token(text, known_families)#
Split
textinto(family, remainder)on the first known family token.The family token may appear as a leading prefix (
"band_...") or embedded ("mean_band_..."). Returns(None, text)when no known family token is present. Shared byparse_descriptor_feature_column()and the family classifier so the token-matching rule lives in one place.
- coco_pipe.descriptors.naming.parse_descriptor_feature_column(column, known_families)#
Strictly parse one descriptor column into its constituent parts.
- Parameters:
- Returns:
Keys
column,family,feature,scope("sensor"/"sensor_group"), andsensor.- Return type:
- Raises:
ValueError – If the column does not match the scope contract or contains no known family token.