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

Increase permited equal or bigger neighbor bins to relax peaksFinder conditions #140

Merged
merged 1 commit into from
Oct 26, 2024

Conversation

JPorron
Copy link
Contributor

@JPorron JPorron commented Oct 23, 2024

JPorron Ok: 1 Powered by Pull Request Badge

The condition to identify a bin as a peak is to compare the smoothed value of each bin with its 5 neighbouring bins in each direction. If there are more than the changed value neighbour bins equal or higher than the smoothed value of the corresponding bin then it is not a peak. This way the first bin (within the "distance" parameter) that has no more than this number of equal or bigger neighbours is the peak (no more bins within "distance" can be peaks).

I found some cases where setting the value to >2 was not letting some signals detect a peak (if the region of the maximum is flat along several bins). I think >3 is a better compromise to not allow very flat regions to be considered as peak while detecting clear peaks.

@JPorron JPorron requested a review from lobis October 23, 2024 10:12
@lobis lobis merged commit 52aeac4 into master Oct 26, 2024
64 checks passed
@lobis lobis deleted the jporron-loosen-peakFinder-conditions branch October 26, 2024 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants