Notebooks

The practice tier. Each notebook runs top-to-bottom in Colab's free tier and downloads only the subset of data it needs.

66 notebooks indexed, 10 of them capstones; 2 referenced by lessons but not yet indexed.

Level 0 · Read the Raw Signal

Capstone notebook

Level 1 · Signal Fundamentals

Capstone notebook

Capstone C1, spectral fingerprint: per-subject PSDs, IAF and aperiodic exponent, eyes open versus eyes closed, with a FULL_COHORT switch nb-c1-spectral-fingerprint

Level 1 capstone ~4 min
notebooks/capstones/nb-c1-spectral-fingerprint.ipynb

Downloads from ds-eegbci.

Used in C1 · Capstone — Spectral fingerprint

Open in Colab Download Read it here

Level 2 · Preprocessing as a Pipeline

Loading data and BIDS: read the file as it is stored, BIDS-ify a messy folder with mne-bids, round-trip it, and compare with the official OpenNeuro mirror nb-2-1-bids

Level 2 ~3 min
notebooks/L2/nb-2-1-bids.ipynb

Downloads from ds-eegbci.

Used in L2.1 · Loading data and BIDS

Open in Colab Download Read it here

Re-referencing: the P3 at Pz under four references, what a reference does to a topography, and reconstructing an absent online reference channel nb-2-3-reference

Level 2 ~7 min
notebooks/L2/nb-2-3-reference.ipynb

Downloads from ds-erpcore, ds-lemon.

Used in L2.3 · Re-referencing

Open in Colab Download Read it here

Filtering in practice: ERP distortion across six high-pass cutoffs, the two-pass ICA strategy measured, filtering epoched data, and a boundary artifact nb-2-4-filter-choices

Level 2 ~4 min
notebooks/L2/nb-2-4-filter-choices.ipynb

Downloads from ds-erpcore.

Used in L2.4 · Filtering in practice

Open in Colab Download Read it here

Capstone notebook

Capstone C2, clean pipeline: raw BIDS to cleaned continuous data plus a QC report per subject, with a FULL_COHORT switch nb-c2-clean-pipeline

Level 2 capstone ~9 min
notebooks/capstones/nb-c2-clean-pipeline.ipynb

Downloads from ds-erpcore.

Used in C2 · Capstone — Clean pipeline

Open in Colab Download Read it here

Level 3 · Event-Related Analysis

Measuring ERPs: peak, mean, area, peak latency and fractional-area latency compared for noise bias and across-subject reliability nb-3-3-measurement

Level 3 ~5 min
notebooks/L3/nb-3-3-measurement.ipynb

Downloads from ds-erpcore.

Used in L3.3 · Measuring ERPs

Open in Colab Download Read it here

Statistics for ERPs: a paired test on one measure, uncorrected time-point tests, and cluster-based permutation tests in time and over the scalp nb-3-7-cluster-test

Level 3 ~6 min
notebooks/L3/nb-3-7-cluster-test.ipynb

Downloads from ds-erpcore.

Used in L3.7 · Statistics for ERPs

Open in Colab Download Read it here

Capstone notebook

Capstone C3, replicate ERP CORE: the P3 oddball effect end to end from raw with amplitude, latency, effect size, SME, a cluster test and a divergence paragraph, with a FULL_COHORT switch nb-c3-replicate-erp-core

Level 3 capstone ~8 min
notebooks/capstones/nb-c3-replicate-erp-core.ipynb

Downloads from ds-erpcore.

Used in C3 · Capstone — Replicate ERP CORE

Open in Colab Download Read it here

Level 4 · Time-Frequency and Oscillations

Why time-frequency: ERP against single-trial power on real motor-imagery trials, and the phase jitter at which a trial average halves nb-4-1-evoked-vs-induced

Level 4 ~3 min
notebooks/L4/nb-4-1-evoked-vs-induced.ipynb

Downloads from ds-eegbci.

Used in L4.1 · Why time-frequency

Open in Colab Download Read it here

STFT and Morlet wavelets: the wavelet's two full widths measured off MNE's own kernel, four cycle schemes on real epochs, and what padding cannot fix nb-4-2-wavelets

Level 4 ~4 min
notebooks/L4/nb-4-2-wavelets.ipynb

Downloads from ds-eegbci.

Used in L4.2 · STFT and Morlet wavelets

Open in Colab Download Read it here

