python-meegkit
π§π§ MEEGkit: MEG & EEG processing toolkit in Python
Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
βCITATION.cff file
-
βcodemeta.json file
Found codemeta.json file -
β.zenodo.json file
Found .zenodo.json file -
βDOI references
Found 28 DOI reference(s) in README -
βAcademic publication links
Links to: zenodo.org -
βCommitters with academic emails
-
βInstitutional organization owner
-
βJOSS paper metadata
-
βScientific vocabulary similarity
Low similarity (15.7%) to scientific vocabulary
Keywords
Repository
π§π§ MEEGkit: MEG & EEG processing toolkit in Python
Basic Info
- Host: GitHub
- Owner: nbara
- License: bsd-3-clause
- Language: Python
- Default Branch: master
- Homepage: https://nbara.github.io/python-meegkit/
- Size: 198 MB
Statistics
- Stars: 200
- Watchers: 8
- Forks: 52
- Open Issues: 3
- Releases: 6
Topics
Metadata Files
README.md
MEEGkit
Denoising tools for M/EEG processing in Python 3.8+.

Disclaimer: The project mostly consists of development code, although some modules and functions are already working. Bugs and performance problems are to be expected, so use at your own risk. More tests and improvements will be added in the future. Comments and suggestions are welcome.
Documentation
Automatic documentation is available online.
This code can also be tested directly from your browser using Binder, by clicking on the binder badge above.
Installation
This package can be installed easily using pip:
bash
pip install meegkit
Or you can clone this repository and run the following commands inside the
python-meegkit directory:
bash
pip install -r requirements.txt
pip install .
Note : Use developer mode with the -e flag (pip install -e .) to be able to modify
the sources even after install.
Advanced installation instructions
Some ASR variants require additional dependencies such as pymanopt. To install meegkit
with these optional packages, use:
bash
pip install -e '.[extra]'
or:
bash
pip install meegkit[extra]
Other available options are [docs] (which installs dependencies required to build the
documentation), or [tests] (which install dependencies to run unit tests).
References
If you use this code, you should cite the relevant methods from the original articles.
1. CCA, STAR, SNS, DSS, ZapLine, and Robust Detrending
This is mostly a translation of Matlab code from the NoiseTools toolbox by Alain de Cheveign. It builds on an initial python implementation by Pedro Alcocer.
Only CCA, SNS, DSS, STAR, ZapLine and robust detrending have been properly tested so far. TSCPA may give inaccurate results due to insufficient testing (contributions welcome!)
sql
[1] de Cheveign, A. (2019). ZapLine: A simple and effective method to remove power line
artifacts. NeuroImage, 116356. https://doi.org/10.1016/j.neuroimage.2019.116356
[2] de Cheveign, A. et al. (2019). Multiway canonical correlation analysis of brain
data. NeuroImage, 186, 728740. https://doi.org/10.1016/j.neuroimage.2018.11.026
[3] de Cheveign, A. et al. (2018). Decoding the auditory brain with canonical component
analysis. NeuroImage, 172, 206216. https://doi.org/10.1016/j.neuroimage.2018.01.033
[4] de Cheveign, A. (2016). Sparse time artifact removal. Journal of Neuroscience
Methods, 262, 1420. https://doi.org/10.1016/j.jneumeth.2016.01.005
[5] de Cheveign, A., & Parra, L. C. (2014). Joint decorrelation, a versatile tool for
multichannel data analysis. NeuroImage, 98, 487505.
https://doi.org/10.1016/j.neuroimage.2014.05.068
[6] de Cheveign, A. (2012). Quadratic component analysis. NeuroImage, 59(4), 38383844.
https://doi.org/10.1016/j.neuroimage.2011.10.084
[7] de Cheveign, A. (2010). Time-shift denoising source separation. Journal of
Neuroscience Methods, 189(1), 113120. https://doi.org/10.1016/j.jneumeth.2010.03.002
[8] de Cheveign, A., & Simon, J. Z. (2008a). Denoising based on spatial filtering.
Journal of Neuroscience Methods, 171(2), 331339.
https://doi.org/10.1016/j.jneumeth.2008.03.015
[9] de Cheveign, A., & Simon, J. Z. (2008b). Sensor noise suppression. Journal of
Neuroscience Methods, 168(1), 195202. https://doi.org/10.1016/j.jneumeth.2007.09.012
[10] de Cheveign, A., & Simon, J. Z. (2007). Denoising based on time-shift PCA.
Journal of Neuroscience Methods, 165(2), 297305.
https://doi.org/10.1016/j.jneumeth.2007.06.003
2. Artifact Subspace Reconstruction (ASR)
The base code is inspired from the original EEGLAB inplementation [1], while the Riemannian variant [2] was adapted from the rASR toolbox by Sarah Blum.
sql
[1] Mullen, T. R., Kothe, C. A. E., Chi, Y. M., Ojeda, A., Kerth, T., Makeig, S.,
et al. (2015). Real-time neuroimaging and cognitive monitoring using wearable dry
EEG. IEEE Trans. Bio-Med. Eng. 62, 25532567.
https://doi.org/10.1109/TBME.2015.2481482
[2] Blum, S., Jacobsen, N., Bleichner, M. G., & Debener, S. (2019). A Riemannian
modification of artifact subspace reconstruction for EEG artifact handling. Frontiers
in human neuroscience, 13, 141.
3. Rhythmic Entrainment Source Separation (RESS)
The code is based on Matlab code from Mike X. Cohen [1]
sql
[1] Cohen, M. X., & Gulbinaite, R. (2017). Rhythmic entrainment source separation:
Optimizing analyses of neural responses to rhythmic sensory stimulation. Neuroimage,
147, 43-56.
4. Task-Related Component Analysis (TRCA)
This code is based on the Matlab implementation from Masaki Nakanishi, and was adapted to python by Giuseppe Ferraro
sql
[1] M. Nakanishi, Y. Wang, X. Chen, Y.-T. Wang, X. Gao, and T.-P. Jung,
"Enhancing detection of SSVEPs for a high-speed brain speller using task-related
component analysis", IEEE Trans. Biomed. Eng, 65(1): 104-112, 2018.
[2] X. Chen, Y. Wang, S. Gao, T. -P. Jung and X. Gao, "Filter bank canonical correlation
analysis for implementing a high-speed SSVEP-based brain-computer interface",
J. Neural Eng., 12: 046008, 2015.
[3] X. Chen, Y. Wang, M. Nakanishi, X. Gao, T. -P. Jung, S. Gao, "High-speed spelling
with a noninvasive brain-computer interface", Proc. Int. Natl. Acad. Sci. U.S.A,
112(44): E6058-6067, 2015.
5. Local Outlier Factor (LOF)
sql
[1] Breunig M, Kriegel HP, Ng RT, Sander J. 2000. LOF: identifying density-based
local outliers. SIGMOD Rec. 29, 2, 93-104. https://doi.org/10.1145/335191.335388
[2] Kumaravel VP, Buiatti M, Parise E, Farella E. 2022. Adaptable and Robust
EEG Bad Channel Detection Using Local Outlier Factor (LOF). Sensors (Basel).
2022 Sep 27;22(19):7314. https://doi.org/10.3390/s22197314.
6. Phase Estimation
The oscillator code is based on the Matlab implementation from Michael Rosenblum, and its corresponding paper [1]. The Endpoint Corrected Hilbert Transform (ECHT) method was adapted from [2].
```sql [1] Rosenblum, M., Pikovsky, A., Khn, A.A. et al. Real-time estimation of phase and amplitude with application to neural data. Sci Rep 11, 18037 (2021). https://doi.org/10.1038/s41598-021-97560-5 [2] Schreglmann, S. R., Wang, D., Peach, R. L., Li, J., Zhang, X., Latorre, A., ... & Grossman, N. (2021). Non-invasive suppression of essential tremor via phase-locked disruption of its temporal coherence. Nature communications, 12(1), 363.
```
Owner
- Name: Nicolas Barascud
- Login: nbara
- Kind: user
- Location: Paris/Basel
- Company: Snap Inc.
- Website: https://sigmoid.social/@nbara
- Twitter: lebababa
- Repositories: 2
- Profile: https://github.com/nbara
Brain-computer Interfaces and M/EEG Analysis
GitHub Events
Total
- Create event: 7
- Release event: 2
- Issues event: 7
- Watch event: 23
- Delete event: 4
- Issue comment event: 24
- Push event: 13
- Pull request review comment event: 5
- Pull request review event: 10
- Pull request event: 11
- Fork event: 4
Last Year
- Create event: 7
- Release event: 2
- Issues event: 7
- Watch event: 23
- Delete event: 4
- Issue comment event: 24
- Push event: 13
- Pull request review comment event: 5
- Pull request review event: 10
- Pull request event: 11
- Fork event: 4
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 149
- Total Committers: 10
- Avg Commits per committer: 14.9
- Development Distribution Score (DDS): 0.329
Top Committers
| Name | Commits | |
|---|---|---|
| Nicolas Barascud | 1****a@u****m | 100 |
| Pedro Alcocer | p****o@g****m | 39 |
| paulroujansky | p****l@r****u | 3 |
| Romain Quentin | r****n@g****m | 1 |
| Matthijs Pals | 3****s@u****m | 1 |
| croyen | c****n@g****m | 1 |
| Juan JesΓΊs Torre Tresols | j****e@g****m | 1 |
| ludovicdmt | l****t@u****m | 1 |
| Maciek Szul | m****l@u****m | 1 |
| gferraro2019 | 4****9@u****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 32
- Total pull requests: 55
- Average time to close issues: about 1 month
- Average time to close pull requests: 6 days
- Total issue authors: 22
- Total pull request authors: 16
- Average comments per issue: 5.38
- Average comments per pull request: 2.27
- Merged pull requests: 55
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 3
- Pull requests: 8
- Average time to close issues: 19 days
- Average time to close pull requests: 10 days
- Issue authors: 3
- Pull request authors: 5
- Average comments per issue: 1.33
- Average comments per pull request: 3.38
- Merged pull requests: 8
- Bot issues: 0
- Bot pull requests: 1
Top Authors
Issue Authors
- nbara (4)
- FarnoodF (3)
- Hororohoruru (3)
- OleBialas (3)
- lokinou (2)
- larsoner (1)
- kingjr (1)
- gferraro2019 (1)
- eliasbenyahia (1)
- colehank (1)
- emma-bailey (1)
- eort (1)
- jinglescode (1)
- MerlinK75 (1)
- nel-hidalgo (1)
Pull Request Authors
- nbara (39)
- paulroujansky (3)
- sappelhoff (2)
- MerlinK75 (2)
- dependabot[bot] (2)
- ludovicdmt (2)
- maciekszul (1)
- romquentin (1)
- johnkylecooper (1)
- gferraro2019 (1)
- vpKumaravel (1)
- eort (1)
- larsoner (1)
- Matthijspals (1)
- Hororohoruru (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- jupyter-sphinx *
- matplotlib *
- numpydoc *
- pillow *
- pydata-sphinx-theme *
- sphinx *
- sphinx-copybutton *
- sphinx-gallery *
- sphinxemoji *
- codecov *
- codespell *
- flake8 *
- joblib *
- matplotlib *
- numpy >=1.20
- pandas *
- pydocstyle *
- pyriemann >=0.2.7
- pytest *
- pytest-cov *
- scikit-learn *
- scipy *
- statsmodels *
- tqdm *
- actions/checkout v1 composite
- actions/setup-python v1 composite
- codecov/codecov-action v1 composite
- matplotlib *
- numpy *