Differences between revisions 1 and 2
Revision 1 as of 2011-05-31 11:25:38
Size: 2646
Comment:
Revision 2 as of 2011-05-31 11:29:59
Size: 2583
Comment:
Deletions are marked like this. Additions are marked like this.
Line 24: Line 24:
disp_ival= [-200 1000];
ref_ival= [-200 0];
crit_maxmin= 70;
crit_ival= [100 800];
crit_clab= {'F9,z,10','AF3,4'};
clab= {'Cz','PO7'};
Line 51: Line 57:
                          'title', [sbj ': ' taglist{ff}], ...
                          'clab',{'not','E*','Fp*','AF*'}, ...
                          'ival_pick_peak', [100 600], ...
                          'c_threshold', 0.85, ...
                          'title', untex(file), ...
                          'clab',{'not','E*'}, ...
Line 65: Line 69:
H= scalpEvolutionPlusChannel(epo, mnt, clab, ival_scalps, ...
                             
defopt_scalp_erp2, ...
H= scalpEvolutionPlusChannel(epo, mnt, clab, ival_scalps, defopt_scalp_erp2, ...
Line 72: Line 75:
scalpEvolutionPlusChannel(epo_r, mnt, clab_rsq, ival_scalps, ...
                         
defopt_scalp_r2);
scalpEvolutionPlusChannel(epo_r, mnt, clab, ival_scalps, defopt_scalp_r2);


Documentation: Some Practical Examples of how to use the BBCI Toolbox


IN CONSTRUCTION


Table of Contents

  • ERP Analysis: #ERP-Aanylsis

  • Spectral Analyses: <to come>

  • <more to come>

ERP Analysis

% Define some settings
disp_ival= [-200 1000];
ref_ival= [-200 0];
crit_maxmin= 70;
crit_ival= [100 800];
crit_clab= {'F9,z,10','AF3,4'};
clab= {'Cz','PO7'};

file= 'VPibv_10_11_02/CenterSpellerMVEP_VPibv';
[cnt, mrk, mnt]= eegfile_loadMatlab(file);

% Apply highpass filter to reduce drifts
b= procutil_firlsFilter(0.5, cnt.fs);
cnt= proc_filtfilt(cnt, b);
  
% Artifact rejection based on variance criterion
mrk= reject_varEventsAndChannels(cnt, mrk, disp_ival, 'verbose', 1);

% Segmentation
epo= cntToEpo(cnt, mrk, disp_ival);
  
% Artifact rejection based on maxmin difference criterion on frontal chans
epo= proc_rejectArtifactsMaxMin(epo, crit_maxmin, ...
            'clab',crit_clab, 'ival',crit_ival, 'verbose',1);
epo= proc_baseline(epo, ref_ival);
epo_r= proc_r_square_signed(epo);
  
fig_set(1);
constraint= ...
      {{-1, [100 300], {'I#','O#','PO7,8','P9,10'}, [50 300]}, ...
       {1, [200 350], {'P3-4','CP3-4','C3-4'}, [200 400]}, ...
       {1, [400 500], {'P3-4','CP3-4','C3-4'}, [350 600]}};
[ival_scalps, nfo]= ...
    select_time_intervals(epo_r, 'visualize', 1, 'visu_scalps', 1, ...
                          'title', untex(file), ...
                          'clab',{'not','E*'}, ...
                          'constraint', constraint);
printFigure('r_matrix', [18 13], opt_fig);
ival_scalps= visutil_correctIvalsForDisplay(ival_scalps, 'fs',epo.fs);

fig_set(3)
H= grid_plot(epo, mnt, defopt_erps, 'colorOrder',colOrder);
grid_addBars(epo_r, 'h_scale',H.scale);
printFigure(['erp'], [19 12], opt_fig);

fig_set(2);
H= scalpEvolutionPlusChannel(epo, mnt, clab, ival_scalps, defopt_scalp_erp2, ...
                             'colorOrder',colOrder);
grid_addBars(epo_r);
printFigure(['erp_topo'], [20  4+5*size(epo.y,1)], opt_fig);

fig_set(4, 'shrink',[1 2/3]);
scalpEvolutionPlusChannel(epo_r, mnt, clab, ival_scalps, defopt_scalp_r2);
printFigure(['erp_topo_r'], [20 9], opt_fig);

Even in this very basic ERP analysis, there are several steps, in which the choice of processing can have quite a big impact on the results, but nevertheless, the correct choice is not clear to us (maybe we will find out a recommendable choice at some point).

IDA Wiki: IDA/BerlinBCI/ToolBox/ToolboxPracticalExamples (last edited 2013-11-06 15:46:45 by BenjaminBlankertz)