Statistics for time-frequency: uncorrected cell counts, cluster-permutation and TFCE over frequency and time, and three analysis plans ranked by analyst degrees of freedom nb-4-7-tf-cluster

Level 4 ~5 min
notebooks/L4/nb-4-7-tf-cluster.ipynb

Downloads from ds-eegbci.

Used in L4.7 · Statistics for time-frequency

Open in Colab Download Read it here

Capstone notebook

Capstone C4, mu/beta ERD: left against right hand imagery over a documented subset, contralateral lateralisation, a cluster test on the difference, and which subjects have no mu peak, with a FULL_COHORT switch nb-c4-mu-beta-erd

Level 4 capstone ~6 min
notebooks/capstones/nb-c4-mu-beta-erd.ipynb

Downloads from ds-eegbci.

Used in C4 · Capstone — Mu/beta ERD

Open in Colab Download Read it here

Level 5 · Connectivity and Spatial Analysis

Sensor-space connectivity: coherence, imaginary coherence, PLV, PLI and wPLI from one set of Fourier coefficients on ds-lemon eyes-closed, with a surrogate null, the reference dependence, and Granger causality on a simulation where the answer is known nb-5-2-connectivity

Level 5 ~3 min
notebooks/L5/nb-5-2-connectivity.ipynb

Downloads from ds-lemon.

Used in L5.2 · Sensor-space connectivity

Open in Colab Download Read it here

Surface Laplacian and current source density: reference independence proved, the ERP CORE P3 sharpened, what depth and spatial extent cost under the Laplacian, and connectivity before and after CSD nb-5-3-csd

Level 5 ~5 min
notebooks/L5/nb-5-3-csd.ipynb

Downloads from ds-erpcore, ds-lemon.

Used in L5.3 · Surface Laplacian and CSD

Open in Colab Download Read it here

Forward models without a boundary-element model: the leadfield on concentric spheres, one shell against four, what fewer electrodes cost, and template electrode positions against one subject's digitised set nb-5-4-forward

Level 5 ~3 min
notebooks/L5/nb-5-4-forward.ipynb

Downloads from ds-lemon.

Used in L5.4 · Forward models

Open in Colab Download Read it here

The inverse problem on a sphere: the null space, minimum-norm, dSPM, sLORETA, eLORETA and an LCMV beamformer, resolution matrices, the depth bias — and why a deep source and a superficial patch cannot be told apart nb-5-5-inverse

Level 5 ~3 min
notebooks/L5/nb-5-5-inverse.ipynb

Used in L5.5 · The inverse problem and source estimation

Open in Colab Download Read it here

Source-space connectivity and leakage: leakage read off the resolution matrix, a simulation with one known coupling, pairwise and symmetric orthogonalisation, and the same measures on ds-lemon — on geometric regions, because no parcellation ships nb-5-6-source-connectivity

Level 5 ~3 min
notebooks/L5/nb-5-6-source-connectivity.ipynb

Downloads from ds-lemon.

Used in L5.6 · Source-space connectivity and leakage

Open in Colab Download Read it here

Spatial filters for decoding: CSP plus LDA on ds-eegbci motor imagery with cross-validation, filters against patterns, the component-count sweep, the eleven points a misplaced fold boundary buys, and the twelve-subject distribution the headline number came from nb-5-7-csp

Level 5 ~20 min
notebooks/L5/nb-5-7-csp.ipynb

Downloads from ds-eegbci.

Used in L5.7 · Spatial filters for decoding

Open in Colab Download Read it here

Capstone notebooks

Capstone C5, connectivity with and without leakage: coherence, wPLI, CSD + wPLI and leakage-corrected source-space connectivity on the same ds-lemon eyes-closed epochs, with a divergence paragraph, a rubric and a FULL_COHORT switch nb-c5-connectivity

Level 5 capstone ~5 min
notebooks/capstones/nb-c5-connectivity.ipynb

Downloads from ds-lemon.

Open in Colab Download Read it here

Level 6 · Inference and Rigor

The multiple-comparisons landscape: one ERP contrast through six inference strategies, their error rates measured on a true null, and the family-wise error rate of the search itself nb-6-1-corrections

Level 6 ~8 min
notebooks/L6/nb-6-1-corrections.ipynb

Downloads from ds-erpcore.

Used in L6.1 · The multiple-comparisons landscape

