-
-
Notifications
You must be signed in to change notification settings - Fork 423
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
[Feature] Add signal_flatintervals function for flatline detection #940
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #940 +/- ##
==========================================
+ Coverage 54.82% 54.88% +0.05%
==========================================
Files 304 305 +1
Lines 14269 14287 +18
==========================================
+ Hits 7823 7841 +18
Misses 6446 6446 ☔ View full report in Codecov by Sentry. |
@DominiqueMakowski |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Description
This PR aims at adding the function
signal_flatintervals
. The function can identify flatline intervals in signals and if modelled aftersignal_flatline
. We discussed this feature in #823. It is one step towards making NeuroKit able to process long-term ECGs with bad or unprocessable intervals.Possible Next Step
A possible next step could be to a
bad_intervals
keyword argument to the peak detection functions to that the peak detector does not need to process the whole signal but only the good (non-flatline parts).Limitations / Concerns
signal_flatintervals
needs two "magic" parameters threshold and tolerance.threshold
is the same as in signal_flatline with a default values of 0.01 (1% percent of the largest spike in the signal).tolerance
says how long the flatline interval needs to be to be recognised as such default is 60 seconds.ecg_simulate
and is therefore quite slow (approx. 10s). I am open to suggestions on how to speed this up.Checklist