You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+13-80Lines changed: 13 additions & 80 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,92 +43,25 @@ The following packages are required to use Systole:
43
43
* Pandas (>=0.24)
44
44
* Matplotlib (>=3.0.2)
45
45
* Seaborn (>=0.9.0)
46
+
* py-ecg-detectors (>=1.0.2)
46
47
47
-
Recording
48
-
=========
49
-
50
-
Systole natively supports the recording of PPG signals through the `Nonin 3012LP Xpod USB pulse oximeter <https://www.nonin.com/products/xpod/>`_ together with the `Nonin 8000SM 'soft-clip' fingertip sensors <https://www.nonin.com/products/8000s/>`_.
51
-
It can easily interface with `PsychoPy <https://www.psychopy.org/>`_ to record PPG signal during psychological experiments, and to synchronize stimulus deliver to e.g., systole or diastole.
52
-
53
-
For example, you can record and plot data in less than 6 lines of code:
54
-
55
-
.. code-block:: python
56
-
57
-
import serial
58
-
from systole.recording import Oximeter
59
-
ser = serial.Serial('COM4') # Add your USB port here
60
-
61
-
# Open serial port, initialize and plot recording for Oximeter
The ``Oximeter`` class can be used together with a stimulus presentation software to record cardiac activity during psychological experiments.
69
-
70
-
* The ``read()`` method
71
-
72
-
will record for a predefined amount of time (specified by the ``duration`` parameter, in seconds). This 'serial mode' is the easiest and most robust method, but it does not allow the execution of other instructions in the meantime.
73
-
74
-
.. code-block:: python
75
-
76
-
# Code 1 {}
77
-
oximeter.read(duration=10)
78
-
# Code 2 {}
79
-
80
-
* The ``readInWaiting()`` method
48
+
Interactive plotting functions and reports generation will also require the following packages to be installed:
81
49
82
-
will only read the bytes temporally stored in the USB buffer. For the Nonin device, this represents up to 10 seconds of recording (this procedure should be executed at least one time every 10 seconds for a continuous recording). When inserted into a while loop, it can record PPG signal in parallel with other commands.
50
+
* plotly (>=4.8.0)
51
+
* plotly_express (>=0.4.1)
83
52
84
-
.. code-block:: python
85
-
86
-
import time
87
-
tstart = time.time()
88
-
while time.time() - tstart <10:
89
-
oximeter.readInWaiting()
90
-
# Insert code here {...}
91
-
92
-
Online detection
93
-
----------------
94
-
95
-
Online heart beat detection, for cardiac-stimulus synchrony:
96
-
97
-
.. code-block:: python
98
-
99
-
import serial
100
-
import time
101
-
from systole.recording import Oximeter
102
-
103
-
# Open serial port
104
-
ser = serial.Serial('COM4') # Change this value according to your setup
105
-
106
-
# Create an Oxymeter instance and initialize recording
Systole natively supports recording of physiological signals from the following setups:
63
+
* `Nonin 3012LP Xpod USB pulse oximeter <https://www.nonin.com/products/xpod/>`_ together with the `Nonin 8000SM 'soft-clip' fingertip sensors <https://www.nonin.com/products/8000s/>`_ (USB).
64
+
* Remote Data Access (RDA) via BrainVision Recorder together with Brain product ExG amplifier `<https://www.brainproducts.com/>`_ (Ethernet).
0 commit comments