neurokit2
Comprehensive Python toolkit for biosignal processing: ECG, EEG, EDA, RSP, EMG, and EOG. Analyze cardiovascular, autonomic, and neural data for psychophysiology, clinical research, and human-computer interaction studies.
Introduction
NeuroKit2 is a professional-grade Python toolkit specifically designed for the processing and advanced analysis of physiological signals. It serves as an essential resource for researchers and engineers working in psychophysiology, clinical diagnostics, and human-computer interaction (HCI). By providing a unified interface for diverse biosignals, the tool simplifies complex workflows—from raw signal cleaning to high-level statistical modeling and feature extraction. It is widely used for studies involving heart rate variability (HRV), cognitive load assessment via autonomic nervous system monitoring, and brain signal dynamics.
-
Cardiac Signal Processing: End-to-end pipelines for ECG and PPG, including R-peak detection, signal quality assessment, and comprehensive time/frequency/nonlinear domain HRV analysis.
-
Neural Signal Analysis: Advanced EEG processing covering frequency band power, microstate segmentation, and integration with source localization frameworks.
-
Autonomic & Respiratory Signals: Decomposition of EDA (GSR) into tonic and phasic components, and analysis of respiratory variability (RRV) and volume per time.
-
Muscular and Ocular Activity: Robust tools for EMG activation detection and EOG-based eye movement and blink analysis.
-
General Utility: A versatile library of signal processing functions including bandpass/bandstop filtering, resampling, interpolation, and fractal dimension computation.
-
Intended for researchers in cognitive science, clinical medicine, and affective computing who require validated signal processing routines.
-
Input requirements: Time-series arrays (e.g., CSV, NumPy arrays) along with precise sampling rates (Hz) to ensure accurate analysis.
-
Outputs: Structured dictionaries or DataFrames containing processed waveforms, calculated indices (e.g., SDNN, LF/HF ratio, SCR magnitude), and metadata for reproducibility.
-
Integration: Compatible with standard scientific Python stacks (NumPy, Pandas, SciPy) and frequently used alongside MNE-Python for EEG workflows.
-
Limitations: While highly automated, domain knowledge is required for interpreting physiological metrics within specific clinical or experimental contexts.
Repository Stats
- Stars
- 19,622
- Forks
- 2,196
- Open Issues
- 41
- Language
- Python
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- Apr 28, 2026, 11:26 AM