User Tools

Site Tools


eeglabsessh2b

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
eeglabsessh2b [2014/02/06 11:47]
bastienboutonnet
eeglabsessh2b [2014/10/08 03:14] (current)
Line 1: Line 1:
-<color Gray> 
-Be patient :) This page will go live on Wed, 5th at 10am.\\ 
-\\ 
-Until then, check the [[overview|overview]] page where you will find all the info about the hackathon.\\ 
-You can also download the necessary files [[download|here]]. 
- 
-</​color>​ 
- 
 ====== Session Two: Post-Processing & Analysis (GUI) ====== ====== Session Two: Post-Processing & Analysis (GUI) ======
 ===== Preparation of Day Crew Script for analysis in ERPLAB ​ ===== ===== Preparation of Day Crew Script for analysis in ERPLAB ​ =====
Line 111: Line 103:
  
  
-/**+
  
  
Line 128: Line 120:
 % %
 % Author: Bastien Boutonnet, bastien.b@icloud.com % Author: Bastien Boutonnet, bastien.b@icloud.com
- +  
- +  
-subject={'​504'}; +subject={'​505'}; 
- +  
-pathname_read='/​Users/​Shared/​HackathonFiles/​TutorialData/​EEGHack2/NightCrew/';+pathname_read='/​Users/​Shared/​HackathonFiles/​TutorialData/​EEGLABHack2/2PostICACorr/';
 pathname_writePostProc='/​Users/​Shared/​HackathonFiles/​TutorialData/​EEGLABHack2/​2PostICACorr/​PostProc/';​ pathname_writePostProc='/​Users/​Shared/​HackathonFiles/​TutorialData/​EEGLABHack2/​2PostICACorr/​PostProc/';​
 pathname_writeERPSets='/​Users/​Shared/​HackathonFiles/​TutorialData/​EEGLABHack2/​2PostICACorr/​ERPSets/';​ pathname_writeERPSets='/​Users/​Shared/​HackathonFiles/​TutorialData/​EEGLABHack2/​2PostICACorr/​ERPSets/';​
 + 
 for i=1:​length(subject) for i=1:​length(subject)
    ​fprintf('​Processing Subject #%g : %s...\n',​ i, subject{i});​    ​fprintf('​Processing Subject #%g : %s...\n',​ i, subject{i});​
 + 
 %creates the destination folders assuming you have not created it manually before %creates the destination folders assuming you have not created it manually before
 %if test makes sure the folder only gets created once. %if test makes sure the folder only gets created once.
Line 147: Line 139:
         display('​%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Destination folder does not exist. Chillax! Will be created'​);​         display('​%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Destination folder does not exist. Chillax! Will be created'​);​
     end     end
-    ​+ 
      if isequal(exist(pathname_writeERPSets,​ '​dir'​),​7) %7 = directory      if isequal(exist(pathname_writeERPSets,​ '​dir'​),​7) %7 = directory
         display('​%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Destination folder exists. All Good to go!');         display('​%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Destination folder exists. All Good to go!');
Line 154: Line 146:
         display('​%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Destination folder does not exist. Chillax! Will be created'​);​         display('​%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Destination folder does not exist. Chillax! Will be created'​);​
     end     end
-    ​+ 
     %try     %try
-    ​+ 
     %Loads ICA corrected set     %Loads ICA corrected set
     EEG = pop_loadset('​filename',​ [pathname_read subject{i} '​RRCOREPFICAC.set'​]);​     EEG = pop_loadset('​filename',​ [pathname_read subject{i} '​RRCOREPFICAC.set'​]);​
-    ​+ 
     %epoched to continuous set     %epoched to continuous set
-    EEG = pop_epoch2continuous(EEG, '​Warning',​ '​off'​); +    EEG = pop_epoch2continuous(EEG);​ 
-    + 
     %create basic eventlist     %create basic eventlist
-    EEG  = pop_creabasiceventlist(EEG ,'​AlphanumericCleaning','​on','​BoundaryNumeric',​{-99},'​BoundaryString',​{'​boundary'​});​ +    EEG  = pop_creabasiceventlist( EEG , '​AlphanumericCleaning',​ '​on',​ 'Newboundary', { -99 }, 'Stringboundary', { '​boundary'​ }, '​Warning',​ '​on' ​); 
-    + 
     %assign bins     %assign bins
-    EEG  = pop_binlister( EEG , '​BDF',​ '/​Users/​Shared/​HackathonFiles/​TutorialData/​EEGHack2/​NightCrew/​bins.txt', '​ExportEL',​ [pathname_writePostProc subject{i} '​_bins.txt'​],​ '​IndexEL',  ​1, '​SendEL2',​ 'All', '​UpdateEEG',​ 'on', '​Voutput',​ 'EEG' ); +    EEG  = pop_binlister( EEG , '​BDF',​ '/​Users/​Shared/​HackathonFiles/​TutorialData/​bindesc.txt', '​ExportEL',​ [pathname_writePostProc subject{i} '​_bins.txt'​],​ '​IndexEL',  ​'​no'​, '​SendEL2',​ 'Workspace&​EEG', '​UpdateEEG',​ '​on'​);​ 
-    +
     %extract bin-based epochs & baseline correct     %extract bin-based epochs & baseline correct
     EEG = pop_epochbin(EEG , [-100  1000], '​pre'​);​     EEG = pop_epochbin(EEG , [-100  1000], '​pre'​);​
-    ​+ 
     %Artefact detection, save summary, save set     %Artefact detection, save summary, save set
     EEG  = pop_artextval(EEG,'​Channel',​[1:​65 67],'​Flag',​1,'​Threshold',​[-75 75],'​Twindow',​[-100 1000]);     EEG  = pop_artextval(EEG,'​Channel',​[1:​65 67],'​Flag',​1,'​Threshold',​[-75 75],'​Twindow',​[-100 1000]);
Line 177: Line 169:
     EEG = pop_saveset(EEG,'​filename',​[pathname_writePostProc subject{i} '​_RREPFICACAR.set'​]);​     EEG = pop_saveset(EEG,'​filename',​[pathname_writePostProc subject{i} '​_RREPFICACAR.set'​]);​
     EEG = eeg_checkset(EEG);​     EEG = eeg_checkset(EEG);​
-    ​+ 
     %Average     %Average
     ERP = pop_averager(EEG ,'​Criterion',​1,'​SEM','​on'​);​     ERP = pop_averager(EEG ,'​Criterion',​1,'​SEM','​on'​);​
     ERP = pop_savemyerp(ERP,'​erpname',​[subject{i} '​_ERPs'​],'​filename',​[pathname_writeERPSets subject{i} '​_ERPs.erp'​]);​     ERP = pop_savemyerp(ERP,'​erpname',​[subject{i} '​_ERPs'​],'​filename',​[pathname_writeERPSets subject{i} '​_ERPs.erp'​]);​
-    ​+ 
     %Once you have fully debugged your script and that you know it goes     %Once you have fully debugged your script and that you know it goes
     %through without problems (Due to scripting) uncomment the following     %through without problems (Due to scripting) uncomment the following
     %lines. It allows you to jump participants if the sets are buggy but     %lines. It allows you to jump participants if the sets are buggy but
     %won't give you error messages.     %won't give you error messages.
-    ​+ 
     %catch     %catch
     %   ​disp(['​%%%%%%%%%%%%%%%%%%%%%%%%%Something went wrong with participant ' subject{i} ' :'( Skipping to next participant %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'​]);​     %   ​disp(['​%%%%%%%%%%%%%%%%%%%%%%%%%Something went wrong with participant ' subject{i} ' :'( Skipping to next participant %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'​]);​
     %end     %end
-    ​+ 
 end end
 </​file>​ </​file>​
  
 <color indianred>​DISCLAIMER:​ The tutorials provided on this wiki are not intended to compete with the tutorials written by the EEGLAB'​s (and other toolboxes) developers ([[http://​sccn.ucsd.edu/​wiki/​Main_Page|EEGLAB website]]). It intends to be a condensed version for educational/​reference purposes for members of the lab/​department to which this workshop was given.</​color>​ <color indianred>​DISCLAIMER:​ The tutorials provided on this wiki are not intended to compete with the tutorials written by the EEGLAB'​s (and other toolboxes) developers ([[http://​sccn.ucsd.edu/​wiki/​Main_Page|EEGLAB website]]). It intends to be a condensed version for educational/​reference purposes for members of the lab/​department to which this workshop was given.</​color>​
-*/ 
eeglabsessh2b.1391687275.txt.gz · Last modified: 2014/10/08 03:14 (external edit)