Note
Go to the end to download the full example code
SortingExtractor Widgets Gallery¶
Here is a gallery of all the available widgets using SortingExtractor objects.
import matplotlib.pyplot as plt
import spikeinterface.extractors as se
import spikeinterface.widgets as sw
First, let’s create a toy example with the extractors module:
recording, sorting = se.toy_example(duration=100, num_channels=1, seed=0, num_segments=1)
plot_rasters()¶
w_rs = sw.plot_rasters(sorting)

plot_isi_distribution()¶
w_isi = sw.plot_isi_distribution(sorting, window_ms=150.0, bin_ms=5.0)

plot_autocorrelograms()¶
w_ach = sw.plot_autocorrelograms(sorting, window_ms=150.0, bin_ms=5.0, unit_ids=[1, 2, 5])

plot_crosscorrelograms()¶
w_cch = sw.plot_crosscorrelograms(sorting, window_ms=150.0, bin_ms=5.0, unit_ids=[1, 2, 5])
plt.show()

plot_presence()¶
w_pr = sw.plot_presence(sorting)
plt.show()
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/spikeinterface-test/checkouts/latest/examples/modules_gallery/widgets/plot_2_sort_gallery.py", line 50, in <module>
w_pr = sw.plot_presence(sorting)
File "/home/docs/checkouts/readthedocs.org/user_builds/spikeinterface-test/conda/latest/lib/python3.9/site-packages/spikeinterface/widgets/_legacy_mpl_widgets/presence.py", line 131, in plot_presence
W.plot()
File "/home/docs/checkouts/readthedocs.org/user_builds/spikeinterface-test/conda/latest/lib/python3.9/site-packages/spikeinterface/widgets/_legacy_mpl_widgets/presence.py", line 70, in plot
self._do_plot()
File "/home/docs/checkouts/readthedocs.org/user_builds/spikeinterface-test/conda/latest/lib/python3.9/site-packages/spikeinterface/widgets/_legacy_mpl_widgets/presence.py", line 93, in _do_plot
time_den.append(gaussian_kde(spiketimes).pdf(time_grid))
NameError: name 'gaussian_kde' is not defined
Total running time of the script: ( 0 minutes 1.985 seconds)