24 SpikeInterface
SpikeInterface is a Python library for spike sorting and electrophysiological data analysis.
SpikeInterface can export the output of spike sorting to pynapple, allowing you to seamlessly integrate spike sorting results into your pynapple-based analysis pipeline:
import spikeinterface as si
from spikeinterface.exporters import to_pynapple_tsgroup
analyzer = si.load_sorting_analyzer("path/to/analyzer")
tsgroup = to_pynapple_tsgroup(
sorting_analyzer=analyzer,
attach_unit_metadata=True,
)