Skip to content

Allow for SortingAnalyzer or BaseSorter in plot_* #3941

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

chrishalcrow
Copy link
Member

Following on from discussion in #3937, this PR allows the user to pass a SortingAnalyzer to plot_isi_distribution.

Will also add to plot_rasters, plot_unit_presence and plot_probe_map. Before I do, is the strategy here fine? I've replace the sorting argument with sorting_analyzer_or_sorting. I think most users use this as

si.plot_isi_distribution(analyzer)

so won't notice any difference.

For anyone passing sorting=sorting, I've deprecated the argument.

@chrishalcrow chrishalcrow added enhancement New feature or request widgets Related to widgets module labels May 21, 2025
@chrishalcrow chrishalcrow marked this pull request as draft May 21, 2025 09:34
@chrishalcrow chrishalcrow requested a review from alejoe91 May 21, 2025 09:34
@chrishalcrow chrishalcrow changed the title Add sa_or_sort to ISIDistributionWidget Allow for SortingAnalyzer or BaseSorter in plot_* May 21, 2025
@zm711
Copy link
Member

zm711 commented May 22, 2025

I think this is good from my perspective and should be extended to all widget functions. Maybe we should add a developer comment to mention which functions need the sorting and which need the analyzer, but that might also be clear by us adding the ensure_sorting or ensure_sorting_analyzer functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request widgets Related to widgets module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants