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:
AlphaOmega
read_alphaomega()
Axona
read_axona()
BlackRock
read_blackrock()
Binary
read_binary()
Biocam HDF5
read_biocam()
CED
read_ced()
EDF
read_edf()
IBL streaming
read_ibl_streaming_recording()
Intan
read_intan()
MaxWell
read_maxwell()
MCS H5
read_mcsh5()
MCS RAW
read_mcsraw()
MEArec
read_mearec()
Mountainsort MDA
read_mda_recording()
Neurodata Without Borders
read_nwb_recording()
Neuroscope
read_neuroscope_recording()
NIX
read_nix()
Neuralynx
read_neuralynx()
Open Ephys Legacy
read_openephys()
Open Ephys Binary
read_openephys()
Plexon
read_plexon()
Shybrid
read_shybrid_recording()
SpikeGLX
read_spikeglx()
SpikeGLX IBL compressed
read_cbin_ibl()
SpikeGLX IBL stream
read_streaming_ibl()
Spike 2
read_spike2()
TDT
read_tdt()
Zarr
read_zarr()
Sorted Data Formats¶
For sorted data formats, we currently support:
BlackRock
read_blackrock_sorting()
Combinato
read_combinato()
Cell explorer
read_cellexplorer()
HerdingSpikes2
read_herdingspikes()
HDsort
read_hdsort()
Kilosort1/2/2.5/3
read_kilosort()
Klusta
read_klusta()
MClust
read_mclust()
MEArec
read_mearec()
Mountainsort MDA
read_mda_sorting()
Neurodata Without Borders
read_nwb_sorting()
Neuroscope
read_neuroscope_sorting()
Neuralynx spikes
read_neuralynx_sorting()
NPZ (created by SpikeInterface)
read_npz_sorting()
Plexon spikes
read_plexon_sorting()
Shybrid
read_shybrid_sorting()
Spyking Circus
read_spykingcircus()
Trideclous
read_tridesclous()
Wave Clus
read_waveclus()
YASS
read_yass()
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.