AUTHORS: Artoni F, Maillard J, Britz J, Seeber M, Lysakowski C, Bréchet L, Tramèr MR, Michel CM

Journal of Open Source Software, 7(78): 4564, October 2022


Microstate analysis of the electroencephalogram (EEG), introduced in 1972 by Lehman (Lehmann, 1971), is a spatiotemporal analysis technique that takes advantage of the full spatial resolution of EEG recordings. Formalized further by Pascual Marqui and colleagues (Pascual-Marqui et al., 1995), microstate analysis studies the distribution of the surface EEG potential maps over time. It transforms the EEG recordings into sequences of successive states of variable duration, called EEG microstates.

Pycrostates implements multiple modules that allow researchers to apply microstate analysis
on their datasets:

  • the cluster module supports the different clustering algorithms that find the optimal
    topographic maps that sparsely represent the EEG.
  • the segmentation module supports the study of microstates sequences and their summary
  • the metrics module quantifies the quality of the fitted clustering algorithms.
    Additional modules help researchers to develop analysis pipelines:
  • the dataset module provides direct access to preprocessed data that can be used to
    test pipelines. As of writing, it supports the LEMON dataset (Babayan et al., 2019)
    comprising preprocessed EEG recordings of 227 healthy participants.
  • the viz module provides visualization tools for performing microstate analyses.

By design, Pycrostates is not restricted to EEG data. Its API is build on top of the robust MNEPython
(Gramfort, 2013) ecosystem enabling a seamless integration of microstates analysis. Its modular design supports all data types from MNE-Python and future improvements and additions such as different clustering algorithms or new tools for sequences analysis such as Markov chains.


Download PDF