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

Error in ppg_sqi.use_template(wave, annotation: list, fs: int) #220

Open
HotDog702 opened this issue Nov 8, 2024 · 1 comment
Open

Error in ppg_sqi.use_template(wave, annotation: list, fs: int) #220

HotDog702 opened this issue Nov 8, 2024 · 1 comment

Comments

@HotDog702
Copy link

HotDog702 commented Nov 8, 2024

94:    locs = find_peaks(y[i:])[0]
95:    pks = y[locs]

find_peaks returns peak indexes relative to the beginning of input array, in your case y[i:], so to get peak indexes of the original array, you have to add the index of starting point, namely i. So, correct line must be:
94: locs = find_peaks(y[i:])[0] + i
otherwise the next line returns incorrect pks values
OR:
95: pks = y[i:][locs]

By the way, you can get peak values directly from find_peaks by transferring to it height= parameter

@abravalheri
Copy link

Hi @HotDog702 please note that this repository is simply a template and does not implement any of the functions you mentioned.

What is probably happening is that the library you are using started as a clone of this template and forgot to modify the github link to its own repo.

My recommendation is to try to find out what is the issue tracker for the specific library you are using and post the issue there.

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

No branches or pull requests

2 participants