Windows, Linux, macOS
Aarón Cuevas López, Pavel Kulik, Josh Siegle
NWB is a widely used format for sharing data among neuroscience labs.
Data is stored in a single HDF5 file with self-documenting internal structure.
HDF5 files must be closed gracefully, so data may be irrecoverable if the GUI crashes during acquisition.
The HDF5 C++ library is not thread-safe, so you cannot write to the NWB format from multiple Record Nodes simultaneously.
Within a Record Node directory, data for each experiment (stop/start acquisition) is contained in a separate NWB file. Individual recordings are appended to datasets stored inside the “acquisition” group.
Each NWB file also contains the following information:
/file_create_date: date + time in ISO format (text array)
/identifier: string identifier for this file (text array)
/nwb_version: ‘2.4.0’ (text attribute)
/session_start_time: date + time in ISO format (text array)
Continuous data is grouped by stream (a block of synchronously sampled channels):
Each continuous group is an NWB ElectricalSeries containing the following datasets:
data: N channels x M samples of 16-bit integers. The
channel_conversiondataset stores the “bitVolts” value required to convert these values into volts.
timestamps: M 64-bit floats representing the timestamps (in seconds) for each sample.
Event data is organized by stream and event channel (eusually named
TTL). Each event channel can contain data for multiple TTL lines.
Each events group is an NWB TimeSeries containing the following datasets:
timestamps: N 64-bit float representing the timestamps (in seconds) for each event
data: N event codes indicating ON (+CH_number) and OFF (-CH_number) states
full_words: N 64-bit integers representing the state of the first 64 TTL lines when each event occurred.
Spike data is organized by stream and electrode.
Each spikes group is an NWB SpikeEventSeries containing the following datasets:
data: array with dimensions S spikes x N channels x M samples containing the spike waveforms. The
channel_conversionattribute stores the “bitVolts” value required to convert these values into microvolts (headstage channels) or volts (ADC channels).
timestamps: S 64-bit floats containing the timestamps (in seconds) corresponding to the peak time of each spike.
Reading data in Python#
Sessionobject using the open-ephys-python-tools package. The data format will be automatically detected.
Reading data in Matlab#
Use the open-ephys-matlab-tools <open-ephys/open-ephys-matlab-tools>`__ library.
NWB files written by the Open Ephys GUI are not currently compatible with the
MatNWB library. We are working on a fix!