This is an old revision of the document!
Source Localization
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)
Brainstorm Organization
- Each subject is then saved as a protocol that is then saved in that database folder
- With each protocol there is an anat and data folder
- anat: anatomy
- contains the anatomy files that were uploaded (from their freesurfer output)
- data: your brain data
- contains eeg files that you load in
Brainstorm Scripts
- I have one script for each task epoch (fix, delay, resting state, etc)
- Sets the necessary paths to the freesurfer folders, list of glasser parcellations, merge 7t, and preprocessed data
- We need the subject folders that have 'long' in the title so it checks for that and if yes, moves on
if contains(FSsubfolder,'long')
- Define the subject folder (protocol), DBfolder is the brainstorm_db, and then I named it sourceLocal_beamforming_ subjectID based on their MRI date, not eeg date to match the freesurfer file
subjectDBfolder = [DBfolder '/sourceLocal_beamforming_' SubjectNameMRI];
- Here we are setting the protocol name
- The iProtocol bst_get checks to see the protocol already exists in the database
- If no (iProtocol is empty), then create protocol, and add the subject within it
- That just creates a blank subject line in the protocol to then fill with the anat and data
- If the protocol does exist, then load it and set it as the current protocol
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
- Unordered List Item
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