Hi,
I try to import events (4 types) for multiple subject, but when I run my pipeline, it all goes in one participant (as described here By-event import when run on multiple runs creates unique folder - #2 by Francois)).
I tried to uncheck the box "created one condition..." and then I got different subjects but created in the same subject.
Then I tried to do it with the script and a loop:
% Script generated by Brainstorm (30-Jun-2022)
% Input files
sFiles = {...
'AF03/@rawPREDEMAUT_A03_CtF_0002_band/data_0raw_PREDEMAUT_A03_CtF_0002_band.mat', ...
'AF04/@rawPREDEMAUT_A04_CtF_0001_band/data_0raw_PREDEMAUT_A04_CtF_0001_band.mat'};
SubjectNames = {...
'AF03',...
'AF04'};
% Start a new report
bst_report('Start', sFiles);
% Process: Select file names with tag: Raw | band
sFiles = bst_process('CallProcess', 'process_select_tag', sFiles, [], ...
'tag', 'Raw | band', ...
'search', 2, ... % Search the file names
'select', 1); % Select only the files with the tag
for i = 1: length(sFiles)
% Process: Import MEG/EEG: Events
sFiles = bst_process('CallProcess', 'process_import_data_event', sFiles{i}, [], ...
'subjectname', SubjectNames{i}, ...
'condition', '', ...
'eventname', 'F_CtF, F_FtC, N_CtF, N_FtC', ...
'timewindow', [], ...
'epochtime', [0, 2.6], ...
'createcond', 1, ...
'ignoreshort', 1, ...
'usectfcomp', 1, ...
'usessp', 1, ...
'freq', [], ...
'baseline', [1.3, 1.5], ...
'blsensortypes', 'MEG, EEG');
end
% Process: Add time offset: -1500.00ms
sFiles = bst_process('CallProcess', 'process_timeoffset', sFiles, [], ...
'info', [], ...
'offset', -1.5, ...
'overwrite', 1);
% Save and display report
ReportFile = bst_report('Save', sFiles);
bst_report('Open', ReportFile);
% bst_report('Export', ReportFile, ExportDir);
% bst_report('Email', ReportFile, username, to, subject, isFullReport);
But I got this erros:
Brace indexing is not supported for variables of this type.
Error in import (line 22)
sFiles = bst_process('CallProcess', 'process_import_data_event', sFiles{i}, [], ...
What's wrong? And how can I have my different events in each subject?
Thanks