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
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/spikeinterface/checkouts/0.98.0/examples/modules_gallery/widgets/plot_2_sort_gallery.py", line 9, in <module>
import spikeinterface.extractors as se
File "/home/docs/checkouts/readthedocs.org/user_builds/spikeinterface/conda/0.98.0/lib/python3.9/site-packages/spikeinterface/extractors/__init__.py", line 1, in <module>
from .extractorlist import *
File "/home/docs/checkouts/readthedocs.org/user_builds/spikeinterface/conda/0.98.0/lib/python3.9/site-packages/spikeinterface/extractors/extractorlist.py", line 15, in <module>
from .neoextractors import *
File "/home/docs/checkouts/readthedocs.org/user_builds/spikeinterface/conda/0.98.0/lib/python3.9/site-packages/spikeinterface/extractors/neoextractors/__init__.py", line 1, in <module>
from .alphaomega import AlphaOmegaRecordingExtractor, AlphaOmegaEventExtractor, read_alphaomega, read_alphaomega_event
File "/home/docs/checkouts/readthedocs.org/user_builds/spikeinterface/conda/0.98.0/lib/python3.9/site-packages/spikeinterface/extractors/neoextractors/alphaomega.py", line 3, in <module>
from .neobaseextractor import NeoBaseRecordingExtractor, NeoBaseEventExtractor
File "/home/docs/checkouts/readthedocs.org/user_builds/spikeinterface/conda/0.98.0/lib/python3.9/site-packages/spikeinterface/extractors/neoextractors/neobaseextractor.py", line 332, in <module>
class NeoBaseSortingExtractor(_NeoBaseExtractor, BaseSorting):
File "/home/docs/checkouts/readthedocs.org/user_builds/spikeinterface/conda/0.98.0/lib/python3.9/site-packages/spikeinterface/extractors/neoextractors/neobaseextractor.py", line 480, in NeoBaseSortingExtractor
def _infer_t_start_from_signal_stream(self, segment_index: int, stream_id: Optional[str] = None) -> float | None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
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()
Total running time of the script: ( 0 minutes 0.002 seconds)