Data Elements
These pages contain information about data types produced by Data Source Operators.
DataFrames
Data Source Operators produce a sequence of DataFrame or
BufferedDataFrame elements. Both types carry the same
fields; the difference is that a DataFrame holds a single device sample per
field, while a BufferedDataFrame holds an array of samples. Each frame
contains:
- Clock: a system-wide synchronized clock
count that can be related to the
Clockof any other data frame collected within the same ONIX Context. - HubClock: a hardware timestamp generated by the local clock on the device's host hardware (for instance the oscillator on a headstage).
- The device data payload, e.g. a set of analog voltage samples like
AnalogData within the
AnalogInputDataFrame.
Using DataFrame type information
The data element pages also document the type and size of each property. This is useful in a few ways:
Estimating data rates. Multiply the per-sample byte count of all properties by the device sample rate to get throughput in bytes per second. For example, a single NeuropixelsV2eData stream produces 384 channels of
ushort(2 bytes each) plus two 8-byte clock fields at 30 kHz, giving roughly 23.5 MB/s.\[ \begin{equation} \frac{2*384+8+8\,bytes}{sample}*\frac{30,000\,samples}{s}*\frac{1\,MB}{10^6bytes} = 23.52\,MB/s \label{eq:1x_npx2_bw} \end{equation} \]Operator compatibility in Bonsai. Bonsai operators accept only specific types as inputs. If a connection between two nodes produces a type mismatch, Bonsai will indicate an error. Knowing a property's type helps diagnose these errors and choose the correct downstream operator.
Loading raw binary files. If data was saved with MatrixWriter, the property type determines the correct NumPy dtype to use when reading the file back. For example, a
Clockproperty saved asulongrequiresdtype=np.uint64when loading.Tip
The DataFrameWriter includes all frame type information within the file it writes, so the user does not need to worry about knowing the exact type of each property. See the tutorial for details on its use.
Other data elements
Aside from DataFrames, OpenEphys.Onix1 operators produce:
- ContextTask: an object passed through the configuration chain for writing to and reading from the ONIX hardware.
- OutputClockParameters: the parameters used to configure the precise hardware output clock when the workflow starts.