Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interchanged pre and pos prefixes in peak_detection function #53

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions carat/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ def peak_detection(feature, threshold=0.05, pre_avg=0, pos_avg=0, pre_max=1, pos
# compute the moving average
if avg_length > 1:
# origin controls the placement of the filter
avg_origin = int(np.floor((pre_avg - pos_avg) / 2))
avg_origin = int(np.floor((pos_avg - pre_avg) / 2))
# moving average
mov_avg = sp.ndimage.filters.uniform_filter(data, avg_length,
mode='constant',
Expand All @@ -615,7 +615,7 @@ def peak_detection(feature, threshold=0.05, pre_avg=0, pos_avg=0, pre_max=1, pos
# compute the moving maximum
if max_length > 1:
# origin controls the placement of the filter
max_origin = int(np.floor((pre_max - pos_max) / 2))
max_origin = int(np.floor((pos_max - pre_max) / 2))
# moving maximum
mov_max = sp.ndimage.filters.maximum_filter(candidates, max_length,
mode='constant',
Expand Down