.. only:: html
@@ -60,7 +60,7 @@ If you want to see the tutorials in action, you can also click on the link below
.. raw:: html
-
+
.. only:: html
diff --git a/source/auto_examples/plot_HeartBeatEvokedArpeggios.ipynb b/source/auto_examples/plot_HeartBeatEvokedArpeggios.ipynb
index 0530bf7a..1ca282bc 100644
--- a/source/auto_examples/plot_HeartBeatEvokedArpeggios.ipynb
+++ b/source/auto_examples/plot_HeartBeatEvokedArpeggios.ipynb
@@ -15,7 +15,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "\nHeart Beats Evoked Arpeggios\n============================\n\nThis tutorial illustrates how to use the ``Oximeter`` class to trigger stimuli\nat different cardiac cycles using the [Psychopy](https://www.psychopy.org/)\ntoolbox. The PPG signal is recorded for 30 seconds and peaks are detected\nonline. Four notes ('C', 'E', 'G', 'Bfl') are played in synch with peak\ndetection with various delay: no delay, 1/4, 2/4 or 3/4 of the previous\ncardiac cycle length. While R-R intervals are prone to large changes in the\nlong term, such changes are physiologically limited for heartbeat, thus\nlimiting the variability of phase in which the note is played.\n"
+ "\nHeartbeat Evoked Arpeggios\n============================\n\nThis tutorial illustrates how to use the ``Oximeter`` class to trigger stimuli\nat different phases of the cardiac cycle using the [Psychopy](https://www.psychopy.org/)\ntoolbox. The PPG signal is recorded for 30 seconds and peaks are detected\nonline. Four notes ('C', 'E', 'G', 'Bfl') are played in synch with peak\ndetection with various delays: no delay, 1/4, 2/4 or 3/4 of the previous\ncardiac cycle length. While R-R intervals are prone to large changes over longer\ntimescales, such changes are physiologically limited from one heartbeat to the next,\nlimiting variance in the onset synchrony between the tones and the cardiac cycle.\nOn this basis, each presentation time is calibrated based on the previous RR-interval.\nThis procedure can easily be adapted to create a standard interoception task, e.g. by either presenting\ntones at no delay (systole, s+) or at a fixed offset (diastole, s-).\n"
]
},
{
@@ -51,7 +51,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "If you want to allow online data acquisition, you should uncomment the\nfollowing lines and provide the reference of the COM port where the pulse\noximeter is plugged.\n\n"
+ "If you want to allow online data acquisition, you should uncomment the\nfollowing lines and provide the reference of the COM port where the pulse\noximeter is plugged in.\n\n"
]
},
{
@@ -65,7 +65,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Create an Oxymeter instance, initialize recording and record for 10 seconds\n\n"
+ "Create an Oximeter instance, initialize recording and record for 10 seconds\n\n"
]
},
{
diff --git a/source/auto_examples/plot_HeartBeatEvokedArpeggios.py b/source/auto_examples/plot_HeartBeatEvokedArpeggios.py
index 4094984b..d5d2c539 100644
--- a/source/auto_examples/plot_HeartBeatEvokedArpeggios.py
+++ b/source/auto_examples/plot_HeartBeatEvokedArpeggios.py
@@ -1,15 +1,18 @@
"""
-Heart Beats Evoked Arpeggios
+Heartbeat Evoked Arpeggios
============================
This tutorial illustrates how to use the ``Oximeter`` class to trigger stimuli
-at different cardiac cycles using the [Psychopy](https://www.psychopy.org/)
+at different phases of the cardiac cycle using the [Psychopy](https://www.psychopy.org/)
toolbox. The PPG signal is recorded for 30 seconds and peaks are detected
online. Four notes ('C', 'E', 'G', 'Bfl') are played in synch with peak
-detection with various delay: no delay, 1/4, 2/4 or 3/4 of the previous
-cardiac cycle length. While R-R intervals are prone to large changes in the
-long term, such changes are physiologically limited for heartbeat, thus
-limiting the variability of phase in which the note is played.
+detection with various delays: no delay, 1/4, 2/4 or 3/4 of the previous
+cardiac cycle length. While R-R intervals are prone to large changes over longer
+timescales, such changes are physiologically limited from one heartbeat to the next,
+limiting variance in the onset synchrony between the tones and the cardiac cycle.
+On this basis, each presentation time is calibrated based on the previous RR-interval.
+This procedure can easily be adapted to create a standard interoception task, e.g. by either presenting
+tones at no delay (systole, s+) or at a fixed offset (diastole, s-).
"""
# Author: Nicolas Legrand
@@ -39,7 +42,7 @@
#%%
# If you want to allow online data acquisition, you should uncomment the
# following lines and provide the reference of the COM port where the pulse
-# oximeter is plugged.
+# oximeter is plugged in.
###############################################################################
# .. code-block:: python
@@ -48,7 +51,7 @@
# ser = serial.Serial('COM4') # Change this value according to your setup
#%%
-# Create an Oxymeter instance, initialize recording and record for 10 seconds
+# Create an Oximeter instance, initialize recording and record for 10 seconds
oxi = Oximeter(serial=ser, sfreq=75, add_channels=4).setup()
diff --git a/source/auto_examples/plot_HeartBeatEvokedArpeggios.py.md5 b/source/auto_examples/plot_HeartBeatEvokedArpeggios.py.md5
index 11916439..3fcf8982 100644
--- a/source/auto_examples/plot_HeartBeatEvokedArpeggios.py.md5
+++ b/source/auto_examples/plot_HeartBeatEvokedArpeggios.py.md5
@@ -1 +1 @@
-cb7354c44dcefa6f0a93a45d8ad9fad7
\ No newline at end of file
+694cbbf3348bf43e6b6f5f00d4315a8d
\ No newline at end of file
diff --git a/source/auto_examples/plot_HeartBeatEvokedArpeggios.rst b/source/auto_examples/plot_HeartBeatEvokedArpeggios.rst
index ad407017..d6fa9e12 100644
--- a/source/auto_examples/plot_HeartBeatEvokedArpeggios.rst
+++ b/source/auto_examples/plot_HeartBeatEvokedArpeggios.rst
@@ -7,17 +7,20 @@
.. _sphx_glr_auto_examples_plot_HeartBeatEvokedArpeggios.py:
-Heart Beats Evoked Arpeggios
+Heartbeat Evoked Arpeggios
============================
This tutorial illustrates how to use the ``Oximeter`` class to trigger stimuli
-at different cardiac cycles using the [Psychopy](https://www.psychopy.org/)
+at different phases of the cardiac cycle using the [Psychopy](https://www.psychopy.org/)
toolbox. The PPG signal is recorded for 30 seconds and peaks are detected
online. Four notes ('C', 'E', 'G', 'Bfl') are played in synch with peak
-detection with various delay: no delay, 1/4, 2/4 or 3/4 of the previous
-cardiac cycle length. While R-R intervals are prone to large changes in the
-long term, such changes are physiologically limited for heartbeat, thus
-limiting the variability of phase in which the note is played.
+detection with various delays: no delay, 1/4, 2/4 or 3/4 of the previous
+cardiac cycle length. While R-R intervals are prone to large changes over longer
+timescales, such changes are physiologically limited from one heartbeat to the next,
+limiting variance in the onset synchrony between the tones and the cardiac cycle.
+On this basis, each presentation time is calibrated based on the previous RR-interval.
+This procedure can easily be adapted to create a standard interoception task, e.g. by either presenting
+tones at no delay (systole, s+) or at a fixed offset (diastole, s-).
.. code-block:: default
@@ -66,14 +69,14 @@ the pulse oximeter using pre-recorded signal.
If you want to allow online data acquisition, you should uncomment the
following lines and provide the reference of the COM port where the pulse
-oximeter is plugged.
+oximeter is plugged in.
.. code-block:: python
import serial
ser = serial.Serial('COM4') # Change this value according to your setup
-Create an Oxymeter instance, initialize recording and record for 10 seconds
+Create an Oximeter instance, initialize recording and record for 10 seconds
.. code-block:: default
@@ -216,7 +219,7 @@ Cardiac cycle
.. rst-class:: sphx-glr-timing
- **Total running time of the script:** ( 0 minutes 32.338 seconds)
+ **Total running time of the script:** ( 0 minutes 31.752 seconds)
.. _sphx_glr_download_auto_examples_plot_HeartBeatEvokedArpeggios.py:
diff --git a/source/auto_examples/plot_HeartBeatEvokedArpeggios_codeobj.pickle b/source/auto_examples/plot_HeartBeatEvokedArpeggios_codeobj.pickle
index 8a0f3f08..c6935cd5 100644
Binary files a/source/auto_examples/plot_HeartBeatEvokedArpeggios_codeobj.pickle and b/source/auto_examples/plot_HeartBeatEvokedArpeggios_codeobj.pickle differ
diff --git a/source/auto_examples/plot_InstantaneousHeartRate.ipynb b/source/auto_examples/plot_InstantaneousHeartRate.ipynb
index 61903143..419dadc4 100644
--- a/source/auto_examples/plot_InstantaneousHeartRate.ipynb
+++ b/source/auto_examples/plot_InstantaneousHeartRate.ipynb
@@ -15,7 +15,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "\nInstantaneous Heart Rate\n========================\n\nThis example show how to record PPG signal through the `Nonin 3012LP\nXpod USB pulse oximeter `_ and the `Nonin\n8000SM 'soft-clip' fingertip sensors `_.\nPeaks are automatically labelled online and the instantaneous heart rate is\nplotted.\n"
+ "\nInstantaneous Heart Rate\n========================\n\nThis example show how to record PPG signals using the `Nonin 3012LP\nXpod USB pulse oximeter `_ and the `Nonin\n8000SM 'soft-clip' fingertip sensors `_.\nPeaks are automatically labelled online and the instantaneous heart rate is\nplotted.\n"
]
},
{
@@ -33,7 +33,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Recording\n---------\nFor the purpose of demonstration, here we simulate data acquisition through\nthe pulse oximeter using pre-recorded signal.\n\n"
+ "Recording\n---------\nFor the demonstration purpose, here we simulate data acquisition through\nthe pulse oximeter using pre-recorded signal.\n\n"
]
},
{
@@ -51,7 +51,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "If you want to allow online data acquisition, you should uncomment the\nfollowing lines and provide the reference of the COM port where the pulse\noximeter is plugged.\n\n"
+ "If you want to enable online data acquisition, you should uncomment the\nfollowing lines and provide the reference of the COM port where the pulse\noximeter is plugged in.\n\n"
]
},
{
diff --git a/source/auto_examples/plot_InstantaneousHeartRate.py b/source/auto_examples/plot_InstantaneousHeartRate.py
index 3e74c0db..664ed6a0 100644
--- a/source/auto_examples/plot_InstantaneousHeartRate.py
+++ b/source/auto_examples/plot_InstantaneousHeartRate.py
@@ -2,7 +2,7 @@
Instantaneous Heart Rate
========================
-This example show how to record PPG signal through the `Nonin 3012LP
+This example show how to record PPG signals using the `Nonin 3012LP
Xpod USB pulse oximeter `_ and the `Nonin
8000SM 'soft-clip' fingertip sensors `_.
Peaks are automatically labelled online and the instantaneous heart rate is
@@ -21,15 +21,15 @@
#%%
# Recording
# ---------
-# For the purpose of demonstration, here we simulate data acquisition through
+# For the demonstration purpose, here we simulate data acquisition through
# the pulse oximeter using pre-recorded signal.
ser = serialSim()
#%%
-# If you want to allow online data acquisition, you should uncomment the
+# If you want to enable online data acquisition, you should uncomment the
# following lines and provide the reference of the COM port where the pulse
-# oximeter is plugged.
+# oximeter is plugged in.
###############################################################################
# .. code-block:: python
diff --git a/source/auto_examples/plot_InstantaneousHeartRate.py.md5 b/source/auto_examples/plot_InstantaneousHeartRate.py.md5
index eaff8bac..8dd58a8b 100644
--- a/source/auto_examples/plot_InstantaneousHeartRate.py.md5
+++ b/source/auto_examples/plot_InstantaneousHeartRate.py.md5
@@ -1 +1 @@
-30d323223ddfc8eb8292956cc89bcb09
\ No newline at end of file
+2e5f5defbd94632a635de74bc150aaa1
\ No newline at end of file
diff --git a/source/auto_examples/plot_InstantaneousHeartRate.rst b/source/auto_examples/plot_InstantaneousHeartRate.rst
index ccd20bc4..515d3f07 100644
--- a/source/auto_examples/plot_InstantaneousHeartRate.rst
+++ b/source/auto_examples/plot_InstantaneousHeartRate.rst
@@ -10,7 +10,7 @@
Instantaneous Heart Rate
========================
-This example show how to record PPG signal through the `Nonin 3012LP
+This example show how to record PPG signals using the `Nonin 3012LP
Xpod USB pulse oximeter `_ and the `Nonin
8000SM 'soft-clip' fingertip sensors `_.
Peaks are automatically labelled online and the instantaneous heart rate is
@@ -38,7 +38,7 @@ plotted.
Recording
---------
-For the purpose of demonstration, here we simulate data acquisition through
+For the demonstration purpose, here we simulate data acquisition through
the pulse oximeter using pre-recorded signal.
@@ -54,9 +54,9 @@ the pulse oximeter using pre-recorded signal.
-If you want to allow online data acquisition, you should uncomment the
+If you want to enable online data acquisition, you should uncomment the
following lines and provide the reference of the COM port where the pulse
-oximeter is plugged.
+oximeter is plugged in.
.. code-block:: python
@@ -83,7 +83,7 @@ oximeter is plugged.
Reset input buffer
-
+
@@ -124,7 +124,7 @@ Plotting
.. rst-class:: sphx-glr-timing
- **Total running time of the script:** ( 0 minutes 31.409 seconds)
+ **Total running time of the script:** ( 0 minutes 31.257 seconds)
.. _sphx_glr_download_auto_examples_plot_InstantaneousHeartRate.py:
diff --git a/source/auto_examples/plot_InstantaneousHeartRate_codeobj.pickle b/source/auto_examples/plot_InstantaneousHeartRate_codeobj.pickle
index 46c04aac..9f809667 100644
Binary files a/source/auto_examples/plot_InstantaneousHeartRate_codeobj.pickle and b/source/auto_examples/plot_InstantaneousHeartRate_codeobj.pickle differ
diff --git a/source/auto_examples/plot_RRSubspacesDetection.ipynb b/source/auto_examples/plot_RRSubspacesDetection.ipynb
index 0fdd754c..65a07be8 100644
--- a/source/auto_examples/plot_RRSubspacesDetection.ipynb
+++ b/source/auto_examples/plot_RRSubspacesDetection.ipynb
@@ -15,7 +15,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "\nOutliers and ectobeats detection\n================================\n\nThis example shows how to detect ectobeat extra, missed and ectobeats from RR\ntime series using the method proposed by Lipponen & Tarvainen (2019) [#]_.\n"
+ "\nOutliers and ectobeats detection\n================================\n\nThis example shows how to detect extra ectobeats, missed and ectobeats from RR\ntime series using the method proposed by Lipponen & Tarvainen (2019) [#]_.\n"
]
},
{
@@ -44,7 +44,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Simulate RR time serie\n----------------------\n\n"
+ "Simulate RR time series\n-----------------------\n\n"
]
},
{
diff --git a/source/auto_examples/plot_RRSubspacesDetection.py b/source/auto_examples/plot_RRSubspacesDetection.py
index 6d557da0..8d062bd7 100644
--- a/source/auto_examples/plot_RRSubspacesDetection.py
+++ b/source/auto_examples/plot_RRSubspacesDetection.py
@@ -2,7 +2,7 @@
Outliers and ectobeats detection
================================
-This example shows how to detect ectobeat extra, missed and ectobeats from RR
+This example shows how to detect extra ectobeats, missed and ectobeats from RR
time series using the method proposed by Lipponen & Tarvainen (2019) [#]_.
"""
@@ -15,8 +15,8 @@
from systole import import_rr
#%%
-# Simulate RR time serie
-# ----------------------
+# Simulate RR time series
+# -----------------------
rr = import_rr().rr[:100]
diff --git a/source/auto_examples/plot_RRSubspacesDetection.py.md5 b/source/auto_examples/plot_RRSubspacesDetection.py.md5
index 1da9f25f..617bf6e2 100644
--- a/source/auto_examples/plot_RRSubspacesDetection.py.md5
+++ b/source/auto_examples/plot_RRSubspacesDetection.py.md5
@@ -1 +1 @@
-27ff66cbe2240503c8708a57adde3792
\ No newline at end of file
+4a7b14e5a0b10cc5d10d5c633997826c
\ No newline at end of file
diff --git a/source/auto_examples/plot_RRSubspacesDetection.rst b/source/auto_examples/plot_RRSubspacesDetection.rst
index 2ad46332..821fb1ec 100644
--- a/source/auto_examples/plot_RRSubspacesDetection.rst
+++ b/source/auto_examples/plot_RRSubspacesDetection.rst
@@ -10,7 +10,7 @@
Outliers and ectobeats detection
================================
-This example shows how to detect ectobeat extra, missed and ectobeats from RR
+This example shows how to detect extra ectobeats, missed and ectobeats from RR
time series using the method proposed by Lipponen & Tarvainen (2019) [#]_.
@@ -41,8 +41,8 @@ time series using the method proposed by Lipponen & Tarvainen (2019) [#]_.
-Simulate RR time serie
-----------------------
+Simulate RR time series
+-----------------------
.. code-block:: default
@@ -112,8 +112,8 @@ too long or too short (right pannel).
.. code-block:: none
- array([,
- ],
+ array([,
+ ],
dtype=object)
@@ -143,7 +143,7 @@ We can then plot back the labelled outliers in the RR interval time course
.. code-block:: none
-
+
@@ -157,7 +157,7 @@ References
.. rst-class:: sphx-glr-timing
- **Total running time of the script:** ( 0 minutes 0.511 seconds)
+ **Total running time of the script:** ( 0 minutes 0.500 seconds)
.. _sphx_glr_download_auto_examples_plot_RRSubspacesDetection.py:
diff --git a/source/auto_examples/plot_RRSubspacesDetection_codeobj.pickle b/source/auto_examples/plot_RRSubspacesDetection_codeobj.pickle
index e1710681..edac147b 100644
Binary files a/source/auto_examples/plot_RRSubspacesDetection_codeobj.pickle and b/source/auto_examples/plot_RRSubspacesDetection_codeobj.pickle differ
diff --git a/source/auto_examples/sg_execution_times.rst b/source/auto_examples/sg_execution_times.rst
index 0ca9a1e9..ebd40066 100644
--- a/source/auto_examples/sg_execution_times.rst
+++ b/source/auto_examples/sg_execution_times.rst
@@ -5,12 +5,12 @@
Computation times
=================
-**00:32.849** total execution time for **auto_examples** files:
+**00:31.758** total execution time for **auto_examples** files:
+-------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_auto_examples_plot_HeartBeatEvokedArpeggios.py` (``plot_HeartBeatEvokedArpeggios.py``) | 00:32.338 | 0.0 MB |
+| :ref:`sphx_glr_auto_examples_plot_InstantaneousHeartRate.py` (``plot_InstantaneousHeartRate.py``) | 00:31.257 | 0.0 MB |
+-------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_auto_examples_plot_RRSubspacesDetection.py` (``plot_RRSubspacesDetection.py``) | 00:00.511 | 0.0 MB |
+| :ref:`sphx_glr_auto_examples_plot_RRSubspacesDetection.py` (``plot_RRSubspacesDetection.py``) | 00:00.500 | 0.0 MB |
+-------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_auto_examples_plot_InstantaneousHeartRate.py` (``plot_InstantaneousHeartRate.py``) | 00:00.000 | 0.0 MB |
+| :ref:`sphx_glr_auto_examples_plot_HeartBeatEvokedArpeggios.py` (``plot_HeartBeatEvokedArpeggios.py``) | 00:00.000 | 0.0 MB |
+-------------------------------------------------------------------------------------------------------+-----------+--------+
diff --git a/source/index.rst b/source/index.rst
index ffb7301a..4f1c2571 100644
--- a/source/index.rst
+++ b/source/index.rst
@@ -148,7 +148,7 @@ Systole implements the artefact rejection method recently proposed by Lipponen &
:align: center
Heartrate variability
-=====================
+======================
Systole supports basic time-domain, frequency-domain and non-linear extraction indices.
@@ -171,7 +171,7 @@ This module was created and is maintained by Nicolas Legrand and Micah Allen (EC
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.
diff --git a/systole.egg-info/PKG-INFO b/systole.egg-info/PKG-INFO
deleted file mode 100644
index 721ea9a9..00000000
--- a/systole.egg-info/PKG-INFO
+++ /dev/null
@@ -1,247 +0,0 @@
-Metadata-Version: 2.1
-Name: systole
-Version: 0.0.1
-Summary: Psychophysiology with Python
-Home-page: UNKNOWN
-Author: Nicolas Legrand
-Author-email: nicolas.legrand@cfin.au.dk
-Maintainer: Nicolas Legrand
-Maintainer-email: nicolas.legrand@cfin.au.dk
-License: GPL-3.0
-Description:
- .. image:: https://img.shields.io/badge/License-GPL%20v3-blue.svg
- :target: https://github.com/LegrandNico/systole/blob/master/LICENSE
-
- .. image:: https://badge.fury.io/py/systole.svg
- :target: https://badge.fury.io/py/systole
-
- .. image:: https://zenodo.org/badge/219720901.svg
- :target: https://zenodo.org/badge/latestdoi/219720901
-
- .. image:: https://travis-ci.org/LegrandNico/systole.svg?branch=master
- :target: https://travis-ci.org/LegrandNico/systole
-
- .. image:: https://codecov.io/gh/LegrandNico/systole/branch/master/graph/badge.svg
- :target: https://codecov.io/gh/LegrandNico/systole
-
- ================
-
- .. figure:: https://github.com/LegrandNico/systole/raw/master/source/images/banner.png
- :align: center
-
- ================
-
- **Systole** is an open-source Python package providing simple tools to record and analyze body signal for psychophysiology.
-
- Installation
- ============
-
- Systole can be installed using pip:
-
- .. code-block:: shell
-
- pip install systole
-
- The following package will be required to use Systole:
-
- * Numpy (>=1.15)
- * SciPy (>=1.3.0)
- * Pandas (>=0.24)
- * Matplotlib (>=3.0.2)
- * Seaborn (>=0.9.0)
-
- Recording
- =========
-
- Systole supports the recording of PPG signal through the `Nonin 3012LP Xpod USB pulse oximeter `_ together with the `Nonin 8000SM 'soft-clip' fingertip sensors `_.
- It can easily interface with `PsychoPy `_ to record PPG signal during psychological experiments.
-
- Record and plot data with less than 6 lines of code.
-
- .. code-block:: python
-
- import serial
- from systole.recording import Oximeter
- ser = serial.Serial('COM4') # Add your USB port here
-
- # Open serial port, initialize and plot recording for Oximeter
- oxi = Oximeter(serial=ser).setup().read(duration=10)
-
-
- Interfacing with PsychoPy
- -------------------------
-
- 2 methods are available to record PPG signal:
-
- * The `read()` method
-
- Will continuously record for a certain amount of time (specified by the
- `duration` parameter, in seconds). This is the easiest and most robust method,
- but it is not possible to run instructions in the meantime (serial mode).
-
- .. code-block:: python
-
- # Code 1 {}
- oximeter.read(duration=10)
- # Code 2 {}
-
- * The `readInWaiting()` method
-
- Will read all the available bytes (up to 10 seconds of recording). When
- inserted into a while loop, it allows recording PPG signal in parallel with
- other commands.
-
- .. code-block:: python
-
- import time
- tstart = time.time()
- while time.time() - tstart < 10:
- oximeter.readInWaiting()
- # Insert code here {...}
-
- Online detection
- ----------------
-
- Online heart beat detection.
-
- .. code-block:: python
-
- import serial
- import time
- from systole.recording import Oximeter
-
- # Open serial port
- ser = serial.Serial('COM4') # Change this value according to your setup
-
- # Create an Oxymeter instance and initialize recording
- oxi = Oximeter(serial=ser, sfreq=75, add_channels=4).setup()
-
- # Online peak detection for 10 seconds
- tstart = time.time()
- while time.time() - tstart < 10:
- while oxi.serial.inWaiting() >= 5:
- paquet = list(oxi.serial.read(5))
- oxi.add_paquet(paquet[2]) # Add new data point
- if oxi.peaks[-1] == 1:
- print('Heartbeat detected')
-
- Peaks detection
- ===============
- Heart beat can be detected in the PPG signal either online or offline.
-
- Methods from clipping correction and peak detection algorithm is adapted from [#]_.
-
- .. code-block:: python
-
- # Plot data
- oxi.plot()
-
- .. figure:: https://github.com/LegrandNico/systole/raw/master/Images/recording.png
- :align: center
-
- Artifact removal
- ================
- It is possible to detect and correct outliers from RR time course following the method described in [#]_.
-
- .. code-block:: python
-
- from systole import import_rr()
- from systole.plotting import plot_subspaces
-
- rr = import_rr().rr[:100]
- rr[20] = 1600 # Add missed beat
-
- plot_subspaces(rr)
-
- .. figure:: https://github.com/LegrandNico/systole/raw/master/Images/subspaces.png
- :align: center
-
- Heart rate variability
- ======================
-
- Time-domain
- -----------
-
- Extract the summary of time-domain indexes.
-
- .. code-block:: python
-
- from systole.hrv import time_domain
-
- stats = time_domain(rr)
- stats
-
- Frequency-domain
- ----------------
- .. code-block:: python
-
- from systole.hrv import plot_psd
-
- plot_psd(rr)
-
- .. figure:: https://github.com/LegrandNico/systole/raw/master/Images/psd.png
- :align: center
-
- Extract the summary of frequency-domain indexes.
-
- .. code-block:: python
-
- from systole.hrv import frequency_domain
-
- frequency_domain(rr)
-
- .. table:: Output
- :widths: auto
-
- +-----------+---------------+
- | *Metric* | *Value* |
- +-----------+---------------+
-
-
- Non-linear
- ----------
-
- .. code-block:: python
-
- from systole.hrv import nonlinear
-
- nonlinear(rr)
-
- All the results have been tested against Kubios HVR 2.2 ().
-
-
- 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 contributors, open an issue or submit a pull request.
-
- This program is provided with NO WARRANTY OF ANY KIND.
-
- Acknowledgement
- ===============
-
- This software 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 preexisting toolboxes dedicated to heart rate variability and signal analysis.
-
- * HeartPy: https://python-heart-rate-analysis-toolkit.readthedocs.io/en/latest/
-
- * hrv: https://github.com/rhenanbartels/hrv
-
- * ECG-detector: https://github.com/berndporr/py-ecg-detectors
-
- * Pingouin: https://pingouin-stats.org/
-
- References
- ==========
-
- **Peak detection (PPG signal)**
-
- .. [#] 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:**
-
- .. [#] 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
-
-Platform: UNKNOWN
-Description-Content-Type: text/x-rst
diff --git a/systole.egg-info/SOURCES.txt b/systole.egg-info/SOURCES.txt
deleted file mode 100644
index 50549d6b..00000000
--- a/systole.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-LICENSE
-MANIFEST.in
-README.rst
-requirements.txt
-setup.py
-systole/__init__.py
-systole/detection.py
-systole/hrv.py
-systole/plotting.py
-systole/recording.py
-systole/reports.py
-systole/utils.py
-systole.egg-info/PKG-INFO
-systole.egg-info/SOURCES.txt
-systole.egg-info/dependency_links.txt
-systole.egg-info/requires.txt
-systole.egg-info/top_level.txt
-systole/datasets/__init__.py
-systole/datasets/ppg1.npy
-systole/datasets/ppg2.npy
-systole/datasets/ppg3.npy
-systole/datasets/ppgNoisy1.npy
-systole/datasets/rr.txt
\ No newline at end of file
diff --git a/systole.egg-info/dependency_links.txt b/systole.egg-info/dependency_links.txt
deleted file mode 100644
index 8b137891..00000000
--- a/systole.egg-info/dependency_links.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/systole.egg-info/requires.txt b/systole.egg-info/requires.txt
deleted file mode 100644
index 8a55515d..00000000
--- a/systole.egg-info/requires.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-numpy>=1.15
-scipy>=1.3
-pandas>=0.24
-matplotlib>=3.0.2
-seaborn>=0.9.0
diff --git a/systole.egg-info/top_level.txt b/systole.egg-info/top_level.txt
deleted file mode 100644
index 846d0971..00000000
--- a/systole.egg-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-systole
diff --git a/systole/__pycache__/__init__.cpython-37.pyc b/systole/__pycache__/__init__.cpython-37.pyc
index 57012419..6b7e528d 100644
Binary files a/systole/__pycache__/__init__.cpython-37.pyc and b/systole/__pycache__/__init__.cpython-37.pyc differ
diff --git a/systole/__pycache__/detection.cpython-37.pyc b/systole/__pycache__/detection.cpython-37.pyc
index 17158c28..b8bc4d99 100644
Binary files a/systole/__pycache__/detection.cpython-37.pyc and b/systole/__pycache__/detection.cpython-37.pyc differ
diff --git a/systole/__pycache__/hrv.cpython-37.pyc b/systole/__pycache__/hrv.cpython-37.pyc
index 231f2c6c..2fffd046 100644
Binary files a/systole/__pycache__/hrv.cpython-37.pyc and b/systole/__pycache__/hrv.cpython-37.pyc differ
diff --git a/systole/__pycache__/plotting.cpython-37.pyc b/systole/__pycache__/plotting.cpython-37.pyc
index d32a4b68..7b0e7baf 100644
Binary files a/systole/__pycache__/plotting.cpython-37.pyc and b/systole/__pycache__/plotting.cpython-37.pyc differ
diff --git a/systole/__pycache__/recording.cpython-37.pyc b/systole/__pycache__/recording.cpython-37.pyc
index 17b3ecb7..79fc0e9e 100644
Binary files a/systole/__pycache__/recording.cpython-37.pyc and b/systole/__pycache__/recording.cpython-37.pyc differ
diff --git a/systole/__pycache__/reports.cpython-37.pyc b/systole/__pycache__/reports.cpython-37.pyc
index b2815f76..979e70e6 100644
Binary files a/systole/__pycache__/reports.cpython-37.pyc and b/systole/__pycache__/reports.cpython-37.pyc differ
diff --git a/systole/__pycache__/utils.cpython-37.pyc b/systole/__pycache__/utils.cpython-37.pyc
index 82938970..f33ae6a5 100644
Binary files a/systole/__pycache__/utils.cpython-37.pyc and b/systole/__pycache__/utils.cpython-37.pyc differ
diff --git a/systole/datasets/__pycache__/__init__.cpython-37.pyc b/systole/datasets/__pycache__/__init__.cpython-37.pyc
index c61ffdb5..532586b9 100644
Binary files a/systole/datasets/__pycache__/__init__.cpython-37.pyc and b/systole/datasets/__pycache__/__init__.cpython-37.pyc differ
diff --git a/systole/tests/__pycache__/__init__.cpython-37.pyc b/systole/tests/__pycache__/__init__.cpython-37.pyc
index 3db9548a..ebf16175 100644
Binary files a/systole/tests/__pycache__/__init__.cpython-37.pyc and b/systole/tests/__pycache__/__init__.cpython-37.pyc differ
diff --git a/systole/tests/__pycache__/test_detection.cpython-37-pytest-5.3.2.pyc b/systole/tests/__pycache__/test_detection.cpython-37-pytest-5.3.2.pyc
index e83bcf03..dadb111a 100644
Binary files a/systole/tests/__pycache__/test_detection.cpython-37-pytest-5.3.2.pyc and b/systole/tests/__pycache__/test_detection.cpython-37-pytest-5.3.2.pyc differ
diff --git a/systole/tests/__pycache__/test_hrv.cpython-37-pytest-5.3.2.pyc b/systole/tests/__pycache__/test_hrv.cpython-37-pytest-5.3.2.pyc
index b0506b4a..948c7ee7 100644
Binary files a/systole/tests/__pycache__/test_hrv.cpython-37-pytest-5.3.2.pyc and b/systole/tests/__pycache__/test_hrv.cpython-37-pytest-5.3.2.pyc differ
diff --git a/systole/tests/__pycache__/test_plotting.cpython-37-pytest-5.3.2.pyc b/systole/tests/__pycache__/test_plotting.cpython-37-pytest-5.3.2.pyc
index fe2dc337..09f65488 100644
Binary files a/systole/tests/__pycache__/test_plotting.cpython-37-pytest-5.3.2.pyc and b/systole/tests/__pycache__/test_plotting.cpython-37-pytest-5.3.2.pyc differ
diff --git a/systole/tests/__pycache__/test_recording.cpython-37-pytest-5.3.2.pyc b/systole/tests/__pycache__/test_recording.cpython-37-pytest-5.3.2.pyc
index dbb59fd6..1b40ad50 100644
Binary files a/systole/tests/__pycache__/test_recording.cpython-37-pytest-5.3.2.pyc and b/systole/tests/__pycache__/test_recording.cpython-37-pytest-5.3.2.pyc differ
diff --git a/systole/tests/__pycache__/test_reports.cpython-37-pytest-5.3.2.pyc b/systole/tests/__pycache__/test_reports.cpython-37-pytest-5.3.2.pyc
index dea3ced0..a2a354ab 100644
Binary files a/systole/tests/__pycache__/test_reports.cpython-37-pytest-5.3.2.pyc and b/systole/tests/__pycache__/test_reports.cpython-37-pytest-5.3.2.pyc differ
diff --git a/systole/tests/__pycache__/test_utils.cpython-37-pytest-5.3.2.pyc b/systole/tests/__pycache__/test_utils.cpython-37-pytest-5.3.2.pyc
index f2a9735c..b75821ae 100644
Binary files a/systole/tests/__pycache__/test_utils.cpython-37-pytest-5.3.2.pyc and b/systole/tests/__pycache__/test_utils.cpython-37-pytest-5.3.2.pyc differ