About
The primer
Neural activity can be described as a point moving through a high-dimensional state space. This view has shaped systems neuroscience through recordings of neuronal populations, but it is still little used with non-invasive human recordings such as EEG and MEG.
The primer presents trajectory analysis based on principal component analysis (PCA) as an accessible way in. It explains how to organise EEG or MEG activity into neural states, project them onto a few components, and read the result as trajectories that show how distributed activity evolves over time. It also covers the limits of PCA and the problems specific to EEG and MEG: spatial mixing, sensitivity to preprocessing, validation and overinterpretation. Read the preprint on arXiv.
What this site is for
The paper works through two examples: motor execution and imagery in EEG, and face perception in MEG. Every analysis behind them was run on the full cohort, and each run wrote an interactive report with its figures, tables, statistics and settings. This site publishes those reports.
Use it to look closer at a figure from the paper, to check the numbers behind it, or to see the analyses that did not fit in the paper: other sensor selections, other contrasts, and a comparison of PCA with nonlinear methods.
Results in the paper
The reports behind Figures 2 and 3. The plots are drawn from the reports themselves.
- Right Hand (Exec)
- Left Hand (Exec)
- Right Hand (Imag)
- Left Hand (Imag)
Trajectories, PC 1 against PC 2
Figure 2Motor execution and imagery in EEG
Left and right hand, executed and imagined, in 106 people. From regional ERPs to a shared PCA space, the trajectories, how far apart the conditions are and how fast the state moves.
Open the report- Famous
- Unfamiliar
- Scrambled
Trajectories, PC 1 against PC 2
Figure 3a–bFace perception in MEG
Famous, unfamiliar and scrambled faces in 16 people, on 36 right-occipital sensors. The sensor-level response, then the trajectories in a shared PCA space.
Open the report- Famous
- Unfamiliar
- Scrambled
Alpha power, PC 1 against PC 2
Figure 3c–dThe same task, seen through alpha power
Alpha-band power (8 to 12 Hz) as the neural state, in its own PCA space. The report also covers beta and low gamma.
Open the report- Sensors
- Shared PCA
- Trajectory metrics
- Aligned PCA
- Aligned PCA + Trajectory metrics
Balanced accuracy over time, three classes
Figure 3e–fDecoding across participants
Leave-one-participant-out decoding of the image type from sensors, shared PCA, trajectory descriptors and aligned PCA.
Open the reportAll reports
Everything that was run, by dataset. Reports open in a viewer with a bar on top for moving between analyses, contrasts and sensor selections. They are files of 5 to 20 MB, so give them a few seconds to load.
EEG: moving a hand, or imagining it
The PhysioNet EEG Motor Movement/Imagery dataset. 64-channel EEG from 106 people who opened and closed their left or right hand, or imagined doing so.
Trajectories
The main analysis. One PCA space for all four conditions, how much variance it holds, and where the paths separate.
PCA next to nonlinear methods
The same data through UMAP, PHATE and Isomap, to see what PCA keeps and what it misses.
Decoding across participants
Train on some people, test on someone new. Raw sensors compared with PCA components aligned between participants.
MEG: looking at faces
The Wakeman and Henson dataset (OpenNeuro ds000117). 306-channel MEG from 16 people who looked at famous faces, unfamiliar faces and scrambled images.
The paper uses the right-occipital sensors. These are groups of sensors by their position on the helmet. They are not source-localised brain regions.
Trajectories
The three image types in one shared PCA space, with the faces vs scrambled and famous vs unfamiliar contrasts.
Frequency bands
The same analysis on alpha, beta and low-gamma (30 to 45 Hz) power instead of the broadband signal.
Decoding across participants
Train on 15 people, test on the 16th. Raw sensors compared with shared and aligned PCA components.
Code and tutorials
Everything is in one repository. How to install and run it
Notebooks
Six tutorials that explain each step and the choices behind it. They run on a few participants, so they finish on a laptop. Start here to learn the method.
Scripts
One script per notebook, in scripts/. It runs the same workflow
on the full cohort and writes the tables, the figures and the report you see
on this site.
coco-pipe
The library underneath: PCA and other reducers, alignment between participants, decoding, and the report format. Use it on your own data.
| Notebook | What it covers | In the paper | |
|---|---|---|---|
| 1 | EEG: the core workflow | Fit PCA, plot trajectories for executed and imagined hand movements, and measure how they differ. | Figure 2 |
| 2 | EEG: PCA next to UMAP, PHATE and Isomap | The same data through three nonlinear methods. | Goes beyond it |
| 3 | EEG: decoding across participants | Train on some people and test on someone new, from sensors and from aligned components. | Follows Figure 2 |
| 4 | MEG: faces in one shared space | Famous, unfamiliar and scrambled faces in a single PCA space. | Figure 3a–b |
| 5 | MEG: frequency bands | Trajectories of alpha power, extended to beta and low gamma. | Figure 3c–d |
| 6 | MEG: decoding across participants | Cross-participant decoding and alignment. | Figure 3e–f |
Cite
@article{hadid2026signals,
title = {From Signals to Trajectories: A Primer on Low-Dimensional
Dynamics in Human EEG and MEG},
author = {Hadid, Vanessa and Abdelhedi, Hamza and Pascarella, Annalisa
and Solla, Sara A. and Cisek, Paul and Jerbi, Karim},
journal = {arXiv preprint arXiv:2609.32315},
year = {2026}
}