- legacy: husos.detectar / husos.resumen vendored unchanged, run on the
'sueno' windows as medidas_director does; the wake rhythm that sets the
'rhythm near sigma' flag is computed inside the process (no biomarker
dependency).
- modern: the same detector on MNE (sigma band-pass) and SciPy (Hilbert,
Welch narrowness, phase stability); summary with the director's
definitions; one baseline per feature.
- privacy.group_size understands per-feature baseline dicts.
Legacy equals the submodule's cluster route exactly (spindle count and the
six summary measures); modern equals legacy on the synthetic study.
- processes.annotation_mask: the director's state words and interval rules
on the EDF+ annotations (MNE), window dominant state and 'mixta'.
- processes.sleep_state: vigilancia's features from batched Hann
periodograms (mne psd_array_welch), depth index, HK1K cut-offs or cohort
reference + KMeans (scikit-learn) after train().
- biomarkers.posterior_rhythm: Welch of the wake windows (MNE), 1/f-fitted
dominant peak, median of O1 O2 P3 P4; private copy of the baselines.
- Registered as the modern modules; Pipeline.default("modern") now runs
the full slice.
On a synthetic study: annotation states and sleep-state labels identical to
legacy, rhythm equal (6.5 Hz); contract suites and cohort cut-offs tested.