Open in Colab Download Read it here

Circularity and analytic flexibility: the false-positive cost of choosing a window and electrode from the tested data, two fixes measured against it, and 486 defensible pipelines on one contrast nb-6-4-multiverse

Level 6 ~7 min
notebooks/L6/nb-6-4-multiverse.ipynb

Downloads from ds-erpcore.

Used in L6.4 · Circularity and analytic flexibility

Open in Colab Download Read it here

Decoding as inference: time-resolved decoding of the P3 with a permutation test, chance and its variance, temporal generalization, and leakage measured three ways nb-6-5-decoding

Level 6 ~12 min
notebooks/L6/nb-6-5-decoding.ipynb

Downloads from ds-erpcore, ds-eegbci.

Used in L6.5 · Decoding as inference

Open in Colab Download Read it here

Capstone notebook

Capstone C6, the rigor audit: a published paper's reporting audited item by item against what its release lets a stranger reproduce, a preregistered analysis run afterwards, and the 108-pipeline multiverse it was written to survive nb-c6-rigor-audit

Level 6 capstone ~11 min
notebooks/capstones/nb-c6-rigor-audit.ipynb

Downloads from ds-iowapd.

Used in C6 · Capstone — Rigor audit

Open in Colab Download Read it here

Level 7 · Applied Electives

Decoding and BCI with moabb: CSP + LDA, a Riemannian tangent-space classifier and filter-bank CSP, benchmarked within session, across sessions and across subjects on motor imagery and on a dry-electrode P300, with session and EOG leakage measured nb-7-1-moabb

Level 7 ~13 min
notebooks/L7/nb-7-1-moabb.ipynb

Downloads from ds-bci-iv-2a, ds-brain-invaders.

Used in L7.1 · Decoding and BCI

Open in Colab Download Read it here

What a four-channel headband measures: the two geometries as facts, a first-look report of a four-channel stream, the occipitotemporal replica on twelve ds-eegbci subjects, the frontotemporal geometry on synthetic data with its real names, the bandwidth edge measured, what an on-device notch removes from the diagnostics, and which analyses survive which geometry nb-7-10-headband

Level 7 ~3 min
notebooks/L7/nb-7-10-headband.ipynb

Downloads from ds-eegbci.

Used in L7.10 · What a four-channel headband measures

Open in Colab Download Read it here

Getting a stream: one interface for a replayed recording, a synthetic stream with planted faults and a headset; the block contract; the rate measured against the rate claimed; a planted loss counted and verified; drift in milliseconds; a session recorded in the site's own asset format and read back nb-7-11-stream

Level 7 ~3 min
notebooks/L7/nb-7-11-stream.ipynb

Downloads from ds-eegbci.

Used in L7.11 · Getting a stream: timestamps, dropped samples, drift, recording

Open in Colab Download Read it here

Signal quality you can act on live: the gate's criteria cited, its sensitivity on planted blinks, pops, a flat channel and a mains line, three states and a hold, how often a second is unusable on the occipitotemporal replica, the online gate against the offline artifact timeline on the same minute, one consumer export's edge, hole and quality columns, and ICA at rank four measured nb-7-12-quality

Level 7 ~3 min
notebooks/L7/nb-7-12-quality.ipynb

Downloads from ds-eegbci, ds-areeg.

Used in L7.12 · Signal quality you can act on live

Open in Colab Download Read it here

The feedback signal: three implementations of the latency budget held to each other and to the SciPy reference, the library's loop against helpers_l7 to 1e-12 on the shipped trace, three band-power derivations per block and what each costs, smoothing measured by the loopback probe on the four-channel loop, a fixed against an adaptive baseline on a planted rise, and the channels of a montage combined with the combination stated nb-7-13-feedback

Level 7 ~3 min
notebooks/L7/nb-7-13-feedback.ipynb

Downloads from ds-eegbci.

Used in L7.13 · The feedback signal: band power in a buffer

Open in Colab Download Read it here

A protocol that can fail: the four sham modes through the library's loop on nb-7-3's twelve replayed sessions with the naive test's false-positive rate reproduced exactly, the valid session-level test null where it should be and the controlled contrast, its power on planted rises, a session log with a sealed sham mode unblinded only with the seed, a hashed pre-registration, and the six CRED-nf items marked satisfied or not satisfiable alone nb-7-14-protocol

