BIDS Dataset Example#

In this example, we show how to fetch and prepare a BIDS dataset for usage with Braindecode.

# Authors: Pierre Guetschel <pierre.guetschel@gmail.com>
#
# License: BSD (3-clause)

from pathlib import Path

import openneuro

from braindecode.datasets import BIDSDataset

First, we download a collection of (fake/empty) BIDS datasets.

# import tempfile
# data_dir = tempfile.mkdtemp()
data_dir = Path("~/mne_data/openneuro/").expanduser()
dataset_name = "ds004745"  # 200Mb dataset
dataset_root = data_dir / dataset_name

if not dataset_root.exists():
    openneuro.download(dataset=dataset_name, target_dir=dataset_root)
👋 Hello! This is openneuro-py 2025.2.0. Great to see you! 🤗

   👉 Please report problems 🤯 and bugs 🪲 at
      https://github.com/hoechenberger/openneuro-py/issues

🌍 Preparing to download ds004745 …

📁 Traversing directories for ds004745 : 0 entities [00:00, ? entities/s]
📁 Traversing directories for ds004745 : 7 entities [00:00, 20.35 entities/s]
📁 Traversing directories for ds004745 : 10 entities [00:00, 13.17 entities/s]
📁 Traversing directories for ds004745 : 14 entities [00:00, 16.34 entities/s]
📁 Traversing directories for ds004745 : 18 entities [00:01, 16.77 entities/s]
📁 Traversing directories for ds004745 : 22 entities [00:01, 18.54 entities/s]
📁 Traversing directories for ds004745 : 26 entities [00:01, 15.49 entities/s]
📁 Traversing directories for ds004745 : 29 entities [00:01, 18.00 entities/s]
📥 Retrieving up to 29 files (5 concurrent downloads).

participants.json:   0%|          | 0.00/79.0 [00:00<?, ?B/s]


dataset_description.json:   0%|          | 0.00/543 [00:00<?, ?B/s]


sub-001_task-unnamed_channels.tsv:   0%|          | 0.00/96.0 [00:00<?, ?B/s]

participants.tsv:   0%|          | 0.00/63.0 [00:00<?, ?B/s]


CHANGES:   0%|          | 0.00/74.0 [00:00<?, ?B/s]






README:   0%|          | 0.00/435 [00:00<?, ?B/s]


sub-001_task-unnamed_eeg.json:   0%|          | 0.00/621 [00:00<?, ?B/s]


sub-002_task-unnamed_channels.tsv:   0%|          | 0.00/96.0 [00:00<?, ?B/s]


task-unnamed_events.json:   0%|          | 0.00/1.88k [00:00<?, ?B/s]


sub-001_task-unnamed_events.tsv:   0%|          | 0.00/1.50k [00:00<?, ?B/s]


sub-002_task-unnamed_eeg.set:   0%|          | 0.00/41.9M [00:00<?, ?B/s]
sub-002_task-unnamed_eeg.set:   0%|          | 83.5k/41.9M [00:00<01:06, 659kB/s]

sub-002_task-unnamed_events.tsv:   0%|          | 0.00/1.62k [00:00<?, ?B/s]



sub-003_task-unnamed_channels.tsv:   0%|          | 0.00/96.0 [00:00<?, ?B/s]



sub-003_task-unnamed_eeg.json:   0%|          | 0.00/621 [00:00<?, ?B/s]



sub-002_task-unnamed_eeg.json:   0%|          | 0.00/621 [00:00<?, ?B/s]


sub-002_task-unnamed_eeg.set:   1%|          | 407k/41.9M [00:00<00:25, 1.69MB/s]
sub-002_task-unnamed_eeg.set:   4%|▎         | 1.51M/41.9M [00:00<00:08, 5.06MB/s]

sub-004_task-unnamed_channels.tsv:   0%|          | 0.00/96.0 [00:00<?, ?B/s]


sub-002_task-unnamed_eeg.set:  11%|█         | 4.67M/41.9M [00:00<00:02, 14.5MB/s]

sub-004_task-unnamed_eeg.json:   0%|          | 0.00/621 [00:00<?, ?B/s]



