- contracts: Preprocessed.quality_spans (QC-unclean stretches at the QC's
own resolution), so the director's state mask can be rebuilt exactly.
- legacy.preprocessing: annotations straight from the EDF (exact onsets, as
edf_convert), quality_spans from his 4 s QC.
- legacy processes annotation_mask (intervalos_estado, estado_de_ventana) and
sleep_state (vigilancia.rasgos with senal._mascara_excluir's mask,
clasificar with the HK1K cut-offs or cohort cut-offs after train()).
- legacy biomarker posterior_rhythm (medidas_director.ritmo on
ritmo.psd_de_ventanas + pico_dominante) with a private _baseline.py holding
curvas.py and perfil_alteraciones' age-block z, copied verbatim.
- Each legacy module owns its adapter, which writes the study in the
director's preprocessed format and opens it with his eeg_io.Estudio.
Identical to the submodule's cluster route on a synthetic study (window
labels and rhythm); contract suites pass.
preprocessing.plan: frozen PreprocessPlan (steps, variants, state, gates,
bads, reasons) with checks, to_dict/from_dict (schema 1, unknown keys
refused) and a content hash; defaults DIRECTOR_CLUSTER and DIRECTOR_CLI
turn the route differences into data.
legacy.preprocessing maps the plan dict onto the director's
preproceso.procesar (vendored unchanged), refuses what his code cannot do
(zapline, other notch threshold, manual bads), returns MNE Raw variants and
the window grid flagged from his 4 s QC. Identical to the submodule for
both default plans.