Skip to content

Threshold filter does not work properly for values below the threshold #30

Description

@mnaegelin

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:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions