Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Commit 1e0edaa

Browse files
committed
Bug fixes
Corrects the default filter parameters for EDA signals; fixes the use of the 'size' keyword in 'signals.tools.get_heart_rate'; various documentation fixes.
1 parent d1ca3f2 commit 1e0edaa

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

biosppy/signals/eda.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def eda(signal=None, sampling_rate=1000., show=True):
6161
ftype='butter',
6262
band='lowpass',
6363
order=4,
64-
frequency=20,
64+
frequency=5,
6565
sampling_rate=sampling_rate)
6666

6767
# smooth
@@ -101,6 +101,8 @@ def basic_scr(signal=None, sampling_rate=1000.):
101101
"""Basic method to extract Skin Conductivity Responses (SCR) from an
102102
EDA signal.
103103
104+
Follows the approach in [Gamb08]_.
105+
104106
Parameters
105107
----------
106108
signal : array
@@ -117,6 +119,11 @@ def basic_scr(signal=None, sampling_rate=1000.):
117119
amplitudes : array
118120
SCR pulse amplitudes.
119121
122+
References
123+
----------
124+
.. [Gamb08] Hugo Gamboa, "Multi-modal Behavioral Biometrics Based on HCI
125+
and Electrophysiology", PhD thesis, Instituto Superior T{\'e}cnico, 2008
126+
120127
"""
121128

122129
# check inputs

biosppy/signals/tools.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ def get_heart_rate(beats=None, sampling_rate=1000., smooth=False, size=3):
11221122
11231123
Notes
11241124
-----
1125-
* Assumes normal human heart rate to be between 40 and 190 bpm.
1125+
* Assumes normal human heart rate to be between 40 and 200 bpm.
11261126
11271127
"""
11281128

@@ -1144,7 +1144,6 @@ def get_heart_rate(beats=None, sampling_rate=1000., smooth=False, size=3):
11441144

11451145
# smooth with moving average
11461146
if smooth:
1147-
size = 5
11481147
hr, _ = smoother(signal=hr, kernel='boxcar', size=size, mirror=True)
11491148

11501149
return utils.ReturnTuple((ts, hr), ('index', 'heart_rate'))

0 commit comments

Comments
 (0)