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.1.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,  9.05 entities/s]
πŸ“ Traversing directories for ds004745 : 10 entities [00:01,  6.09 entities/s]
πŸ“ Traversing directories for ds004745 : 14 entities [00:01,  7.69 entities/s]
πŸ“ Traversing directories for ds004745 : 18 entities [00:02,  7.83 entities/s]
πŸ“ Traversing directories for ds004745 : 22 entities [00:02,  7.84 entities/s]
πŸ“ Traversing directories for ds004745 : 26 entities [00:03,  8.04 entities/s]
πŸ“ Traversing directories for ds004745 : 29 entities [00:03,  8.69 entities/s]
πŸ“₯ Retrieving up to 29 files (5 concurrent downloads).

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


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


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


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


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


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


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


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


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


sub-001_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-003_task-unnamed_eeg.json:   0%|          | 0.00/621 [00:00<?, ?B/s]


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


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

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


sub-002_task-unnamed_eeg.set:   0%|          | 83.5k/41.9M [00:00<00:56, 774kB/s]

sub-003_task-unnamed_events.tsv:   0%|          | 0.00/1.51k [00:00<?, ?B/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-002_task-unnamed_eeg.set:   1%|          | 459k/41.9M [00:00<00:17, 2.50MB/s]


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




sub-003_task-unnamed_eeg.set:   0%|          | 179k/39.7M [00:00<00:23, 1.75MB/s]
sub-002_task-unnamed_eeg.set:   3%|β–Ž         | 1.43M/41.9M [00:00<00:07, 5.95MB/s]


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



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





sub-003_task-unnamed_eeg.set:   3%|β–Ž         | 1.09M/39.7M [00:00<00:06, 6.27MB/s]
sub-002_task-unnamed_eeg.set:   7%|β–‹         | 2.99M/41.9M [00:00<00:04, 9.98MB/s]


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



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





sub-003_task-unnamed_eeg.set:   6%|β–Œ         | 2.40M/39.7M [00:00<00:04, 9.46MB/s]
sub-002_task-unnamed_eeg.set:  12%|β–ˆβ–        | 4.96M/41.9M [00:00<00:02, 13.8MB/s]


sub-004_task-unnamed_eeg.set:   1%|          | 390k/42.0M [00:00<00:20, 2.13MB/s]



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

sub-003_task-unnamed_eeg.set:  10%|β–‰         | 3.95M/39.7M [00:00<00:03, 12.0MB/s]
sub-002_task-unnamed_eeg.set:  18%|β–ˆβ–Š        | 7.43M/41.9M [00:00<00:02, 17.9MB/s]




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







sub-004_task-unnamed_eeg.set:   2%|▏         | 1.04M/42.0M [00:00<00:10, 4.28MB/s]



sub-005_task-unnamed_eeg.set:   0%|          | 187k/38.9M [00:00<00:21, 1.90MB/s]

sub-003_task-unnamed_eeg.set:  14%|β–ˆβ–        | 5.57M/39.7M [00:00<00:02, 13.8MB/s]
sub-002_task-unnamed_eeg.set:  22%|β–ˆβ–ˆβ–       | 9.15M/41.9M [00:00<00:01, 17.3MB/s]


sub-004_task-unnamed_eeg.set:   6%|β–Œ         | 2.37M/42.0M [00:00<00:05, 8.04MB/s]




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








sub-005_task-unnamed_eeg.set:   2%|▏         | 851k/38.9M [00:00<00:08, 4.60MB/s]

sub-003_task-unnamed_eeg.set:  17%|β–ˆβ–‹        | 6.90M/39.7M [00:00<00:02, 13.6MB/s]
sub-002_task-unnamed_eeg.set:  26%|β–ˆβ–ˆβ–Œ       | 10.8M/41.9M [00:00<00:02, 15.8MB/s]


sub-004_task-unnamed_eeg.set:   8%|β–Š         | 3.50M/42.0M [00:00<00:04, 9.38MB/s]



sub-005_task-unnamed_eeg.set:   4%|▍         | 1.69M/38.9M [00:00<00:05, 6.56MB/s]

sub-003_task-unnamed_eeg.set:  21%|β–ˆβ–ˆ        | 8.35M/39.7M [00:00<00:02, 14.1MB/s]




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







sub-004_task-unnamed_eeg.set:  11%|β–ˆβ–        | 4.73M/42.0M [00:00<00:03, 10.6MB/s]
sub-002_task-unnamed_eeg.set:  29%|β–ˆβ–ˆβ–‰       | 12.4M/41.9M [00:00<00:02, 14.9MB/s]



sub-005_task-unnamed_eeg.set:   6%|β–Œ         | 2.42M/38.9M [00:00<00:05, 6.97MB/s]

sub-003_task-unnamed_eeg.set:  24%|β–ˆβ–ˆβ–       | 9.71M/39.7M [00:00<00:02, 13.8MB/s]


sub-004_task-unnamed_eeg.set:  15%|β–ˆβ–Œ        | 6.34M/42.0M [00:00<00:02, 12.6MB/s]
sub-002_task-unnamed_eeg.set:  33%|β–ˆβ–ˆβ–ˆβ–Ž      | 14.0M/41.9M [00:01<00:01, 15.5MB/s]



sub-005_task-unnamed_eeg.set:   9%|β–‰         | 3.63M/38.9M [00:00<00:04, 8.96MB/s]




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

sub-003_task-unnamed_eeg.set:  29%|β–ˆβ–ˆβ–Š       | 11.4M/39.7M [00:00<00:01, 14.9MB/s]







sub-004_task-unnamed_eeg.set:  18%|β–ˆβ–Š        | 7.56M/42.0M [00:00<00:02, 12.6MB/s]
sub-002_task-unnamed_eeg.set:  37%|β–ˆβ–ˆβ–ˆβ–‹      | 15.5M/41.9M [00:01<00:01, 14.9MB/s]



sub-005_task-unnamed_eeg.set:  13%|β–ˆβ–Ž        | 4.91M/38.9M [00:00<00:03, 10.5MB/s]

sub-003_task-unnamed_eeg.set:  32%|β–ˆβ–ˆβ–ˆβ–      | 12.8M/39.7M [00:01<00:01, 14.5MB/s]


sub-004_task-unnamed_eeg.set:  22%|β–ˆβ–ˆβ–       | 9.22M/42.0M [00:00<00:02, 14.1MB/s]
sub-002_task-unnamed_eeg.set:  41%|β–ˆβ–ˆβ–ˆβ–ˆ      | 17.1M/41.9M [00:01<00:01, 15.5MB/s]



sub-005_task-unnamed_eeg.set:  17%|β–ˆβ–‹        | 6.58M/38.9M [00:00<00:02, 12.7MB/s]

sub-003_task-unnamed_eeg.set:  37%|β–ˆβ–ˆβ–ˆβ–‹      | 14.5M/39.7M [00:01<00:01, 15.4MB/s]




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







sub-004_task-unnamed_eeg.set:  25%|β–ˆβ–ˆβ–Œ       | 10.6M/42.0M [00:01<00:02, 13.9MB/s]
sub-002_task-unnamed_eeg.set:  44%|β–ˆβ–ˆβ–ˆβ–ˆβ–     | 18.6M/41.9M [00:01<00:01, 14.9MB/s]



sub-005_task-unnamed_eeg.set:  20%|β–ˆβ–ˆ        | 7.82M/38.9M [00:00<00:02, 12.8MB/s]

sub-003_task-unnamed_eeg.set:  40%|β–ˆβ–ˆβ–ˆβ–ˆ      | 16.0M/39.7M [00:01<00:01, 14.9MB/s]


sub-004_task-unnamed_eeg.set:  29%|β–ˆβ–ˆβ–‰       | 12.2M/42.0M [00:01<00:02, 14.8MB/s]
sub-002_task-unnamed_eeg.set:  48%|β–ˆβ–ˆβ–ˆβ–ˆβ–Š     | 20.2M/41.9M [00:01<00:01, 15.4MB/s]



sub-005_task-unnamed_eeg.set:  24%|β–ˆβ–ˆβ–       | 9.44M/38.9M [00:00<00:02, 14.1MB/s]

sub-003_task-unnamed_eeg.set:  44%|β–ˆβ–ˆβ–ˆβ–ˆβ–     | 17.6M/39.7M [00:01<00:01, 15.6MB/s]




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


sub-004_task-unnamed_eeg.set:  33%|β–ˆβ–ˆβ–ˆβ–Ž      | 13.8M/42.0M [00:01<00:01, 15.5MB/s]
sub-002_task-unnamed_eeg.set:  52%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–    | 21.9M/41.9M [00:01<00:01, 16.0MB/s]



sub-005_task-unnamed_eeg.set:  28%|β–ˆβ–ˆβ–Š       | 11.1M/38.9M [00:01<00:01, 14.9MB/s]

sub-003_task-unnamed_eeg.set:  48%|β–ˆβ–ˆβ–ˆβ–ˆβ–Š     | 19.2M/39.7M [00:01<00:01, 15.9MB/s]




sub-006_task-unnamed_eeg.set:   0%|          | 187k/41.2M [00:00<00:22, 1.89MB/s]


sub-004_task-unnamed_eeg.set:  37%|β–ˆβ–ˆβ–ˆβ–‹      | 15.4M/42.0M [00:01<00:01, 15.7MB/s]
sub-002_task-unnamed_eeg.set:  56%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Œ    | 23.4M/41.9M [00:01<00:01, 15.7MB/s]



sub-005_task-unnamed_eeg.set:  32%|β–ˆβ–ˆβ–ˆβ–      | 12.6M/38.9M [00:01<00:01, 15.1MB/s]

sub-003_task-unnamed_eeg.set:  52%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–    | 20.8M/39.7M [00:01<00:01, 15.5MB/s]




sub-006_task-unnamed_eeg.set:   2%|▏         | 918k/41.2M [00:00<00:08, 5.14MB/s]


sub-004_task-unnamed_eeg.set:  40%|β–ˆβ–ˆβ–ˆβ–ˆ      | 16.9M/42.0M [00:01<00:01, 15.2MB/s]



sub-005_task-unnamed_eeg.set:  36%|β–ˆβ–ˆβ–ˆβ–Œ      | 14.0M/38.9M [00:01<00:01, 14.6MB/s]
sub-002_task-unnamed_eeg.set:  60%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰    | 24.9M/41.9M [00:01<00:01, 15.0MB/s]

sub-003_task-unnamed_eeg.set:  56%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Œ    | 22.3M/39.7M [00:01<00:01, 15.1MB/s]




sub-006_task-unnamed_eeg.set:   4%|▍         | 1.66M/41.2M [00:00<00:06, 6.44MB/s]


sub-004_task-unnamed_eeg.set:  44%|β–ˆβ–ˆβ–ˆβ–ˆβ–Ž     | 18.3M/42.0M [00:01<00:01, 14.8MB/s]



sub-005_task-unnamed_eeg.set:  40%|β–ˆβ–ˆβ–ˆβ–‰      | 15.4M/38.9M [00:01<00:01, 14.5MB/s]
sub-002_task-unnamed_eeg.set:  63%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž   | 26.4M/41.9M [00:01<00:01, 14.8MB/s]

sub-003_task-unnamed_eeg.set:  60%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰    | 23.7M/39.7M [00:01<00:01, 14.8MB/s]




sub-006_task-unnamed_eeg.set:   6%|β–Œ         | 2.46M/41.2M [00:00<00:05, 7.19MB/s]


sub-004_task-unnamed_eeg.set:  47%|β–ˆβ–ˆβ–ˆβ–ˆβ–‹     | 19.7M/42.0M [00:01<00:01, 14.6MB/s]



sub-005_task-unnamed_eeg.set:  43%|β–ˆβ–ˆβ–ˆβ–ˆβ–Ž     | 16.8M/38.9M [00:01<00:01, 14.4MB/s]
sub-002_task-unnamed_eeg.set:  66%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹   | 27.8M/41.9M [00:02<00:01, 14.6MB/s]

sub-003_task-unnamed_eeg.set:  63%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž   | 25.2M/39.7M [00:01<00:01, 14.6MB/s]




sub-006_task-unnamed_eeg.set:   8%|β–Š         | 3.38M/41.2M [00:00<00:04, 8.06MB/s]


sub-004_task-unnamed_eeg.set:  50%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     | 21.2M/42.0M [00:01<00:01, 14.5MB/s]



sub-005_task-unnamed_eeg.set:  47%|β–ˆβ–ˆβ–ˆβ–ˆβ–‹     | 18.2M/38.9M [00:01<00:01, 14.5MB/s]
sub-002_task-unnamed_eeg.set:  70%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰   | 29.2M/41.9M [00:02<00:00, 14.5MB/s]

sub-003_task-unnamed_eeg.set:  67%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹   | 26.6M/39.7M [00:01<00:00, 14.5MB/s]




sub-006_task-unnamed_eeg.set:  11%|β–ˆβ–        | 4.74M/41.2M [00:00<00:03, 10.1MB/s]


sub-004_task-unnamed_eeg.set:  54%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž    | 22.5M/42.0M [00:01<00:01, 14.3MB/s]



sub-005_task-unnamed_eeg.set:  50%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     | 19.6M/38.9M [00:01<00:01, 14.5MB/s]
sub-002_task-unnamed_eeg.set:  73%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž  | 30.6M/41.9M [00:02<00:00, 14.5MB/s]




sub-006_task-unnamed_eeg.set:  15%|β–ˆβ–        | 6.15M/41.2M [00:00<00:03, 11.6MB/s]

sub-003_task-unnamed_eeg.set:  70%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   | 27.9M/39.7M [00:02<00:00, 14.4MB/s]


sub-004_task-unnamed_eeg.set:  57%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹    | 23.9M/42.0M [00:01<00:01, 14.3MB/s]



sub-005_task-unnamed_eeg.set:  54%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–    | 21.0M/38.9M [00:01<00:01, 14.3MB/s]
sub-002_task-unnamed_eeg.set:  76%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹  | 32.0M/41.9M [00:02<00:00, 14.5MB/s]




sub-006_task-unnamed_eeg.set:  18%|β–ˆβ–Š        | 7.51M/41.2M [00:00<00:02, 12.4MB/s]

sub-003_task-unnamed_eeg.set:  74%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–  | 29.3M/39.7M [00:02<00:00, 14.4MB/s]


sub-004_task-unnamed_eeg.set:  60%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ    | 25.3M/42.0M [00:02<00:01, 14.3MB/s]



sub-005_task-unnamed_eeg.set:  58%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Š    | 22.4M/38.9M [00:01<00:01, 14.5MB/s]
sub-002_task-unnamed_eeg.set:  80%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰  | 33.4M/41.9M [00:02<00:00, 14.5MB/s]




sub-006_task-unnamed_eeg.set:  22%|β–ˆβ–ˆβ–       | 8.91M/41.2M [00:00<00:02, 13.1MB/s]

sub-003_task-unnamed_eeg.set:  77%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹  | 30.7M/39.7M [00:02<00:00, 14.5MB/s]


sub-004_task-unnamed_eeg.set:  64%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž   | 26.7M/42.0M [00:02<00:01, 14.3MB/s]



sub-005_task-unnamed_eeg.set:  61%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ    | 23.8M/38.9M [00:01<00:01, 14.4MB/s]
sub-002_task-unnamed_eeg.set:  83%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž | 34.8M/41.9M [00:02<00:00, 14.4MB/s]




sub-006_task-unnamed_eeg.set:  25%|β–ˆβ–ˆβ–       | 10.2M/41.2M [00:01<00:02, 13.3MB/s]

sub-003_task-unnamed_eeg.set:  81%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  | 32.1M/39.7M [00:02<00:00, 14.4MB/s]


sub-004_task-unnamed_eeg.set:  67%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹   | 28.1M/42.0M [00:02<00:01, 14.2MB/s]



sub-005_task-unnamed_eeg.set:  65%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–   | 25.2M/38.9M [00:02<00:01, 14.3MB/s]
sub-002_task-unnamed_eeg.set:  86%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹ | 36.2M/41.9M [00:02<00:00, 14.4MB/s]




sub-006_task-unnamed_eeg.set:  28%|β–ˆβ–ˆβ–Š       | 11.5M/41.2M [00:01<00:02, 13.4MB/s]

sub-003_task-unnamed_eeg.set:  84%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ– | 33.5M/39.7M [00:02<00:00, 14.1MB/s]


sub-004_task-unnamed_eeg.set:  70%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   | 29.4M/42.0M [00:02<00:00, 14.0MB/s]



sub-005_task-unnamed_eeg.set:  68%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Š   | 26.6M/38.9M [00:02<00:00, 13.9MB/s]
sub-002_task-unnamed_eeg.set:  90%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰ | 37.6M/41.9M [00:02<00:00, 13.9MB/s]




sub-006_task-unnamed_eeg.set:  31%|β–ˆβ–ˆβ–ˆ       | 12.8M/41.2M [00:01<00:02, 13.3MB/s]

sub-003_task-unnamed_eeg.set:  88%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Š | 34.9M/39.7M [00:02<00:00, 13.9MB/s]


sub-004_task-unnamed_eeg.set:  73%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž  | 30.8M/42.0M [00:02<00:00, 13.9MB/s]



sub-005_task-unnamed_eeg.set:  72%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–  | 27.9M/38.9M [00:02<00:00, 14.0MB/s]
sub-002_task-unnamed_eeg.set:  93%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž| 39.0M/41.9M [00:02<00:00, 14.1MB/s]




sub-006_task-unnamed_eeg.set:  34%|β–ˆβ–ˆβ–ˆβ–      | 14.2M/41.2M [00:01<00:02, 13.5MB/s]

sub-003_task-unnamed_eeg.set:  91%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–| 36.3M/39.7M [00:02<00:00, 14.1MB/s]


sub-004_task-unnamed_eeg.set:  77%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹  | 32.1M/42.0M [00:02<00:00, 14.0MB/s]



sub-005_task-unnamed_eeg.set:  75%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Œ  | 29.3M/38.9M [00:02<00:00, 14.1MB/s]
sub-002_task-unnamed_eeg.set:  96%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹| 40.3M/41.9M [00:02<00:00, 14.1MB/s]




sub-006_task-unnamed_eeg.set:  38%|β–ˆβ–ˆβ–ˆβ–Š      | 15.6M/41.2M [00:01<00:01, 13.9MB/s]

sub-003_task-unnamed_eeg.set:  95%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–| 37.7M/39.7M [00:02<00:00, 14.1MB/s]


sub-004_task-unnamed_eeg.set:  80%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰  | 33.5M/42.0M [00:02<00:00, 14.1MB/s]



sub-005_task-unnamed_eeg.set:  79%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰  | 30.6M/38.9M [00:02<00:00, 14.1MB/s]
sub-002_task-unnamed_eeg.set: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰| 41.7M/41.9M [00:03<00:00, 14.2MB/s]





sub-006_task-unnamed_eeg.set:  41%|β–ˆβ–ˆβ–ˆβ–ˆ      | 17.0M/41.2M [00:01<00:01, 14.1MB/s]

sub-003_task-unnamed_eeg.set:  99%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Š| 39.1M/39.7M [00:02<00:00, 14.5MB/s]


sub-004_task-unnamed_eeg.set:  84%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž | 35.1M/42.0M [00:02<00:00, 14.8MB/s]





sub-005_task-unnamed_eeg.set:  83%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž | 32.3M/38.9M [00:02<00:00, 15.1MB/s]




sub-006_task-unnamed_eeg.set:  46%|β–ˆβ–ˆβ–ˆβ–ˆβ–Œ     | 18.9M/41.2M [00:01<00:01, 15.9MB/s]


sub-004_task-unnamed_eeg.set:  89%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Š | 37.2M/42.0M [00:02<00:00, 17.0MB/s]



sub-005_task-unnamed_eeg.set:  89%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰ | 34.5M/38.9M [00:02<00:00, 17.5MB/s]




sub-006_task-unnamed_eeg.set:  51%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     | 21.1M/41.2M [00:01<00:01, 18.0MB/s]


sub-004_task-unnamed_eeg.set:  94%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–| 39.4M/42.0M [00:02<00:00, 18.7MB/s]



sub-005_task-unnamed_eeg.set:  94%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–| 36.7M/38.9M [00:02<00:00, 19.1MB/s]




sub-006_task-unnamed_eeg.set:  57%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹    | 23.3M/41.2M [00:01<00:00, 19.6MB/s]


sub-004_task-unnamed_eeg.set:  99%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰| 41.6M/42.0M [00:03<00:00, 20.1MB/s]











sub-006_task-unnamed_eeg.set:  66%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Œ   | 27.1M/41.2M [00:01<00:00, 25.7MB/s]




sub-006_task-unnamed_eeg.set:  81%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  | 33.4M/41.2M [00:02<00:00, 37.7MB/s]




sub-006_task-unnamed_eeg.set:  97%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹| 39.9M/41.2M [00:02<00:00, 46.6MB/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: Data will be preloaded. preload=False or a string preload is not supported when the data is stored in the .set file
  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: Data will be preloaded. preload=False or a string preload is not supported when the data is stored in the .set file
  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: Data will be preloaded. preload=False or a string preload is not supported when the data is stored in the .set file
  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: Data will be preloaded. preload=False or a string preload is not supported when the data is stored in the .set file
  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: Data will be preloaded. preload=False or a string preload is not supported when the data is stored in the .set file
  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 11.145 seconds)

Estimated memory usage: 988 MB

Gallery generated by Sphinx-Gallery