Level 7 ~4 min
notebooks/L7/nb-7-14-protocol.ipynb

Downloads from ds-eegbci.

Used in L7.14 · A protocol that can fail: sham, blinding, pre-registration, the valid test

Open in Colab Download Read it here

A first BCI on four channels: the chance band held to Level 6's helper, eyes closed against eyes open on the occipitotemporal replica with a time-split calibrate-then-apply and the decoder frozen (and the leaky split beside it), the P300 at 16, 8 and 4 channels on one dry-headset subject, a steady-state response by canonical correlation on the planted flicker with the alpha caveat measured, a blink switch labelled EOG, and the decoder run block by block nb-7-15-bci

Level 7 ~3 min
notebooks/L7/nb-7-15-bci.ipynb

Downloads from ds-eegbci, ds-brain-invaders.

Used in L7.15 · A first BCI on four channels

Open in Colab Download Read it here

Build the application: the two example applications run as programs on the shipped four-channel asset and the synthetic stream, the session.json fields the rubric reads, a pip project shape with a replay entry point, the budget with its measured row and the loopback probe within one block of it, the gate over planted artifact windows, four sham modes sealed and unblinded, the CRED-nf report with the valid learning test beside the invalid trend, pre-registration as a hash a commit can precede, the EO/EC switch on the planted answer and on the occipitotemporal replica, and the hardware-run record with every value TODO(confirm) nb-7-16-application

Level 7 ~4 min
notebooks/L7/nb-7-16-application.ipynb

Downloads from ds-eegbci.

Used in L7.16 · Build the application

Open in Colab Download Read it here

Sleep staging against an expert hypnogram: the irreversible Rechtschaffen & Kales to AASM mapping stated first, then Cohen's kappa over the whole recording and over the sleep period, with the confusion matrix and four sensitivity runs nb-7-2-sleep

Level 7 ~8 min
notebooks/L7/nb-7-2-sleep.ipynb

Downloads from ds-sleep-edf.

Used in L7.2 · Sleep EEG and staging

Open in Colab Download Read it here

A simulated real-time pipeline: the end-to-end latency budget derived, measured with a loopback probe and checked against the widget, then an alpha-envelope feedback loop with sham controls and the false-positive rate of the naive within-session test nb-7-3-realtime

Level 7 ~3 min
notebooks/L7/nb-7-3-realtime.ipynb

Downloads from ds-eegbci.

Used in L7.3 · Real-time processing and neurofeedback

Open in Colab Download Read it here

What survives at fourteen channels: three device classes measured with one estimator, the hardware bandwidth ceiling behind a nominal sampling rate, the vendor-derived columns that are not signal, and a controlled degradation of one recording from 64 electrodes to four nb-7-5-low-channel

Level 7 ~5 min
notebooks/L7/nb-7-5-low-channel.ipynb

Downloads from ds-eegbci, ds-brain-invaders, ds-areeg.

Used in L7.5 · Mobile and consumer EEG

Open in Colab Download Read it here

How reliable is a resting-state feature? Split-half, minutes, two months and five years of test-retest ICC for the alpha peak, a theta/beta ratio and the aperiodic slope, against a clinical group contrast and the attenuation ceiling it implies nb-7-6-reliability

Level 7 ~9 min
notebooks/L7/nb-7-6-reliability.ipynb

Downloads from ds-lemon, ds-dortmund, ds-srm, ds-iowapd.

Used in L7.6 · Resting-state and biomarkers

Open in Colab Download Read it here

A pipeline you configure instead of write: mne-bids-pipeline on an ERP dataset and a resting one, the BIDS layout and event metadata a config cannot supply, the same subject through two pipelines, and the units error no configuration file could catch nb-7-8-bids-pipeline

Level 7 ~4 min
notebooks/L7/nb-7-8-bids-pipeline.ipynb

Downloads from ds-erpcore, ds-srm.

Used in L7.8 · Reproducible pipelines at scale

Open in Colab Download Read it here

Capstone notebooks

Capstone C7, the full reproduction: a published Parkinson's resting-EEG result reproduced end to end from raw under a preregistered plan, with four tiers of what reproduction can mean, a QC report per participant, and every divergence from the paper listed before any is called the explanation nb-c7-reproduction

Level 7 capstone ~8 min
notebooks/capstones/nb-c7-reproduction.ipynb

Downloads from ds-iowapd.

Open in Colab Download Read it here