When recording electroencephalography (EEG) data, electrodes are usually placed according to an international standard. The 10-20, and by extension the 10-10 and 10-05 systems are established sets of rules for this case . Even when the actual electrode positions have not been empirically measured during the recording, an approximation of these positions is important for for plotting topographies or visualizing locations of sensors with the help of analysis software.
While standard positions are available in many places such as from Robert Oostenveld's blog or directly from electrode cap manufacturers such as Easycap; with this repository I tried very hard to provide an explicit and obvious documentation on how to obtain these coordinates.
This repository contains all you need to compute the standard EEG electrode positions in 3D for the 10-20, 10-10, or even 10-05 system.
At a glance
- The coordinates are computed on a geometrical sphere centered on the origin and with radius 1.
- At its core, the function uses an algorithm to compute positions at fractions along contour lines defined by three points.
- The electrode positions can be plotted in 3D or in 2D using a stereographic projection.
How to work with it
git clonethe repository (or download as .zip and unpack)
- Using your python environment of choice, install the package locally using
pip install -e .
- Run the tests using
- Calculate and plot electrodes by calling
python eeg_positions.pyin the
- Check out
contour_labels.pyfor the order how electrodes are computed
- ... and see
find_point_at_fractionfunction that is the core of the computations.
EEG Electrode Position Data
You can also just download the precomputed electrode positions in tab-separated data format.
2D via a stereographic projection from 3D
Interactively viewing 3D coordinates
Projections to 2D
Coordinate System Conventions
3D Axes and Cartesian Coordinate System
- Imagine the x-axis pointing roughly towards the viewer with increasing values
- The y-axis is orthogonal to the x-axis, pointing to the right of the viewer with increasing values
- The z-axis is orthogonal to the xy-plane and pointing vertically up with increasing values
Relationship of Coordinate System to a Human Head
For simplicity, we assume a spherical head shape of a human. Roughly speaking, the x-axis goes from the left ear through the right ear, the y-axis goes orthogonally to that from the inion through the nasion, and the z-axis goes orthogonally to that plane through the vertex of the scalp.
We use the following anatomical landmarks to define the boundaries of the sphere:
- The left preauricular point = (-1, 0, 0) ... coincides with T9
- The right preauricular point = (1, 0, 0) ... coincides with T10
- The nasion = (0, 1, 0) ... coincides with Nz
- The inion = (0, -1, 0) ... coincides with Iz
- The vertex = (0, 0, 1) ... coincides with Cz