Skip to content

Conversation

@samuelgarcia
Copy link
Member

This PR:

  • make template_tools.py function working without both WaveformExtractor (as before) and Templates objects
  • implements a estimate_templates() which is fast and do not need WaveformExtractor
  • implements random_spikes_selection()
  • implements estimate_sparsity() function. This is also fast. This could replace precompute_sparsity() This will be used by SortingResult

This PR do not break any signature or behavior. Just improve or enhance previous functions.

@samuelgarcia samuelgarcia added enhancement New feature or request core Changes to core module labels Jan 17, 2024
@samuelgarcia samuelgarcia added this to the 0.100.0 milestone Jan 17, 2024
@samuelgarcia
Copy link
Member Author

@yger @h-mayorquin @alejoe91 : ready to review

@yger
Copy link
Collaborator

yger commented Jan 23, 2024

If we along these lines, then I would also be tempted to modify all the function in templates_tools.py to also have an extended signature with templates_or_waveform_extractor instead of simply waveform_extractor. What do you think ? Can I do that? This would be usefull for playing with templates in the hybrid case, i.e. sorting them by amplitudes, slicing them, ...

Copy link
Member

@zm711 zm711 left a comment

Choose a reason for hiding this comment

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

A few docstring fixes and an assert tweak.

@yger
Copy link
Collaborator

yger commented Jan 24, 2024

I will built my PR on this one, but don't you think that estimate_templates() should return a Templates object ? I mean, we should enforce such object everywhere, no?

Co-authored-by: Zach McKenzie <92116279+zm711@users.noreply.github.com>
@alejoe91 alejoe91 merged commit fcb7ce4 into SpikeInterface:main Jan 29, 2024
@samuelgarcia samuelgarcia deleted the estimate_sparsity branch July 29, 2025 13:42
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.

4 participants