mne-python
mne-python copied to clipboard
add skip_by_annotation to notch_filter and resample
We have TMS-EEG data at MGH for which we're trying to figure what is the best processing pipeline. The TMS pulses are recorded as triggers, so we can create annotations of 10 ms around those triggers and use that to exclude from operations such as ICA and raw.filter. This seems to work well but we noticed that skip_by_annotation is not supported in notch_filter and resample. Would it make sense to add these functionality to these functions as well? It would also make the API more consistent.
Agreed this would be useful!
Thinking about this more, if resample function was to have skip_by_annotation, how is the "skipped" segment to be handled? Would there still be decimation but no filter since MNE-Python only supports a single sampling frequency ...
how is the "skipped" segment to be handled? Would there still be decimation but no filter since MNE-Python only supports a single sampling frequency ...
Yes there would be no need, it would just get subsampled somehow. An upfirdn (with no filter / a delta) could do it as you suggest