Importing data into BESA

 

For now the only way to import data into BESA is with the File->Import ASCII File... menu command. The data should be written to an ascii text file with a column for each channel and each line containing a singe time step.  BESA calls this a "Multiplexed" format and can also accept a text file with all the timesteps for the first channel on the first line and so on; but this "Vectorized" format is rather unwieldy for a text editor to handle, particularly if there are thousands of time steps.  The following dialog box appears after you have selected an ascii file to import and chosen a BESA .fsg filename under which to store the data:

You'll need to input the number of header lines, if any; Bins/Microvolt should be one if your data is in microvolts; set the sampling rate and number of channels; the number of samples should set itself when you click in the box; the prestimulus time should be set to the amount of prestimulus data in your ERP. 

If your EEG data was recorded at standard (10-10, 10-20) electrode positions,  you will  need to have a simple channel label file (.ela) which is also an ascii text file with one channel label per line corresponding to the columns in the data file such as:

Fp1
Fp2
F7
F3
.
.
.
FPz
Oz
PO1
PO2

However, if your electrodes are not at standard positions like the 128 channel EGI data, then the label file must include the type of electrode and electrode name on each line:

EEG E1
EEG E2
EEG E3
EEG E4
.
.
.
EEG E124
EEG E125
EEG E126
EEG E127
EEG E128
REF CZ
POLY E129
POLY E130
POLY E131
POLY E132

CZ is the reference channel for the EGI data. E129 - E132 are event channels and will be treated as type polygraph. Since BESA needs to know the location of each electrode on the head an additional surface point (.sfp) file with each line containing the X, Y, Z device coordinates of an electrode corresponding to the EEG electrodes in the label file. The first three lines of the .sfp file contain the device coordinates of three fiducial points (RPA, LPA and Nas) so that BESA can translate from 'device' to 'head' and eventually to BESA coordinates. The .sfp file looks like:

FidNz     -0.761006    8.4654     -3.52084
FidLPA -7.14491     -0.228457 -4.60396
FidRPA  7.14503    -0.576499  -4.41845
E1          4.64814      6.15427     -2.9247
E2          4.47238      7.15292     -0.38293
E3          3.67002      7.78136       2.23162
E4         2.22411       7.15139      4.85484
.
.
.
E125      4.71338      6.02181     -5.22721
E126      1.73871      7.31165     -5.5655
E127     -3.28153     7.35404      -5.70434
E128     -5.95283     5.97173      -4.85799
CZ         1.254         -1.10244     7.31

After clicking OK on the ASCII File Properties dialog the following dialog comes up to help with choosing the proper associated electrode label and position files:

For the standard electrodes (.ela) label file choose Browse in the Channel configuration frame and select the proper label file. BESA checks the file for consistency with the ascii electrode data and puts a green check mark in the upper right box if everythings looks good.  Click OK at the bottom of the dialog and the data will load and appear in the main display window:

The same steps for EGI data look like:

Cz can now be set as the common electrode by choosing Edit -> Channel Configuration:

and choosing Cz in the COM box which automatically enables the Common Scalp Reference check box.  Cz will now appear at the  bottom of the channels display plotted as all zeros.  It will also be shown in the electrode display (File -> Head Surface Points and Sensors -> View) as a black dot.   The main advantage of specifying Cz as the reference point is that for the average (and virtual) montages Cz - avr takes on a value and can be used for mapping and source analysis.  The following display shows the plot of Cz - avr for the average reference montage:

Several separate data files can be combined  into a single file by using the File->Export and Append data menu item. If you keep saving to the same file the data is appended at the end of the file.  The compressed .foc file format is useful for concatenating several long recording sessions.  After loading such a file the marker bar contains thick black lines separating the data segments and these can be clicked to jump between segments.