Reading EGI RAW Files
Module information | |
Modules | BESA Research |
Version | 6.0 or higher |
Contents
Introduction
Net Station can export data to several data formats that BESA can read in. When sharing Net Station data with BESA, it is best to either share:
- Data that hasn’t been processed in any way, except segmentation markup, discussed below (ie don’t filter, don’t convert to microvolts [in the future, after a known issue in Net Station is resolved it will be possible to convert to microvolts]), or
- ERP data, in other words data that has been processed in Net Station all the way through averaging.
In either case, the recommended file format is Epoch Marked Simple Binary File. Also, known as Epoch Marked Raw. Export to this format is only available in Net Station 3.0, through the File Export tool of the Waveform Tools. If you need to share Net Station data with BESA, and you don’t have access to this tool, please contact [support@egi.com EGI Support]. The details vary, depending on whether you are exporting unprocessed data, or ERP data. Each of these cases is discussed below:
Exporting Unprocessed Data
Segmentation Markup
This section assumes you are familiar with Net Station Segmentation, and the structure of a simple standard/target experiment. Net Station events contain key lists, in other words, mini databases. Using a simple standard/target experiment as an example, in Net Station all stimulii events might be named stim. The distinction between standards and targets can’t be determined from the name of the event. It can only be determined from the key list in the events. In most programs, including BESA, events only have names. They don’t have key lists. To make the jump from key-list events to non-keylist events, you must use Net Station’s segmentation markup. Segmentation markup adds events to the recording that BESA can use. To use segmentation markup, create a segmentation specification, and check the Mark Up File checkbox in the segmentation specification editor. When you run segmentation using this specification, instead of segmenting the file, new events will be added for BESA. For example, if all your standard and target stimulii are named stim, you would create a segmentation specification just as you would for segmenting this file into standard and target categories. Then, if you check the Mark Up File checkbox, the specification will cause new events to be added to the file instead of segmentation. Then, you can add events called stnd for standard, and targ for target. Note: Although Net Station allows you to add markup events with spaces in the names, it might cause unpredictable results in BESA. Also, Net Station generates the event names automatically, but you can modify them. Sometimes the automatically generated ones contain spaces. Simply edit them, for example, replace thespaces with underscore characters. The objective is to be able to do segmentation in BESA. So, before exporting to BESA, use segmentation markup to add all the events you might want to use in BESA. Although a simple standard/target experiment was used in this example, you can combine the full power of Net Station’s segmentation with the segmentation markup feature.
Export
As mentioned above, you need to export to the Epoch Marked Simple Binary File format using the File Export tool. The following explains the options to use: Since this data hasn’t been rereferenced, do not export the reference channel. In other words, leave the Export Reference Channel checkbox unchecked. You have the option of using integer or floating point precision. Each of these options is discussed below. The advantage of using integer precision is that export is faster, and results in a file that is about half the size of floating point. The disadvantage is that the individual gains and zeros aren’t applied to the data. If your amplifier is in spec, the loss should be negligible. If you choose this option, leave the Calibrate Data checkbox unchecked. The advantage of using floating point precision is that it is much more precise. The disadvantage is that export is slower, and results in a file that is about twice the size of integer. If you choose this option, make sure that you do check the Calibrate Data checkbox. In either case, set the name of the output file to append the extention .raw.
Opening in BESA
After you have generated the .raw file, move it to the BESA PC. You should now be able to read this file with BESA. To do so, in the File Open Dialog Box, set the “Files of type” dropdown list to EGI Formats(*.raw). If you do this, BESA will read all the events in the file, and assign trigger numbers to them (except the following, which are meaningless to BESA: CELL, SESS, bgin and TRSP). Optionally, you can control which events are read by BESA by creating a .trig file. A .trig file is a tab delimited file that contains one line for each event type that you want BESA to read. Each line consists of the name of the event, followed by a tab character, followed by a number between 1 and <255? 256? 65535? 65536?>. The following is an example of a .trig file:
stnd 1
targ 2
resp 128
You might want to use a .trig file if:
- your data has a large number of events, and you don’t need most of them in BESA, or,
- you want to include events with any of these names: CELL, SESS, bgin and TRSP.
To use a .trig file, just make sure that the file is in the same directory as your data file when you open the data file. In addition, the .trig file must be named either default.trig, or <your data file name>.trig (eg subject1.trig).
Loading Sensor Coordinates
After you have opened the file, you must load the sensor coordinate files (File -> Head Surface Points and Sensors -> Load Coordinate Files. If want to use average sensor position files (as opposed to files individually digitized for your subject), use the files in C:\Besa\Examples\Xtras\EEG Binary Formats\EGI directory.
- If you have 256 channel data, use GSN256andRef.ela, and GSN257.sfp.
- If you have 128 channel data, use GSN128andRef.ela, and GSN129.sfp.
- If you have 64 channel data v1, use GSN64andRef.ela, and GSN65v1_0.sfp.
- If you have 64 channel data v2, use GSN64andRef.ela, and GSN65v2_0.sfp.
You are now ready to do your ERP derivation in BESA.
Exporting Averaged ERP Data
Export
If you have derived your ERP in Net Station, and wish to export it to BESA for source localization, once again, use the File Export tool, exporting in the Epoch Marked Simple Binary File format. The following explains the options to use: (This explanation assumes that the data has been rereferenced during the ERP derivation process.) Since this data has been rereferenced, you should export the reference channel. In other words, check the Export Reference Channel checkbox. For averaged data, you need to export using floating point precision. Since the data has been calibrated during the ERP derivation process, it doesn’t matter what you do with the Calibrate Data checkbox. Set the name of the output file to append the extention .raw. When exporting averaged ERP data (or any Net Station data that has been categorized, for example segmented data), Net Station generates an additional file: <your file name>.epoc. This file contains the names of the conditions for each epoch in the data.
Opening in BESA
After you have generated the .raw file, move it, and the .epoc file, to the BESA PC, keeping both files in the same directory. You should now be able to read this file with BESA. To do so, in the File Open dialog box, set the Files of Type dropdown list to EGI Formats(*.raw).
Loading Sensor Coordinates
After you have opened the file, you must load the sensor coordinate files (File -> Head Surface Points and Sensors -> Load Coordinate Files. If want to use average sensor position files (as opposed to files individually digitized for your subject), use the files in C:\Besa\Examples\Xtras\EEG Binary Formats\EGI directory.
- If you have 256 channel data, use GSN257.ela, and GSN257.sfp.
- If you have 128 channel data, use GSN129.ela, and GSN129.sfp.
- If you have 64 channel data v1, use GSN65.ela, and GSN65v1_0.sfp.
- If you have 64 channel data v2, use GSN65.ela, and GSN65v2_0.sfp.
You are now ready to do source analysis in BESA.