sub-003_task-unnamed_eeg.set:   0%|          | 0.00/39.7M [00:00<?, ?B/s]


sub-004_task-unnamed_eeg.set:   0%|          | 0.00/42.0M [00:00<?, ?B/s]
sub-002_task-unnamed_eeg.set:  20%|██        | 8.50M/41.9M [00:00<00:01, 22.7MB/s]


sub-004_task-unnamed_eeg.set:   0%|          | 83.5k/42.0M [00:00<00:57, 767kB/s]

sub-003_task-unnamed_eeg.set:   0%|          | 94.0k/39.7M [00:00<00:49, 838kB/s]
sub-002_task-unnamed_eeg.set:  29%|██▉       | 12.4M/41.9M [00:00<00:01, 28.3MB/s]



sub-003_task-unnamed_events.tsv:   0%|          | 0.00/1.51k [00:00<?, ?B/s]






sub-004_task-unnamed_eeg.set:   1%|          | 220k/42.0M [00:00<00:39, 1.11MB/s]

sub-003_task-unnamed_eeg.set:   1%|          | 213k/39.7M [00:00<00:39, 1.05MB/s]
sub-002_task-unnamed_eeg.set:  38%|███▊      | 15.8M/41.9M [00:00<00:00, 30.7MB/s]



sub-004_task-unnamed_events.tsv:   0%|          | 0.00/1.56k [00:00<?, ?B/s]





sub-003_task-unnamed_eeg.set:   2%|▏         | 825k/39.7M [00:00<00:12, 3.30MB/s]


sub-004_task-unnamed_eeg.set:   2%|▏         | 900k/42.0M [00:00<00:12, 3.59MB/s]
sub-002_task-unnamed_eeg.set:  45%|████▌     | 18.9M/41.9M [00:00<00:00, 27.4MB/s]

sub-003_task-unnamed_eeg.set:   5%|▍         | 1.93M/39.7M [00:00<00:06, 6.55MB/s]


sub-004_task-unnamed_eeg.set:   5%|▍         | 2.04M/42.0M [00:00<00:06, 6.86MB/s]



sub-005_task-unnamed_channels.tsv:   0%|          | 0.00/96.0 [00:00<?, ?B/s]





sub-003_task-unnamed_eeg.set:   8%|▊         | 3.22M/39.7M [00:00<00:04, 8.98MB/s]


sub-004_task-unnamed_eeg.set:   8%|▊         | 3.46M/42.0M [00:00<00:04, 9.68MB/s]
sub-002_task-unnamed_eeg.set:  52%|█████▏    | 21.6M/41.9M [00:01<00:00, 23.9MB/s]



sub-005_task-unnamed_events.tsv:   0%|          | 0.00/1.50k [00:00<?, ?B/s]





sub-003_task-unnamed_eeg.set:  12%|█▏        | 4.81M/39.7M [00:00<00:03, 11.6MB/s]


sub-004_task-unnamed_eeg.set:  12%|█▏        | 5.07M/42.0M [00:00<00:03, 12.1MB/s]
sub-002_task-unnamed_eeg.set:  57%|█████▋    | 24.1M/41.9M [00:01<00:00, 22.1MB/s]

sub-003_task-unnamed_eeg.set:  18%|█▊        | 6.95M/39.7M [00:00<00:02, 15.1MB/s]


sub-004_task-unnamed_eeg.set:  17%|█▋        | 7.23M/42.0M [00:00<00:02, 15.5MB/s]



sub-005_task-unnamed_eeg.json:   0%|          | 0.00/621 [00:00<?, ?B/s]




sub-002_task-unnamed_eeg.set:  63%|██████▎   | 26.3M/41.9M [00:01<00:00, 20.8MB/s]

sub-003_task-unnamed_eeg.set:  21%|██▏       | 8.48M/39.7M [00:00<00:02, 15.3MB/s]


sub-004_task-unnamed_eeg.set:  21%|██        | 8.80M/42.0M [00:00<00:02, 15.8MB/s]
sub-002_task-unnamed_eeg.set:  68%|██████▊   | 28.5M/41.9M [00:01<00:00, 21.2MB/s]

