coco_pipe.descriptors.validation¶
Runtime input validation helpers for descriptor extraction.
Functions¶
|
Validate explicit runtime inputs against the descriptor contract. |
Module Contents¶
- coco_pipe.descriptors.validation.validate_runtime_inputs(config: coco_pipe.descriptors.configs.DescriptorConfig, *, X: Any, ids: collections.abc.Sequence[Any] | numpy.ndarray | None = None, channel_names: collections.abc.Sequence[str] | numpy.ndarray | None = None, sfreq: float | None = None) dict[str, Any][source]¶
Validate explicit runtime inputs against the descriptor contract.
- Parameters:
config (DescriptorConfig) – Parsed descriptor config defining the expected runtime contract.
X (Any) – Candidate signal array expected to coerce to shape
(n_obs, n_channels, n_times).ids – Optional runtime inputs aligned with the observation or channel axes.
channel_names – Optional runtime inputs aligned with the observation or channel axes.
sfreq – Optional runtime inputs aligned with the observation or channel axes.
- Returns:
Normalized runtime inputs ready for pipeline and extractor dispatch.
- Return type:
dict[str, Any]
- Raises:
ValueError – If array dimensionality, identifier alignment, sampling frequency, or explicit channel-name requirements are violated.