Skip to content

Better handling of scroll time in trace viewer#256

Merged
alejoe91 merged 3 commits intoSpikeInterface:mainfrom
samuelgarcia:fix_scrool
Mar 23, 2026
Merged

Better handling of scroll time in trace viewer#256
alejoe91 merged 3 commits intoSpikeInterface:mainfrom
samuelgarcia:fix_scrool

Conversation

@samuelgarcia
Copy link
Copy Markdown
Member

This should fix this #253.
@JoeZiminski
Here I chosse a fix step of total duration per segment / 2**16
This avoid the clipping.

Can you test it of your very long recording ?

def _qt_update_scroll_step(self):
segment_index = self.controller.get_time()[1]
length = self.controller.get_num_samples(segment_index)
self.scrool_step = length / 2**16
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.scrool_step = length / 2**16
self.scroll_step = length / 2**16


def _qt_on_scroll_time(self, val):
time = self.controller.sample_index_to_time(val)
sample = val * self.scrool_step
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sample = val * self.scrool_step
sample = val * self.scroll_step

@alejoe91 alejoe91 changed the title better handling of scroll time in trace viewer Better handling of scroll time in trace viewer Mar 23, 2026
@alejoe91 alejoe91 merged commit 5f0a3f9 into SpikeInterface:main Mar 23, 2026
2 checks passed
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