Skip to content

Conversation

@chrishalcrow
Copy link
Member

Following on from #4133, here is a draft proposal for implementing a frame_slice method for the sorting analyzer, to see how tricky it is.

API is:

sliced_analyzer = analyzer.frame_slice(start_frame=1000, end_frame=2000)

which matches the frame_slice methods for sorting and recording objects.

There's a "hard" mode (which just recomputes all extensions) and a "soft" mode (which attempts to estimate the extensions). Almost all the complexity occurs at the level of the extension. For each extension, we'd need to implement a _frame_slice_extension_data method.

I've only implemented _frame_slice_extension_data for random_spikes, and you can only return an in memory analyzer for the moment.

Would like some feedback on the basic structure before doing anything more.

@yger
Copy link
Collaborator

yger commented Dec 15, 2025

I think this is a great idea, and I don't think of any obvisous flaws in the design as it is proposed. I'm afraid lots of extensions would need to be recomputed however, but this would be a cool feature

@alejoe91
Copy link
Member

I agree with @yger here! It doesn't hurt and it could be beneficial in many cases! Of course, we should add proper warnings if things aren't as expected, e.g., too few sampled spikes, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Changes to core module enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants