Difference between revisions of "How to Prepare Data for BESA Connectivity"

From BESA® Wiki
Jump to: navigation, search
Line 197: Line 197:
 
== Export data using Matlab ==
 
== Export data using Matlab ==
  
 +
== Examples ==
 +
 +
Minimal examples for data files that can be imported in BESA Connectivity can be downloaded here.
 +
# EEG data: this data set contains 25 trials (trial length: -400ms to 1200ms) of scalp data with 27 electrodes at a sampling rate of 320 samples/second.
 +
Download link.
 +
# Source data: this data set contains 53 trials (trial length: -400ms to 1200ms) of source data with 45 dipoles at a sampling rate of 320 samples/second.
 +
Download link.
  
 
[[Category:Connectivity]] [[Category:Time-Frequency]]
 
[[Category:Connectivity]] [[Category:Time-Frequency]]

Revision as of 09:19, 8 June 2018

Module information
Modules BESA Research Basic or higher,

BESA Connectivity

Version 7.0 or higher (BR), 1.0 or higher (BC)

Note and general remarks

This article applies to data that are prepared using BESA Research. It is also possible to read data prepared by other programs. For the requirements, please refer to the BESA Connectivity manual, the chapter on "Loading data that were created in other software" and the chapter "File formats".

BESA Connectivity needs the following data:

  1. A file containing the binary data matrix. All epochs in the data file need to have the same length, the same stimulus position, the same baseline interval, and the same channel configuration.
  2. A header file in ASCII format.
  3. A channel description file in ASCII format. Two types of files are supported: elp files and bsa files.

File format descriptions

Header file format

The header file is a standard ASCII file. It contains the following lines:

Line Entry Possible values Description
1 BESA Generic Data v1.1 File format version
2 nChannels= [1 ... 1024] Number of channels
3 sRate= [0.0001 ... ] Sampling rate in Hz
4 nSamples= [1 ...] Total number of samples in file
5 format= float Format of the data in the binary file
6 file= Name of binary file Name of binary file
7 prestimulus= 500.000, Pre-stimulus interval in milliseconds. If negative, then the epoch starts after the stimulus. This effectively means that the value of prestimulus denotes the position of the stimulus in the epoch (milliseconds after epoch start).
8 epochs= Number of epochs in the data file
9 baselineStart= Baseline start relative to the stimulus position.
10 baselineEnd= Baseline end relative to the stimulus position. Must be >= baselineStart
11 epochLength= Epoch length in milliseconds. This parameter is optional and can be added for convenience. If not given, the epoch length is calculated from the overall number of samples, the sampling rate, and the number of epochs.
12 conditionName= Name of the condition that identifies it.
13 channelUnits= Unit that the data are stored in the binary file. For EEG data, it should be one of µV, mV, V, µV/cm². For source data, it should be one of nAm, nAm/cm², nAm/cm³. For MEG data, it should be one of fT, pT, fT/cm, pT/cm, µV/cm².

This entry is repeated <nChannels> times.

Channel configuration file format

The channel description file is an ASCII file. Two types of files are supported: .elp files and .bsa files.

ELP file format

Elp files describe surface channel coordinates using spherical coordinates (theta, phi). It contains one line for each channel in the data file. Each line contains the following entries:

Column Entry Possible values Description
1 Channel type EEG (scalp electrode)

SCP (scalp electrode)
POL (polygraphic channel)
PGR (polygraphic channel)
ICR (intracranial electrode)
MEG (MEG sensor)
REF (reference electrode)

This column denotes the type of the channel.
2 Channel label Fpz

Fz
Fpz'
EOG
TpL_r, ...

Channel label. Is not allowed to contain blanks.
3 Azimuth (theta) [-180.00 ... 180.00] Spherical azimuth angle in degrees (optional entry).
4 Latitude (phi) [-90.00 ... 90.00] Spherical latitude angle in degrees (optional entry).

BSA file format

Bsa files describe source channel data. They have a header section for format version and readability, followed by one line for each source channel.

Column Entry Possible values Description
1 Channel type RegSrc (regional source)

DipSrc (dipole)
SptCmp (spatial component)

This column denotes the type of the channel.
2 x location x coordinate of the channel.
3 y location y coordinate of the channel.
4 z location z coordinate of the channel.
5 x orientation x orientation of the channel.
6 y orientation y orientation of the channel.
7 z orientation z orientation of the channel.
8 Color [0 … 255*255*255] RGB color value

Binary data matrix file format

Export data using BESA Research

Export data using Matlab

Examples

Minimal examples for data files that can be imported in BESA Connectivity can be downloaded here.

  1. EEG data: this data set contains 25 trials (trial length: -400ms to 1200ms) of scalp data with 27 electrodes at a sampling rate of 320 samples/second.

Download link.

  1. Source data: this data set contains 53 trials (trial length: -400ms to 1200ms) of source data with 45 dipoles at a sampling rate of 320 samples/second.

Download link.