You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Standalone MNE preprocessors: handle remaining cases from #885 #1055
Follow-up to #1037, which safely fixed 3 of the 19 broken standalone-function preprocessors from #885 (the ones verified to return the modified instance: compute_current_source_density, set_bipolar_reference, oversampled_temporal_projection).
The remaining functions can not be fixed by simply passing the callable, because Preprocessor.apply would then replace the recording with whatever the function returns. They split into three buckets, each needing its own design:
1. Return auxiliary data (tuple/list/Annotations) — would corrupt the recording if passed as-is
annotate_amplitude -> (annotations, bads)
annotate_nan
compute_bridged_electrodes
find_bad_channels_lof -> list
standalone set_eeg_reference -> (raw, ref_data)
(and the other annotate_* / compute_* of the same kind)
These need a wrapper that calls the function and then re-applies its side effects to the recording (e.g. raw.set_annotations(...), raw.info['bads'] = ...).
2. Need a second instance / list input — don't fit the single-recording Preprocessor model
equalize_bads
equalize_channels
realign_raw
These require an API extension.
3. Operate on arrays
filter_data -> already documented to use Filter instead; candidate for deprecation rather than a fix.
Activity
Merge pull request #1037 from YihengLi-1/fix-standalone-preprocessor-…
fix: wrap aux-return standalone MNE preprocessors (#1055)
fix: wrap aux-return standalone MNE preprocessors (closes braindecode…