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

[Fix] findpeaks neurokit index error #1011

Merged

Conversation

ajb5d
Copy link
Contributor

@ajb5d ajb5d commented Jul 14, 2024

Description

In working on #1007 I added logic to ensure that the find_peaks functions all worked when there were no peaks detected. We couldn't work on _ecg_findpeaks_visibilitygraph because ts2vg was broken in CI. Well CarlosBergillos/ts2vg#36 (#1009 here) is fixed now and a new version is on pypi. This PR finishes what #1007 started.

Proposed Changes

I added flat signal checking to _ecg_findpeaks_visibilitygraph -- if the min/max of the signal is equal then return an empty array

Checklist

Here are some things to check before creating the PR. If you encounter any issues, do let us know :)

  • I have read the CONTRIBUTING file.
  • My PR is targeted at the dev branch (and not towards the master branch).
  • I ran the CODE CHECKS on the files I added or modified and fixed the errors.
  • I have added the newly added features to News.rst (if applicable)

@DominiqueMakowski
Copy link
Member

Sweet, thanks @ajb5d !

@DominiqueMakowski DominiqueMakowski changed the title Fix findpeaks neurokit index error [Fix] findpeaks neurokit index error Jul 19, 2024
@DominiqueMakowski DominiqueMakowski merged commit bc3f4f1 into neuropsychology:dev Jul 19, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants