Skip to content

Attempt to fix possible pick-spikes issue#18

Closed
JoeZiminski wants to merge 1 commit into
int-brain-lab:mainfrom
JoeZiminski:fix_pick_window
Closed

Attempt to fix possible pick-spikes issue#18
JoeZiminski wants to merge 1 commit into
int-brain-lab:mainfrom
JoeZiminski:fix_pick_window

Conversation

@JoeZiminski
Copy link
Copy Markdown
Collaborator

@JoeZiminski JoeZiminski commented Feb 12, 2026

Hey @oliche, when I tried the pick-spikes functionality, it worked well for CTRL+click but the auto-detect voltage was not working. For me at least, the calculated S_RANGE was very large, say (-15000, 15000) for 30kHz sampling. Typically the view window was around 0.33s, so the out_of_time_range was always triggered as tscale[0] was very negative.

I proposed a fix in this PR, but I'm not 100% if its needed, I might just be doing something wrong. The fix creates the window to search for the voltage peak as a percentage of the current zoom (so, if the user is really zoomed it, a point is not detected outside of their view range). The percentages (5% of y, 2% of x) are arbitrary but felt okay when manually testing. I'm curious to know if you also had any issues with the pick spikes or if I'm mis-using it. Cheers!

@JoeZiminski JoeZiminski requested a review from oliche February 12, 2026 18:01
@JoeZiminski JoeZiminski requested review from oliche and removed request for oliche May 21, 2026 10:01
@oliche
Copy link
Copy Markdown
Member

oliche commented May 21, 2026

Thanks @JoeZiminski! The fix is correct. I rebased on main, used the public viewRange() API, and removed a stray debug line — opened as #28 with your original commit preserved so you're credited in the history.

@oliche oliche closed this May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants