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

Add single-click option for peak editing #20

Open
rmarkello opened this issue Jun 8, 2020 · 4 comments
Open

Add single-click option for peak editing #20

rmarkello opened this issue Jun 8, 2020 · 4 comments
Assignees
Labels
Enhancement New feature or request Paused Issue should not be worked on until the resolution of other issues or Pull Requests Urgent If you don't know where to start, start here!

Comments

@rmarkello
Copy link
Member

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!

@rmarkello rmarkello added the Enhancement New feature or request label Jun 8, 2020
@smoia smoia added the Urgent If you don't know where to start, start here! label Nov 5, 2020
@smoia
Copy link
Member

smoia commented Nov 5, 2020

I'd like to make this issue more important, mainly to develop a way to add missing peaks.
Now that I'm user testing these repo, I see how important it is to be able to add new peaks, especially if it's already halfway through a manual classification.

@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 np.max())?

@rmarkello
Copy link
Member Author

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.

@smoia
Copy link
Member

smoia commented Nov 5, 2020

That's another question I wanted to ask you: what is exactly the difference between the two?

@rmarkello
Copy link
Member Author

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!

@smoia smoia added the Paused Issue should not be worked on until the resolution of other issues or Pull Requests label Dec 14, 2022
@m-miedema m-miedema transferred this issue from physiopy/peakdet Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Paused Issue should not be worked on until the resolution of other issues or Pull Requests Urgent If you don't know where to start, start here!
Projects
None yet
Development

No branches or pull requests

2 participants