MEEGLET

Morlet wavelets for M/EEG analysis, [ˈmiːglɪt]

This package provides a lean implementation of Morlet wavelets (Morlet et al. 1982) designed for power-spectral analysis of M/EEG resting-state signals (Hipp et al. 2012; Bomatter et al. 2024).

Code
import matplotlib.pyplot as plt
from meeglet import define_frequencies, define_wavelets, plot_wavelet_family

foi, sigma_time, sigma_freq, bw_oct, qt = define_frequencies(
    foi_start=1, foi_end=32, bw_oct=1, delta_oct=1
)

wavelets = define_wavelets(
    foi=foi, sigma_time=sigma_time, sfreq=1000., density='oct'
)

plot_wavelet_family(wavelets, foi, fmax=64)
plt.gcf().set_size_inches(9, 3)

Documentation

Background overview on scope, rationale & design choices
Python tutorials M/EEG data analysis examples
Python API Documentation of Python functions and unit tests
MATLAB functionality MATLAB documentation and data analysis example

Use the left sidebar for navigating conveniently!

Installation

from PyPi

In your environment of choice, use pip to install meeglet:

pip install meeglet

from the sources

Please clone the software, consider installing the dependencies listed in the `environment.yml.

Then do in your conda/mamba environment of choice:

pip install -e .

Citation

When using our package, please cite our two reference articles:

Python implementation and covariance computation.

@article{bomatter2024,
    author = {Bomatter, Philipp and Paillard, Joseph and Garces, Pilar and Hipp, J{\"o}rg and Engemann, Denis-Alexander},
    title = {Machine learning of brain-specific biomarkers from EEG},
    year = {2024},
    journal = {eBioMedicine},
    url = {https://doi.org/10.1016/j.ebiom.2024.105259},
    date = {2024/08/05},
    publisher = {Elsevier},
    isbn = {2352-3964},
    month = {2024/08/06},
    volume = {106},
}

General methodology, MATLAB implementation and power-envelope correlations.

@article{hipp2012large,
  title={Large-scale cortical correlation structure of spontaneous oscillatory activity},
  author={Hipp, Joerg F and Hawellek, David J and Corbetta, Maurizio and Siegel, Markus and Engel, Andreas K},
  journal={Nature neuroscience},
  volume={15},
  number={6},
  pages={884--890},
  year={2012},
  publisher={Nature Publishing Group US New York}
}

References

Bomatter, Philipp, Joseph Paillard, Pilar Garces, Jörg Hipp, and Denis-Alexander Engemann. 2024. “Machine Learning of Brain-Specific Biomarkers from EEG.” eBioMedicine 106. https://doi.org/10.1016/j.ebiom.2024.105259.
Hipp, Joerg F, David J Hawellek, Maurizio Corbetta, Markus Siegel, and Andreas K Engel. 2012. “Large-Scale Cortical Correlation Structure of Spontaneous Oscillatory Activity.” Nature Neuroscience 15 (6): 884–90. https://www.nature.com/articles/nn.3101.
Morlet, J., G. Arens, E. Fourgeau, and D. Giard. 1982. “Wave Propagation and Sampling Theory—Part II: Sampling Theory and Complex Waves.” GEOPHYSICS 47 (2): 222–36. https://doi.org/10.1190/1.1441329.