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

Commit

Permalink
Closes issue #43.
Browse files Browse the repository at this point in the history
  • Loading branch information
capcarr committed Aug 20, 2018
1 parent ce09ce1 commit bb42994
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions biosppy/signals/eda.py
Expand Up @@ -78,7 +78,9 @@ def eda(signal=None, sampling_rate=1000., show=True, min_amplitude=0.1):
mirror=True)

# get SCR info
onsets, peaks, amps = kbk_scr(signal=filtered, sampling_rate=sampling_rate, min_amplitude=min_amplitude)
onsets, peaks, amps = kbk_scr(signal=filtered,
sampling_rate=sampling_rate,
min_amplitude=min_amplitude)

# get time vectors
length = len(signal)
Expand Down Expand Up @@ -215,7 +217,7 @@ def kbk_scr(signal=None, sampling_rate=1000., min_amplitude=0.1):
df, _ = st.smoother(signal=df, kernel='bartlett', size=size, mirror=True)

# zero crosses
zeros, = st.zero_cross(signal=df, detrend=True)
zeros, = st.zero_cross(signal=df, detrend=False)
if np.all(df[:zeros[0]] > 0):
zeros = zeros[1:]
if np.all(df[zeros[-1]:] > 0):
Expand Down

0 comments on commit bb42994

Please sign in to comment.