--- id: neurokit2 version: "0.2.13" license: MIT License license_treatment: permissive maintenance: active --- # neurokit2 — The Python Toolbox for Neurophysiological Signal Processing. License: permissive · Maintenance: active · Downloads: 175.7K/mo ## 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 above — 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 pip install neurokit2 uv add neurokit2 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_current - Install friction: low - Maintenance: active - Downloads: 175.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags ECG signal processing, physiological signal analysis, heart rate variability extraction, EDA electrodermal activity, biosignal preprocessing, respiratory rate variability, EMG electromyography analysis, biosignal-processing, physiological-data, signal-analysis [View on SkillFed](https://skillfed.io/packages/neurokit2) · [View on PyPI](https://pypi.org/project/neurokit2/)