Skip to content

embodied-computation-group/systole

Repository files navigation

https://travis-ci.org/embodied-computation-group/systole.svg?branch=master https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336 https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
https://github.com/embodied-computation-group/systole/raw/master/source/images/banner.png

Systole is an open-source Python package providing simple tools to record and analyze, cardiac signals for psychophysiology. In particular, the package provides tools to pre-process, analyze, and synchronize cardiac data from psychophysiology research. This includes tools for data epoching, heart-rate variability, and synchronizing stimulus presentation with different cardiac phases via psychopy.

The documentation can be found under the following link.

Installation

Systole can be installed using pip:

pip install systole

The following packages are required to use Systole:

Interactive plotting functions and reports generation will also require the following packages to be installed:

Tutorial

For an overview of all the recording functionalities, you can refer to the following examples:

  • Recording
  • Artefacts detection and artefacts correction
  • Heart rate variability

For an introduction to Systole and cardiac signal analysis, you can refer to the following tutorial:

Recording

Systole natively supports recording of physiological signals from the following setups: * Nonin 3012LP Xpod USB pulse oximeter together with the Nonin 8000SM 'soft-clip' fingertip sensors (USB). * Remote Data Access (RDA) via BrainVision Recorder together with Brain product ExG amplifier (Ethernet).

Artefact correction

Systole implements systolic peak detection inspired by van Gent et al. (2019) [1] and the artefact rejection method recently proposed by Lipponen & Tarvainen (2019) [2].

from systole import simulate_rr
from systole.plotting import plot_subspaces

rr = simulate_rr()
plot_subspaces(rr)
https://github.com/embodied-computation-group/systole/raw/master/Images/subspaces.png

Interactive visualization

Systole integrates a set of functions for interactive data visualization based on Plotly.

https://github.com/embodied-computation-group/systole/raw/master/Images/systole.gif

Heartrate variability

Systole supports basic time-domain, frequency-domain and non-linear extraction indices.

All time-domain and non-linear indices have been tested against Kubios HVR 2.2 (<https://www.kubios.com>). The frequency-domain indices can slightly differ. We recommend to always check your results against another software.

from systole.plotting import plot_psd

plot_psd(rr)
https://github.com/embodied-computation-group/systole/raw/master/Images/psd.png

Development

This module was created and is maintained by Nicolas Legrand and Micah Allen (ECG group, https://the-ecg.org/). If you want to contribute, feel free to contact one of the developers, open an issue or submit a pull request.

This program is provided with NO WARRANTY OF ANY KIND.

Contributors

Acknowledgements

This software and the ECG are supported by a Lundbeckfonden Fellowship (R272-2017-4345), and the AIAS-COFUND II fellowship programme that is supported by the Marie Skłodowska-Curie actions under the European Union’s Horizon 2020 (Grant agreement no 754513), and the Aarhus University Research Foundation.

Systole was largely inspired by pre-existing toolboxes dedicated to heartrate variability and signal analysis.

References

Peak detection (PPG signal)

[1]van Gent, P., Farah, H., van Nes, N., & van Arem, B. (2019). HeartPy: A novel heart rate algorithm for the analysis of noisy signals. Transportation Research Part F: Traffic Psychology and Behaviour, 66, 368–378. https://doi.org/10.1016/j.trf.2019.09.015

Artefact detection and correction:

[2]Lipponen, J. A., & Tarvainen, M. P. (2019). A robust algorithm for heart rate variability time series artefact correction using novel beat classification. Journal of Medical Engineering & Technology, 43(3), 173–181. https://doi.org/10.1080/03091902.2019.1640306