List of implemented RawIO modules#

neo.rawio provides classes for reading electrophysiological data files with a low-level API

neo.rawio.rawiolist provides a list of successfully imported rawio classes.

Functions:

neo.rawio.get_rawio(filename_or_dirname, exclusive_rawio: bool = True)#

Return a neo.rawio class guess from file extension.

Parameters#

filename_or_dirnamestr | Path

The filename or directory name to check for file suffixes that can be read by Neo. This can also be used to check whether a rawio could read a not-yet written file

exclusive_rawio: bool, default: True

Whether to return a rawio if there is only one rawio capable of reading the file. If this doesn’t exist will return None. If set to False it will return all possible rawios organized by the most likely rawio.

Returns#

possibles: neo.RawIO | None | list[neo.RawIO]

If exclusive_rawio is True, returns the single RawIO that can read a file/set of files or None. If exclusive_rawio is False it will return all possible RawIOs (organized by most likely) that could read the file or files.

Classes:

class neo.rawio.AlphaOmegaRawIO(dirname='', lsx_files=None, prune_channels=True)#

AlphaOmega MPX file format 4 reader. Handles several segments. A segment is a continuous recording (when recording starts/stops). Only files in current dirname are loaded, subfolders are not explored.

Parameters#

dirname: str | Path

The folder from which the data will be loaded

lsx_files: list[str] | None, default: None

List of lsx files in dirname referencing mpx files to load (optional) If None all mpx files will be read

prune_channels: bool, default: True

If True removes the empty channels

Notes#

Because channels must be gathered into coherent streams, channels names must be the default channel names in AlphaRS or Alpha LAB SNR software.

extensions = ['lsx', 'mpx']#
class neo.rawio.AxographRawIO(filename, force_single_segment=False)#

RawIO class for reading AxoGraph files (.axgd, .axgx)

Parameters#

filename: str

File name of the AxoGraph file to read.

force_single_segment: bool, default: False

Episodic files are normally read as multi-Segment Neo objects. This parameter can force AxographRawIO to put all signals into a single Segment.

Examples#

>>> import neo
>>> reader = neo.rawio.AxographRawIO(filename=filename)
>>> reader.parse_header()
>>> print(reader)
>>> # get signals
>>> raw_chunk = reader.get_analogsignal_chunk(block_index=0,
...                                           seg_index=0,
...                                           i_start=0,
...                                           i_stop=1024,
...                                           channel_names=channel_names)
>>> float_chunk = r.rescale_signal_raw_to_float(raw_chunk,
...                                             dtype='float64',
...                                             channel_names=channel_names)
>>> print(float_chunk)
>>> # get event markers
>>> ev_raw_times, _, ev_labels = reader.get_event_timestamps(event_channel_index=0)
>>> ev_times = reader.rescale_event_timestamp(ev_raw_times, dtype='float64')
>>> print([ev for ev in zip(ev_times, ev_labels)])
>>> # get interval bars
>>> ep_raw_times, ep_raw_durations, ep_labels = reader.get_event_timestamps(event_channel_index=1)
>>> ep_times = reader.rescale_event_timestamp(ep_raw_times, dtype='float64')
>>> ep_durations = reader.rescale_epoch_duration(ep_raw_durations, dtype='float64')
>>> print([ep for ep in zip(ep_times, ep_durations, ep_labels)])
>>> # get notes
>>> print(reader.info['notes'])
>>> # get other miscellaneous info
>>> print(reader.info)
extensions = ['axgd', 'axgx', '']#
class neo.rawio.AxonaRawIO(filename)#

Class for reading raw, continuous data from the Axona dacqUSB system

Parameters#

filename: str

The name of the *.bin file containing the data

Notes#

http://space-memory-navigation.org/DacqUSBFileFormats.pdf

The raw data is saved in .bin binary files with an accompanying .set file about the recording setup (see the above manual for details).

Examples#

