Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Ho committed Oct 21, 2018
2 parents b5f128f + 29c2344 commit bfa5409
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions sensormotion/gait.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ def step_regularity(autocorr_peak_values):
"""

peaks_half = autocorr_peak_values[autocorr_peak_values.size//2:]

assert len(peaks_half) >= 3, \
'Not enough autocorrelation peaks detected. Plot the ' \
'autocorrelation signal to visually inspect peaks'

ac_lag0 = peaks_half[0] # autocorrelation value at lag 0
ac_d1 = peaks_half[1] # first dominant period i.e. a step (left-right)
ac_d2 = peaks_half[2] # second dominant period i.e. a stride (left-left)
Expand Down Expand Up @@ -171,6 +176,11 @@ def step_symmetry(autocorr_peak_values):
"""

peaks_half = autocorr_peak_values[autocorr_peak_values.size//2:]

assert len(peaks_half) >= 3, \
'Not enough autocorrelation peaks detected. Plot the ' \
'autocorrelation signal to visually inspect peaks'

ac_d1 = peaks_half[1] # first dominant period i.e. a step (left-right)
ac_d2 = peaks_half[2] # second dominant period i.e. a stride (left-left)

Expand Down
2 changes: 1 addition & 1 deletion sensormotion/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.1.2'
__version__ = '1.1.3'

0 comments on commit bfa5409

Please sign in to comment.