SpikeInterface
0.98.0

Contents:

  • Overview
  • Installation
  • Modules documentation
  • How to guides
  • Modules example gallery
    • Core tutorials
    • Extractors tutorials
    • Quality metrics tutorial
    • Comparison tutorial
    • Widgets tutorials
      • Core tutorials
      • Extractors tutorials
      • Quality metrics tutorial
      • Comparison tutorial
      • Widgets tutorials
        • RecordingExtractor Widgets Gallery
        • SortingExtractor Widgets Gallery
        • Waveforms Widgets Gallery
        • Peaks Widgets Gallery
  • Installing Spike Sorters
  • Viewers
  • Development
  • API
  • Release notes
  • Contact Us
SpikeInterface
  • Modules example gallery
  • Widgets tutorials
  • RecordingExtractor Widgets Gallery
  • Edit on GitHub

Note

Go to the end to download the full example code

RecordingExtractor Widgets Gallery¶

Here is a gallery of all the available widgets using RecordingExtractor 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_1_rec_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=10, num_channels=4, seed=0, num_segments=1)

plot_timeseries()¶

w_ts = sw.plot_timeseries(recording)

We can select time range

w_ts1 = sw.plot_timeseries(recording, time_range=(5, 8))

We can color with groups

recording2 = recording.clone()
recording2.set_channel_groups(channel_ids=recording.get_channel_ids(), groups=[0, 0, 1, 1])
w_ts2 = sw.plot_timeseries(recording2, time_range=(5, 8), color_groups=True)

Note: each function returns a widget object, which allows to access the figure and axis.

w_ts.figure.suptitle("Recording by group")
w_ts.ax.set_ylabel("Channel_ids")

We can also use the ‘map’ mode useful for high channel count

w_ts = sw.plot_timeseries(recording, mode='map', time_range=(5, 8),
        show_channel_ids=True, order_channel_by_depth=True)

plot_electrode_geometry()¶

w_el = sw.plot_probe_map(recording)


plt.show()

Total running time of the script: ( 0 minutes 0.002 seconds)

Download Python source code: plot_1_rec_gallery.py

Download Jupyter notebook: plot_1_rec_gallery.ipynb

Gallery generated by Sphinx-Gallery

Previous Next

© Copyright 2022, Alessio Paolo Buccino, Samuel Garcia, Cole Hurwitz, Jeremy Magland, Matthias Hennig. Revision 14361073.

Built with Sphinx using a theme provided by Read the Docs.