This document defines the latest CSV specification for the Emteq DAB CSV specification.
Please observe the #Format/Version when parsing CSV data.
The specification is actively being updated and changes can be identified in the chapter Format Revisions.
#
prefix on comment-lines (See Meta-Data Comments),
separated data for all areas of document#Format/Version,CSV1.0.0
as the first line of the fileLF
(MS-DOS CR+LF
prior to CSV1.0.7)UpperCamelCase/
.lowerCamelCase
/
class-module scopesModule/Class
or Module/Class/Subclass
etc..
for referencing member fieldModule/Class.firstMember
[]
postfix for Array of dataModule/Class.valueArray[],0,1,2,3,4,5,6,7
{}
postfix for Key-Value dataModule/Class.valueArray{},valueA,0,valueB,1,valueC,2
This chapter contains examples for each formatting rule.
#Format/Version,CSV1.0.0
#Device/Version.serialId,DAB6N0tqTM5OVMgICA4KiEQ/w
#Imu/Version{},firmware,3.017,bootloader,21,accelerometer,251,magnetometer,50,gyroscope,15
#Emg/Properties.ids[],RightFrontalis,RightZygomaticus,...,LeftFrontalis
Frame#,Time,Faceplate/FaceState,Faceplate/FitState
123,0.01052,1,1,4,4,0,0,35078,1247797,31721
This chapter contains detail about all CSV Meta-Data
Comment-lines are used to store Meta-Data
thatdescribes how to use the contained CSV Data
Version of the CSV specification which the data file is based upon
e.g. #Format/Version,CSV1.0.3
Deprecation flag for a CSV class means that the data is not intended to be supported in future specification or has been replaced.
Please observe the #Format/Version when parsing CSV data. Developers should prepare to migrate away from use of deprecated classes as they will be removed in a future/next revision of the specification.
e.g. #Format/Deprecate,Imu/*
indicates the all of Imu/
types are planned for removal.
See the change-log and respective class specific data documentation for details
Application that generated this CSV file as a Name and Version pair
e.g. #File/Generator,dab2csv,v0.4.0
Generator setting for whether all measurement data is to be normalised'.
e.g. #File/Normalised,YES
When a file is ‘Normalised' the data will have been pre-scaled to the output unit specified in {Measurement}/Properties
Disk-space requirement is significantly increased when converting data to Normalise-CSV format
Source DAB filename from which the CSV was converted from
e.g. #File/Source,recording_2020_01_02_1230.dab
When using dab2csv
this field can only be populated if the filename is provided on the command line. i.e. This field is omitted when stdin
pipe is used.
Binary communications protocol revision that the Emteq DAB device supports. This must be compatible with the tool used to generate the data-file.
e.g. #Protocol/Version,MASK.1.3
Current dab2csv is only backwards-compatible and must be updated to convert more recent protocol revision data.
Developer/diagnostic log message with generic content. Some common messages:
The EMG device failed to read a number of measurements. This can be caused by:
Creator of measurement data as Name and Value pair
e.g. #Stream/Generator,Dab,v0.6.2
Beginning of Emteq DAB power-on-self-test (POST)
Indicates the result of power-on-self-test (POST)
The revision of application firmware that is running on the Emteq DAB device that generated this data file.
e.g. #Firmware/Build.buildTag,v0.4.6-0
The revision of bootloader firmware that is running on the Emteq DAB device.
e.g. #Firmware/Bootloader.buildTag,v1.8.0
The unique hardware device indicator that identifies the Emteq DAB device embedded inside your Emteq headset.
e.g. #Device/Version.serialId,DABqWeRtYuIoPaSd123/w
This should be included in support communications as provides a means to identify the device that any issues are related too.
The hardware revision of the Emteq DAB board this data file was created from.
This information is required when performing firmware updates to ensure that the application is compatible with the device revision.
The unique identifier for the flexible-mask faceplate that is attached to the Emteq DAB device.
e.g. #Faceplate/Version.serial,oQwErTyUiO
The hardware revision of the flexible-mask faceplate that is attached to the Emteq DAB device.
This may not be populated for early-production devices
Hardware device model which is used for EMG acquisition. The model may have specific measurement characteristics which may be published if/as these are determined by Emteq.
The number of EMG channels that are collected in this data file.
e.g. #Emg/Properties.sensorCount,7
Method of skin-contact that is in-use. The current modes are:
Underlying hardware data-acquisition rate of EMG data.
CSV data is unprocessed by default and a scalar can be applied to produce normalised measurement in the specified unit.
e.g. #Emg/Properties.rawToVoltageDivisor,25165824.0,volt
#File/Normalised of YES indicates the scalar conversion is intrinsically applied to the data
This scalar may be used to convert Emg/Raw, Emg/Filtered, and Emg/Amplitude values as volts
volts = raw / rawToVoltageDivisor
CSV data is unprocessed by default and a scalar can be applied to produce normalised measurement in the specified unit.
e.g. #Emg/Properties.contactToImpedanceDivisor,0.5,ohm
#File/Normalised of YES indicates the scalar conversion is intrinsically applied to the data
This scalar may be used to convert Emg/Contact to Impedance as Ohms
ohms = contact / contactToImpedanceDivisor
Primary-muscle location of each Emg electrode.
Order and assignment of Leads may change based on hardware version or manual electrode positioning (specific hardware versions).
It is highly recommended that:
Emg/Raw[0]
is data from the first primary-muscle identifier.Face-location of each Emg electrode.
This data is not yet defined/populated on any current Firmware
Emteq internal information about the Factory-Calibration status of the device
Emteq internal information about the Factory-Calibration status of the device
The output-rate of the respective Emg data.
This applies to all data after this point in the data file but may be overridden by subsequent changes.
As the data-rate may be configured by the application on the Host computer either:
A) Avoid changing the setting during data-capture
B) ensure that the data-rate change is processed when it occurs mid-recording
#Imu/
is deprecated as of CSV1.0.5
, removed in CSV1.1.x
See #Accelerometer/Properties.rawDivisor
See #Magnetometer/Properties.rawDivisor
See #Gyroscope/Properties.rawDivisor
See #Accelerometer/Properties.hertzMax
See #Magnetometer/Properties.hertzMax
See #Gyroscope/Properties.hertzMax
See #Accelerometer/Config.hertz
See #Magnetometer/Config.hertz
Hardware device model.
e.g. #Magnetometer/Version.model,Bno055
The model may have specific measurement characteristics which may be published if/as these are determined by Emteq.
Maximum configurable data-acquisition rate.
v0.6.x firmware does not provide full configurability of IMU data rate.
CSV data is unprocessed by default and a scalar can be applied to produce normalised measurement in the specified unit.
The scalar divisor used to convert raw Accelerometer values to m/s^2
e.g. mss = accRaw / accelerationDivisor
Origin of sensor-data calibration information.
Source | Value | Condition |
---|---|---|
None | 0 | No calibration source |
Factory | 1 | Calibration is applied from factory |
Staged | 2 | Calibration is determined by initiating a staged procedure being performed e.g. Accelerometer places stable on all 6-sides. |
Online | 3 | Calibration is determined online at runtime (background process) |
User | 4 | Calibration is determined by user-provided calibration sent to device |
Condition/Maturity state of sensor-data calibration.
Source | Value | Condition |
---|---|---|
None | 0 | Indicates data as not calibrated, ‘potential' significant Bias or Offset @note is Source==None then user or factory calibration must be set (emteq internal) |
Minimal | 1 | Indicates data calibration has begun, reduced Bias or Offset |
Basic | 2 | Indicates data calibration is nearing maturity, significant confidence in removal of Offset or Bias |
Mature | 3 | Indicates data as fully calibrated, highest confidence in removal of Offset or Bias |
Emteq internal information about the Calibration data for the device.
The output-rate of the measurement data.
This applies to all data after this point in the data file but may be overridden by subsequent changes.
Hardware device model.
e.g. #Gyroscope/Version.model,Bno055
The model may have specific measurement characteristics which may be published if/as these are determined by Emteq.
Maximum configurable data-acquisition rate.
v0.6.x firmware does not provide full configurability of IMU data rate.
CSV data is unprocessed by default and a scalar can be applied to produce normalised measurement in the specified unit.
The scalar divisor used to convert raw Gyroscope values to degrees/s
e.g. degPerSecond= gyroRaw / gyroscopeDivisor
Origin of sensor-data calibration information.
See #Accelerometer/Calibration.source for details of the source enumeration
Condition/Maturity state of sensor-data calibration.
See #Accelerometer/Calibration.state for details of the 0-3 scale
Emteq internal information about the Calibration data for the device.
The output-rate of the measurement data.
This applies to all data after this point in the data file but may be overridden by subsequent changes.
Hardware device model.
e.g. #Magnetometer/Version.model,Bno055
The model may have specific measurement characteristics which may be published if/as these are determined by Emteq.
Maximum configurable data-acquisition rate.
v0.6.x firmware does not provide full configurability of IMU data rate.
CSV data is unprocessed by default and a scalar can be applied to produce normalised measurement in the specified unit.
The scalar divisor used to convert raw Magnetometer values to microTesla
microTesla = magRaw / magnetometerDivisor
Origin of sensor-data calibration information.
See #Accelerometer/Calibration.source for details of the source enumeration
Condition/Maturity state of sensor-data calibration.
See #Accelerometer/Calibration.state for details of the 0-3 scale
Emteq internal information about the Calibration data for the device.
The output-rate of the measurement data.
This applies to all data after this point in the data file but may be overridden by subsequent changes.
Data-time offset that may be added to Time
values to give a J2000 time value as Seconds since 00:00:00 01-01-2000 (J.2000 Epoch).
J2000 Timestamp can be converted to Unix-Timestamp by adding 946684800
e.g. unixTime = referenceOffset + 946684800
When #Time/Epoch is J2000
this offset will be 0.0
Conversion to Unix Timestamp may overflow if using 32-bit data types so overflow must be taken into consideration.
Data-time offset that may be added to Time
values to give a Unix time value as Seconds since 00:00:00 01-01-1970 (Unix Epoch). e.g. unixTime = time + unixOffset
When #Time/Epoch is Unix
this offset will be 0.0
The ‘Epoch' that is used for the Time field. The Epoch specifies the arbitrary fixed date from which all values are relative to.
Session
= Time at the start of the file is used as the Epoch. Time
field will count up from 0.0Unix
[default] = Unix Epoch will be used. Time
will be seconds since 00:00:00 01-01-1970J2000
= J2000 Epoch will be used. Time
will be seconds since 00:00:00 01-01-2000Prior to CSV1.1.1
the epoch was Session
time. Since Dab2Csv v0.7.4
this can be confiugred while defaulting to Unix when not specified.
Irrespective of which Epoch is selected, #Time/Seconds.unixOffset can be used to adjust time to absolute Unix values.
Data-time at which the data recording began specified as Seconds since 00:00:00 01-01-1970 (Unix Epoch).
{Documentation incomplete} [Introduced in v0.5.0]
Row index for human readable data references.
The Frame#
will start at 1 and increment +1 for each data record row
Frame#
may not map directly to Time, in general a fixed rate can be assumed but gaps in data can/do occur under certain criteria (See ‘AdsMiss & AdsLate’)
Relative Time in Seconds at which data was measured in the device hardware.
This may be converted to J2000 or Unix time values, the offset values to apply are available from #Time/Seconds.referenceOffset or #Time/Seconds.unixOffset respectively.
The configured Epoch can is also specified in #Time/Epoch.
Since CSV1.1.1 the Epoch defaults to `Unix`, previously the `Session` Epoch was used for all CSV data files.
Discrete OFF>ON face information indicating when the device is detected as being worn by a user.
State | Value | Condition |
---|---|---|
Error | -1 | Fit detection failed e.g. No-Face-Plate |
Off | 0 | No face contact detected |
On | 1 | Face contact detected |
Abstract continuous measurement of Mask ‘Fit' with higher values representing the ideal state of system performance/quality.
Average
should a minimum threshold to start an session. Lower-levels than this shows degradation in fit while higher values indicate good preferential fit.
State | Value | Condition |
---|---|---|
Failure | -1 | Fit detection failure e.g. No-Face-Plate or Sensor failure |
None | 0 | Not on-face |
Measuring | 1 | Fit detection failed e.g. No-Face-Plate |
Failing | 2 .. 3 | Minimal to detect face i.e. 3-4 pairs any contact |
Failing | 4 .. 5 | Minimal to detect face i.e. 5-6 pairs any contact |
Below-Average | 6 .. 7 | Basic function i.e. 3 pairs settled contact, 5-7 pairs full contact |
Average | 8 | General function i.e. 5 pairs settled contact, 7 pairs full contact |
Very-Good | 9 | Good on all sensors i.e. 7 pairs settled contact |
Excellent | 10 | Optimal on all sensors i.e. 7 pairs settled contact + Excellent impedance |
Perfect | 11 | Ideal sensor Impedance. Not possible on user-face. |
Supplementary data counting number of electrodes which have any Contact on either electrode of the pair.
Removed as of #CSV1.1.0. See Emg/ContactStates
Supplementary data counting the number of electrode-pairs which are both in contact.
Removed as of #CSV1.1.0. See Emg/ContactStates
Supplementary data counting the number of electrode pairs with settled contact.
Removed as of #CSV1.1.0. See Emg/ContactStates
Order and assignment of Leads may change based on hardware version or manual electrode positioning (specific hardware versions).
Please see #Emg/Properties.ids[] prior to reading EMG data.
Discrete (OFF>ON>STABLE>SETTLED) contact information for each pair of EMG electrodes.
The fidelity of this signal depends on #Emg/Properties.contactMode as follows:
There is no ContactState
for the reference electrodes on the Emteq MASK in currently released firmware.
[Faceplate/FitState](#faceplatefitstate) provides an simplified abstraction to determine EMG contact overall.
The ContactState is a 8-bit value split into two nibbles (half-a-byte i.e 4-bits), one for the ‘Positive', and one for the Negative electrode contact respectively.
Emg/ContactStates [8-bits] | |
---|---|
NegativeContact [4-bits] | PositiveContact [4-bits] |
Each electrode contact can be one of the following states:
State | Binary-Nibble | Condition |
---|---|---|
Off | 0000 | Lifted - No skin contact |
On | 0001 | Contact - Initial, possibly intermittent skin contact |
Stable | 1000 | Not likely to change; firmly established |
Fault | 1110 | Fault-state - Indicates a faulty contact |
Settled | 1111 | Stable with Saturated filters indicating higher confidence in measurements Emg/Filtered and Emg/Amplitude |
Impedance measurement of electrode-to-skin contact when #Emg/Properties.contactMode is AC mode.
The value may be converted to Ohms and to do so refer to the chapter on #Emg/Properties.contactToImpedanceDivisor
Raw Analog signal from the EMG measurement device representing the device data in a bit-precise unmodified form i.e. No filtering stages have been performed
The value may be converted to Volts and to do so refer to the chapter on #Emg/Properties.rawToVoltageDivisor
Supplementary data for Emteq Internal. This represents the AC contact mode signal (see #Emg/Properties.contactMode) and may be removed in future revision.
The value may be converted to Volts and to do so refer to the chapter on #Emg/Properties.rawToVoltageDivisor
Filtered EMG data to contain only in-band EMG measurements in the frequency range 100-450Hz
The value may be converted to Volts and to do so refer to the chapter on #Emg/Properties.rawToVoltageDivisor
Movement artifacts may occur in-band so are not suppressed as of <=v0.5 firmware and <=v9.3.8 hardware.
Amplitude of the muscle EMG in-band signal acquired by a moving-window RMS over Emg/Filtered
The value may be converted to Volts and to do so refer to the chapter on #Emg/Properties.rawToVoltageDivisor
Average beats-per-minute (BPM) of the cardiac cycle as measured from the Photoplethysmographic (PPG) sensor on the user's forehead.
This is updated at 1Hz in all firmware versions <= 0.5
Raw Photoplethysmographic (PPG) sensor reading which detects variation in blood volume within the skin of the user's forehead.
See HeartRate/Average where BPM is of direct interest
Raw proximity sensor reading (see notes below)
As of <= v0.5 firmware the Proximity function output is not implemented. The Raw sensor will measure ambient incident light.
Faceplate/FaceState, Faceplate/FitState, and for granular information the Emg/ContactStates are more reliable measures of mask being worn.
{Documentation incomplete} [Introduced in v0.5.0]
#Imu/
is deprecated as of CSV1.0.5
, removed in CSV1.1.x
See #Accelerometer/Raw.{x | y | z}
See #Magnetometer/Raw.{x | y | z}
See #Gyroscope/Raw.{x | y | z}
IMU sensor reading of linear-acceleration for the X, Y, and Z axes.
The orientation of X, Y, and Z axis are not defined by the Emteq system and must be calibrated for a user or session.
The value may be converted to m/s^2 and to do so refer to the chapter on #Accelerometer/Properties.rawDivisor
IMU sensor reading of magnetic-field strength on the X, Y, and Z axes which can be used to derive absolute orientation or compensate for Gyroscopic drift.
The orientation of X, Y, and Z axis are not defined by the Emteq system and must be calibrated for a user or session.
The value may be converted to micro-Tesla and to do so refer to the chapter on #Magnemeter/Properties.rawDivisor
IMU sensor reading of angular-velocity on the X, Y, and Z axes.
The orientation of X, Y, and Z axis are not defined by the Emteq system and must be calibrated for a user or session.
The value may be converted to degrees/s and to do so refer to the chapter on #Gyroscope/Properties.rawDivisor
The latest version of the emteqPRO CSV specification document can be accessed from the flowing link:
https://support.emteqlabs.com/data/CSV.html
Refer to #Format/Version field for identifying the revision of the CSV specification that a file uses.
.Xx
to .x
*/Properties.*Divisor
fields.[]
position in #Emg/Calibration.liftCurrent[]
FLX
prefix on faceplate/Version.serial
LF
(/n) instead of CR+LF
to reduce file size and standardize Linux compatibilityInternal, see #CSV1.1.0
Imu/*
(Present since CSV1.0.5)Imu/*
comment fields removed (Deprecated since CSV1.0.5)Imu/*
field headings renamed to their respective Accelerometer/Raw
, Magnetometer/Raw
, and Gyroscope/Raw
(Rename raised since CSV1.0.5)Faceplate/FitState.any#
, Faceplate/FitState.both#
, and Faceplate/FitState.settled#
where Emg/ContactStates shall be used insteadCSV1.1.0
Emg/ContactState
should be Emg/ContactStates (with ‘s') to be in-line global schema