`_
diff --git a/source/auto_examples/Tutorial_recording_codeobj.pickle b/source/auto_examples/Tutorial_recording_codeobj.pickle
deleted file mode 100644
index df24569b..00000000
Binary files a/source/auto_examples/Tutorial_recording_codeobj.pickle and /dev/null differ
diff --git a/source/auto_examples/auto_examples_jupyter.zip b/source/auto_examples/auto_examples_jupyter.zip
deleted file mode 100644
index aba6089f..00000000
Binary files a/source/auto_examples/auto_examples_jupyter.zip and /dev/null differ
diff --git a/source/auto_examples/auto_examples_python.zip b/source/auto_examples/auto_examples_python.zip
deleted file mode 100644
index db6076c0..00000000
Binary files a/source/auto_examples/auto_examples_python.zip and /dev/null differ
diff --git a/source/auto_examples/images/sphx_glr_plot_ArtefactsDetection_001.html b/source/auto_examples/images/sphx_glr_plot_ArtefactsDetection_001.html
deleted file mode 100644
index e9b6a019..00000000
--- a/source/auto_examples/images/sphx_glr_plot_ArtefactsDetection_001.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/source/auto_examples/images/sphx_glr_plot_ArtefactsDetection_001.png b/source/auto_examples/images/sphx_glr_plot_ArtefactsDetection_001.png
deleted file mode 100644
index b60994f3..00000000
Binary files a/source/auto_examples/images/sphx_glr_plot_ArtefactsDetection_001.png and /dev/null differ
diff --git a/source/auto_examples/images/sphx_glr_plot_ECGProcessing_001.png b/source/auto_examples/images/sphx_glr_plot_ECGProcessing_001.png
deleted file mode 100644
index 276e5200..00000000
Binary files a/source/auto_examples/images/sphx_glr_plot_ECGProcessing_001.png and /dev/null differ
diff --git a/source/auto_examples/images/sphx_glr_plot_HeartBeatEvokedArpeggios_001.png b/source/auto_examples/images/sphx_glr_plot_HeartBeatEvokedArpeggios_001.png
deleted file mode 100644
index b1948478..00000000
Binary files a/source/auto_examples/images/sphx_glr_plot_HeartBeatEvokedArpeggios_001.png and /dev/null differ
diff --git a/source/auto_examples/images/sphx_glr_plot_HeartBeatEvokedArpeggios_002.png b/source/auto_examples/images/sphx_glr_plot_HeartBeatEvokedArpeggios_002.png
deleted file mode 100644
index 2d6b3aa8..00000000
Binary files a/source/auto_examples/images/sphx_glr_plot_HeartBeatEvokedArpeggios_002.png and /dev/null differ
diff --git a/source/auto_examples/images/sphx_glr_plot_InstantaneousHeartRate_001.png b/source/auto_examples/images/sphx_glr_plot_InstantaneousHeartRate_001.png
deleted file mode 100644
index 2e314b12..00000000
Binary files a/source/auto_examples/images/sphx_glr_plot_InstantaneousHeartRate_001.png and /dev/null differ
diff --git a/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_001.html b/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_001.html
deleted file mode 100644
index cb375600..00000000
--- a/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_001.html
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_001.png b/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_001.png
deleted file mode 100644
index 8fd03532..00000000
Binary files a/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_001.png and /dev/null differ
diff --git a/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_002.html b/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_002.html
deleted file mode 100644
index 042e6a86..00000000
--- a/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_002.html
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_002.png b/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_002.png
deleted file mode 100644
index a2a3f6b4..00000000
Binary files a/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_002.png and /dev/null differ
diff --git a/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_003.html b/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_003.html
deleted file mode 100644
index 1c940d56..00000000
--- a/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_003.html
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_003.png b/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_003.png
deleted file mode 100644
index 26f7f437..00000000
Binary files a/source/auto_examples/images/sphx_glr_plot_InteractiveVisualizations_003.png and /dev/null differ
diff --git a/source/auto_examples/images/sphx_glr_plot_RRSubspacesDetection_001.png b/source/auto_examples/images/sphx_glr_plot_RRSubspacesDetection_001.png
deleted file mode 100644
index 8c98618d..00000000
Binary files a/source/auto_examples/images/sphx_glr_plot_RRSubspacesDetection_001.png and /dev/null differ
diff --git a/source/auto_examples/images/sphx_glr_plot_RRSubspacesDetection_002.png b/source/auto_examples/images/sphx_glr_plot_RRSubspacesDetection_002.png
deleted file mode 100644
index e767d5d2..00000000
Binary files a/source/auto_examples/images/sphx_glr_plot_RRSubspacesDetection_002.png and /dev/null differ
diff --git a/source/auto_examples/images/sphx_glr_plot_SubspaceCorrection_001.png b/source/auto_examples/images/sphx_glr_plot_SubspaceCorrection_001.png
deleted file mode 100644
index da89d863..00000000
Binary files a/source/auto_examples/images/sphx_glr_plot_SubspaceCorrection_001.png and /dev/null differ
diff --git a/source/auto_examples/images/sphx_glr_plot_SubspaceCorrection_002.png b/source/auto_examples/images/sphx_glr_plot_SubspaceCorrection_002.png
deleted file mode 100644
index bc8de9e8..00000000
Binary files a/source/auto_examples/images/sphx_glr_plot_SubspaceCorrection_002.png and /dev/null differ
diff --git a/source/auto_examples/images/thumb/sphx_glr_InstantaneousHeartRate_thumb.png b/source/auto_examples/images/thumb/sphx_glr_InstantaneousHeartRate_thumb.png
deleted file mode 100644
index 233f8e60..00000000
Binary files a/source/auto_examples/images/thumb/sphx_glr_InstantaneousHeartRate_thumb.png and /dev/null differ
diff --git a/source/auto_examples/images/thumb/sphx_glr_Tutorial_HRV_thumb.png b/source/auto_examples/images/thumb/sphx_glr_Tutorial_HRV_thumb.png
deleted file mode 100644
index 233f8e60..00000000
Binary files a/source/auto_examples/images/thumb/sphx_glr_Tutorial_HRV_thumb.png and /dev/null differ
diff --git a/source/auto_examples/images/thumb/sphx_glr_Tutorial_recording_thumb.png b/source/auto_examples/images/thumb/sphx_glr_Tutorial_recording_thumb.png
deleted file mode 100644
index 233f8e60..00000000
Binary files a/source/auto_examples/images/thumb/sphx_glr_Tutorial_recording_thumb.png and /dev/null differ
diff --git a/source/auto_examples/images/thumb/sphx_glr_plot_ArtefactsCorrection_thumb.png b/source/auto_examples/images/thumb/sphx_glr_plot_ArtefactsCorrection_thumb.png
deleted file mode 100644
index 233f8e60..00000000
Binary files a/source/auto_examples/images/thumb/sphx_glr_plot_ArtefactsCorrection_thumb.png and /dev/null differ
diff --git a/source/auto_examples/images/thumb/sphx_glr_plot_ArtefactsDetection_thumb.png b/source/auto_examples/images/thumb/sphx_glr_plot_ArtefactsDetection_thumb.png
deleted file mode 100644
index 117a0469..00000000
Binary files a/source/auto_examples/images/thumb/sphx_glr_plot_ArtefactsDetection_thumb.png and /dev/null differ
diff --git a/source/auto_examples/images/thumb/sphx_glr_plot_ECGProcessing_thumb.png b/source/auto_examples/images/thumb/sphx_glr_plot_ECGProcessing_thumb.png
deleted file mode 100644
index b06c4e6a..00000000
Binary files a/source/auto_examples/images/thumb/sphx_glr_plot_ECGProcessing_thumb.png and /dev/null differ
diff --git a/source/auto_examples/images/thumb/sphx_glr_plot_HeartBeatEvokedArpeggios_thumb.png b/source/auto_examples/images/thumb/sphx_glr_plot_HeartBeatEvokedArpeggios_thumb.png
deleted file mode 100644
index 91a304bd..00000000
Binary files a/source/auto_examples/images/thumb/sphx_glr_plot_HeartBeatEvokedArpeggios_thumb.png and /dev/null differ
diff --git a/source/auto_examples/images/thumb/sphx_glr_plot_InstantaneousHeartRate_thumb.png b/source/auto_examples/images/thumb/sphx_glr_plot_InstantaneousHeartRate_thumb.png
deleted file mode 100644
index f8f17257..00000000
Binary files a/source/auto_examples/images/thumb/sphx_glr_plot_InstantaneousHeartRate_thumb.png and /dev/null differ
diff --git a/source/auto_examples/images/thumb/sphx_glr_plot_InteractiveVisualizations_thumb.png b/source/auto_examples/images/thumb/sphx_glr_plot_InteractiveVisualizations_thumb.png
deleted file mode 100644
index 7045b97f..00000000
Binary files a/source/auto_examples/images/thumb/sphx_glr_plot_InteractiveVisualizations_thumb.png and /dev/null differ
diff --git a/source/auto_examples/images/thumb/sphx_glr_plot_RRSubspacesDetection_thumb.png b/source/auto_examples/images/thumb/sphx_glr_plot_RRSubspacesDetection_thumb.png
deleted file mode 100644
index 8b990b7b..00000000
Binary files a/source/auto_examples/images/thumb/sphx_glr_plot_RRSubspacesDetection_thumb.png and /dev/null differ
diff --git a/source/auto_examples/images/thumb/sphx_glr_plot_RespirationFromPPG_thumb.png b/source/auto_examples/images/thumb/sphx_glr_plot_RespirationFromPPG_thumb.png
deleted file mode 100644
index b06c4e6a..00000000
Binary files a/source/auto_examples/images/thumb/sphx_glr_plot_RespirationFromPPG_thumb.png and /dev/null differ
diff --git a/source/auto_examples/images/thumb/sphx_glr_plot_SubspaceCorrection_thumb.png b/source/auto_examples/images/thumb/sphx_glr_plot_SubspaceCorrection_thumb.png
deleted file mode 100644
index b3178d6a..00000000
Binary files a/source/auto_examples/images/thumb/sphx_glr_plot_SubspaceCorrection_thumb.png and /dev/null differ
diff --git a/source/auto_examples/index.rst b/source/auto_examples/index.rst
deleted file mode 100644
index 09be4e39..00000000
--- a/source/auto_examples/index.rst
+++ /dev/null
@@ -1,173 +0,0 @@
-:orphan:
-
-
-
-.. _sphx_glr_auto_examples:
-
-.. _general_examples:
-
-Tutorials
-=========
-
-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
- :local:
- :depth: 3
-
-
-
-.. raw:: html
-
-
-
-.. only:: html
-
- .. figure:: /auto_examples/images/thumb/sphx_glr_plot_ArtefactsDetection_thumb.png
- :alt: Outliers and artefacts detection
-
- :ref:`sphx_glr_auto_examples_plot_ArtefactsDetection.py`
-
-.. raw:: html
-
-
-
-
-.. toctree::
- :hidden:
-
- /auto_examples/plot_ArtefactsDetection
-
-.. raw:: html
-
-
-
-.. only:: html
-
- .. figure:: /auto_examples/images/thumb/sphx_glr_plot_InteractiveVisualizations_thumb.png
- :alt: Interactive visualization
-
- :ref:`sphx_glr_auto_examples_plot_InteractiveVisualizations.py`
-
-.. raw:: html
-
-
-
-
-.. toctree::
- :hidden:
-
- /auto_examples/plot_InteractiveVisualizations
-
-.. raw:: html
-
-
-
-.. only:: html
-
- .. figure:: /auto_examples/images/thumb/sphx_glr_plot_ArtefactsCorrection_thumb.png
- :alt: Outliers and ectobeats correction
-
- :ref:`sphx_glr_auto_examples_plot_ArtefactsCorrection.py`
-
-.. raw:: html
-
-
-
-
-.. toctree::
- :hidden:
-
- /auto_examples/plot_ArtefactsCorrection
-
-.. raw:: html
-
-
-
-.. only:: html
-
- .. figure:: /auto_examples/images/thumb/sphx_glr_plot_InstantaneousHeartRate_thumb.png
- :alt: Instantaneous Heart Rate
-
- :ref:`sphx_glr_auto_examples_plot_InstantaneousHeartRate.py`
-
-.. raw:: html
-
-
-
-
-.. toctree::
- :hidden:
-
- /auto_examples/plot_InstantaneousHeartRate
-
-.. raw:: html
-
-
-
-.. only:: html
-
- .. figure:: /auto_examples/images/thumb/sphx_glr_Tutorial_recording_thumb.png
- :alt: Recording PPG signal
-
- :ref:`sphx_glr_auto_examples_Tutorial_recording.py`
-
-.. raw:: html
-
-
-
-
-.. toctree::
- :hidden:
-
- /auto_examples/Tutorial_recording
-
-.. raw:: html
-
-
-
-.. only:: html
-
- .. figure:: /auto_examples/images/thumb/sphx_glr_plot_HeartBeatEvokedArpeggios_thumb.png
- :alt: Heartbeat Evoked Arpeggios
-
- :ref:`sphx_glr_auto_examples_plot_HeartBeatEvokedArpeggios.py`
-
-.. raw:: html
-
-
-
-
-.. toctree::
- :hidden:
-
- /auto_examples/plot_HeartBeatEvokedArpeggios
-.. raw:: html
-
-
-
-
-
-.. only :: html
-
- .. container:: sphx-glr-footer
- :class: sphx-glr-footer-gallery
-
-
- .. container:: sphx-glr-download sphx-glr-download-python
-
- :download:`Download all examples in Python source code: auto_examples_python.zip `
-
-
-
- .. container:: sphx-glr-download sphx-glr-download-jupyter
-
- :download:`Download all examples in Jupyter notebooks: auto_examples_jupyter.zip `
-
-
-.. only:: html
-
- .. rst-class:: sphx-glr-signature
-
- `Gallery generated by Sphinx-Gallery `_
diff --git a/source/auto_examples/plot_ArtefactsCorrection.ipynb b/source/auto_examples/plot_ArtefactsCorrection.ipynb
deleted file mode 100644
index ac2c3ed4..00000000
--- a/source/auto_examples/plot_ArtefactsCorrection.ipynb
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "%matplotlib inline"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "\n# Outliers and ectobeats correction\n\nHere, we describe two method for artefacts and outliers correction, after\ndetection using the method proposed by Lipponen & Tarvainen (2019) [#]_.\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "# Author: Nicolas Legrand \n# Licence: GPL v3\n\n# Two approaches for artefacts correction are proposed:\n# * `correct_peaks()` will find and correct artefacts in a boolean peaks\n# vector, thus ensuring the length of recording remain constant and corrected\n# peaks fit the signal sampling rate. This method is more adapted to\n# event-related cardiac activity designs.\n\n# * `correct_rr()` will find and correct artefacts in the RR time series. The\n# signal length will possibly change after the interpolation of long, short or\n# ectopic beats. This method is more relevant for HRV analyse of long recording\n# where the timing of experimental events is not important.\n\nimport matplotlib.pyplot as plt"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "import numpy as np\n\nfrom systole import simulate_rr\nfrom systole.correction import correct_peaks, correct_rr\nfrom systole.plotting import plot_subspaces"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#############################\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "peaks = simulate_rr(as_peaks=True)\npeaks_correction = correct_peaks(peaks)\npeaks_correction"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#############################\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "rr = simulate_rr()\nrr_correction = correct_rr(rr)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## References\n.. [#] Lipponen, J. A., & Tarvainen, M. P. (2019). A robust algorithm for\n heart rate variability time series artefact correction using novel\n beat classification. Journal of Medical Engineering & Technology,\n 43(3), 173\u2013181. https://doi.org/10.1080/03091902.2019.1640306\n\n"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
\ No newline at end of file
diff --git a/source/auto_examples/plot_ArtefactsCorrection.py b/source/auto_examples/plot_ArtefactsCorrection.py
deleted file mode 100644
index 86fe1b80..00000000
--- a/source/auto_examples/plot_ArtefactsCorrection.py
+++ /dev/null
@@ -1,49 +0,0 @@
-"""
-Outliers and ectobeats correction
-=================================
-
-Here, we describe two method for artefacts and outliers correction, after
-detection using the method proposed by Lipponen & Tarvainen (2019) [#]_.
-"""
-
-# Author: Nicolas Legrand
-# Licence: GPL v3
-
-# Two approaches for artefacts correction are proposed:
-# * `correct_peaks()` will find and correct artefacts in a boolean peaks
-# vector, thus ensuring the length of recording remain constant and corrected
-# peaks fit the signal sampling rate. This method is more adapted to
-# event-related cardiac activity designs.
-
-# * `correct_rr()` will find and correct artefacts in the RR time series. The
-# signal length will possibly change after the interpolation of long, short or
-# ectopic beats. This method is more relevant for HRV analyse of long recording
-# where the timing of experimental events is not important.
-
-import matplotlib.pyplot as plt
-#%%
-import numpy as np
-
-from systole import simulate_rr
-from systole.correction import correct_peaks, correct_rr
-from systole.plotting import plot_subspaces
-
-#%% Method 1 - Peaks correction
-# #############################
-
-peaks = simulate_rr(as_peaks=True)
-peaks_correction = correct_peaks(peaks)
-peaks_correction
-
-#%% Method 2 - RR correction
-# #############################
-rr = simulate_rr()
-rr_correction = correct_rr(rr)
-
-#%%
-# References
-# ----------
-# .. [#] 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
diff --git a/source/auto_examples/plot_ArtefactsCorrection.py.md5 b/source/auto_examples/plot_ArtefactsCorrection.py.md5
deleted file mode 100644
index 48fd0b2b..00000000
--- a/source/auto_examples/plot_ArtefactsCorrection.py.md5
+++ /dev/null
@@ -1 +0,0 @@
-3aef4defe652fe63c7a1eda1c7f030b5
\ No newline at end of file
diff --git a/source/auto_examples/plot_ArtefactsCorrection.rst b/source/auto_examples/plot_ArtefactsCorrection.rst
deleted file mode 100644
index e5831943..00000000
--- a/source/auto_examples/plot_ArtefactsCorrection.rst
+++ /dev/null
@@ -1,157 +0,0 @@
-
-.. DO NOT EDIT.
-.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
-.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
-.. "auto_examples\plot_ArtefactsCorrection.py"
-.. LINE NUMBERS ARE GIVEN BELOW.
-
-.. only:: html
-
- .. note::
- :class: sphx-glr-download-link-note
-
- Click :ref:`here `
- to download the full example code
-
-.. rst-class:: sphx-glr-example-title
-
-.. _sphx_glr_auto_examples_plot_ArtefactsCorrection.py:
-
-
-Outliers and ectobeats correction
-=================================
-
-Here, we describe two method for artefacts and outliers correction, after
-detection using the method proposed by Lipponen & Tarvainen (2019) [#]_.
-
-.. GENERATED FROM PYTHON SOURCE LINES 8-24
-
-.. code-block:: default
-
-
- # Author: Nicolas Legrand
- # Licence: GPL v3
-
- # Two approaches for artefacts correction are proposed:
- # * `correct_peaks()` will find and correct artefacts in a boolean peaks
- # vector, thus ensuring the length of recording remain constant and corrected
- # peaks fit the signal sampling rate. This method is more adapted to
- # event-related cardiac activity designs.
-
- # * `correct_rr()` will find and correct artefacts in the RR time series. The
- # signal length will possibly change after the interpolation of long, short or
- # ectopic beats. This method is more relevant for HRV analyse of long recording
- # where the timing of experimental events is not important.
-
- import matplotlib.pyplot as plt
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 25-31
-
-.. code-block:: default
-
- import numpy as np
-
- from systole import simulate_rr
- from systole.correction import correct_peaks, correct_rr
- from systole.plotting import plot_subspaces
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 32-33
-
-#############################
-
-.. GENERATED FROM PYTHON SOURCE LINES 33-38
-
-.. code-block:: default
-
-
- peaks = simulate_rr(as_peaks=True)
- peaks_correction = correct_peaks(peaks)
- peaks_correction
-
-
-
-
-
-.. rst-class:: sphx-glr-script-out
-
- Out:
-
- .. code-block:: none
-
-
- {'clean_peaks': array([ True, False, False, ..., False, False, False]), 'ectopic': 0, 'short': 0, 'long': 0, 'extra': 1, 'missed': 1}
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 39-40
-
-#############################
-
-.. GENERATED FROM PYTHON SOURCE LINES 40-43
-
-.. code-block:: default
-
- rr = simulate_rr()
- rr_correction = correct_rr(rr)
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 44-50
-
-References
-----------
-.. [#] 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
-
-
-.. rst-class:: sphx-glr-timing
-
- **Total running time of the script:** ( 0 minutes 0.132 seconds)
-
-
-.. _sphx_glr_download_auto_examples_plot_ArtefactsCorrection.py:
-
-
-.. only :: html
-
- .. container:: sphx-glr-footer
- :class: sphx-glr-footer-example
-
-
-
- .. container:: sphx-glr-download sphx-glr-download-python
-
- :download:`Download Python source code: plot_ArtefactsCorrection.py `
-
-
-
- .. container:: sphx-glr-download sphx-glr-download-jupyter
-
- :download:`Download Jupyter notebook: plot_ArtefactsCorrection.ipynb `
-
-
-.. only:: html
-
- .. rst-class:: sphx-glr-signature
-
- `Gallery generated by Sphinx-Gallery `_
diff --git a/source/auto_examples/plot_ArtefactsCorrection_codeobj.pickle b/source/auto_examples/plot_ArtefactsCorrection_codeobj.pickle
deleted file mode 100644
index c60e91a0..00000000
Binary files a/source/auto_examples/plot_ArtefactsCorrection_codeobj.pickle and /dev/null differ
diff --git a/source/auto_examples/plot_ArtefactsDetection.ipynb b/source/auto_examples/plot_ArtefactsDetection.ipynb
deleted file mode 100644
index 5b08500f..00000000
--- a/source/auto_examples/plot_ArtefactsDetection.ipynb
+++ /dev/null
@@ -1,133 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "%matplotlib inline"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "\n# Outliers and artefacts detection\n\nThis example shows how to detect ectopic, missed, extra, slow and long long\nfrom RR or pulse rate interval time series using the method proposed by\nLipponen & Tarvainen (2019) [#]_.\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "# Author: Nicolas Legrand \n# Licence: GPL v3"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "from systole.detection import rr_artefacts\nfrom systole.plotting import plot_subspaces\nfrom systole.utils import simulate_rr"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## RR artefacts\nThe proposed method will detect 4 kinds of artefacts in an RR time series:\nMissed R peaks, when an existing R component was erroneously NOT detected by\nthe algorithm.\n* Extra R peaks, when an R peak was detected but does not exist in the\nsignal.\n* Long or short interval intervals, when R peaks are correctly detected but\nthe resulting interval has extreme value in the overall time-series.\n* Ectopic beats, due to disturbance of the cardiac rhythm when the heart\neither skip or add an extra beat.\n* The category in which the artefact belongs will have an influence on the\ncorrection procedure (see Artefact correction).\n\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Simulate RR time series\nThis function will simulate RR time series containing ectopic, extra, missed,\nlong and short artefacts.\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "rr = simulate_rr()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Artefact detection\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "outliers = rr_artefacts(rr)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Subspaces visualization\nYou can visualize the two main subspaces and spot outliers. The left pamel\nplot subspaces that are more sensitive to ectopic beats detection. The right\npanel plot subspaces that will be more sensitive to long or short beats,\ncomprizing the extra and missed beats.\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "plot_subspaces(rr)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## References\n.. [#] Lipponen, J. A., & Tarvainen, M. P. (2019). A robust algorithm for\n heart rate variability time series artefact correction using novel\n beat classification. Journal of Medical Engineering & Technology,\n 43(3), 173\u2013181. https://doi.org/10.1080/03091902.2019.1640306\n\n"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
\ No newline at end of file
diff --git a/source/auto_examples/plot_ArtefactsDetection.py.md5 b/source/auto_examples/plot_ArtefactsDetection.py.md5
deleted file mode 100644
index 07e2582d..00000000
--- a/source/auto_examples/plot_ArtefactsDetection.py.md5
+++ /dev/null
@@ -1 +0,0 @@
-4e7dc2a699048ce938dac18e50c4acef
\ No newline at end of file
diff --git a/source/auto_examples/plot_ArtefactsDetection.rst b/source/auto_examples/plot_ArtefactsDetection.rst
deleted file mode 100644
index 87661ff2..00000000
--- a/source/auto_examples/plot_ArtefactsDetection.rst
+++ /dev/null
@@ -1,191 +0,0 @@
-
-.. DO NOT EDIT.
-.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
-.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
-.. "auto_examples\plot_ArtefactsDetection.py"
-.. LINE NUMBERS ARE GIVEN BELOW.
-
-.. only:: html
-
- .. note::
- :class: sphx-glr-download-link-note
-
- Click :ref:`here `
- to download the full example code
-
-.. rst-class:: sphx-glr-example-title
-
-.. _sphx_glr_auto_examples_plot_ArtefactsDetection.py:
-
-
-Outliers and artefacts detection
-================================
-
-This example shows how to detect ectopic, missed, extra, slow and long long
-from RR or pulse rate interval time series using the method proposed by
-Lipponen & Tarvainen (2019) [#]_.
-
-.. GENERATED FROM PYTHON SOURCE LINES 9-13
-
-.. code-block:: default
-
-
- # Author: Nicolas Legrand
- # Licence: GPL v3
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 14-18
-
-.. code-block:: default
-
- from systole.detection import rr_artefacts
- from systole.plotting import plot_subspaces
- from systole.utils import simulate_rr
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 19-32
-
-RR artefacts
-------------
-The proposed method will detect 4 kinds of artefacts in an RR time series:
-Missed R peaks, when an existing R component was erroneously NOT detected by
-the algorithm.
-* Extra R peaks, when an R peak was detected but does not exist in the
-signal.
-* Long or short interval intervals, when R peaks are correctly detected but
-the resulting interval has extreme value in the overall time-series.
-* Ectopic beats, due to disturbance of the cardiac rhythm when the heart
-either skip or add an extra beat.
-* The category in which the artefact belongs will have an influence on the
-correction procedure (see Artefact correction).
-
-.. GENERATED FROM PYTHON SOURCE LINES 34-38
-
-Simulate RR time series
------------------------
-This function will simulate RR time series containing ectopic, extra, missed,
-long and short artefacts.
-
-.. GENERATED FROM PYTHON SOURCE LINES 38-41
-
-.. code-block:: default
-
-
- rr = simulate_rr()
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 42-44
-
-Artefact detection
-------------------
-
-.. GENERATED FROM PYTHON SOURCE LINES 44-47
-
-.. code-block:: default
-
-
- outliers = rr_artefacts(rr)
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 48-54
-
-Subspaces visualization
------------------------
-You can visualize the two main subspaces and spot outliers. The left pamel
-plot subspaces that are more sensitive to ectopic beats detection. The right
-panel plot subspaces that will be more sensitive to long or short beats,
-comprizing the extra and missed beats.
-
-.. GENERATED FROM PYTHON SOURCE LINES 54-57
-
-.. code-block:: default
-
-
- plot_subspaces(rr)
-
-
-
-
-.. image:: /auto_examples/images/sphx_glr_plot_ArtefactsDetection_001.png
- :alt: Subspace 1 (ectopic beats detection), Subspace 2 (long and short beats detection)
- :class: sphx-glr-single-img
-
-
-.. rst-class:: sphx-glr-script-out
-
- Out:
-
- .. code-block:: none
-
-
- array([,
- ],
- dtype=object)
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 58-64
-
-References
-----------
-.. [#] 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
-
-
-.. rst-class:: sphx-glr-timing
-
- **Total running time of the script:** ( 0 minutes 1.520 seconds)
-
-
-.. _sphx_glr_download_auto_examples_plot_ArtefactsDetection.py:
-
-
-.. only :: html
-
- .. container:: sphx-glr-footer
- :class: sphx-glr-footer-example
-
-
-
- .. container:: sphx-glr-download sphx-glr-download-python
-
- :download:`Download Python source code: plot_ArtefactsDetection.py `
-
-
-
- .. container:: sphx-glr-download sphx-glr-download-jupyter
-
- :download:`Download Jupyter notebook: plot_ArtefactsDetection.ipynb `
-
-
-.. only:: html
-
- .. rst-class:: sphx-glr-signature
-
- `Gallery generated by Sphinx-Gallery `_
diff --git a/source/auto_examples/plot_ArtefactsDetection_codeobj.pickle b/source/auto_examples/plot_ArtefactsDetection_codeobj.pickle
deleted file mode 100644
index ca140d90..00000000
Binary files a/source/auto_examples/plot_ArtefactsDetection_codeobj.pickle and /dev/null differ
diff --git a/source/auto_examples/plot_HeartBeatEvokedArpeggios.ipynb b/source/auto_examples/plot_HeartBeatEvokedArpeggios.ipynb
deleted file mode 100644
index 2cb1fc7b..00000000
--- a/source/auto_examples/plot_HeartBeatEvokedArpeggios.ipynb
+++ /dev/null
@@ -1,158 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "%matplotlib inline"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "\n# Heartbeat Evoked Arpeggios\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"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "# Author: Nicolas Legrand \n# Licence: GPL v3\n\nimport itertools\nimport time\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport seaborn as sns\nfrom psychopy.sound import Sound\n\nfrom systole import serialSim\nfrom systole.plotting import circular\nfrom systole.recording import Oximeter\nfrom systole.utils import norm_triggers, to_angles"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Recording\nFor the purpose of demonstration, here we simulate data acquisition through\nthe pulse oximeter using pre-recorded signal.\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "ser = serialSim()"
- ]
- },
- {
- "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 in.\n\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- ".. code-block:: python\n\n import serial\n ser = serial.Serial('COM4') # Change this value according to your setup\n\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Create an Oximeter instance, initialize recording and record for 10 seconds\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "oxi = Oximeter(serial=ser, sfreq=75, add_channels=4).setup()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Create an Oxymeter instance, initialize recording and record for 10 seconds\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "beat = Sound(\"C\", secs=0.1)\ndiastole1 = Sound(\"E\", secs=0.1)\ndiastole2 = Sound(\"G\", secs=0.1)\ndiastole3 = Sound(\"Bfl\", secs=0.1)\n\nsystoleTime1, systoleTime2, systoleTime3 = None, None, None\ntstart = time.time()\nwhile time.time() - tstart < 30:\n\n # Check if there are new data to read\n while oxi.serial.inWaiting() >= 5:\n\n # Convert bytes into list of int\n paquet = list(oxi.serial.read(5))\n\n if oxi.check(paquet): # Data consistency\n oxi.add_paquet(paquet[2]) # Add new data point\n\n # T + 0\n if oxi.peaks[-1] == 1:\n beat = Sound(\"C\", secs=0.1)\n beat.play()\n systoleTime1 = time.time()\n systoleTime2 = time.time()\n systoleTime3 = time.time()\n\n # T + 1/4\n if systoleTime1 is not None:\n if time.time() - systoleTime1 >= ((oxi.instant_rr[-1] / 4) / 1000):\n diastole1 = Sound(\"E\", secs=0.1)\n diastole1.play()\n systoleTime1 = None\n\n # T + 2/4\n if systoleTime2 is not None:\n if time.time() - systoleTime2 >= (((oxi.instant_rr[-1] / 4) * 2) / 1000):\n diastole2 = Sound(\"G\", secs=0.1)\n diastole2.play()\n systoleTime2 = None\n\n # T + 3/4\n if systoleTime3 is not None:\n if time.time() - systoleTime3 >= (((oxi.instant_rr[-1] / 4) * 3) / 1000):\n diastole3 = Sound(\"A\", secs=0.1)\n diastole3.play()\n systoleTime3 = None\n\n # Track the note status\n oxi.channels[\"Channel_0\"][-1] = beat.status\n oxi.channels[\"Channel_1\"][-1] = diastole1.status\n oxi.channels[\"Channel_2\"][-1] = diastole2.status\n oxi.channels[\"Channel_3\"][-1] = diastole3.status"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Events\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "f, (ax1, ax2) = plt.subplots(2, 1, figsize=(12, 5), sharex=True)\noxi.plot_recording(ax=ax1)\noxi.plot_events(ax=ax2)\nplt.tight_layout()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Cardiac cycle\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "angles = []\nx = np.asarray(oxi.peaks)\nfor ev in oxi.channels:\n events = norm_triggers(\n np.asarray(oxi.channels[ev]), threshold=1, n=40, direction=\"higher\"\n )\n angles.append(to_angles(np.where(x)[0], np.where(events)[0]))\n\npalette = itertools.cycle(sns.color_palette(\"deep\"))\nax = plt.subplot(111, polar=True)\nfor i in angles:\n circular(i, color=next(palette), ax=ax)"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
\ No newline at end of file
diff --git a/source/auto_examples/plot_HeartBeatEvokedArpeggios.py b/source/auto_examples/plot_HeartBeatEvokedArpeggios.py
deleted file mode 100644
index af7981e1..00000000
--- a/source/auto_examples/plot_HeartBeatEvokedArpeggios.py
+++ /dev/null
@@ -1,138 +0,0 @@
-"""
-Heartbeat Evoked Arpeggios
-============================
-
-This tutorial illustrates how to use the ``Oximeter`` class to trigger stimuli
-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 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
-# Licence: GPL v3
-
-import itertools
-import time
-
-import matplotlib.pyplot as plt
-import numpy as np
-import seaborn as sns
-from psychopy.sound import Sound
-
-from systole import serialSim
-from systole.plotting import circular
-from systole.recording import Oximeter
-from systole.utils import norm_triggers, to_angles
-
-#%%
-# Recording
-# ---------
-# For the purpose of demonstration, 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
-# following lines and provide the reference of the COM port where the pulse
-# oximeter is plugged in.
-
-###############################################################################
-# .. code-block:: python
-#
-# import serial
-# ser = serial.Serial('COM4') # Change this value according to your setup
-
-#%%
-# Create an Oximeter instance, initialize recording and record for 10 seconds
-
-oxi = Oximeter(serial=ser, sfreq=75, add_channels=4).setup()
-
-#%%
-# Create an Oxymeter instance, initialize recording and record for 10 seconds
-
-beat = Sound("C", secs=0.1)
-diastole1 = Sound("E", secs=0.1)
-diastole2 = Sound("G", secs=0.1)
-diastole3 = Sound("Bfl", secs=0.1)
-
-systoleTime1, systoleTime2, systoleTime3 = None, None, None
-tstart = time.time()
-while time.time() - tstart < 30:
-
- # Check if there are new data to read
- while oxi.serial.inWaiting() >= 5:
-
- # Convert bytes into list of int
- paquet = list(oxi.serial.read(5))
-
- if oxi.check(paquet): # Data consistency
- oxi.add_paquet(paquet[2]) # Add new data point
-
- # T + 0
- if oxi.peaks[-1] == 1:
- beat = Sound("C", secs=0.1)
- beat.play()
- systoleTime1 = time.time()
- systoleTime2 = time.time()
- systoleTime3 = time.time()
-
- # T + 1/4
- if systoleTime1 is not None:
- if time.time() - systoleTime1 >= ((oxi.instant_rr[-1] / 4) / 1000):
- diastole1 = Sound("E", secs=0.1)
- diastole1.play()
- systoleTime1 = None
-
- # T + 2/4
- if systoleTime2 is not None:
- if time.time() - systoleTime2 >= (((oxi.instant_rr[-1] / 4) * 2) / 1000):
- diastole2 = Sound("G", secs=0.1)
- diastole2.play()
- systoleTime2 = None
-
- # T + 3/4
- if systoleTime3 is not None:
- if time.time() - systoleTime3 >= (((oxi.instant_rr[-1] / 4) * 3) / 1000):
- diastole3 = Sound("A", secs=0.1)
- diastole3.play()
- systoleTime3 = None
-
- # Track the note status
- oxi.channels["Channel_0"][-1] = beat.status
- oxi.channels["Channel_1"][-1] = diastole1.status
- oxi.channels["Channel_2"][-1] = diastole2.status
- oxi.channels["Channel_3"][-1] = diastole3.status
-
-#%%
-# Events
-# --------
-
-f, (ax1, ax2) = plt.subplots(2, 1, figsize=(12, 5), sharex=True)
-oxi.plot_recording(ax=ax1)
-oxi.plot_events(ax=ax2)
-plt.tight_layout()
-
-#%%
-# Cardiac cycle
-# -------------
-
-angles = []
-x = np.asarray(oxi.peaks)
-for ev in oxi.channels:
- events = norm_triggers(
- np.asarray(oxi.channels[ev]), threshold=1, n=40, direction="higher"
- )
- angles.append(to_angles(np.where(x)[0], np.where(events)[0]))
-
-palette = itertools.cycle(sns.color_palette("deep"))
-ax = plt.subplot(111, polar=True)
-for i in angles:
- circular(i, color=next(palette), ax=ax)
diff --git a/source/auto_examples/plot_HeartBeatEvokedArpeggios.py.md5 b/source/auto_examples/plot_HeartBeatEvokedArpeggios.py.md5
deleted file mode 100644
index 5e585e14..00000000
--- a/source/auto_examples/plot_HeartBeatEvokedArpeggios.py.md5
+++ /dev/null
@@ -1 +0,0 @@
-b3a99b467f1d4d705f9233756f6a06d8
\ No newline at end of file
diff --git a/source/auto_examples/plot_HeartBeatEvokedArpeggios.rst b/source/auto_examples/plot_HeartBeatEvokedArpeggios.rst
deleted file mode 100644
index f681d86d..00000000
--- a/source/auto_examples/plot_HeartBeatEvokedArpeggios.rst
+++ /dev/null
@@ -1,349 +0,0 @@
-
-.. DO NOT EDIT.
-.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
-.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
-.. "auto_examples\plot_HeartBeatEvokedArpeggios.py"
-.. LINE NUMBERS ARE GIVEN BELOW.
-
-.. only:: html
-
- .. note::
- :class: sphx-glr-download-link-note
-
- Click :ref:`here `
- to download the full example code
-
-.. rst-class:: sphx-glr-example-title
-
-.. _sphx_glr_auto_examples_plot_HeartBeatEvokedArpeggios.py:
-
-
-Heartbeat Evoked Arpeggios
-============================
-
-This tutorial illustrates how to use the ``Oximeter`` class to trigger stimuli
-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 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-).
-
-.. GENERATED FROM PYTHON SOURCE LINES 17-34
-
-.. code-block:: default
-
-
- # Author: Nicolas Legrand
- # Licence: GPL v3
-
- import itertools
- import time
-
- import matplotlib.pyplot as plt
- import numpy as np
- import seaborn as sns
- from psychopy.sound import Sound
-
- from systole import serialSim
- from systole.plotting import circular
- from systole.recording import Oximeter
- from systole.utils import norm_triggers, to_angles
-
-
-
-
-
-.. rst-class:: sphx-glr-script-out
-
- Out:
-
- .. code-block:: none
-
- c:\programdata\anaconda3\lib\site-packages\seaborn\cm.py:1582: UserWarning:
-
- Trying to register the cmap 'rocket' which already exists.
-
- c:\programdata\anaconda3\lib\site-packages\seaborn\cm.py:1583: UserWarning:
-
- Trying to register the cmap 'rocket_r' which already exists.
-
- c:\programdata\anaconda3\lib\site-packages\seaborn\cm.py:1582: UserWarning:
-
- Trying to register the cmap 'mako' which already exists.
-
- c:\programdata\anaconda3\lib\site-packages\seaborn\cm.py:1583: UserWarning:
-
- Trying to register the cmap 'mako_r' which already exists.
-
- c:\programdata\anaconda3\lib\site-packages\seaborn\cm.py:1582: UserWarning:
-
- Trying to register the cmap 'icefire' which already exists.
-
- c:\programdata\anaconda3\lib\site-packages\seaborn\cm.py:1583: UserWarning:
-
- Trying to register the cmap 'icefire_r' which already exists.
-
- c:\programdata\anaconda3\lib\site-packages\seaborn\cm.py:1582: UserWarning:
-
- Trying to register the cmap 'vlag' which already exists.
-
- c:\programdata\anaconda3\lib\site-packages\seaborn\cm.py:1583: UserWarning:
-
- Trying to register the cmap 'vlag_r' which already exists.
-
- c:\programdata\anaconda3\lib\site-packages\seaborn\cm.py:1582: UserWarning:
-
- Trying to register the cmap 'flare' which already exists.
-
- c:\programdata\anaconda3\lib\site-packages\seaborn\cm.py:1583: UserWarning:
-
- Trying to register the cmap 'flare_r' which already exists.
-
- c:\programdata\anaconda3\lib\site-packages\seaborn\cm.py:1582: UserWarning:
-
- Trying to register the cmap 'crest' which already exists.
-
- c:\programdata\anaconda3\lib\site-packages\seaborn\cm.py:1583: UserWarning:
-
- Trying to register the cmap 'crest_r' which already exists.
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 35-39
-
-Recording
----------
-For the purpose of demonstration, here we simulate data acquisition through
-the pulse oximeter using pre-recorded signal.
-
-.. GENERATED FROM PYTHON SOURCE LINES 39-42
-
-.. code-block:: default
-
-
- ser = serialSim()
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 43-46
-
-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 in.
-
-.. GENERATED FROM PYTHON SOURCE LINES 48-52
-
-.. code-block:: python
-
- import serial
- ser = serial.Serial('COM4') # Change this value according to your setup
-
-.. GENERATED FROM PYTHON SOURCE LINES 54-55
-
-Create an Oximeter instance, initialize recording and record for 10 seconds
-
-.. GENERATED FROM PYTHON SOURCE LINES 55-58
-
-.. code-block:: default
-
-
- oxi = Oximeter(serial=ser, sfreq=75, add_channels=4).setup()
-
-
-
-
-
-.. rst-class:: sphx-glr-script-out
-
- Out:
-
- .. code-block:: none
-
- Reset input buffer
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 59-60
-
-Create an Oxymeter instance, initialize recording and record for 10 seconds
-
-.. GENERATED FROM PYTHON SOURCE LINES 60-114
-
-.. code-block:: default
-
-
- beat = Sound("C", secs=0.1)
- diastole1 = Sound("E", secs=0.1)
- diastole2 = Sound("G", secs=0.1)
- diastole3 = Sound("Bfl", secs=0.1)
-
- systoleTime1, systoleTime2, systoleTime3 = None, None, None
- tstart = time.time()
- while time.time() - tstart < 30:
-
- # Check if there are new data to read
- while oxi.serial.inWaiting() >= 5:
-
- # Convert bytes into list of int
- paquet = list(oxi.serial.read(5))
-
- if oxi.check(paquet): # Data consistency
- oxi.add_paquet(paquet[2]) # Add new data point
-
- # T + 0
- if oxi.peaks[-1] == 1:
- beat = Sound("C", secs=0.1)
- beat.play()
- systoleTime1 = time.time()
- systoleTime2 = time.time()
- systoleTime3 = time.time()
-
- # T + 1/4
- if systoleTime1 is not None:
- if time.time() - systoleTime1 >= ((oxi.instant_rr[-1] / 4) / 1000):
- diastole1 = Sound("E", secs=0.1)
- diastole1.play()
- systoleTime1 = None
-
- # T + 2/4
- if systoleTime2 is not None:
- if time.time() - systoleTime2 >= (((oxi.instant_rr[-1] / 4) * 2) / 1000):
- diastole2 = Sound("G", secs=0.1)
- diastole2.play()
- systoleTime2 = None
-
- # T + 3/4
- if systoleTime3 is not None:
- if time.time() - systoleTime3 >= (((oxi.instant_rr[-1] / 4) * 3) / 1000):
- diastole3 = Sound("A", secs=0.1)
- diastole3.play()
- systoleTime3 = None
-
- # Track the note status
- oxi.channels["Channel_0"][-1] = beat.status
- oxi.channels["Channel_1"][-1] = diastole1.status
- oxi.channels["Channel_2"][-1] = diastole2.status
- oxi.channels["Channel_3"][-1] = diastole3.status
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 115-117
-
-Events
---------
-
-.. GENERATED FROM PYTHON SOURCE LINES 117-123
-
-.. code-block:: default
-
-
- f, (ax1, ax2) = plt.subplots(2, 1, figsize=(12, 5), sharex=True)
- oxi.plot_recording(ax=ax1)
- oxi.plot_events(ax=ax2)
- plt.tight_layout()
-
-
-
-
-.. image:: /auto_examples/images/sphx_glr_plot_HeartBeatEvokedArpeggios_001.png
- :alt: Oximeter recording, Events
- :class: sphx-glr-single-img
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 124-126
-
-Cardiac cycle
--------------
-
-.. GENERATED FROM PYTHON SOURCE LINES 126-139
-
-.. code-block:: default
-
-
- angles = []
- x = np.asarray(oxi.peaks)
- for ev in oxi.channels:
- events = norm_triggers(
- np.asarray(oxi.channels[ev]), threshold=1, n=40, direction="higher"
- )
- angles.append(to_angles(np.where(x)[0], np.where(events)[0]))
-
- palette = itertools.cycle(sns.color_palette("deep"))
- ax = plt.subplot(111, polar=True)
- for i in angles:
- circular(i, color=next(palette), ax=ax)
-
-
-
-.. image:: /auto_examples/images/sphx_glr_plot_HeartBeatEvokedArpeggios_002.png
- :alt: plot HeartBeatEvokedArpeggios
- :class: sphx-glr-single-img
-
-
-.. rst-class:: sphx-glr-script-out
-
- Out:
-
- .. code-block:: none
-
- c:\programdata\anaconda3\lib\site-packages\systole\plotting.py:697: UserWarning:
-
- FixedFormatter should only be used together with FixedLocator
-
-
-
-
-
-
-.. rst-class:: sphx-glr-timing
-
- **Total running time of the script:** ( 0 minutes 41.321 seconds)
-
-
-.. _sphx_glr_download_auto_examples_plot_HeartBeatEvokedArpeggios.py:
-
-
-.. only :: html
-
- .. container:: sphx-glr-footer
- :class: sphx-glr-footer-example
-
-
-
- .. container:: sphx-glr-download sphx-glr-download-python
-
- :download:`Download Python source code: plot_HeartBeatEvokedArpeggios.py `
-
-
-
- .. container:: sphx-glr-download sphx-glr-download-jupyter
-
- :download:`Download Jupyter notebook: plot_HeartBeatEvokedArpeggios.ipynb `
-
-
-.. only:: html
-
- .. rst-class:: sphx-glr-signature
-
- `Gallery generated by Sphinx-Gallery `_
diff --git a/source/auto_examples/plot_HeartBeatEvokedArpeggios_codeobj.pickle b/source/auto_examples/plot_HeartBeatEvokedArpeggios_codeobj.pickle
deleted file mode 100644
index ea881b4e..00000000
Binary files a/source/auto_examples/plot_HeartBeatEvokedArpeggios_codeobj.pickle and /dev/null differ
diff --git a/source/auto_examples/plot_InstantaneousHeartRate.ipynb b/source/auto_examples/plot_InstantaneousHeartRate.ipynb
deleted file mode 100644
index c685875a..00000000
--- a/source/auto_examples/plot_InstantaneousHeartRate.ipynb
+++ /dev/null
@@ -1,115 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "%matplotlib inline"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "\n# Instantaneous Heart Rate\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"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "# Author: Nicolas Legrand \n# Licence: GPL v3\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nfrom systole import serialSim\nfrom systole.recording import Oximeter\nfrom systole.utils import heart_rate"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Recording\nFor the demonstration purpose, here we simulate data acquisition through\nthe pulse oximeter using pre-recorded signal.\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "ser = serialSim()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "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"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- ".. code-block:: python\n\n import serial\n ser = serial.Serial('COM4') # Change this value according to your setup\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "# Create an Oxymeter instance, initialize recording and record for 10 seconds\noxi = Oximeter(serial=ser, sfreq=75).setup()\noxi.read(30)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Plotting\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "fig, ax = plt.subplots(3, 1, figsize=(13, 8), sharex=True)\noxi.plot_recording(ax=ax[0])\n\nax[1].plot(oxi.times, oxi.peaks, \"k\")\nax[1].set_title(\"Peaks vector\", fontweight=\"bold\")\nax[1].set_xlabel(\"Time (s)\")\nax[1].set_ylabel(\"Peak\\n detection\")\n\n\nhr, time = heart_rate(oxi.peaks, sfreq=75, unit=\"rr\", kind=\"cubic\")\nax[2].plot(time, hr, label=\"Interpolated HR\", linestyle=\"--\", color=\"gray\")\nax[2].plot(\n np.array(oxi.times)[np.where(oxi.peaks)[0]],\n hr[np.where(oxi.peaks)[0]],\n \"ro\",\n label=\"Instantaneous HR\",\n)\nax[2].set_xlabel(\"Time (s)\")\nax[2].set_title(\"Instantaneous Heart Rate\", fontweight=\"bold\")\nax[2].set_ylabel(\"RR intervals (ms)\")\n\nplt.tight_layout()"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
\ No newline at end of file
diff --git a/source/auto_examples/plot_InstantaneousHeartRate.py.md5 b/source/auto_examples/plot_InstantaneousHeartRate.py.md5
deleted file mode 100644
index ffacad5c..00000000
--- a/source/auto_examples/plot_InstantaneousHeartRate.py.md5
+++ /dev/null
@@ -1 +0,0 @@
-bab8f131b47340be7647609e2fbff9e0
\ No newline at end of file
diff --git a/source/auto_examples/plot_InstantaneousHeartRate.rst b/source/auto_examples/plot_InstantaneousHeartRate.rst
deleted file mode 100644
index d83201d9..00000000
--- a/source/auto_examples/plot_InstantaneousHeartRate.rst
+++ /dev/null
@@ -1,184 +0,0 @@
-
-.. DO NOT EDIT.
-.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
-.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
-.. "auto_examples\plot_InstantaneousHeartRate.py"
-.. LINE NUMBERS ARE GIVEN BELOW.
-
-.. only:: html
-
- .. note::
- :class: sphx-glr-download-link-note
-
- Click :ref:`here `
- to download the full example code
-
-.. rst-class:: sphx-glr-example-title
-
-.. _sphx_glr_auto_examples_plot_InstantaneousHeartRate.py:
-
-
-Instantaneous Heart Rate
-========================
-
-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
-plotted.
-
-.. GENERATED FROM PYTHON SOURCE LINES 11-22
-
-.. code-block:: default
-
-
- # Author: Nicolas Legrand
- # Licence: GPL v3
-
- import matplotlib.pyplot as plt
- import numpy as np
-
- from systole import serialSim
- from systole.recording import Oximeter
- from systole.utils import heart_rate
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 23-27
-
-Recording
----------
-For the demonstration purpose, here we simulate data acquisition through
-the pulse oximeter using pre-recorded signal.
-
-.. GENERATED FROM PYTHON SOURCE LINES 27-30
-
-.. code-block:: default
-
-
- ser = serialSim()
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 31-34
-
-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 in.
-
-.. GENERATED FROM PYTHON SOURCE LINES 36-40
-
-.. code-block:: python
-
- import serial
- ser = serial.Serial('COM4') # Change this value according to your setup
-
-.. GENERATED FROM PYTHON SOURCE LINES 40-45
-
-.. code-block:: default
-
-
- # Create an Oxymeter instance, initialize recording and record for 10 seconds
- oxi = Oximeter(serial=ser, sfreq=75).setup()
- oxi.read(30)
-
-
-
-
-
-.. rst-class:: sphx-glr-script-out
-
- Out:
-
- .. code-block:: none
-
- Reset input buffer
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 46-48
-
-Plotting
---------
-
-.. GENERATED FROM PYTHON SOURCE LINES 48-70
-
-.. code-block:: default
-
- fig, ax = plt.subplots(3, 1, figsize=(13, 8), sharex=True)
- oxi.plot_recording(ax=ax[0])
-
- ax[1].plot(oxi.times, oxi.peaks, "k")
- ax[1].set_title("Peaks vector", fontweight="bold")
- ax[1].set_xlabel("Time (s)")
- ax[1].set_ylabel("Peak\n detection")
-
-
- hr, time = heart_rate(oxi.peaks, sfreq=75, unit="rr", kind="cubic")
- ax[2].plot(time, hr, label="Interpolated HR", linestyle="--", color="gray")
- ax[2].plot(
- np.array(oxi.times)[np.where(oxi.peaks)[0]],
- hr[np.where(oxi.peaks)[0]],
- "ro",
- label="Instantaneous HR",
- )
- ax[2].set_xlabel("Time (s)")
- ax[2].set_title("Instantaneous Heart Rate", fontweight="bold")
- ax[2].set_ylabel("RR intervals (ms)")
-
- plt.tight_layout()
-
-
-
-.. image:: /auto_examples/images/sphx_glr_plot_InstantaneousHeartRate_001.png
- :alt: Oximeter recording, Peaks vector, Instantaneous Heart Rate
- :class: sphx-glr-single-img
-
-
-
-
-
-
-.. rst-class:: sphx-glr-timing
-
- **Total running time of the script:** ( 0 minutes 32.270 seconds)
-
-
-.. _sphx_glr_download_auto_examples_plot_InstantaneousHeartRate.py:
-
-
-.. only :: html
-
- .. container:: sphx-glr-footer
- :class: sphx-glr-footer-example
-
-
-
- .. container:: sphx-glr-download sphx-glr-download-python
-
- :download:`Download Python source code: plot_InstantaneousHeartRate.py `
-
-
-
- .. container:: sphx-glr-download sphx-glr-download-jupyter
-
- :download:`Download Jupyter notebook: plot_InstantaneousHeartRate.ipynb `
-
-
-.. only:: html
-
- .. rst-class:: sphx-glr-signature
-
- `Gallery generated by Sphinx-Gallery `_
diff --git a/source/auto_examples/plot_InstantaneousHeartRate_codeobj.pickle b/source/auto_examples/plot_InstantaneousHeartRate_codeobj.pickle
deleted file mode 100644
index 7b461f2f..00000000
Binary files a/source/auto_examples/plot_InstantaneousHeartRate_codeobj.pickle and /dev/null differ
diff --git a/source/auto_examples/plot_InteractiveVisualizations.ipynb b/source/auto_examples/plot_InteractiveVisualizations.ipynb
deleted file mode 100644
index 720e98e7..00000000
--- a/source/auto_examples/plot_InteractiveVisualizations.ipynb
+++ /dev/null
@@ -1,191 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "%matplotlib inline"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "\n# Interactive visualization\n\nThe pipeline of physiological recording can often benefiit from\ninteractive data visualization and exploration to guide data analysis. Systole\ninclude functions build on the top of Plotly (https://plotly.com/) for\ninteractive data visualization and dashboard integration\n(https://plotly.com/dash/).\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "# Author: Nicolas Legrand \n# Licence: GPL v3"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "import plotly\n\nfrom systole import import_ppg, import_rr\nfrom systole.detection import rr_artefacts\nfrom systole.plotly import (\n plot_frequency,\n plot_nonlinear,\n plot_raw,\n plot_subspaces,\n plot_timedomain,\n)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Raw data\n\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "ppg = import_ppg()\nplot_raw(ppg)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## HRV analyses\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "rr = import_rr().rr.values"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Frequency domain\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "plot1 = plot_timedomain(rr)\nplotly.io.show(plot1)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Frequency domain\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "plot2 = plot_frequency(rr)\nplotly.io.show(plot2)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Nonlinear domain\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "plot3 = plot_nonlinear(rr)\nplotly.io.show(plot3)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Artefact detection\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "artefacts = rr_artefacts(rr)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Subspaces visualization\nYou can visualize the two main subspaces and spot outliers. The left pamel\nplot subspaces that are more sensitive to ectopic beats detection. The right\npanel plot subspaces that will be more sensitive to long or short beats,\ncomprizing the extra and missed beats.\n\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "plot_subspaces(rr)"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
\ No newline at end of file
diff --git a/source/auto_examples/plot_InteractiveVisualizations.py b/source/auto_examples/plot_InteractiveVisualizations.py
deleted file mode 100644
index 7d82a967..00000000
--- a/source/auto_examples/plot_InteractiveVisualizations.py
+++ /dev/null
@@ -1,73 +0,0 @@
-"""
-Interactive visualization
-=========================
-
-The pipeline of physiological recording can often benefiit from
-interactive data visualization and exploration to guide data analysis. Systole
-include functions build on the top of Plotly (https://plotly.com/) for
-interactive data visualization and dashboard integration
-(https://plotly.com/dash/).
-"""
-
-# Author: Nicolas Legrand
-# Licence: GPL v3
-
-#%%
-import plotly
-
-from systole import import_ppg, import_rr
-from systole.detection import rr_artefacts
-from systole.plotly import (
- plot_frequency,
- plot_nonlinear,
- plot_raw,
- plot_subspaces,
- plot_timedomain,
-)
-
-#%%
-# Raw data
-# --------
-#
-ppg = import_ppg()
-plot_raw(ppg)
-
-#%%
-# HRV analyses
-# ------------
-
-rr = import_rr().rr.values
-
-#%%
-# Frequency domain
-# ----------------
-plot1 = plot_timedomain(rr)
-plotly.io.show(plot1)
-
-#%%
-# Frequency domain
-# ----------------
-plot2 = plot_frequency(rr)
-plotly.io.show(plot2)
-
-#%%
-# Nonlinear domain
-# ----------------
-plot3 = plot_nonlinear(rr)
-plotly.io.show(plot3)
-
-#%%
-# Artefact detection
-# ------------------
-
-artefacts = rr_artefacts(rr)
-
-#%%
-# Subspaces visualization
-# -----------------------
-# You can visualize the two main subspaces and spot outliers. The left pamel
-# plot subspaces that are more sensitive to ectopic beats detection. The right
-# panel plot subspaces that will be more sensitive to long or short beats,
-# comprizing the extra and missed beats.
-
-plot_subspaces(rr)
diff --git a/source/auto_examples/plot_InteractiveVisualizations.py.md5 b/source/auto_examples/plot_InteractiveVisualizations.py.md5
deleted file mode 100644
index 88d2919e..00000000
--- a/source/auto_examples/plot_InteractiveVisualizations.py.md5
+++ /dev/null
@@ -1 +0,0 @@
-de495e58aace86865c15275ef84c8cc7
\ No newline at end of file
diff --git a/source/auto_examples/plot_InteractiveVisualizations.rst b/source/auto_examples/plot_InteractiveVisualizations.rst
deleted file mode 100644
index 3e355857..00000000
--- a/source/auto_examples/plot_InteractiveVisualizations.rst
+++ /dev/null
@@ -1,259 +0,0 @@
-
-.. DO NOT EDIT.
-.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
-.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
-.. "auto_examples\plot_InteractiveVisualizations.py"
-.. LINE NUMBERS ARE GIVEN BELOW.
-
-.. only:: html
-
- .. note::
- :class: sphx-glr-download-link-note
-
- Click :ref:`here `
- to download the full example code
-
-.. rst-class:: sphx-glr-example-title
-
-.. _sphx_glr_auto_examples_plot_InteractiveVisualizations.py:
-
-
-Interactive visualization
-=========================
-
-The pipeline of physiological recording can often benefiit from
-interactive data visualization and exploration to guide data analysis. Systole
-include functions build on the top of Plotly (https://plotly.com/) for
-interactive data visualization and dashboard integration
-(https://plotly.com/dash/).
-
-.. GENERATED FROM PYTHON SOURCE LINES 11-15
-
-.. code-block:: default
-
-
- # Author: Nicolas Legrand
- # Licence: GPL v3
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 16-28
-
-.. code-block:: default
-
- import plotly
-
- from systole import import_ppg, import_rr
- from systole.detection import rr_artefacts
- from systole.plotly import (
- plot_frequency,
- plot_nonlinear,
- plot_raw,
- plot_subspaces,
- plot_timedomain,
- )
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 29-32
-
-Raw data
---------
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 32-35
-
-.. code-block:: default
-
- ppg = import_ppg()
- plot_raw(ppg)
-
-
-
-
-
-
-.. raw:: html
-
-