sub-003_task-unnamed_eeg.set:  27%|██▋       | 10.6M/39.7M [00:00<00:01, 17.4MB/s]


sub-004_task-unnamed_eeg.set:  26%|██▌       | 10.9M/42.0M [00:00<00:01, 17.8MB/s]



sub-005_task-unnamed_eeg.set:   0%|          | 0.00/38.9M [00:00<?, ?B/s]
sub-002_task-unnamed_eeg.set:  73%|███████▎  | 30.6M/41.9M [00:01<00:00, 21.1MB/s]

sub-003_task-unnamed_eeg.set:  32%|███▏      | 12.6M/39.7M [00:01<00:01, 18.6MB/s]


sub-004_task-unnamed_eeg.set:  31%|███       | 12.9M/42.0M [00:01<00:01, 18.7MB/s]




sub-006_task-unnamed_channels.tsv:   0%|          | 0.00/96.0 [00:00<?, ?B/s]








sub-005_task-unnamed_eeg.set:   0%|          | 77.0k/38.9M [00:00<01:09, 582kB/s]

sub-003_task-unnamed_eeg.set:  36%|███▋      | 14.4M/39.7M [00:01<00:01, 18.1MB/s]


sub-004_task-unnamed_eeg.set:  35%|███▌      | 14.7M/42.0M [00:01<00:01, 18.1MB/s]
sub-002_task-unnamed_eeg.set:  78%|███████▊  | 32.6M/41.9M [00:01<00:00, 19.9MB/s]



sub-005_task-unnamed_eeg.set:   1%|          | 366k/38.9M [00:00<00:26, 1.54MB/s]

sub-003_task-unnamed_eeg.set:  41%|████      | 16.3M/39.7M [00:01<00:01, 18.5MB/s]


sub-004_task-unnamed_eeg.set:  40%|███▉      | 16.6M/42.0M [00:01<00:01, 18.6MB/s]
sub-002_task-unnamed_eeg.set:  83%|████████▎ | 34.6M/41.9M [00:01<00:00, 19.6MB/s]



sub-005_task-unnamed_eeg.set:   3%|▎         | 1.02M/38.9M [00:00<00:10, 3.62MB/s]




sub-006_task-unnamed_eeg.json:   0%|          | 0.00/621 [00:00<?, ?B/s]







sub-004_task-unnamed_eeg.set:  44%|████▍     | 18.4M/42.0M [00:01<00:01, 17.4MB/s]

sub-003_task-unnamed_eeg.set:  45%|████▌     | 18.1M/39.7M [00:01<00:01, 17.2MB/s]
sub-002_task-unnamed_eeg.set:  87%|████████▋ | 36.5M/41.9M [00:01<00:00, 18.2MB/s]



sub-005_task-unnamed_eeg.set:   5%|▍         | 1.77M/38.9M [00:00<00:07, 5.10MB/s]


sub-004_task-unnamed_eeg.set:  48%|████▊     | 20.1M/42.0M [00:01<00:01, 17.5MB/s]

sub-003_task-unnamed_eeg.set:  50%|████▉     | 19.7M/39.7M [00:01<00:01, 17.2MB/s]
sub-002_task-unnamed_eeg.set:  91%|█████████▏| 38.3M/41.9M [00:02<00:00, 17.9MB/s]



sub-005_task-unnamed_eeg.set:   9%|▊         | 3.35M/38.9M [00:00<00:04, 8.93MB/s]


sub-004_task-unnamed_eeg.set:  52%|█████▏    | 21.8M/42.0M [00:01<00:01, 17.4MB/s]

sub-003_task-unnamed_eeg.set:  54%|█████▍    | 21.4M/39.7M [00:01<00:01, 17.1MB/s]
sub-002_task-unnamed_eeg.set:  95%|█████████▌| 40.0M/41.9M [00:02<00:00, 17.9MB/s]



sub-005_task-unnamed_eeg.set:  13%|█▎        | 5.05M/38.9M [00:00<00:03, 11.8MB/s]




