mne-tools / mne-bids-pipeline

Automatically process entire electrophysiological datasets using MNE-Python.
https://mne.tools/mne-bids-pipeline/
BSD 3-Clause "New" or "Revised" License
133 stars 65 forks source link

ENH: support for filtering / processing other types of signals (not data channels) #328

Open dengemann opened 3 years ago

dengemann commented 3 years ago

with @tomdamelio we want to filter EDA channels in the 02 preprocessing script for example. Naturally, the EDA (coded as misc channel) should be forwarded to the epoching later. What is the cleanest way of doing that? Thoughts:

  1. allow passing picks (e.g. 'all') to .filter in 02 script; -> challenge: make sure similar picking logic is supported for subsequent steps
  2. declare misc channels as data channels in config; -> drawback: you then filter all of the misc channels there are many different ones.

cc @agramfort @hoechenberger

hoechenberger commented 3 years ago

@dengemann Interesting issue! I think an easy solution would be adding a config option to allow for passing picks in addition to the data channels (which will always be filtered anyway). We could go even farther and add a setting for specifying EDA channels specifically – we already have something ~similar for EOG (of course with different intentions, but still), so why not add specific support for more channel types? Would you need specific filter settings too?

agramfort commented 3 years ago

I would complexify the API of the filtering parameters

filter_freq = (None, 40) or filter_freq = dict(eeg=(None, 40), misc=(2, 40))

dengemann commented 3 years ago

I think pick by type would be good… at that point we could allow for passing callables

dengemann commented 3 years ago

I would complexify the API of the filtering parameters filter_freq = (None, 40) or filter_freq = dict(eeg=(None, 40), misc=(2, 40))

I think I misunderstood it before. Yes, that could make sense! We will just need to see where else down-stream we'll need picks support.