Skip to content

Add all-in-one run_compare_analyzers function - #220

Open
alejoe91 wants to merge 15 commits into
SpikeInterface:mainfrom
alejoe91:compare-analyzers-alessio
Open

alejoe91 wants to merge 15 commits into
SpikeInterface:mainfrom
alejoe91:compare-analyzers-alessio

Conversation

@alejoe91

@alejoe91 alejoe91 commented Dec 12, 2025 •

Copy link
Copy Markdown
Member

This PR implements a ComparisonController and several views to facilitate the comparison and inspection of the output of two spike sorters.

It implements a new run_mainwindow_comparison function:

from spikeinterface_gui import run_mainwindow_comparison

run_mainwindow_comparison(
    analyzer_dartsort,
    analyzer_kilosort4,
    analyzer1_name="dartsort",
    analyzer2_name="kilosort4",
    match_score=0.3,
    verbose=True,
    # skip_extensions=["waveforms"],
    mode="web", # or "web"
    user_settings=user_settings
)

And a bunch of comparison views, with a comparison preset:

  • CompareUnitListView: core of the comparison, display pairs of matched units + unmatched units by sorters, ordered by agreement
  • VennView: Venn diagram with units in agreement, with a slider to change the agreement thredhold. Clicking on regions randomly select units from that region (match, sorter1 only, sorter2 only)
  • AgreementMatrixView: same as similarity view, but displaying agreement. Selecting a unit on the diagonal will select the corresponding row in the CompareUnitListView. Off-diagonal clicks (e.g. to check oversplits) will select units in the "classic" UnitListView" (by default same zone as CompareUnitListView`)
  • CompareSpikeListView: venn diagram at the spike level, for unit pairs. It also shows sample waveforms from the different groups (match, sorter1 only, sorter2 only) when the waveforms extension is available (no recompute)
  • CompareMetricsView: shows scatters of selected metrics, only for paired units above the match threshold defined in the VennView

Ready to review on my end!

Docs are updated and tested both desktop and web modes!

Screencast.from.2026-10-27.15-19-01.webm

@alejoe91
alejoe91 marked this pull request as ready for review October 27, 2026 14:21
@alejoe91
alejoe91 requested review from chrishalcrow and samuelgarcia and removed request for chrishalcrow October 27, 2026 14:27
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.

1 participant