LNCD

Table of Contents

  • LNCD Home
  • Administration
  • Notebooks
  • Journal Club Presentations
  • Publications
  • Current Projects
  • Completed Projects
  • Current Grants
  • Datasets by Project
  • Brain ROIs and Measures
  • ️Tools And Methods
  • Big Data
  • RA Homepage
  • Undergrad Resources
  • Recent Changes
  • Maintenance
  • Site Map
  • Random Page
LNCD
Admin » Source Localization

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
tools:source_localization [2026/11/09 16:30] – sdm63tools:source_localization [2026/11/09 16:38] (current) – sdm63
Line 48: Line 48:
  
  
-  * Unordered List Item+  * bst_get('ProtocolStudies') pulls out the studies within one protocol  
 +    * A study is like each EEG file you have loaded into that protocol, so everyone should have fix, delays, and rest 
 +  * But this code below checks to see if fix (or delay or rest or whatever what you're running) already exists and removes it (cause maybe you wanna redo it)
  
 <code> <code>
Line 65: Line 67:
 end end
  
 +</code>
 +
 +  * Find the lunaID
 +  * Find the MRI date
 +  * Find the row in merge 7t with the corresponding lunaID and MRI date
 +  * Using that row, find the EEG date
 +  * Create the path to the corresponding EEG file
 +
 +<code>
 +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
 </code> </code>