Skip to content

Only use nonempty main channel indices when making an analyzer from templates - #4763

Open
chrishalcrow wants to merge 1 commit into
SpikeInterface:mainfrom
chrishalcrow:fix-sparse-templates-analyzer-creation
Open

Only use nonempty main channel indices when making an analyzer from templates#4763
chrishalcrow wants to merge 1 commit into
SpikeInterface:mainfrom
chrishalcrow:fix-sparse-templates-analyzer-creation

Conversation

@chrishalcrow

Copy link
Copy Markdown
Member

Found a main_channel_indices bug. When you use create_sorting_analyzer_with_existing_templates (done inside e.g. SK2 and Lupin) the sorting might have fewer units than there are templates. This is because some templates end up having no spikes clustered to them (especially happens if you use a template library generated from a different recording, for fun ;) ). So we usually throw away these units.

This PR ensures that when we throw away these units, we update the main_channel_indices accordingly.

@chrishalcrow chrishalcrow added bug Something isn't working sorters Related to sorters module sortingcomponents Related to sortingcomponents module labels Sep 4, 2026

@alejoe91 alejoe91 left a comment

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.

Great catch!

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

Labels

bug Something isn't working sorters Related to sorters module sortingcomponents Related to sortingcomponents module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants