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 details)

Uploaded Source

File details

Details for the file neurokit2-0.0.3.tar.gz.

File metadata

  • Download URL: neurokit2-0.0.3.tar.gz
  • Upload date:
  • Size: 555.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for neurokit2-0.0.3.tar.gz
Algorithm Hash digest
SHA256 1a4e1d7128b58b76bde785a56ec76cc1333a1da05f89b69d64c0f8dc8bc13a26
MD5 5ecb637ac64fffaf41b7cf1dd89a65d1
BLAKE2b-256 71102a37874fcb50009fce8d70e17b07b8e4ef45cc0aca00b2626be1c6fdbbb4

See more details on using hashes here.

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