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
134 stars 65 forks source link

ENH: Process multiple tasks jointly? #820

Open larsoner opened 8 months ago

larsoner commented 8 months ago

I have a dataset that I'm BIDSifying. For each subject we have the following based on how I'm BIDSifying the data:

  1. Resting state data (task="rest")
  2. One run of auditory localizer data (task="localizer")
  3. Several runs of task data (task="speech", run="01" | "02" | ...)

I'd like to preprocess these all at once using the same SSP or ICA. It would be nice to be able to do task = ["rest", "localizer", "speech"] for example. But then there's an issue where each task can have a different set of runs, so maybe we'd also need to allow runs to be a dict specifying runs on a per-task basis. Thoughts @hoechenberger ? If no objection then I can try implementing this and running it on my data.

Things will get trickier later when I might want to be able to epoch data differently for the localizer vs the speech for example, but at least getting the preprocessing done for all of these (and probably just doing epoching for localizer to start) would be a huge help.

What wouldn't work is processing the localizer separately from the speech task since the spatial processing steps (SSP/ICA) need to be identical for them, but that looks like my only option currently.

larsoner commented 8 months ago

@hoechenberger this is a blocker for some analyses that I need to run, any objection to task-as-list (plus runs as dict with keys corresponding to task names and values being str ('all') or list of str)?

hoechenberger commented 8 months ago

Hey no objections at all, but at this time I cannot give any input on implementation details