SpikeInterface

Contents:

  • Overview
  • Getting started
  • Tutorials
    • Updating from legacy
    • Core tutorials
    • Extractors tutorials
    • Quality metrics tutorial
    • Comparison tutorial
    • Widgets tutorials
      • RecordingExtractor Widgets Gallery
        • plot_traces()
        • plot_electrode_geometry()
      • SortingExtractor Widgets Gallery
      • Waveforms Widgets Gallery
      • Peaks Widgets Gallery
  • How to Guides
  • Modules documentation
  • API
  • Development
  • Release notes
  • Contact Us
  • How to Cite
SpikeInterface
  • Tutorials
  • RecordingExtractor Widgets Gallery
  • View page source

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

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_traces()¶

w_ts = sw.plot_traces(recording)
plot 1 rec gallery

We can select time range

w_ts1 = sw.plot_traces(recording, time_range=(5, 8))
plot 1 rec gallery

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_traces(recording2, time_range=(5, 8), color_groups=True)
plot 1 rec gallery

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")
Text(0, 0.5, 'Channel_ids')

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

w_ts = sw.plot_traces(recording, mode="map", time_range=(5, 8), show_channel_ids=True, order_channel_by_depth=True)
plot 1 rec gallery

plot_electrode_geometry()¶

w_el = sw.plot_probe_map(recording)


plt.show()
plot 1 rec gallery

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

Download Jupyter notebook: plot_1_rec_gallery.ipynb

Download Python source code: plot_1_rec_gallery.py

Download zipped: plot_1_rec_gallery.zip

Gallery generated by Sphinx-Gallery

Previous Next

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

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