Abstract
NeuroKit2 is an open-source, community-driven, and user-centered Python package for neurophysiological signal processing. It provides a comprehensive suite of processing routines for a variety of bodily signals (e.g., ECG, PPG, EDA, EMG, RSP). These processing routines include high-level functions that enable data processing in a few lines of code using validated pipelines, which we illustrate in two examples covering the most typical scenarios, such as an event-related paradigm and an interval-related analysis. The package also includes tools for specific processing steps such as rate extraction and filtering methods, offering a trade-off between high-level convenience and fine-tuned control. Its goal is to improve transparency and reproducibility in neurophysiological research, as well as foster exploration and innovation. Its design philosophy is centred on user-experience and accessibility to both novice and advanced users.
This is a preview of subscription content, access via your institution.


References
Bach, D. R. (2014). A head-to-head comparison of scralyze and ledalab, two model-based methods for skin conductance analysis. Biological Psychology, 103, 63–68.
Bartels, R., & Pecanha, T. (2020). HRV: A pythonic package for heart rate variability analysis. Journal of Open Source Software, 5(51), 1867. https://doi.org/10.21105/joss.01867
Benedek, M., & Kaernbach, C. (2010). A continuous measure of phasic electrodermal activity. Journal of Neuroscience Methods, 190(1), 80–91.
Carreiras, C., Alves, A. P., Lourenço, A., Canento, F., Silva, H., Fred, A., & et al (2015). BioSPPy: Biosignal processing in Python. Retrieved from https://github.com/PIA-Group/BioSPPy/
Clifton, D. A., Gibbons, J., Davies, J., & Tarassenko, L. (2012). Machine learning and software engineering in health informatics. 2012 first international workshop on realizing ai synergies in software engineering (raise) (pp 37–41). IEEE.
Gabrieli, G., Azhari, A., & Esposito, G. (2019). PySiology: A python package for physiological feature extraction. In Neural approaches to dynamics of signal exchanges (pp. 395–402). Springer Singapore. https://doi.org/10.1007/978-981-13-8950-4∖_35
Gomes, P., Margaritoff, P., & Silva, H (2019). pyHRV: Development and evaluation of an open-source python toolbox for heart rate variability (hrv). Proc. Int’l conf On electrical, electronic and computing engineering (icetran), 822–828.
Gramfort, A., Luessi, M., Larson, E., Engemann, D. A., Strohmeier, D., Brodbeck, C., & et al. (2013). MEG and eeg data analysis with mne-python. Frontiers in Neuroscience, 7, 267.
Greco, A., Valenza, G., Lanata, A., Scilingo, E. P., & Citi, L. (2015). CvxEDA: A convex optimization approach to electrodermal activity processing. IEEE Transactions on Biomedical Engineering, 63(4), 797–804.
Harris, C. R., Millman, K. J., Van der Walt, S. J., Gommers, R., Virtanen, P., Cournapeau, D., & et al. (2020). Array programming with numpy. Nature, 585(7825), 357–362.
Hunter, J. D. (2007). Matplotlib: a 2D graphics environment. Computing in Science & Engineering, 9(3), 90–95.
Jupyter, B., Forde, F., Granger, H. W, Akici, F., Lippa, D., Niederhut, D., & Pacer, M. (2018). Binder 2.0 - Reproducible, interactive, sharable environments for science at scale. In Proceedings of the 17th Python in Science Conference. https://doi.org/%2010.25080/Majora-4af1f417-011%20 (pp. 113–120).
Khodadad, D., Nordebo, S., Mueller, B., Waldmann, A., Yerworth, R., Becher, T., & et al. (2018). Optimized breath detection algorithm in electrical impedance tomography. Physiological Measurement, 39(9), 094001.
Kiverstein, J., & Miller, M. (2015). The embodied brain: Towards a radical embodied cognitive neuroscience. Frontiers in Human Neuroscience, 9, 237.
Kluyver, T., Ragan-Kelley, B., Pérez, F., Granger, B. E., Bussonnier, M., Frederic, J., & et al. (2016). Jupyter notebooks-a publishing format for reproducible computational workflows. ELPUB, 87–90.
Legrand, N., & Allen, M. (2020). Systole: A python toolbox for preprocessing, analyzing, and synchronizing cardiac data. Retrieved from https://github.com/embodied-computation-group/systole
Maizey, L., & Tzavella, L. (2019). Barriers and solutions for early career researchers in tackling the reproducibility crisis in cognitive neuroscience. Cortex, 113, 357–359.
Makowski, D. (2020). Neurokit: A python toolbox for statistics and neurophysiological signal processing (eeg, eda, ecg, emg...). Retrieved from https://github.com/neuropsychology/NeuroKit.py
Marchewka, A., Żurawski, J.K., & Grabowska, A. (2014). The nencki affective picture system (naps): Introduction to a novel, standardized, wide-range, high-quality, realistic picture database. Behavior Research Methods, 46(2), 596–610.
McKinney, W., et al. (2010). Data structures for statistical computing in python. Proceedings of the 9th python in science conference (vol. 445, pp. 51–56). Austin.
Miłkowski, M., Hensel, W. M., & Hohol, M. (2018). Replicability or reproducibility? on the replication crisis in computational neuroscience and sharing only relevant detail. Journal of Computational Neuroscience, 45(3), 163–172.
Nosek, B. A., Cohoon, J., Kidwell, M., & Spies, J. R. (2015). Estimating the reproducibility of psychological science. Science, 349(6251), aac4716.
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., & Duchesnay, E. (2011). Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12, 2825–2830.
Quintana, D., Alvares, G. A., & Heathers, J. (2016). Guidelines for reporting articles on psychiatry and heart rate variability (graph): Recommendations to advance research communication. Translational Psychiatry, 6(5), e803–e803.
Roy, Y., Banville, H., Albuquerque, I., Gramfort, A., Falk, T. H., & Faubert, J. (2019). Deep learning-based electroencephalography analysis: A systematic review. Journal of Neural Engineering, 16(5), 051001.
Schölzel, C. (2019). Nonlinear measures for dynamical systems. Zenodo. https://doi.org/10.5281/zenodo.3814723
Tarvainen, M. P., Niskanen, J. -P., Lipponen, J. A., Ranta-Aho, P. O., & Karjalainen, P. (2014). A Kubios hrv–heart rate variability analysis software. Computer Methods and Programs in Biomedicine, 113(1), 210–220.
Topalidou, M., Leblois, A., Boraud, T., & Rougier, N. (2015). P A long journey into reproducible computational neuroscience. Frontiers in Computational Neuroscience, 9, 30.
van Gent, P., Farah, H., van Nes, N., & van Arem, B. (2019). HeartPy: A novel heart rate algorithm for the analysis of noisy signals. Transportation Research Part F: Traffic Psychology and Behaviour, 66, 368–378. https://doi.org/10.1016/j.trf.2019.09.015
Van Rossum, G., & Drake, F. L. (2009) Python 3 reference manual. CreateSpace: Scotts Valley.
Virtanen, P., Gommers, R., Oliphant, T. E., Haberland, M., Reddy, T., Cournapeau, D., & Contributors, S. (2020). SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python. Nature Methods, 17, 261–272. https://doi.org/10.1038/s41592-019-0686-2
Yuehong, Y., Zeng, Y., Chen, X., & Fan, Y. (2016). The internet of things in healthcare: An overview. Journal of Industrial Information Integration, 1, 3–13.
Acknowledgments
We would like to thank Prof. C. F. Xavier for inspiration, all the current and future contributors (https://neurokit2.readthedocs.io/en/latest/authors.html), and the users for their support. Additionally, François Lespinasse would like to thank the Courtois Foundation for its support through the Courtois-NeuroMod project (https://cneuromod.ca)
Author information
Affiliations
Corresponding author
Ethics declarations
Conflict of interests
The authors declare that the research was conducted in the absence of commercial or financial relationships that could constitute a conflict of interest.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Makowski, D., Pham, T., Lau, Z.J. et al. NeuroKit2: A Python toolbox for neurophysiological signal processing. Behav Res (2021). https://doi.org/10.3758/s13428-020-01516-y
Accepted:
Published:
Keywords
- Neurophysiology
- Biosignals
- Python
- ECG
- EDA
- EMG