sub-006_task-unnamed_events.tsv:   0%|          | 0.00/1.62k [00:00<?, ?B/s]






sub-003_task-unnamed_eeg.set:  58%|█████▊    | 23.0M/39.7M [00:01<00:01, 16.1MB/s]


sub-004_task-unnamed_eeg.set:  56%|█████▌    | 23.5M/42.0M [00:01<00:01, 16.3MB/s]



sub-005_task-unnamed_eeg.set:  16%|█▌        | 6.32M/38.9M [00:00<00:02, 12.3MB/s]
sub-002_task-unnamed_eeg.set:  99%|█████████▉| 41.7M/41.9M [00:02<00:00, 16.8MB/s]


sub-003_task-unnamed_eeg.set:  63%|██████▎   | 25.0M/39.7M [00:01<00:00, 17.3MB/s]


sub-004_task-unnamed_eeg.set:  61%|██████    | 25.5M/42.0M [00:01<00:00, 17.7MB/s]



sub-005_task-unnamed_eeg.set:  21%|██▏       | 8.35M/38.9M [00:00<00:02, 15.1MB/s]

sub-003_task-unnamed_eeg.set:  68%|██████▊   | 27.1M/39.7M [00:01<00:00, 18.7MB/s]


sub-004_task-unnamed_eeg.set:  66%|██████▌   | 27.6M/42.0M [00:01<00:00, 18.9MB/s]



sub-005_task-unnamed_eeg.set:  27%|██▋       | 10.5M/38.9M [00:00<00:01, 17.3MB/s]

sub-003_task-unnamed_eeg.set:  74%|███████▎  | 29.2M/39.7M [00:01<00:00, 19.7MB/s]


sub-004_task-unnamed_eeg.set:  71%|███████   | 29.7M/42.0M [00:01<00:00, 19.8MB/s]
sub-006_task-unnamed_eeg.set:   0%|          | 0.00/41.2M [00:00<?, ?B/s]



sub-005_task-unnamed_eeg.set:  32%|███▏      | 12.6M/38.9M [00:01<00:01, 18.7MB/s]

sub-003_task-unnamed_eeg.set:  79%|███████▉  | 31.4M/39.7M [00:02<00:00, 20.5MB/s]


sub-004_task-unnamed_eeg.set:  76%|███████▌  | 31.8M/42.0M [00:02<00:00, 20.3MB/s]



sub-005_task-unnamed_eeg.set:  38%|███▊      | 14.7M/38.9M [00:01<00:01, 19.7MB/s]
sub-006_task-unnamed_eeg.set:   0%|          | 85.2k/41.2M [00:00<01:06, 650kB/s]

sub-003_task-unnamed_eeg.set:  84%|████████▍ | 33.5M/39.7M [00:02<00:00, 20.9MB/s]


sub-004_task-unnamed_eeg.set:  81%|████████  | 33.9M/42.0M [00:02<00:00, 20.7MB/s]



sub-005_task-unnamed_eeg.set:  43%|████▎     | 16.6M/38.9M [00:01<00:01, 19.9MB/s]
sub-006_task-unnamed_eeg.set:   1%|          | 408k/41.2M [00:00<00:24, 1.73MB/s]


sub-004_task-unnamed_eeg.set:  85%|████████▌ | 35.9M/42.0M [00:02<00:00, 20.4MB/s]

sub-003_task-unnamed_eeg.set:  89%|████████▉ | 35.5M/39.7M [00:02<00:00, 20.3MB/s]



sub-005_task-unnamed_eeg.set:  48%|████▊     | 18.6M/38.9M [00:01<00:01, 19.9MB/s]
sub-006_task-unnamed_eeg.set:   3%|▎         | 1.13M/41.2M [00:00<00:10, 4.03MB/s]


sub-004_task-unnamed_eeg.set:  90%|█████████ | 37.8M/42.0M [00:02<00:00, 19.7MB/s]

sub-003_task-unnamed_eeg.set:  94%|█████████▍| 37.4M/39.7M [00:02<00:00, 19.7MB/s]



