Thanks for the awesome package! One small issue I spotted: the threshold_filter function seems to only filter values where the RRI is greater than $\text{local median} + \text{threshold}$, but not where it is smaller than $\text{local median} - \text{threshold}$:
|
if rri[j] > (np.median(rri[slice_]) + threshold): |
Only for the values in the very first local window, the filtering happens in both directions:
|
if abs(rri[j] - np.median(rri[slice_])) > threshold: |