[Fix] findpeaks neurokit index error #1011
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 arrayChecklist
Here are some things to check before creating the PR. If you encounter any issues, do let us know :)