The Python Toolbox for Neurophysiological Signal Processing.
Project description
The Python Toolbox for Neurophysiological Signal Processing (EDA, ECG, PPG, EMG, EEG…)
This is a work in progress project meant as a continuation of NeuroKit.py. We are looking to build a community of people around this collaborative project. If you’re interested by getting involved, do let us know!
Installation
To install NeuroKit, run this command in your terminal:
pip install https://github.com/neuropsychology/neurokit/zipball/master
Documentation
Click on the links above and check out our tutorials:
Examples
Simulate biosignals
import numpy as np
import pandas as pd
import neurokit2 as nk
# Generate synthetic signals
ecg = nk.ecg_simulate(duration=10, heart_rate=70)
rsp = nk.rsp_simulate(duration=10, respiratory_rate=15)
eda = nk.eda_simulate(duration=10, n_peaks=3)
emg = nk.emg_simulate(duration=10, n_bursts=2)
# Visualise biosignals
data = pd.DataFrame({"ECG": ecg,
"RSP": rsp,
"EDA": eda,
"EMG": emg})
data.plot(subplots=True, layout=(4, 1))
Signal processing
NeuroKit includes functions to facilitate signal processing:
signal_binarize(): Convert a continuous signal into zeros and ones depending on a given threshold.
signal_findpeaks(): Locate peaks (local maxima) in a signal and their related characteristics, such as height (prominence), width and distance with other peaks.
signal_resample(): Up- or down-sample a signal.
signal_interpolate(): Interpolate (fills the values between data points) a signal using different methods.
signal_detrend(): Apply a baseline (order = 0), linear (order = 1), or polynomial (order > 1) detrending to the signal (i.e., removing a general trend).
signal_filter(): Apply a lowpass, highpass or bandpass filter to the signal.
signal_merge(): Arbitrary addition of two signals with different time ranges.
Alternatives
Here’s a list of great alternative packages that you should check-out:
General
ECG
EDA
BreatheEasyEDA (matlab)
EDA (matlab)
EEG
Eye-Tracking
News
0.0.1 (2019-10-29)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.