Download a real EEG subset and inspect its cache#

Estimated reading time:11 minutes

Stage one BNCI2014-004 motor-imagery recording (about 5.6 MB including sidecars). CPU is sufficient; install EEGDash and choose writable persistent storage. The source is nm000135. This acquisition recipe does not train a model or require a waveform plot.

1. Select one recording before downloading#

The resolver honours EEGDASH_CACHE_DIR, expands ~ and otherwise chooses a writable project cache. A query identifies recordings, not whole people.

from eegdash import EEGDashDataset
from eegdash.paths import get_default_cache_dir

cache_dir = get_default_cache_dir()
query = dict(dataset="nm000135", subject="1", session="0train", run="0", task="imagery")
dataset = EEGDashDataset(cache_dir=cache_dir, **query, n_jobs=1)
dataset.description[["subject", "session", "run", "task"]]
subject session run task
0 1 0train 0 imagery


2. Stage signals and required BIDS sidecars#

Cropping after opening does not reduce download size. Keep events, channels and the complete BIDS directory structure with the signal files.

dataset.download_all(n_jobs=1)
[10/16/26 15:56:52] INFO     HTTP Request: GET                   _client.py:1025
                             https://data.nemar.org/nm000135/v1.
                             1.0/sub-1/ses-0train/sub-1_ses-0tra
                             in_scans.tsv "HTTP/1.1 200 OK"

Next check that local discovery and the signal reader can reopen the subset. A successful open is not an integrity checksum of the entire recording.

offline = EEGDashDataset(cache_dir=cache_dir, **query, download=False, n_jobs=1)
raw = offline.datasets[0].raw
raw
General
Filename(s) sub-1_ses-0train_task-imagery_run-0_eeg.bdf
MNE object type RawBDF
Measurement date 2008-01-01 at 00:00:00 UTC
Participant sub-1
Experimenter mne_anonymize
Acquisition
Duration 00:40:20 (HH:MM:SS)
Sampling frequency 250.00 Hz
Time points 605,000
Channels
EEG
Head & sensor digitization Not available
Filters
Highpass 0.00 Hz
Lowpass 125.00 Hz


The reader confirms local loading, not file integrity. For cross-host transfers, keep the complete BIDS tree and verify file checksums separately.