Extractors module

Overview

The extractors module allows you to load BaseRecording, BaseSorting, and BaseEvent objects from a large variety of acquisition systems and spike sorting outputs.

Most of the Recording classes are implemented by wrapping the NEO rawio implementation.

Most of the Sorting are instead directly implemented in SpikeInterface.

Although SI is object-oriented (class-based), each object can also be loaded with a convenient read_XXXXX() function.

Read one Recording

Every format can be read with a simple function:

recording_oe = read_openephys("open-ephys-folder")

recording_spikeglx = read_spikeglx("spikeglx-folder")

recording_blackrock = read_blackrock("blackrock-folder")

recording_mearec = read_mearec("mearec_file.h5")

Importantly, some formats directly handle the probe information:

recording_spikeglx = read_spikeglx("spikeglx-folder")
print(recording_spikeglx.get_probe())

recording_mearec = read_mearec("mearec_file.h5")
print(recording_mearec.get_probe())

Read one Sorting

sorting_KS = read_kilosort("kilosort-folder")

Read one Event

events_OE = read_openephys_event("open-ephys-folder")

For a comprehensive list of compatible technologies, see Supported File Formats.

Lazy loading

An important concept is that all read_XXXX() functions are lazy. Traces are not read from the disk, but only the relevant metadata, like channel_ids, sampling frequency, etc.

The actual reading will be done on demand using the get_traces() method:

# open a 40GB SpikeGLX dataset is fast
recording_spikeglx = read_spikeglx("spikeglx-folder")

# this really does the full 40GB loading in memory : not recommended!!!!!
traces = recording_spikeglx.get_traces(start_frame=None, end_frame=None, return_scaled=False)

Supported File Formats

Currently, we support many popular file formats for both raw and sorted extracellular datasets. Given the standardized, modular design of our recording and sorting extractors, adding new file formats is straightforward so we expect this list to grow in future versions.

Most of format are supported on top on NEO

Dependencies

The neo package is a hard dependency of spiekinterface. So all formats handle by neo directly will be handled also in spikeinterface.

However, some format are handle directly by spikeinterface and need extra installation.

You can install all extractors dependeicies with:

pip install spikeinterface[extractor]

Raw Data Formats

For raw recording formats, we currently support:

Sorted Data Formats

For sorted data formats, we currently support:

Dealing with Non-Supported File Formats

With recording and sorting objects, we hope that any user can access SpikeInterface regardless of the nature of their underlying file format. If you feel like a non-supported file format should be included in SpikeInterface as an actual extractor, please open an issue.