NeuroKit (''"nk"'') is an
open source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
toolbox for
physiological
Physiology (; ) is the scientific study of functions and mechanisms in a living system. As a sub-discipline of biology, physiology focuses on how organisms, organ systems, individual organs, cells, and biomolecules carry out the chemica ...
signal processing.
The most recent version, ''NeuroKit2'', is written in
Python and is available from the
PyPI package repository. As of June 2022, the software was used in 94 scientific publications.
NeuroKit2 is presented as one of the most popular and contributor-friendly open-source software for neurophysiology based on the number of downloads, the number of contributors, and other
GitHub
GitHub, Inc. () is an Internet hosting service for software development and version control using Git. It provides the distributed version control of Git plus access control, bug tracking, software feature requests, task management, co ...
metrics.
History
The first version of ''NeuroKit'' was created as a PhD side-project of
Dominique Makowski in 2017.
It was officially deprecated in 2020 and has been replaced by the current version, ''NeuroKit2''. A few major updates have been released since:
* February 08, 2021: The 0.1.0 release coincides with the first publication of the software.
* May 18, 2022: The 0.2.0 release coincides with an overhaul of the documentation.
Features
NeuroKit2 includes tools to work with cardiac activity from
electrocardiography (ECG) and
photoplethysmography (PPG),
electrodermal activity
Electrodermal activity (EDA) is the property of the human body that causes continuous variation in the electrical characteristics of the skin. Historically, EDA has also been known as skin conductance, galvanic skin response (GSR), electrodermal ...
(EDA),
respiratory
The respiratory system (also respiratory apparatus, ventilatory system) is a biological system consisting of specific organs and structures used for gas exchange in animals and plants. The anatomy and physiology that make this happen varies gre ...
(RSP),
electromyography
Electromyography (EMG) is a technique for evaluating and recording the electrical activity produced by skeletal muscles. EMG is performed using an instrument called an electromyograph to produce a record called an electromyogram. An electromyo ...
(EMG), and
electrooculography
Electrooculography (EOG) is a technique for measuring the corneo-retinal standing potential that exists between the front and the back of the human eye. The resulting signal is called the electrooculogram. Primary applications are in ophthalmol ...
(EOG) signals.
It enables the computation of
Heart Rate Variability
Heart rate variability (HRV) is the physiological phenomenon of variation in the time interval between heartbeats. It is measured by the variation in the beat-to-beat interval.
Other terms used include: "cycle length variability", "R–R variabi ...
(HRV) and
Respiratory Variability (RRV) metrics.
It also implements a variety of different algorithms to detect R-peaks and other
QRS waves, including an efficient in-house R-peak detector.
For neurophysiological signals such as
EEG, it supports
microstates
A microstate or ministate is a sovereign state having a very small population or very small land area, usually both. However, the meanings of "state" and "very small" are not well-defined in international law.Warrington, E. (1994). "Lilliputs ...
and
frequency band
A frequency band is an interval (mathematics), interval in the frequency domain, delimited by a lower frequency and an upper frequency. The term may refer to a radio band or an interval of some other spectrum.
The frequency range of a system is ...
analysis.
It also includes a comprehensive set of functions used for
fractal physiology, allowing the computation of various measures of
complexity
Complexity characterises the behaviour of a system or model whose components interact in multiple ways and follow local rules, leading to nonlinearity, randomness, collective dynamics, hierarchy, and emergence.
The term is generally used to c ...
(including
entropy
Entropy is a scientific concept, as well as a measurable physical property, that is most commonly associated with a state of disorder, randomness, or uncertainty. The term and the concept are used in diverse fields, from classical thermodyna ...
and
fractal dimensions).
Design
The software was designed to be accessible to users without programming experience, with the possibility of using high-level functions to run entire preprocessing or analysis routines.
import neurokit2 as nk
# Download example data
data = nk.data("bio_eventrelated_100hz")
# Preprocess the data (filter, find peaks, etc.)
processed_data, info = nk.bio_process(ecg=data ECG" rsp=data RSP" eda=data EDA" sampling_rate=100)
# Compute relevant features
results = nk.bio_analyze(processed_data, sampling_rate=100)
See also
Other open-source toolboxes for analysis of physiological signals include:
*
Neurophysiological Biomarker Toolbox
The Neurophysiological Biomarker Toolbox (NBT) is an open source MATLAB toolbox for the computation and integration of neurophysiological biomarkers (e.g., biomarkers based on EEG or MEG recordings). The NBT toolbox has so far been used in s ...
''(MatLab)''
*
EEGLAB ''(MatLab)''
*
MNE-Python ''(Python)''
Notes
:As of May 18, 2022, GitHub indicates that the package has 644 stars, 47 contributors, and is used in 101 other open-source applications.
References
{{SciPy ecosystem
Python (programming language) scientific libraries
Neuroimaging software
Free and open-source software