EegChunk
A batch of decoded samples from one stream packet — the efficient public unit (one object per packet, not per sample). Channel labels + srate travel with the data so consumers never reconstruct layout by hand.
IMU values are in the physical units the BrainAccess C/Python SDK delivers — the conversion from the wire's raw counts is per hardware generation (DeviceHardware); an EegChunk never carries counts.
Constructors
Properties
flat [sampleCount * 3] accelerometer x/y/z in m/s², or null when the hardware has no accelerometer (HALO V1/V2). One reading per packet, repeated on each sample.
per-active-channel electrode contact (length == channels.size); false = not connected.
per-sample level of the headset's digital input (length == sampleCount; ADS chip 0's GPIO1, sampled with each conversion; firmware 3.8.1+), when the stream was started with digitalInput = true; null otherwise. Gap-filled samples read false: nothing is known of a lost sample's input.
device sample counter of the first sample (gaps detectable).
flat [sampleCount * 3] gyroscope x/y/z in degrees per second, or null when the hardware has no gyroscope (every board before the V3 generation).
host monotonic clock at receipt (for sync/LSL).
per-sample gap-fill marker (length == sampleCount).
length of the BLE notification payload this chunk was decoded from.
flat [sampleCount * channels.size], row-major, µV — or, in impedance mode, device-computed electrode impedance in kΩ (one value per sample; NOT a raw ADC count).
the rate the device streams at: DeviceConfig.deviceSrate, which in an impedance mode too slow for the configured rate is 250 Hz.
the packet footer's device sample counter (unsigned 32-bit LE at packetBytes - 5), exactly as received — never gap-filled, never relabeled; -1 if the packet carried no counter. A value BELOW the previous chunk's marks a late/out-of-order packet: the codec appends that packet's samples at the current cursor, so firstSampleIndex keeps climbing and cannot reveal the reorder — only this raw counter can.