Neurodata Types

The precise rules for how to store different types of data and the associated metadata are defined using neurodata types. Different types of data have different neurodata types. Together, these neurodata type definitions form the NWB schema. The NWB schema defines over 60 different neurodata types, which cover the most common data types in extracellular electrophysiology, intracellular electrophysiology, optical physiology, and behavior.

Neurodata types act like classes in Object-Oriented Programming in that they can use inheritance (a neurodata type can be a specialized child of another neurodata type) and composition (a neurodata type can contain other neurodata types).

TimeSeries

The TimeSeries neurodata type defines how generic data values that change over time should be stored. In particular, the TimeSeries type must contain a description, an N-dimensional “data” dataset (array) where the first dimension is time, and either a 1-dimensional “timestamps” dataset or both a sampling rate and starting time.

The TimeSeries neurodata type is the base type for many other neurodata types, such as the ElectricalSeries for extracellular electrophysiology. ElectricalSeries inherits all of the properties of TimeSeries but additionally specifies that the “data” dataset must be 2-dimensional, where the second dimension is electrode, and it must contain an additional “electrodes” dataset with row indices into the “electrodes” table of the NWB file to indicate which electrodes correspond to the second dimension of the “data” dataset.

See also

For your reference, NWB defines the following main TimeSeries subtypes:

All time values in a TimeSeries and other neurodata types must be stored in seconds relative to the timestamps_reference_time value, a datetime value stored at the root of the NWB file. By default, this is the same as the session_start_time, another datetime value stored at the root of the NWB file.

DynamicTable

Tabular (table-like) data are stored in DynamicTable objects, which are column-based tables to which you can add custom columns.

Similar to TimeSeries, several neurodata types inherit from DynamicTable that are specialized for particular types of data and specify particular required or optional columns.

See also

For your reference, NWB defines the following main DynamicTable subtypes:

NWB is faced with the challenge of supporting a large variety of different experiment types, so the data types and relationships can get quite complex. For this reason, the NWB development team provides software to help users easily and efficiently read and write NWB files. These software packages are described in the next section.