Difference between revisions of "Files & Formats"

From Neuroelectric's Wiki
Jump to: navigation, search
(The .easy data format (ASCII))
(The .easy data format (ASCII))
 
(55 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Neuroelectrics devices generate a series of files and formats. Proprietary ones are in bold:  
+
==Neuroelectrics devices generate a series of files and formats. Proprietary ones are in bold:==
  - The '''.''easy''''' data format (ASCII, plain text)  
+
  - The '''.''easy''''' data format (ASCII, plain text) (Enobio & Starstim)
  - The '''.''info''''' file (ASCII, plain text)
+
  - The '''.''info''''' file (ASCII, plain text) (Enobio & Starstim)  
  - The .'''edf''' (EDF+) and '''".nedf"''' data formats (binary)
+
  - The '''.''sdeeg''''' SD card data format (binary) (Enobio & Starstim)
- The '''.''stim''''' file (ASCII, plain text)
+
  - The '''.''.nedf''''' (binary) data format (Enobio & Starstim)
  - The '''.''sdeeg''''' SD card data format (binary)
 
 
 
In general, time keeping is given with time stamps per sample in ms since Jan 1st 1970 ([http://en.wikipedia.org/wiki/Unix_time| Unix time]).
 
 
 
= Stimulation generated files =
 
Neuroelectrics stimulation StarStim class devices generate stimulation specific files as well as EEG data. Here we describe the former (for EEG see the EEG data section).
 
  
 +
In general, time keeping is given with time stamps per sample in ms since Jan 1st 1970 ([http://en.wikipedia.org/wiki/Unix_time Unix time]).
  
 +
= Neuroelectrics generated files =
 +
Neuroelectrics devices generate specific files as well as EEG data for Enobio devices.
  
 
== the .'''info''' file associated with a stimulation session ==
 
== the .'''info''' file associated with a stimulation session ==
Line 24: Line 21:
 
  Additional channel status:OFF
 
  Additional channel status:OFF
 
  Number of records of Stimulation: 46 (1 second/record)
 
  Number of records of Stimulation: 46 (1 second/record)
  Total number of channels: 8
+
   
 +
Total number of channels: 8
 
  Number of EEG channels: 6
 
  Number of EEG channels: 6
 
  Number of stimulation channels: 1
 
  Number of stimulation channels: 1
Line 33: Line 31:
 
  Shamp ramp duration (s): OFF
 
  Shamp ramp duration (s): OFF
 
  Stimulation duration (s): 1200
 
  Stimulation duration (s): 1200
  Type of stimulation: tACS+
+
  Type of stimulation: tACS
 +
 
 
  Stimulation parameters:
 
  Stimulation parameters:
 
  Channel 1:  
 
  Channel 1:  
 
   Position: C3
 
   Position: C3
 
   Type: EEG Recording
 
   Type: EEG Recording
 +
 
   Channel 2:  
 
   Channel 2:  
 
   Position: C4
 
   Position: C4
Line 44: Line 44:
 
   Offset (uA): 0
 
   Offset (uA): 0
 
   Frequency (Hz): 10
 
   Frequency (Hz): 10
 +
 
   Channel 3:  
 
   Channel 3:  
 
   Position: Ch3
 
   Position: Ch3
 
   Type: EEG Recording
 
   Type: EEG Recording
 +
 
  Channel 4:  
 
  Channel 4:  
 
   Position: Ch4
 
   Position: Ch4
 
   Type: Return
 
   Type: Return
 
   Percentage return: 100%
 
   Percentage return: 100%
 +
 
  Channel 5:  
 
  Channel 5:  
 
   Position: Ch5
 
   Position: Ch5
 
   Type: EEG Recording
 
   Type: EEG Recording
 +
 
   Channel 6:  
 
   Channel 6:  
 
   Position: Ch6
 
   Position: Ch6
 
   Type: EEG Recording
 
   Type: EEG Recording
 +
 
  Channel 7:  
 
  Channel 7:  
 
   Position: Ch7
 
   Position: Ch7
 
   Type: EEG Recording
 
   Type: EEG Recording
 +
 
   Channel 8:  
 
   Channel 8:  
 
   Position: Ch8
 
   Position: Ch8
 
   Type: EEG Recording
 
   Type: EEG Recording
 +
 
  Trigger information:
 
  Trigger information:
 
   Code Description
 
   Code Description
Line 74: Line 81:
 
   8
 
   8
 
   9
 
   9
 
== the .'''stim''' file ==
 
This ASCII file contains a record of the currents at each electrode.
 
 
There is a row per time sample with one column per channel (units in uA).
 
 
The last column contains the time stamps per sample in ms since Jan 1st 1970 ([http://en.wikipedia.org/wiki/Unix_time| Unix time]).
 
 
Here is the typical content of a .stim file. There are 8 columns (one per channel). Channels with a constant value of -1 identify channels not used for stimulation (they would be used for EEG).
 
The first two columns provide injected current in uA, with a + sign indicating injection of current into the scalp. The last column is the Unix timestamp (ms).
 
 
246 -246 -1 -1 -1 -1 -1 -1 1381762713753
 
246 -246 -1 -1 -1 -1 -1 -1 1381762713754
 
246 -246 -1 -1 -1 -1 -1 -1 1381762713755
 
246 -246 -1 -1 -1 -1 -1 -1 1381762713756
 
246 -246 -1 -1 -1 -1 -1 -1 1381762713757
 
247 -247 -1 -1 -1 -1 -1 -1 1381762713758
 
247 -247 -1 -1 -1 -1 -1 -1 1381762713759
 
247 -247 -1 -1 -1 -1 -1 -1 1381762713760
 
247 -247 -1 -1 -1 -1 -1 -1 1381762713761
 
247 -247 -1 -1 -1 -1 -1 -1 1381762713762
 
247 -247 -1 -1 -1 -1 -1 -1 1381762713763
 
248 -248 -1 -1 -1 -1 -1 -1 1381762713764
 
248 -248 -1 -1 -1 -1 -1 -1 1381762713765
 
  
 
= EEG data files and formats =  
 
= EEG data files and formats =  
Line 118: Line 101:
 
  EEG sampling rate: 500 Samples/second
 
  EEG sampling rate: 500 Samples/second
 
  EEG units: nV
 
  EEG units: nV
 +
 
  EEG montage:
 
  EEG montage:
 
   Channel 1: P7
 
   Channel 1: P7
Line 139: Line 123:
 
   Channel 19: F7
 
   Channel 19: F7
 
   Channel 20: EXT
 
   Channel 20: EXT
 +
 
  Number of records of Accelerometer: 30 (1 second/record)
 
  Number of records of Accelerometer: 30 (1 second/record)
 
  Number of channels of Accelerometer: 3
 
  Number of channels of Accelerometer: 3
 
  Accelerometer sampling rate: 100 Samples/second
 
  Accelerometer sampling rate: 100 Samples/second
 
  Accelerometer units: mm/s^2
 
  Accelerometer units: mm/s^2
 +
 
  Trigger information:
 
  Trigger information:
 
   Code Description
 
   Code Description
Line 157: Line 143:
 
== The .'''easy''' data format (ASCII) ==
 
== The .'''easy''' data format (ASCII) ==
 
   ABOUT THE NE ASCII DATA FORMAT (July 2012):  
 
   ABOUT THE NE ASCII DATA FORMAT (July 2012):  
         NE ASCII files contain one line per time sample. Each line contains
+
         NE ASCII files contain one line per time sample (Sampling rate: 500 SPS). Each line contains first the EEG data (8,20 or 32
        first the EEG data (8 or 20 channels, depending on the device, with
+
        channels, depending on the device, with units in nV), followed by  three acceleration channels (aX,aY,aZ in mm/s^2-
        units in nV), followed by  three acceleration channels (aX,aY,aZ  
+
        millimeters per second squared), a trigger flag (int32) and, finally, a timestamp in    
        in mm/s^2- millimeters per second squared), an *optional* external
+
        Unix time (ms from Jan 1 1970):
        input channel, a trigger flag (int32) and, finally,  
 
        a timestamp in Unix time (ms from Jan 1 1970):
 
 
   
 
   
   Ch1(nV) ... Ch8or20(nV) aX(mg) aY(mg) aZ(mg) AddSensor Flags(uint32) TimeStamp (ms)
+
   Ch1(nV) ... Ch8,20or32(nV) aX(mg) aY(mg) aZ(mg) AddSensor Flags(int32) TimeStamp (ms)
 
      
 
      
   Therefore Enobio8/StarStim will have a minimum of 8+2 (10) columns, or 8+3=11 if no
+
   Therefore Enobio8/StarStim8 will have a minimum of 8+4 (12) columns + timestamp
    accelerometer or >= 8+4 (with accelerometer). In summary:
 
 
   
 
   
     Enobio8/20
+
     Enobio8: 8 columns (EEG data) + 3 acceleration channels + trigger column + timestamp
         10 Columns: no AddSensor, no accelerometer data:
+
          
        11 Comumns: no accelerometer, but there is AddSensor
+
    Enobio20: 20 columns (EEG data) + 3 acceleration channels + trigger column + timestamp
        13 Columns: there is accelerometer, but no Addsensor
+
 
        14 Comumns: there is accelerometer, AddSensor.
+
    Enobio 32: 32 columns (EEG data) + 3 acceleration channels + trigger column + timestamp
+
 
     Enobio 20 will have >= 22 and >=24 columns if acc. data present:
+
    Starstim 8: 8 columns (EEG data or not used channel to record EEG) + 3 acceleration channels + trigger column + timestamp
        22 Columns: no AddSensor, no accelerometer
+
 
        23 Comumns: no accelerometer, but there is AddSensor
+
     Starstim 20: 20 columns (EEG data or not used channel to record EEG) + 3 acceleration channels + trigger column + timestamp
        25 Columns: there is accelerometer, no AddSensor
+
 
        26 Comumns: there is accelerometer, AddSensor.
+
    Starstim 32: 32 columns (EEG data or not used channel to record EEG) + 3 acceleration channels + trigger column + timestamp
   
+
 
    Enobio 32 will have >=34 and >=36 if acc data is present
+
 
        34 Columns: no AddSensor, no accelerometer
+
[Note: the accelerometer uses 13 bits for a range of +/- 16g, thus 3.9 mg/LSB]
        35 Comumns: no accelerometer, but there is AddSensor
+
 
        37 Columns: there is accelerometer, no AddSensor
+
 
        38 Comumns: there is accelerometer, AddSensor.
+
Here is an example from a StarStim device (8 Channels) where the first 2 channels are used for stimulation (with "-1"s), and with accelerometer data (3 columns), markers (with a marker sent (5) in the last sample) and timestamp:
 +
 
 +
  -1 -1  8999110  29602960 27793792  19921829  -3670597 18110801  -2745  9561 -912  0  1353011252736
 +
-1 -1  8902360  29539254 27764085  19818737  -3924179 18143797  -2745  9561 -912  0  1353011252738
 +
-1 -1  8827496  29457477 27727511  19748117  -4140377 18101551  -2745  9561 -912  0  1353011252740
 +
-1 -1  8779812  29376462 27720311  19705727  -4315472 18054868  -2745  9561 -912  5  1353011252742 <-- Reception of the marker #5
 +
 
 +
Here is an example from a StarStim device (8 Channels) using all the channels to record EEG, and with accelerometer data (3 columns), markers and timestamp:
 +
 
 +
899394 182343  8999110  29602960 27793792  19921829  -3670597 18110801   -2745  9561 -912  0  1353011252736
 +
197056 789249  8902360  29539254 27764085  19818737  -3924179 18143799   -2745  9561 -912  0  1353011252738
 +
198187 237426  8827496  29457477 27727511  19748117  -4140377 18101551   -2745  9561 -912  0  1353011252740
 +
772031 389240  8779812  29376462 27720311  19705727  -4315472 18054868   -2745  9561 -912  0  1353011252742
  
  
Here is an example from a StarStim device (8 Channels) where the first 4 channels are used for stimulation (with "-1"s), and with accelerometer data (3 channels), markers and timestamp:
+
Regarding the 3D image of the accelerometer, here the image of an Enobio 8-channels or a Starstim 8-channels:
  
-1 -1  8999110  29602960 27793792  19921829  -3670597 18110801   -2745  9561 -912  0  1353011252736
+
    [[File:Accelerometer device.PNG|600px]]
-1 -1  8902360  29539254 27764085  19818737  -3924179 18143799   -2745  9561 -912  0  1353011252738
 
-1 -1  8827496  29457477 27727511  19748117  -4140377 18101551   -2745  9561 -912  0  1353011252740
 
-1 -1  8779812  29376462 27720311  19705727  -4315472 18054868   -2745  9561 -912  0  1353011252742
 
  
 
== The .'''edf''' (binary, EDF+)  data format ==
 
== The .'''edf''' (binary, EDF+)  data format ==
This is the standard [http://www.edfplus.info/specs/edf.html | EDF data format]. Files in this format can be opened from EDF data readers as well as with NIC Offline (and exported/saved into any of the other NE formats).
+
This is the standard [http://www.edfplus.info/specs/edf.html | EDF data format]. Files in this format can be opened from EDF data readers.
 +
The EDF+ format has only 16 bits of quantization. To avoid any distortion of the signal the EDF+ files are pre-processed including:
 +
 
 +
- High pass filtering of the signal at 0.1 Hz
  
 
== The .'''nedf''' (binary)  data format ==
 
== The .'''nedf''' (binary)  data format ==
This is Neuroelectrics proprietary data format. It is lossless (full 24 bit) binary. It can be opened by NIC Offline and exported/saved into any of the other NE formats.
+
This is Neuroelectrics proprietary data format (NEDF). It is lossless (full 24 bit) binary. It can be opened by NIC Offline and exported/saved into any of the other NE formats.
  
= The '''.sdeeg''' SD card data =
+
== The '''.sdeeg''' SD card data ==
 
This is another  proprietary, binary data format. It can be opened with NIC Offline software and exported/saved into any of the other NE formats.
 
This is another  proprietary, binary data format. It can be opened with NIC Offline software and exported/saved into any of the other NE formats.

Latest revision as of 08:38, 29 August 2018

Neuroelectrics devices generate a series of files and formats. Proprietary ones are in bold:

- The .easy data format (ASCII, plain text) (Enobio & Starstim)
- The .info file (ASCII, plain text) (Enobio & Starstim) 
- The .sdeeg SD card data format (binary) (Enobio & Starstim)
- The ..nedf (binary) data format (Enobio & Starstim)

In general, time keeping is given with time stamps per sample in ms since Jan 1st 1970 (Unix time).

Neuroelectrics generated files

Neuroelectrics devices generate specific files as well as EEG data for Enobio devices.

the .info file associated with a stimulation session

Here is an example of the ASCII data file associated to a stimulation session. The name of the file would be something like '20130220112635_Patient01.info:

StartDate (first EEG timestamp): 1361377909087 
Device class: StarStim
Device Mac: 00:07:80:58:9C:1A
NIC version: v1.1.9
Firmware version: 699
Line filter status: OFF
Additional channel status:OFF
Number of records of Stimulation: 46 (1 second/record)

Total number of channels: 8

Number of EEG channels: 6
Number of stimulation channels: 1
Stimulation sampling rate: 500 Samples/second
Stimulation units: uA
Ramp up duration (s): 15
Ramp down duration (s): 15
Shamp ramp duration (s): OFF
Stimulation duration (s): 1200
Type of stimulation: tACS
Stimulation parameters:
Channel 1: 
 Position: C3
 Type: EEG Recording
 Channel 2: 
 Position: C4
 Type: Stimulation Anodal
 Amplitude (uA): 100
 Offset (uA): 0
 Frequency (Hz): 10
 Channel 3: 
 Position: Ch3
 Type: EEG Recording
Channel 4: 
 Position: Ch4
 Type: Return
 Percentage return: 100%
Channel 5: 
 Position: Ch5
 Type: EEG Recording
 Channel 6: 
 Position: Ch6
 Type: EEG Recording
Channel 7: 
 Position: Ch7
 Type: EEG Recording
 Channel 8: 
 Position: Ch8
 Type: EEG Recording
Trigger information:
 Code	Description
 1	Subject moved
 2	Eyes opened
 3	Eyes closed
 4	sleeping
 5	EEG signals are noisy
 6	
 7	
 8	
 9

EEG data files and formats

the .info file associated with an EEG only session

Here is an example of what this plain text file contains. The name of the file would be something like '20131011141257_demo.info:

StartDate (first EEG timestamp): 1381493577260
Device class: Enobio20
Device MAC: 00:07:80:63:F0:CD
NIC version: v1.2.9
Firmware version: 699
Line filter status: 60 Hz
Additional channel status: OFF
Total number of channels: 20
Number of EEG channels: 20
Number of records of EEG: 15381
Number of packets lost: 0(0.00%)
EEG sampling rate: 500 Samples/second
EEG units: nV
EEG montage:
 Channel 1: P7
 Channel 2: P4
 Channel 3: Cz
 Channel 4: Pz
 Channel 5: P3
 Channel 6: P8
 Channel 7: O1
 Channel 8: O2
 Channel 9: T8
 Channel 10: F8
 Channel 11: C4
 Channel 12: F4
 Channel 13: Fp2
 Channel 14: Fz
 Channel 15: C3
 Channel 16: F3
 Channel 17: Fp1
 Channel 18: T7
 Channel 19: F7
 Channel 20: EXT
Number of records of Accelerometer: 30 (1 second/record)
Number of channels of Accelerometer: 3
Accelerometer sampling rate: 100 Samples/second
Accelerometer units: mm/s^2
Trigger information:
 Code	Description
 1	EventA
 2	EventB
 3	Movement
 4	Eyeblink
 5	
 6	
 7	
 8	
 9

The .easy data format (ASCII)

 ABOUT THE NE ASCII DATA FORMAT (July 2012): 
       NE ASCII files contain one line per time sample (Sampling rate: 500 SPS). Each line contains first the EEG data (8,20 or 32 
       channels, depending on the device, with units in nV), followed by  three acceleration channels (aX,aY,aZ in mm/s^2-
       millimeters per second squared), a trigger flag (int32) and, finally, a timestamp in      
       Unix time (ms from Jan 1 1970):

 Ch1(nV) ... Ch8,20or32(nV) aX(mg) aY(mg) aZ(mg) AddSensor Flags(int32) TimeStamp (ms)
   
 Therefore Enobio8/StarStim8 will have a minimum of 8+4 (12) columns + timestamp

   Enobio8: 8 columns (EEG data) + 3 acceleration channels + trigger column + timestamp
        
   Enobio20: 20 columns (EEG data) + 3 acceleration channels + trigger column + timestamp
   Enobio 32: 32 columns (EEG data) + 3 acceleration channels + trigger column + timestamp
   Starstim 8: 8 columns (EEG data or not used channel to record EEG) + 3 acceleration channels + trigger column + timestamp
   Starstim 20: 20 columns (EEG data or not used channel to record EEG) + 3 acceleration channels + trigger column + timestamp
   Starstim 32: 32 columns (EEG data or not used channel to record EEG) + 3 acceleration channels + trigger column + timestamp
 

[Note: the accelerometer uses 13 bits for a range of +/- 16g, thus 3.9 mg/LSB]


Here is an example from a StarStim device (8 Channels) where the first 2 channels are used for stimulation (with "-1"s), and with accelerometer data (3 columns), markers (with a marker sent (5) in the last sample) and timestamp:

-1 -1  8999110  29602960 27793792  19921829  -3670597	18110801  -2745  9561	 -912  0  1353011252736
-1 -1  8902360  29539254 27764085  19818737  -3924179	18143797  -2745  9561	 -912  0  1353011252738
-1 -1  8827496  29457477 27727511  19748117  -4140377	18101551  -2745  9561	 -912  0  1353011252740
-1 -1  8779812  29376462 27720311  19705727  -4315472	18054868  -2745  9561	 -912  5  1353011252742 <-- Reception of the marker #5

Here is an example from a StarStim device (8 Channels) using all the channels to record EEG, and with accelerometer data (3 columns), markers and timestamp:

899394	182343   8999110  29602960	 27793792  19921829  -3670597	18110801	  -2745  9561	 -912  0  1353011252736
197056	789249   8902360  29539254	 27764085  19818737  -3924179	18143799	  -2745  9561	 -912  0  1353011252738
198187	237426   8827496  29457477	 27727511  19748117  -4140377	18101551	  -2745  9561	 -912  0  1353011252740
772031	389240   8779812  29376462	 27720311  19705727  -4315472	18054868	  -2745  9561	 -912  0  1353011252742


Regarding the 3D image of the accelerometer, here the image of an Enobio 8-channels or a Starstim 8-channels:

    Accelerometer device.PNG

The .edf (binary, EDF+) data format

This is the standard | EDF data format. Files in this format can be opened from EDF data readers. The EDF+ format has only 16 bits of quantization. To avoid any distortion of the signal the EDF+ files are pre-processed including:

- High pass filtering of the signal at 0.1 Hz

The .nedf (binary) data format

This is Neuroelectrics proprietary data format (NEDF). It is lossless (full 24 bit) binary. It can be opened by NIC Offline and exported/saved into any of the other NE formats.

The .sdeeg SD card data

This is another proprietary, binary data format. It can be opened with NIC Offline software and exported/saved into any of the other NE formats.