Average over channels

External Email - Use Caution

Hello MNE users,

I was wondering if there is an easy way to do an average over channels on a Raw or Epochs object. I've seen a few plotting functions with a "combine" parameter but is it possible to create a new Raw/Epochs object with combined channels (for example a new object with pseudo-channels representing ROIs)? I would like to avoid extracting a data array and doing it with NumPy if there is easier...

Thanks a lot!

Best wishes,

Johann Benerradi

1 Like

External Email - Use Caution

hi Johann,

no it's not possible presently.

you can group channel when plotting though

https://mne.tools/stable/generated/mne.viz.plot_compare_evokeds.html#mne.viz.plot_compare_evokeds

Alex

External Email - Use Caution

Hi Alex,

Alright, thank you. Is that something users would be interested in, and worth creating a GitHub issue for feature request? I personally would like to do such a thing to average channels by ROI before classification with fNIRS (in addition to having this for visualisation)... I can eventually work on an implementation, but as for now I'll keep doing this with get_data() and np.mean().

Thanks,
Johann

External Email - Use Caution

hi,

yes create an issue to we can exchange ideas more easily

thx

A