Export Data to Brainstorm

From BESA® Wiki
Revision as of 18:11, 21 May 2021 by Jaehyun (Talk | contribs)

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Module information
Modules BESA Research Standard or higher
Version BESA Research 6.1 or higher

BESA Research can export EEG or MEG data to MATLAB in a structure data type named besa_channels. The exported data structure can be also imported to Brainstorm for further analysis using the besa2brainstorm MATLAB function included in the BESA MATLAB Readers.

Procedure

  1. Export EEG or MEG data to MATLAB in BESA Research using the Export data dialog (File → Send to MATLAB...).
  2. After finishing the data exporting process, type desktop in the MATLAB window to open the MATLAB desktop window.
  3. Add the BESA MATLAB Readers and Brainstorm folders to the search path for MATLAB.
  4. Run Brainstorm and then create a Protocol and Subject. Protocols and subjects already created in Brainstorm can be also used instead of creating new ones.
  5. Import the besa_channels structure to Brainstorm using the besa2brainstorm function. For an example, refer to the MATLAB script below.

An example MATLAB script for importing the besa_channels structure to Brainstorm:

% Add paths: BESA2MATLAB (BESA MATLAB Readers) and Brainstorm
%addpath('xxx');
%addpath('xxx');
 
% Create a protocol and a subject in Brainstorm
% ex) Protocol name: Protocol01; Subject name: Subject01
 
% Import the besa_channels structure to Brainstorm
bstVar              = [];
bstVar.ProtocolName = 'Protocol01';
bstVar.SubjectName  = 'Subject01';
bstVar.StudyName    = 'test_S1_EpochedData';
besa2brainstorm(besa_channels, bstVar, true);

See also