Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
81 lines (63 sloc) 3.09 KB
function BST_Pipeline_6_Epoching
% Example of script for Brainstorm software
% Epoching using 2 events
% Author: Valérie Chanoine, Research Engineer at Brain and Language
% Research Institute (http://www.blri.fr/)
% Partners: Jean-Michel Badier and Christian Bénar from
% MEG Center of Marseille (Timone Hospital, France)
% Date: April 12, 2015
%%======= DEFINE PARAMETERS =======
SubjectName = {'NV_002_A1','NV_002_A2'};
EventName = { 'TRIGGER: 530', 'TRIGGER: 514'};
Condition = {'PredNouns', 'PredVerbs'};
Epochtime = [-0.2, 1.2];
Baseline = [-0.2, 0];
%% ===== START BRAINSTORM =====
if ~brainstorm('status')
brainstorm nogui
end
%% ===== START A NEW BRAINSTORM REPORT =====
bst_report('Start');
% Loop on subjects
for ixSub=1:numel(SubjectName)
%% ===== DEFINE MEG RECORDINGS =====
sFiles_bandpass = {...
[ SubjectName{ixSub} '/@rawc_rfDC_bp0p3_300_run1_bandpass_02/data_0raw_c_rfDC_bp0p3_300_run1_bandpass_02.mat'], ...
[ SubjectName{ixSub} '/@rawc_rfDC_bp0p3_300_run2_bandpass_02/data_0raw_c_rfDC_bp0p3_300_run2_bandpass_02.mat'], ...
[ SubjectName{ixSub} '/@rawc_rfDC_bp0p3_300_run3_bandpass_02/data_0raw_c_rfDC_bp0p3_300_run3_bandpass_02.mat'], ...
[ SubjectName{ixSub} '/@rawc_rfDC_bp0p3_300_run4_bandpass_02/data_0raw_c_rfDC_bp0p3_300_run4_bandpass_02.mat'], ...
[ SubjectName{ixSub} '/@rawc_rfDC_bp0p3_300_run5_bandpass_02/data_0raw_c_rfDC_bp0p3_300_run5_bandpass_02.mat'], ...
[ SubjectName{ixSub} '/@rawc_rfDC_bp0p3_300_run6_bandpass_02/data_0raw_c_rfDC_bp0p3_300_run6_bandpass_02.mat']};
%% ===== Process: Import data event 1 ====
sFilesOut = bst_process('CallProcess', 'process_import_data_event', ...
sFiles_bandpass, [], ...
'subjectname', SubjectName { ixSub }, ...
'condition', Condition{1}, ...
'eventname', EventName{1}, ...
'timewindow', [], ...
'epochtime', Epochtime, ...
'createcond', 1, ...
'ignoreshort', 1, ...
'usectfcomp', 1, ...
'usessp', 1, ...
'freq', [],...
'baseline', Baseline);
%% ===== Process: Import data event 2 ====
sFilesOut = bst_process('CallProcess', 'process_import_data_event', ...
sFiles_bandpass, [], ...
'subjectname', SubjectName { ixSub }, ...
'condition', Condition{2}, ...
'eventname', EventName{2}, ...
'timewindow', [], ...
'epochtime', Epochtime, ...
'createcond', 1, ...
'ignoreshort', 1, ...
'usectfcomp', 1, ...
'usessp', 1, ...
'freq', [],...
'baseline', Baseline);
end
% Save and display report
ReportFile = bst_report('Save', sFilesOut);
bst_report('Open', ReportFile);
end