Commit Graph

2 Commits

Author SHA1 Message Date
AlbertoPMDM 6d0a99e6e5 modern: the director's filter and spectra, and gaps stay NaN
- every private _signal.bandpass: scipy butter + sosfiltfilt per gap-free run, as
  eeg_io.pasa_banda (MNE's IIR padded the run edges differently: up to tens of µV)
- preprocessing: variants built as preproceso (band-pass per run, nanmean
  reference); BAD_ACQ_SKIP gaps stay NaN in every variant instead of 0 µV, so no
  module filters or detects across a gap (the director's EDF reader reads them as
  signal; his Natus route keeps NaN)
- aperiodic: DPSS multitaper on demeaned windows with equal taper weights
  (espectro.multitaper) instead of MNE's eigenvalue-weighted one without demeaning
- gradient: symmetric Hann periodogram of demeaned windows (gradiente.potencias)
- tests: preprocessing equal to the director sample by sample (edges included);
  every biomarker equal to legacy within 1e-4 on gap-free recordings
2026-11-19 02:10:15 -06:00
AlbertoPMDM acfd3a70d4 preprocessing: modern Preprocessor on MNE, agreeing with the director's output
Executes a PreprocessPlan with MNE: EDF read and label normalisation, plan
bads dropped, line removal on the raw signal (interpolated notch when the
line is >= min_db on the kept scalp channels, or ZapLine via meegkit),
Raw.filter (IIR Butterworth order 4, zero phase, run by run between
BAD_ACQ_SKIP), set_eeg_reference (average of kept scalp / linked ears),
EOG/ECG filtered only. Window grid and quality spans from a private copy of
the window QC.

Within 0.25 uV of legacy.preprocessing on every channel of both default
plans away from the filter edges (max(5 s, 3/highpass)).
2026-11-18 20:50:33 -06:00