skillfed

neurokit2

The Python Toolbox for Neurophysiological Signal Processing.

neurokit2 v0.2.13 175.7K downloads/30d#10,260 on PyPI2,324
Permissive license MIT License Active released

What it is and what it does

NeuroKit2 is a Python toolbox for processing and analyzing physiological signals commonly recorded in research and clinical settings. It wraps complex signal processing operations (filtering, peak detection, feature extraction) into high-level functions that researchers and clinicians can call with minimal code—the description example shows analysis completed in two function calls. The package supports multiple signal types: ECG (electrocardiogram), RSP (respiration), EDA (electrodermal activity), EMG (electromyography), PPG (photoplethysmography), and EOG (electrooculography).

The package is built on established scientific libraries (numpy, scipy, scikit-learn, pandas, matplotlib) and provides both simple "master" functions for standard workflows and lower-level functions for custom pipelines. It includes example datasets and supports signal simulation for testing. The codebase is actively maintained, has a published peer-reviewed paper (2021), and is designed to be accessible to users without deep expertise in signal processing or programming.

Use it for:

  • Preprocess and extract heart rate variability features from ECG recordings for cardiovascular research.
  • Analyze electrodermal activity (skin conductance) peaks and troughs in emotion or stress studies.
  • Extract respiratory rate and variability metrics from respiration signals in sleep or exercise studies.
  • Simulate synthetic physiological signals to validate custom analysis pipelines before applying them to real data.
  • Perform event-related analysis by aligning and processing multiple signal types around experimental events.
  • Locate and delineate ECG waveform components (P, Q, R, S, T waves) for detailed cardiac morphology analysis.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

NeuroKit2 processes physiological signals (ECG, RSP, EDA, EMG, PPG, EOG) with high-level functions that handle filtering, peak detection, and feature extraction in minimal code.

Yes, if you work with physiological signals and want to avoid building signal processing pipelines from scratch. The package is actively maintained, permissively licensed, has low install friction, and is backed by published research. The Pre-Alpha classifier is a minor concern—verify current stability for production use—but the active repository, recent releases, and substantial community adoption suggest it is reliable for research and clinical applications.

Install

neurokit2 on PyPI

pip

pip install neurokit2

uv

uv add neurokit2

poetry

poetry add neurokit2

Installing neurokit2

Before you install

Low install friction with a pure-Python wheel. Maintenance is active with recent commits and a substantial community (2324 stars). Supports modern Python versions (3.10–3.14).

License in practice

MIT License permits commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you include the license notice.

Quickstart

pip install neurokit2

import neurokit2 as nk
data = nk.data("bio_eventrelated_100hz")
processed_data, info = nk.bio_process(ecg=data["ECG"], rsp=data["RSP"], eda=data["EDA"], sampling_rate=100)
results = nk.bio_analyze(processed_data, sampling_rate=100)

Requires Python >=3.10; eight runtime dependencies (numpy, scipy, scikit-learn, pandas, matplotlib, pywavelets, requests, setuptools) will be installed automatically.

Verify before relying

  • Whether the package's Pre-Alpha classifier (Development Status :: 2) reflects current stability or is outdated given active maintenance since 2019.
  • Real-world performance and accuracy of signal processing algorithms compared to domain-specific alternatives.
  • Whether all eight runtime dependencies are truly necessary for typical use cases or if some are optional.

Package facts

License MIT License (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 8 — matplotlib, numpy, pandas, pywavelets, requests, scikit-learn, scipy, setuptools
Maintenance actively maintained — 165 days since the last release
Last repo commit
First released
Downloads 175,694/month — #10,260 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: neurokit2-0.2.13-py3-none-any.whl

Keywords: ECG, EDA, EMG, NeuroKit2, PPG, Python, bodily signals, physiology

Development Status :: 2 - Pre-AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

ECG signal processingphysiological signal analysisheart rate variability extractionEDA electrodermal activitybiosignal preprocessingrespiratory rate variabilityEMG electromyography analysis
biosignal-processingphysiological-datasignal-analysis

More Information Analysis packages