Skip to main content
https://img.shields.io/badge/License-Apache%202.0-blue.svg https://badge.fury.io/py/systole-core.svg https://github.com/embodied-computation-group/systole/actions/workflows/test.yml/badge.svg https://joss.theoj.org/papers/10.21105/joss.03832/status.svg https://codecov.io/gh/embodied-computation-group/systole/branch/master/graph/badge.svg https://img.shields.io/badge/code%20style-black-000000.svg https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336 https://img.shields.io/badge/mypy-checked-blue.svg https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
https://raw.githubusercontent.com/embodied-computation-group/systole/master/docs/source/images/logo.png

Systole is an open-source Python package implementing simple tools for working with cardiac signals for psychophysiology research. In particular, the package provides tools to pre-process, visualize, and analyze cardiac data. This includes tools for data epoching, artefact detection, artefact correction, evoked heart rate analyses, heart rate variability analyses, circular statistical approaches to analysing cardiac cycles, and synchronising stimulus presentation with different cardiac phases via Psychopy.

The documentation can be found under the following link.

If you have questions, please open an issue on the issue tracker.

How to cite?

If you are using Systole in a publication we ask you to cite the following paper:

Legrand, N. & Allen, M., (2022). Systole: A python package for cardiac signal synchrony and analysis. Journal of Open Source Software, 7(69), 3832, https://doi.org/10.21105/joss.03832

Installation

Systole can be installed using pip:

pip install systole-core

The following packages are required to use Systole:

The Python version should be 3.7 or higher.

Tutorials

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

Cardiac signal analysis

Colab badge 1

Detecting cardiac cycles

Colab badge 2

Detecting and correcting artefats

Colab badge 3

Heart rate variability

Colab badge 4

Instantaneous and evoked heart rate

Colab badge 5

Working with BIDS folders

Colab badge 6

Getting started

from systole import import_dataset1

# Import ECg recording
signal = import_dataset1(modalities=['ECG']).ecg.to_numpy()

Signal extraction and interactive plotting

The package integrates a set of functions for interactive or non interactive data visualization based on Matplotlib and Bokeh.

from systole.plots import plot_raw

plot_raw(signal[60000 : 120000], modality="ecg", backend="bokeh",
            show_heart_rate=True, show_artefacts=True, figsize=300)
https://raw.githubusercontent.com/embodied-computation-group/systole/master/docs/source/images/raw.png

Artefacts detection and rejection

Artefacts can be detected and corrected in the RR interval time series or the peaks vector using the method proposed by Lipponen & Tarvainen (2019).

from systole.detection import ecg_peaks
from systole.plots import plot_subspaces

# R peaks detection
signal, peaks = ecg_peaks(signal, method='pan-tompkins', sfreq=1000)

plot_subspaces(peaks, input_type="peaks", backend="bokeh")
https://raw.githubusercontent.com/embodied-computation-group/systole/master/docs/source/images/subspaces.png

Heart rate variability analysis

Systole implements time-domain, frequency-domain and non-linear HRV indices, as well as tools for evoked heart rate analysis.

from bokeh.layouts import row
from systole.plots import plot_frequency, plot_poincare

row(
    plot_frequency(peaks, input_type="peaks", backend="bokeh", figsize=(300, 200)),
    plot_poincare(peaks, input_type="peaks", backend="bokeh", figsize=(200, 200)),
    )
https://raw.githubusercontent.com/embodied-computation-group/systole/master/docs/source/images/hrv.png

Online systolic peak detection, cardiac-stimulus synchrony, and cardiac circular analysis

The package 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).

Interactive visualization of BIDS structured datasets

from systole.viewer import Viewer

view = Viewer(
    input_folder="/BIDS/folder/path/",
    pattern="task-mytask",
    modality="beh",
    signal_type="ECG"
)
https://raw.githubusercontent.com/embodied-computation-group/systole/master/docs/source/images/editor.gif

Inserting and removing peaks

https://raw.githubusercontent.com/embodied-computation-group/systole/master/docs/source/images/peaks.gif

Annotating bad segments

https://raw.githubusercontent.com/embodied-computation-group/systole/master/docs/source/images/segments.gif

Development

Written and maintained by Micah Allen and the Embodied Computation Group, Aarhus University. Contact: micah@cfin.au.dk

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.

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.


AU lundbeck lab

Metadata

Release files for systole-core 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for systole-core 0.3.3
File Size Uploaded
systole_core-0.3.3.tar.gz 119.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for systole-core 0.3.3
File Interpreter ABI Platform
systole_core-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 259.5 kB

Release files / systole_core-0.3.3.tar.gz

Download URL systole_core-0.3.3.tar.gz
Size 119.4 kB
Tags Source
SHA-256 checksum
How to use checksums
91db104749df44cf8dfe59764fc61125360c5fe6ce963acee9df849e59345c10
BLAKE2b-256 checksum
How to use checksums
973132ba6dd5c2c72af4c60e10edd70363a1bd10dd37b258c18b2bf58926a38b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / systole_core-0.3.3-py3-none-any.whl

Download URL systole_core-0.3.3-py3-none-any.whl
Size 140.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
059a0a73c9e026ffd4766002f257a1b980c25983bbda1d485fcbbe5a93f78685
BLAKE2b-256 checksum
How to use checksums
4e7a3e07a18778b4b623b7e912d51d88cf480d54e8982d6ca6485a0c727aba02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.5

2 release files

0.3.4

2 release files

This release

0.3.3 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page