Skip to content

Commit

Permalink
- Remove install folder
Browse files Browse the repository at this point in the history
- Docs
  • Loading branch information
LegrandNico committed Jan 16, 2020
1 parent 0659b78 commit 0598629
Show file tree
Hide file tree
Showing 50 changed files with 67 additions and 336 deletions.
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
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 `links <https://embodied-computation-group.github.io/>`_.

Installation
============

Expand Down
Binary file removed dist/systole-0.0.1-py3-none-any.whl
Binary file not shown.
Binary file removed dist/systole-0.0.1-py3.7.egg
Binary file not shown.
Binary file removed dist/systole-0.0.1.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/plot_RRSubspacesDetection.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#%%
# Simulate RR time series
# ----------------------
# -----------------------

rr = import_rr().rr[:100]

Expand Down
Binary file modified source/auto_examples/auto_examples_jupyter.zip
Binary file not shown.
Binary file modified source/auto_examples/auto_examples_python.zip
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions source/auto_examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Tutorials
=========

This section shows off some of the basic functionality of **systole**.
This section demonstrates some of the basic functionality of **systole**.
If you want to see the tutorials in action, you can also click on the link below and navigate to the ``tutorials/`` folder to launch one of the interactive Jupyter notebooks.

.. contents:: Contents
Expand All @@ -20,7 +20,7 @@ If you want to see the tutorials in action, you can also click on the link below

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="This example shows how to detect ectobeat extra, missed and ectobeats from RR time series using...">
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how to detect extra ectobeats, missed and ectobeats from RR time series usin...">

.. only:: html

Expand All @@ -40,7 +40,7 @@ If you want to see the tutorials in action, you can also click on the link below

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="This example show how to record PPG signal through the `Nonin 3012LP Xpod USB pulse oximeter &lt;h...">
<div class="sphx-glr-thumbcontainer" tooltip="This example show how to record PPG signals using the `Nonin 3012LP Xpod USB pulse oximeter &lt;ht...">

.. only:: html

Expand All @@ -60,7 +60,7 @@ If you want to see the tutorials in action, you can also click on the link below

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="This tutorial illustrates how to use the Oximeter class to trigger stimuli at different cardiac...">
<div class="sphx-glr-thumbcontainer" tooltip="This tutorial illustrates how to use the Oximeter class to trigger stimuli at different phases ...">

.. only:: html

Expand Down
6 changes: 3 additions & 3 deletions source/auto_examples/plot_HeartBeatEvokedArpeggios.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
{
Expand Down Expand Up @@ -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"
]
},
{
Expand All @@ -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"
]
},
{
Expand Down
19 changes: 11 additions & 8 deletions source/auto_examples/plot_HeartBeatEvokedArpeggios.py
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Expand Down Expand Up @@ -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
Expand All @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion source/auto_examples/plot_HeartBeatEvokedArpeggios.py.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cb7354c44dcefa6f0a93a45d8ad9fad7
694cbbf3348bf43e6b6f5f00d4315a8d
21 changes: 12 additions & 9 deletions source/auto_examples/plot_HeartBeatEvokedArpeggios.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
Binary file not shown.
6 changes: 3 additions & 3 deletions source/auto_examples/plot_InstantaneousHeartRate.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://www.nonin.com/products/xpod/>`_ and the `Nonin\n8000SM 'soft-clip' fingertip sensors <https://www.nonin.com/products/8000s/>`_.\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 <https://www.nonin.com/products/xpod/>`_ and the `Nonin\n8000SM 'soft-clip' fingertip sensors <https://www.nonin.com/products/8000s/>`_.\nPeaks are automatically labelled online and the instantaneous heart rate is\nplotted.\n"
]
},
{
Expand All @@ -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"
]
},
{
Expand All @@ -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"
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions source/auto_examples/plot_InstantaneousHeartRate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://www.nonin.com/products/xpod/>`_ and the `Nonin
8000SM 'soft-clip' fingertip sensors <https://www.nonin.com/products/8000s/>`_.
Peaks are automatically labelled online and the instantaneous heart rate is
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion source/auto_examples/plot_InstantaneousHeartRate.py.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
30d323223ddfc8eb8292956cc89bcb09
2e5f5defbd94632a635de74bc150aaa1
12 changes: 6 additions & 6 deletions source/auto_examples/plot_InstantaneousHeartRate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://www.nonin.com/products/xpod/>`_ and the `Nonin
8000SM 'soft-clip' fingertip sensors <https://www.nonin.com/products/8000s/>`_.
Peaks are automatically labelled online and the instantaneous heart rate is
Expand Down Expand Up @@ -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.


Expand All @@ -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
Expand All @@ -83,7 +83,7 @@ oximeter is plugged.
Reset input buffer
<systole.recording.Oximeter object at 0x00000267906F90B8>
<systole.recording.Oximeter object at 0x0000027EC53A2B70>
Expand Down Expand Up @@ -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:
Expand Down
Binary file modified source/auto_examples/plot_InstantaneousHeartRate_codeobj.pickle
Binary file not shown.
4 changes: 2 additions & 2 deletions source/auto_examples/plot_RRSubspacesDetection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
{
Expand Down Expand Up @@ -44,7 +44,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Simulate RR time serie\n----------------------\n\n"
"Simulate RR time series\n-----------------------\n\n"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions source/auto_examples/plot_RRSubspacesDetection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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) [#]_.
"""

Expand All @@ -15,8 +15,8 @@
from systole import import_rr

#%%
# Simulate RR time serie
# ----------------------
# Simulate RR time series
# -----------------------

rr = import_rr().rr[:100]

Expand Down
2 changes: 1 addition & 1 deletion source/auto_examples/plot_RRSubspacesDetection.py.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
27ff66cbe2240503c8708a57adde3792
4a7b14e5a0b10cc5d10d5c633997826c
14 changes: 7 additions & 7 deletions source/auto_examples/plot_RRSubspacesDetection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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) [#]_.


Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -112,8 +112,8 @@ too long or too short (right pannel).
.. code-block:: none
array([<matplotlib.axes._subplots.AxesSubplot object at 0x000001790F5ADF98>,
<matplotlib.axes._subplots.AxesSubplot object at 0x000001790FA577F0>],
array([<matplotlib.axes._subplots.AxesSubplot object at 0x0000027EC4DE8A90>,
<matplotlib.axes._subplots.AxesSubplot object at 0x0000027EC50C9048>],
dtype=object)
Expand Down Expand Up @@ -143,7 +143,7 @@ We can then plot back the labelled outliers in the RR interval time course
.. code-block:: none
<matplotlib.axes._subplots.AxesSubplot object at 0x000001790FDB61D0>
<matplotlib.axes._subplots.AxesSubplot object at 0x0000027EC5436EB8>
Expand All @@ -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:
Expand Down
Binary file modified source/auto_examples/plot_RRSubspacesDetection_codeobj.pickle
Binary file not shown.
8 changes: 4 additions & 4 deletions source/auto_examples/sg_execution_times.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
+-------------------------------------------------------------------------------------------------------+-----------+--------+
Loading

0 comments on commit 0598629

Please sign in to comment.