Skip to content

Instantly share code, notes, and snippets.

@sylvchev
Created September 1, 2021 17:17
Show Gist options
  • Select an option

  • Save sylvchev/7d4b29cc5414fa172138df1dff8ad478 to your computer and use it in GitHub Desktop.

Select an option

Save sylvchev/7d4b29cc5414fa172138df1dff8ad478 to your computer and use it in GitHub Desktop.

Revisions

  1. Sylvain Chevallier created this gist Sep 1, 2021.
    13 changes: 13 additions & 0 deletions moabb_channel_order.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    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']}")