Skip to content

Instantly share code, notes, and snippets.

@sylvchev
Created September 1, 2021 17:17
Show Gist options
  • Save sylvchev/7d4b29cc5414fa172138df1dff8ad478 to your computer and use it in GitHub Desktop.
Save sylvchev/7d4b29cc5414fa172138df1dff8ad478 to your computer and use it in GitHub Desktop.
Check channel order with MOABB
from moabb.datasets import Cho2017, BNCI2014001, PhysionetMI
from moabb.paradigms import MotorImagery
from moabb.datasets.utils import find_intersecting_channels
datasets = [Cho2017(), BNCI2014001(), PhysionetMI()]
common_channels, _ = find_intersecting_channels(datasets)
chans = common_channels[:3]
paradigm = MotorImagery(channels=chans)
for d in datasets:
ep, _, _ = paradigm.get_data(dataset=d, subjects=[1], return_epochs=True)
print(f"{d.code} channel order: {ep.info['ch_names']}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment