Skip to main content

The Python Toolbox for Neurophysiological Signal Processing.

Project description

https://raw.github.com/neuropsychology/NeuroKit/master/docs/img/banner.png https://img.shields.io/pypi/pyversions/neurokit2.svg https://img.shields.io/pypi/v/neurokit2.svg https://img.shields.io/travis/neuropsychology/NeuroKit.svg https://codecov.io/gh/neuropsychology/NeuroKit/branch/master/graph/badge.svg https://img.shields.io/pypi/dm/neurokit2 Maintainability

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

Documentation Status API Tutorials

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))
https://raw.github.com/neuropsychology/NeuroKit/master/docs/img/README_simulation.png

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

EEG

Eye-Tracking

News

0.0.1 (2019-10-29)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neurokit2-0.0.3.tar.gz (555.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page