GitHub license GitHub release pre-commit pip black mypy Imports: isort Gitter


The Cardioception Python Package - Measuring Interoception with Psychopy - implements two measures of cardiac interoception (cardioception):

  1. The Heartbeat counting task (HBC), also known as the Heartbeat tracking task, developed by Rainer Schandry [Dale and Anderson, 1978, Schandry, 1981]. This task measures cardiac interoception by asking participants to count their heartbeats for a given period of time. An accuracy score is then derived by comparing the reported number of heartbeats and the true number of heartbeats.

  2. The Heart Rate Discrimination task [Legrand et al., 2022] implementing an adaptive psychophysical measure of cardiac interoception where participants have to estimate the frequency of their heart rate by comparing it to tones that can be faster or slower. By manipulating the difference between the true heart rate and the presented tone using different staircase procedures, the bias (threshold) and precision (slope) of the psychometric function can be estimated either online or offline (see Analyses below), together with metacognitive efficiency.

These tasks can run using minimal experimental settings: a computer and a recording device to monitor the heart rate of the participant. The default version of the task uses the Nonin 3012LP Xpod USB pulse oximeter together with Nonin 8000SM ‘soft-clip’ fingertip sensors. This sensor can be plugged directly into the stim PC via USB and will work with Cardioception without any additional coding required. The tasks can also integrate easily with other recording devices and experimental settings (ECG, M/EEG, fMRI…).

Looking for help?#

If you have questions regarding the tasks or want discuss data analysis, please ask on our public Gitter.

If you want to report a bug, you can open an issue on the GitHub page.


This package was created and is maintained by Nicolas Legrand, Micah Allen, and the Embodied Computation Group.