sub-005_task-unnamed_eeg.set:  53%|█████▎    | 20.5M/38.9M [00:01<00:00, 19.3MB/s]
sub-006_task-unnamed_eeg.set:   5%|▌         | 2.14M/41.2M [00:00<00:06, 6.34MB/s]

sub-003_task-unnamed_eeg.set:  99%|█████████▉| 39.3M/39.7M [00:02<00:00, 19.1MB/s]


sub-004_task-unnamed_eeg.set:  95%|█████████▍| 39.7M/42.0M [00:02<00:00, 18.9MB/s]



sub-005_task-unnamed_eeg.set:  57%|█████▋    | 22.3M/38.9M [00:01<00:00, 18.7MB/s]


sub-006_task-unnamed_eeg.set:  10%|▉         | 3.93M/41.2M [00:00<00:03, 10.5MB/s]


sub-004_task-unnamed_eeg.set: 100%|█████████▉| 41.9M/42.0M [00:02<00:00, 20.0MB/s]






sub-005_task-unnamed_eeg.set:  64%|██████▎   | 24.7M/38.9M [00:01<00:00, 20.5MB/s]
sub-006_task-unnamed_eeg.set:  16%|█▌        | 6.52M/41.2M [00:00<00:02, 15.9MB/s]



sub-005_task-unnamed_eeg.set:  72%|███████▏  | 28.1M/38.9M [00:01<00:00, 24.7MB/s]
sub-006_task-unnamed_eeg.set:  24%|██▍       | 9.80M/41.2M [00:00<00:01, 21.7MB/s]



sub-005_task-unnamed_eeg.set:  80%|████████  | 31.1M/38.9M [00:01<00:00, 26.9MB/s]
sub-006_task-unnamed_eeg.set:  31%|███       | 12.9M/41.2M [00:00<00:01, 25.0MB/s]



sub-005_task-unnamed_eeg.set:  88%|████████▊ | 34.3M/38.9M [00:01<00:00, 28.7MB/s]
sub-006_task-unnamed_eeg.set:  39%|███▉      | 16.0M/41.2M [00:00<00:00, 27.5MB/s]



sub-005_task-unnamed_eeg.set:  96%|█████████▋| 37.5M/38.9M [00:02<00:00, 30.2MB/s]
sub-006_task-unnamed_eeg.set:  47%|████▋     | 19.3M/41.2M [00:01<00:00, 29.5MB/s]




sub-006_task-unnamed_eeg.set:  60%|█████▉    | 24.6M/41.2M [00:01<00:00, 37.4MB/s]
sub-006_task-unnamed_eeg.set:  71%|███████   | 29.2M/41.2M [00:01<00:00, 40.1MB/s]
sub-006_task-unnamed_eeg.set:  82%|████████▏ | 33.8M/41.2M [00:01<00:00, 42.0MB/s]
sub-006_task-unnamed_eeg.set:  94%|█████████▍| 38.9M/41.2M [00:01<00:00, 45.1MB/s]

✅ Finished downloading ds004745.

🧠 Please enjoy your brains.

Now, loading the dataset is simply a one-line command:

/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "1" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "2" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "3" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "4" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "5" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "6" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "7" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "8" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "1" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "2" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "3" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "4" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "5" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "6" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "7" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "8" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "1" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "2" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "3" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "4" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "5" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "6" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "7" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "8" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "1" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "2" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "3" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "4" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "5" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "6" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "7" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "8" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "1" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "2" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "3" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "4" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "5" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "6" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "7" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)
/home/runner/work/braindecode/braindecode/braindecode/datasets/bids.py:191: RuntimeWarning: No BIDS -> MNE mapping found for channel type "n/a". Type of channel "8" will be set to "misc".
  raw = mne_bids.read_raw_bids(bids_path, verbose=False)

And we can see that the events of this dataset are set in the .annotations attribute of the raw data:

print(bids_ds.datasets[0].raw.annotations)
<Annotations | 58 segments: 1 (6), 10 (10), 2 (6), 3 (6), 4 (6), 5 (6), 6 ...>

Total running time of the script: (0 minutes 10.156 seconds)

Estimated memory usage: 952 MB

Gallery generated by Sphinx-Gallery