>>> import neo.rawio
>>> r = neo.rawio.AxonaRawIO(filename=os.path.join(dir_name, base_filename))
>>> r.parse_header()
>>> print(r)
>>> raw_chunk = r.get_analogsignal_chunk(block_index=0,
                                         seg_index=0,
                                         i_start=0,
                                         i_stop=1024,
                                         channel_names=channel_names)
>>> float_chunk = reader.rescale_signal_raw_to_float(raw_chunk,
                                                     dtype='float64',
                                                     channel_indexes=[0, 3, 6])
extensions = ['bin', 'set', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32']#
class neo.rawio.AxonRawIO(filename='')#

Class for Class for reading data from pCLAMP and AxoScope files (.abf version 1 and 2)

Parameters#

filename: str, default: ‘’

The *.abf file to be read

Notes#

This code is a port of abfload and abf2load written in Matlab (BSD-2-Clause licence) by Copyright (c) 2009, Forrest Collman, fcollman@princeton.edu Copyright (c) 2004, Harald Hentschke

Examples#

>>> import neo.rawio
>>> reader = neo.rawio.AxonRawIO(filename='mydata.abf')
>>> reader.parse_header()
>>> print(reader)
extensions = ['abf']#
class neo.rawio.BiocamRawIO(filename='')#

Class for reading data from a Biocam h5 file.

Parameters#

filename: str, default: ‘’

The *.h5 file to be read

Examples#

>>> import neo.rawio
>>> r = neo.rawio.BiocamRawIO(filename='biocam.h5')
>>> r.parse_header()
>>> print(r)
>>> raw_chunk = r.get_analogsignal_chunk(block_index=0,
                                         seg_index=0,
                                         i_start=0,
                                         i_stop=1024,
                                         channel_names=channel_names)
>>> float_chunk = r.rescale_signal_raw_to_float(raw_chunk,
                                                dtype='float64',
                                                channel_indexes=[0, 3, 6])
extensions = ['h5', 'brw']#
class neo.rawio.BlackrockRawIO(filename=None, nsx_override=None, nev_override=None, nsx_to_load=None, load_nev=True, verbose=False)#

Class for reading data in from a file set recorded by the Blackrock (Cerebus) recording system. Upon initialization, the class is linked to the available set of Blackrock files.

Parameters#

filename: str, default: ‘’

File name (without extension) of the set of Blackrock files to associate with. Any .nsX or .nev, .sif, or .ccf extensions are ignored when parsing this parameter.

nsx_override: str | None, default: None

File name of the .nsX files (without extension). If None, filename is used.

nev_override: str | None, default: None

File name of the .nev file (without extension). If None, filename is used.

nsx_to_load: int | list | ‘max’ | ‘all’ | None, default: None

IDs of nsX file from which to load data, e.g., if set to 5 only data from the ns5 file are loaded. If ‘all’, then all nsX will be loaded. Contrary to previous version of the IO (<0.7), nsx_to_load must be set at the init before parse_header().

load_nev: bool, default: True

Load (or not) events/spikes by ignoring or not the nev file.

Notes#

  • Note: This routine will handle files according to specification 2.1, 2.2,

2.3, 3.0 and 3.0-ptp. Recording pauses that may occur in file specifications 2.2 and 2.3 are automatically extracted and the data set is split into different segments.

  • The Blackrock data format consists not of a single file, but a set of

different files. This constructor associates itself with a set of files that constitute a common data set. By default, all files belonging to the file set have the same base name, but different extensions. However, by using the override parameters, individual filenames can be set.

Examples#

>>> import neo.rawio
>>> # Inspect a set of file consisting of files FileSpec2.3001.ns5 and FileSpec2.3001.nev
>>> reader = neo.rawio.BlackrockRawIO(filename='FileSpec2.3001', nsx_to_load=5)
>>> reader.parse_header()
>>> print(reader)
extensions = ['ns1', 'ns2', 'ns3', 'ns4', 'ns5', 'ns6', 'nev', 'sif', 'ccf']#
class neo.rawio.BrainVisionRawIO(filename='')#

Class for reading BrainVision files

Parameters#

filename: str, default: ‘’

The *.vhdr file to load

Examples#

>>> import neo.rawio
>>> reader = neo.rawio.BrainVisionRawIO(filename=data_filename)
extensions = ['vhdr']#
class neo.rawio.CedRawIO(filename='', take_ideal_sampling_rate=False)#

Class for reading data from CED (Cambridge Electronic Design) spike2.

Parameters#

filename: str, default: ‘’

The *.smr or *.smrx file to load

take_ideal_sampling_rate: bool, default: False

If true use the GetIdealRate function from sonpy package

Notes#

  • This internally uses the sonpy package which is closed source.

  • This IO reads smr and smrx files

extensions = ['smr', 'smrx']#
class neo.rawio.EDFRawIO(filename='')#

Class for reading European Data Format files (EDF and EDF+). Currently only continuous EDF+ files (EDF+C) and original EDF files (EDF) are supported

Parameters#

filename: str, default: ‘’

The EDF+C file or EDF file to be loaded

Examples#

>>> import neo.rawio
>>> r = neo.rawio.EDFRawIO(filename='file.edf')
>>> r.parse_header()
>>> print(r)
>>> raw_chunk = r.get_analogsignal_chunk(block_index=0,
                                         seg_index=0,
                                         i_start=0,
                                         i_stop=1024,
                                         stream_index=0,
                                         channel_indexes=range(10))
>>> float_chunk = reader.rescale_signal_raw_to_float(raw_chunk,
                                                     dtype='float64',
                                                     channel_indexes=[0, 3, 6])
extensions = ['edf']#
class neo.rawio.ElanRawIO(filename=None, entfile=None, posfile=None)#

Class for reading time-frequency EEG data maps from the Elan software

Parameters#

filename: str | None, default: None

The raw data to load (*.eeg)

entfile: str | None, default: None

The header file to load (*.eeg.ent)

posfile: str | None, deafult: None

The event file to load (*.eeg.pos)

Examples#

>>> import neo.rawio
>>> reader = neo.rawio.ElanRawIO(filename='data.eeg', entfile='header.eeg.ent', posfile='events.eeg.pos')
>>> reader.parse_header()
>>> print(reader)
extensions = ['eeg']#
class neo.rawio.IntanRawIO(filename='', ignore_integrity_checks=False)#

Class for reading rhd and rhs Intan data

Parameters#

filename: str, default: ‘’

name of the ‘rhd’ or ‘rhs’ data/header file

ignore_integrity_checks: bool, default: False

If True, data that violates integrity assumptions will be loaded. At the moment the only integrity check we perform is that timestamps are continuous. Setting this to True will ignore this check and set the attribute discontinuous_timestamps to True if the timestamps are not continous. This attribute can be checked after parsing the header to see if the timestamps are continuous or not.

Notes#

  • The Intan reader can handle two file formats ‘rhd’ and ‘rhs’. It will automatically

check for the file extension and will gather the header information based on the extension. Additionally it functions with RHS v 1.0 and v 3.x and RHD 1.0, 1.1, 1.2, 1.3, 2.0, 3.x files.

  • The Intan reader can also handle the headerless binary formats ‘one-file-per-signal’ and

‘one-file-per-channel’ which have a header file called ‘info.rhd’ or ‘info.rhs’ and a series of binary files with the ‘.dat’ suffix

  • The reader can handle three file formats ‘header-attached’, ‘one-file-per-signal’ and

‘one-file-per-channel’.

  • Intan files contain amplifier channels labeled ‘A’, ‘B’ ‘C’ or ‘D’

depending on the port in which they were recorded along with the following additional streams. 0: ‘RHD2000’ amplifier channel 1: ‘RHD2000 auxiliary input channel’, 2: ‘RHD2000 supply voltage channel’, 3: ‘USB board ADC input channel’, 4: ‘USB board digital input channel’, 5: ‘USB board digital output channel’

And for RHS:

0: ‘RHS2000 amplfier channel’ 3: ‘USB board ADC input channel’, 4: ‘USB board ADC output channel’, 5: ‘USB board digital input channel’, 6: ‘USB board digital output channel’, 10: ‘DC Amplifier channel’, 11: ‘Stim channel’,

  • For the “header-attached” and “one-file-per-signal” formats, the structure of the digital input and output channels is

one long vector, which must be post-processed to extract individual digital channel information. See the intantech website for more information on performing this post-processing.

Examples#

>>> import neo.rawio
>>> # for a header-attached file
>>> reader = neo.rawio.IntanRawIO(filename='data.rhd')
>>> # for the other formats we point to the info.rhd
>>> reader = neo.rawioIntanRawIO(filename='info.rhd')
>>> reader.parse_header()
>>> raw_chunk = reader.get_analogsignal_chunk(block_index=0,
                                              seg_index=0
                                              stream_index=0)
>>> float_chunk = reader.rescale_signal_raw_to_float(raw_chunk, stream_index=0)
extensions = ['rhd', 'rhs', 'dat']#
class neo.rawio.MaxwellRawIO(filename='', rec_name=None)#

Class for reading MaxOne or MaxTwo files.

Parameters#

filename: str, default: ‘’

The *.h5 file to be loaded

rec_name: str | None, default: None

If the file has multiple recordings, specify the one to read. For 24-well plates, the rec_name needs to be specified since different well rows generate different recording ids. E.g., rec0001, rec0002, etc.

extensions = ['h5']#
class neo.rawio.MedRawIO(dirname=None, password=None, keep_original_times=False, **kargs)#

Class for reading MED (Multiscale Electrophysiology Data) Format.

Uses the dhn-med-py MED python package (version >= 1.0.0), created by Dark Horse Neuro, Inc. and medformat.org.

Parameters#

dirname: str | Path | None, default: None

The folder containing the data files to load

password: str | None, default: None

The password for the Med session

keep_original_times: bool, default: False

If True UTC timestamps are used and returned as seconds referenced to midnight 1 Jan 1970 If False timestamps are referenced to the beginning of the session with the beginning being 0

Notes#

Currently reads the entire MED session. Every discontinuity is considered to be a new segment. Channels are grouped by sampling frequency, to create streams. In MED all channels will line up time-wise, so streams will span the entire recording, and continuous sections of those streams are divided up into segments.

extensions = ['medd', 'rdat', 'ridx']#
class neo.rawio.MEArecRawIO(filename='', load_spiketrains=True, load_analogsignal=True)#

Class for “reading” simulated data from a MEArec file.

Parameters#

filenamestr, default: ‘’

The filename of the MEArec file to read.

load_spiketrainsbool, default: True

Whether or not to load spike train data.

load_analogsignalbool, default: True

Whether or not to load continuous recording data.

Examples#

>>> import neo.rawio
>>> r = neo.rawio.MEArecRawIO(filename='mearec.h5', load_spiketrains=True)
>>> r.parse_header()
>>> print(r)
>>> raw_chunk = r.get_analogsignal_chunk(block_index=0,
                                         seg_index=0,
                                         i_start=0,
                                         i_stop=1024,
                                         channel_names=channel_names)
>>> float_chunk = reader.rescale_signal_raw_to_float(raw_chunk,
                                                    dtype='float64',
                                                    channel_indexes=[0, 3, 6])
>>> spike_timestamp = reader.spike_timestamps(unit_index=0, t_start=None, t_stop=None)
>>> spike_times = reader.rescale_spike_timestamp(spike_timestamp, 'float64')
extensions = ['h5']#
class neo.rawio.MicromedRawIO(filename='')#

Class for reading data from micromed (.trc).

Parameters#

filename: str, default: None

The *.trc file to be loaded

extensions = ['trc', 'TRC']#
class neo.rawio.NeuralynxRawIO(dirname='', include_filenames=None, exclude_filenames=None, keep_original_times=False, strict_gap_mode=True, filename=None, exclude_filename=None, **kargs)#

Class for reading datasets recorded by Neuralynx.

This version works with rawmode of one-dir for a single directory of files or one-file for a single file.

Parameters#

dirname: str, default: ‘’

Name of directory containing all files for a dataset. If provided, filename is ignored. But one of either dirname or filename is required.

include_filenames: str | list | None, default: None

Name of a single ncs, nse, nev or ntt file or list of such files. Will only include file names in the list. This can be plain filenames or fullpath or path relative to dirname. All files should be in a single path.

exclude_filenames: str | list | None, default: None

Name of a single ncs, nse, nev or ntt file or list of such files. Expects plain filenames (without directory path). None will search for all file types

keep_original_times: bool, default: False

If True, keep original start time as in files, Otherwise set 0 of time to first time in dataset

strict_gap_mode: bool, default: True
Detect gaps using strict mode or not.
  • strict_gap_mode = True then a gap is consider when timstamp difference between two consequtive data packet is more than one sample interval.

  • strict_gap_mode = False then a gap has an increased tolerance. Some new system with different clock need this option otherwise, too many gaps are detected

Notes#

  • This IO supports NCS, NEV, NSE and NTT file formats (not NVT or NRD yet)

  • These variations of header format and possible differences between the stated sampling frequency and actual sampling frequency can create apparent time discrepancies in .Ncs files. Additionally, the Neuralynx recording software can start and stop recording while continuing to write samples to a single .Ncs file, which creates larger gaps in the time sequences of the samples.

  • This RawIO attempts to correct for these deviations where possible and present a single section of contiguous samples with one sampling frequency, t_start, and length for each .Ncs file. These sections are determined by the NcsSectionsFactory class. In the event the gaps are larger, this RawIO only provides the samples from the first section as belonging to one Segment.

Examples#

>>> import neo.rawio
>>> reader = neo.rawio.NeuralynxRawIO(dirname='Cheetah_v5.5.1/original_data')
>>> reader.parse_header()

Inspect all files in the directory.

>>> print(reader)

Display all information about signal channels, units, segment size….

extensions = ['nse', 'ncs', 'nev', 'ntt', 'nvt', 'nrd']#
class neo.rawio.NeuroExplorerRawIO(filename='')#
extensions = ['nex']#
class neo.rawio.NeuroNexusRawIO(filename: str | Path = '')#
class neo.rawio.NeuroScopeRawIO(filename, binary_file=None)#
extensions = ['xml', 'dat', 'lfp', 'eeg']#
class neo.rawio.NIXRawIO(filename='')#

Class for reading NIX files

Parameters#

filename: str, default: ‘’

The nix file to be load

Notes#

Requires the nixio package to be installed

extensions = ['nix', 'h5']#
class neo.rawio.OpenEphysRawIO(dirname='', ignore_timestamps_errors=None, fill_gap_value=0)#

Class for reading openephys data

Parameters#

dirname: str

The directory where the files are stored.

ignore_timestamps_errors: bool

(deprecated) This parameter is not used anymore.

fill_gap_value: int

When gaps are detected in continuous files, the gap is filled with this value. Default is 0.

Notes#

OpenEphys GUI software offers several data formats, see https://open-ephys.atlassian.net/wiki/spaces/OEW/pages/491632/Data+format

This class implements the legacy OpenEphys format here https://open-ephys.atlassian.net/wiki/spaces/OEW/pages/65667092/Open+Ephys+format

The OpenEphys group already proposes some tools here: open-ephys/analysis-tools but (i) there is no package at PyPI and (ii) those tools read everything in memory.

The format is directory based with several files:
  • .continuous

  • .events

  • .spikes

This implementation is based on:
  • this code open-ephys/analysis-tools written by Dan Denman and Josh Siegle

  • a previous PR by Cristian Tatarau at Charité Berlin

In contrast to previous code for reading this format, here all data use memmap so it should be super fast and light compared to legacy code.

When the acquisition is stopped and restarted then files are named *_2, *_3. In that case this class creates a new Segment. Note that timestamps are reset in this situation.

Limitation :
  • Works only if all continuous channels have the same sampling rate, which is a reasonable hypothesis.

  • A recording can contain gaps due to USB stream loss when high CPU load when recording. These gaps are checked channel per channel which makes the parse_header() slow. If gaps are detected then they are filled with zeros but then the reading will be much slower for getting signals.

extensions = ['continuous', 'openephys', 'spikes', 'events', 'xml']#
class neo.rawio.OpenEphysBinaryRawIO(dirname='', load_sync_channel=False, experiment_names=None)#

Handle several Blocks and several Segments.

Parameters#

dirnamestr

Path to Open Ephys directory

load_sync_channelbool

If False (default) and a SYNC channel is present (e.g. Neuropixels), this is not loaded. If True, the SYNC channel is loaded and can be accessed in the analog signals.

experiment_namesstr or list or None

If multiple experiments are available, this argument allows users to select one or more experiments. If None, all experiements are loaded as blocks. E.g. experiment_names=”experiment2”, experiment_names=[“experiment1”, “experiment2”]

Note#

For multi-experiment datasets, the streams need to be consistent across experiments. If this is not the case, you can select a subset of experiments with the experiment_names argument.

# Correspondencies Neo OpenEphys block[n-1] experiment[n] New device start/stop segment[s-1] recording[s] New recording start/stop

This IO handles several signal streams. Special event (npy) data are represented as array_annotations. The current implementation does not handle spiking data, this will be added upon user request

extensions = ['xml', 'oebin', 'txt', 'dat', 'npy']#
class neo.rawio.PhyRawIO(dirname='', load_amplitudes=False, load_pcs=False)#

Class for reading Phy data.

Parameters#

dirname: str | Path, default: ‘’

The dirname containing the phy data (.npy, .mat, .tsv. & .dat files)

load_amplitudes: bool, default: False

Whether to load the amplitude data

load_pcs: bool, default: False

Whether to load the pcs feature files (these are relatively big files)

Examples#

>>> import neo.rawio
>>> r = neo.rawio.PhyRawIO(dirname='/dir/to/phy/folder')
>>> r.parse_header()
>>> print(r)
>>> spike_timestamp = r.get_spike_timestamps(block_index=0,
                                             seg_index=0,
                                             spike_channel_index=0,
                                             t_start=None,
                                             t_stop=None)
>>> spike_times = r.rescale_spike_timestamp(spike_timestamp, dtype='float64')
extensions = ['npy', 'mat', 'tsv', 'dat']#
class neo.rawio.PlexonRawIO(filename='', progress_bar=True)#
extensions = ['plx']#
class neo.rawio.Plexon2RawIO(filename, pl2_dll_file_path=None, reading_attempts=25)#

Class for “reading” data from a PL2 file

Parameters#

filename: str | Path

The *.pl2 file to be loaded

pl2_dll_file_path: str | Path | None, default: None

The path to the necessary dll for loading pl2 files If None will find correct dll for architecture and if it does not exist will download it

reading_attempts: int, default: 25

Number of attempts to read the file before raising an error This opening process is somewhat unreliable and might fail occasionally. Adjust this higher if you encounter problems in opening the file.

Notes#

  • This IO is only partially lazy

  • The IO only considers enabled channels and will not list disabled channels in its header.

  • There is no 1-1 correspondence of PL2 spike channels and neo spike channels as each unit of a PL2 spike channel will be represented as an individual neo spike channel.

Examples#

>>> import neo.rawio
>>> r = neo.rawio.Plexon2RawIO(filename='my_data.pl2')
>>> r.parse_header()
>>> print(r)
>>> raw_chunk = r.get_analogsignal_chunk(block_index=0,
                                         seg_index=0,
                                         i_start=0,
                                         i_stop=1024,
                                         stream_index=0,
                                         channel_indexes=range(10))
>>> float_chunk = r.rescale_signal_raw_to_float(raw_chunk,
                                                dtype='float64',
                                                stream_index=0,
                                                channel_indexes=[0, 3, 6])
>>> spike_timestamp = r.get_spike_timestamps(spike_channel_index=0,
                                             t_start=None,
                                             t_stop=None)
>>> spike_times = r.rescale_spike_timestamp(spike_timestamp, dtype='float64')
>>> ev_timestamps, _, ev_labels = r.get_event_timestamps(event_channel_index=0)
extensions = ['pl2']#
class neo.rawio.RawBinarySignalRawIO(filename='', dtype='int16', sampling_rate=10000.0, nb_channel=2, signal_gain=1.0, signal_offset=0.0, bytesoffset=0)#

Class for reading raw binary files with user specified values Parameters ———- filename: str, default: ‘’

The *.raw, *.bin, or *.dat binary file to load

dtype: np.dtype, default: ‘int16’

The dtype that the data is stored with. Must be acceptable by the numpy.dtype constructor

sampling_rate: float, default: 10000.0

The sampling rate of the file

nb_channel: int, default: 2

The number of channels for the file

signal_gain: float, default: 1.0

The gain for the signal in the binary file

signal_offset: float, default: 0.0

The offset for the signal in the binary file

bytesoffset: int: 0

The offset for the bytes

extensions = ['raw', 'bin', 'dat']#
class neo.rawio.RawMCSRawIO(filename='')#

Class for reading an mcs file converted by the MC_DataToo binary converter

Parameters#

filename: str, default: ‘’

The *.raw MCS file to be loaded

extensions = ['raw']#
class neo.rawio.Spike2RawIO(filename='', take_ideal_sampling_rate=False, ced_units=True, try_signal_grouping=True)#

This implementation in neo reads only old smr files. For smrx files you need to use CedRawIO which is based on sonpy.

Parameters#

filename: str, default: ‘’

The *.smr file to be loaded

take_ideal_sampling_rate: bool, default: False

If True takes the ideal_rate from info

ced_units: bool, default: True

If True uses the ced unit ids

try_signal_grouping: bool, default: True

If True will attempt to group signals together

extensions = ['smr']#
class neo.rawio.SpikeGadgetsRawIO(filename='', selected_streams=None)#
extensions = ['rec']#
class neo.rawio.SpikeGLXRawIO(dirname='', load_sync_channel=False, load_channel_location=False)#

Class for reading data from a SpikeGLX system

Parameters#

dirname: str, default: ‘’

The spikeglx folder containing meta/bin files

load_sync_channel: bool, default: False

The last channel (SY0) of each stream is a fake channel used for synchronisation

load_channel_location: bool, default: False

If True probeinterface is used to load the channel locations from the directory

Notes#

  • Contrary to other implementations this IO reads the entire folder and subfolders and: deals with several segments based on the _gt0, _gt1, _gt2, etc postfixes deals with all signals “imec0”, “imec1” for neuropixel probes and also external signal like”nidq”. This is the “device”

  • For imec device both “ap” and “lf” are extracted so one device have several “streams”

  • There are several versions depending the neuropixel probe generation (1.x/2.x/3.x)

  • Here, we assume that the meta file has the same structure across all generations.

  • This IO is developed based on neuropixel generation 2.0, single shank recordings.

Examples#

>>> import neo.rawio
>>> reader = neo.rawio.SpikeGLXRawIO(dirname='path/to/data/')
>>> reader.parse_header()
>>> print(reader)
>>> raw_chunk = reader.get_analogsignal_chunk(block_index=0,
                                              seg_index=0,
                                              i_start=None,
                                              i_stop=None,
                                              stream_index=0)
extensions = ['meta', 'bin']#
class neo.rawio.TdtRawIO(dirname='', sortname='')#
extensions = ['tbk', 'tdx', 'tev', 'tin', 'tnt', 'tsq', 'sev', 'txt']#
class neo.rawio.WinEdrRawIO(filename='')#
extensions = ['EDR', 'edr']#
class neo.rawio.WinWcpRawIO(filename='')#

Class for reading WinWCP data

Parameters#

filename: str, default: ‘’

The *.wcp file to load

extensions = ['wcp']#