-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add single-click option for peak editing #20
Comments
I'd like to make this issue more important, mainly to develop a way to add missing peaks. @rmarkello I have a quesiton for you to get a quick fix: given that the troughs are recomputed instantaneously after deleting peaks, can we adapt the current code and add a definition to get the peak in a selected range (it could be as easy as a |
I think adapting the code to get missing peaks would certainly be feasible—and relatively straightforward. You'd just have to figure out what combination of events to capture since I believe both left / right mouse clicks are already reserved for rejecting / deleting peaks. |
That's another question I wanted to ask you: what is exactly the difference between the two? |
Sorry for the massive delay on this—been on a GitHub hiatus for a while 😬 Deleting peaks: this is for when your peak detection messed up and found a peak on, say, the P-wave of an ECG pulse. That is, the peaks immediately adjacent to this one are totally valid and this region of the time series is artifact-free—this is simply an erroneous peak that should never have been picked up (maybe your height threshold was too liberal or something). Critically, deleting this peak means that if we go on to calculate, say, instantaneous heart rate, we want to use the peaks surrounding this one to calculate one of the R-R intervals! Deleting this erroneous peak will ensure that this portion of the time series is still used in downstream analyses (like iHR calculations). On the other hand.... Rejecting peaks: This is for artifact rejection. That is, the peak that was detected may be appropriate, but it's in a section of data that's unusable and you therefore can't or shouldn't trust it. The main difference from a deletion is that if we go on to calculate instantaneous heart rate, we don't want to use the peaks surrounding this one to calculate one of the R-R intervals! Rejecting this peak will ensure that this portion of the time series is not used in downstream analyses (like iHR calculations). This may seem like a very minor nuance, but if you're ever looking at peak-to-peak differences it becomes critical. Rejecting a peak ensures that the surrounding peaks are NOT included in any peak-to-peak difference calculations, while deleting a peak ensures they ARE included. Let me know if that makes sense / you have any more questions about that! |
Currently when editing peaks users are required to drag and select a range to remove / delete peaks. It might be nice to add functionality to allow for simply clicking a peak to mark it for removal / deletion.
Related, adding the ability to click for missing peaks would be great, as well!
The text was updated successfully, but these errors were encountered: