Version: brainstorm3
Package is in Shane/resources/brainstorm3
Need to add its path to matlab and then just run the command brainstorm
Running/ installing brainstorm will automatically make a brainstorm_db folder in the same folder where brainstorm3 is saved (in my case resources)
if contains(FSsubfolder,'long')
subjectDBfolder = [DBfolder '/sourceLocal_beamforming_' SubjectNameMRI];
ProtocolName = sprintf('sourceLocal_beamforming_%s', SubjectNameMRI);
iProtocol = bst_get('Protocol', ProtocolName);
if isempty(iProtocol)
gui_brainstorm('CreateProtocol', ProtocolName, 0, 0);
db_add_subject(SubjectNameMRI, [], 1);
else
gui_brainstorm('SetCurrentProtocol', iProtocol);
end
sStudies = bst_get('ProtocolStudies');
for iStudy = 1:length(sStudies.Study)
studyName = sStudies.Study(iStudy).Name;
if contains(studyName, 'fix')
fprintf('Deleting study: %s\n', studyName);
db_delete_studies(iStudy);
end
end
luna = str2double(SubjectNameMRI(1:5));
MRIdate = str2double(SubjectNameMRI(7:14));
rowIdx = merge7t(:,1) == luna & merge7t(:,4) == MRIdate;
if any(rowIdx)
eeg_date = merge7t(rowIdx,5);
pattern = sprintf('%s_%s*_rerefwhole_ICA_icapru.set', string(luna), string(eeg_date));
files = dir(fullfile(EEGfolder, pattern));
EEGpath = fullfile(EEGfolder, files.name);
else
continue
end