Differences

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

Link to this comparison view

workshop:trento [2012/08/06 12:32]
robert created
workshop:trento [2012/10/25 10:03] (current)
robert removed the tms cleaning function, it is now in the fieldtrip svn repository
Line 1: Line 1:
 ======FieldTrip workshop in Trento, Italy====== ======FieldTrip workshop in Trento, Italy======
  
-===== Suggested date =====+===== When and where =====
  
-September or October 2012+Monday 22 October - Wednesday 24 October 2012
  
-===== Suggested program =====+http://www.unitn.it/en/cimec 
 + 
 +The local organizers of the workshop are Nathan Weisz and Angelika Lingnau. 
 + 
 +===== Using the tutorial data and the FieldTrip version provided ===== 
 + 
 +For the hands-on sessions you have to start MATLAB. To ensure that 
 +everything runs smooth, we will work with a **clean and well-tested** 
 +version of fieldtrip that is distributed on the workstations and on a USB stick. You should **not** work with an old version you might already have installed in the past. Furthermore, the tutorial data **does not have to be downloaded** but will also be distributed on the workstations and on a USB stick. 
 + 
 +If you work on your own laptop you need the USB stick: 
 +  - Copy the complete content from the USB stick to your computer 
 +  - Unzip the fieldtrip-xxxxxxxx.zip file.  
 +  - Unzip the Subject01.zip file, you should place the contents in the tutorial directory. 
 + 
 +<note warning> 
 +Depending on the unzip program you are using (e.g. Winrar), the name 
 +of the zip file might also appear as directiory, resulting in 
 +path_to_directory/fieldtrip-xxxxxxxx/fieldtrip-xxxxxxxx, i.e. the 
 +fieldtrip directory in a fieldtrip directory. Please fix that by 
 +moving all files one level up. 
 +</note> 
 + 
 +After copying all files to your computer and unzipping then, you start MATLAB. To ensure that the right version of fieldtrip is used, and not another version (such as the one included in SPM or EEGLAB), you type in the **MATLAB command window** 
 + 
 + 
 +  restoredefaultpath 
 +  cd path_to_directory/fieldtrip-xxxxxxxx 
 +  ls 
 +  addpath(pwd) 
 +  ft_defaults 
 + 
 +The restoredefaultpath command clears your path, keeping only the official MATLAB toolboxes.  
 +   
 +The ls statement shows the list of files in the present directory, and you can visually check that the contents are correct and e.g. not in another subfolder. You should see a long list of ft_xxx.m functions. 
 +   
 +The addpath(pwd) statement adds the 
 +present working directory, i.e. the directory containing the fieldtrip 
 +main funcctions. The ft_defaults command ensures that all required 
 +subdirectories are added to the path. 
 + 
 +If you get the error "can't find the command ft_defaults" you should check the present working directory.  
 + 
 +<note warning> 
 +Please do NOT use the graphical path management tool from MATLAB. In this hands-on session we'll manage the path from the command line, but in general you are much better off using the startup.m file than the path GUI. 
 + 
 +Please do NOT add fieldtrip with all subdirectories, subdirectories will be added automatically when needed, but only when needed. 
 +</note> 
 + 
 + 
 +After installing fieldtrip to your path, you change into the tutorial directory 
 + 
 +  cd path_to_directory/tutorial 
 + 
 +In general the tutorials start by reading the raw data from 
 +"Subject01.ds", which is a data directory. You should **not** go into 
 +the Subject01.ds directory, but stay at the level of the tutorial 
 +directory. If a specific tutorial instructs you to load data (and 
 +if you want the skip the step just prior to that because of time 
 +limitations), you should go into the tutorial data directory. 
 + 
 +===== Program =====
  
 Each of the topics consists of a 1h lecture and a 2h hands-on session. Each of the topics consists of a 1h lecture and a 2h hands-on session.
  
-====day 1====+====Monday==== 
 + 
 +  * morning: [[/tutorial/eventrelatedaveraging|intro and ERFs]]  
 +  * afternoon: [[/tutorial/timefrequencyanalysis|time-frequency analysis]] 
 + 
 +====Tuesday==== 
 + 
 +  * morning: [[:tutorial:beamformer|beamforming]]  
 +  * afternoon: [[/tutorial/cluster_permutation_timelock|randomization stats]] 
 + 
 +====Wednesday==== 
 + 
 +  * playground, analyzing your own data 
 + 
 +===== Trial function for TMS data ==== 
 + 
 +<code> 
 +function trl = trialfun_tms(cfg) 
 + 
 +% TRIALFUN_TMS does a flank detection on one of the EEG channels  
 +% in a combined EEG-TMS recording 
 +
 +% Required fields in the configuration are: 
 +%   cfg.dataset             = 'elli_test2_tms2.vhdr' 
 +%   cfg.trialdef.tmschannel = 'POz' 
 +%   cfg.trialdef.threshold  = -12000; 
 +%   cfg.trialdef.pre        = 0.3 
 +%   cfg.trialdef.post       = 0.7
  
-  * intro and ERF +hdr = ft_read_header(cfg.dataset); 
-  * frequency+indx = find(strcmp(hdr.label, cfg.trialdef.tmschannel)); 
 +dat = ft_read_data(cfg.dataset, 'chanindx', indx);
  
-====day 2====+if cfg.trialdef.threshold<0 
 +  trig (dat<cfg.trialdef.threshold); 
 +elseif cfg.trialdef.threshold>0 
 +  trig (dat>cfg.trialdef.threshold); 
 +end
  
-  * beamforming  +% find the onset and offset of the thresholded signal 
-  * randomization stats+trig = [diff(trig) 0];
  
-====day 3====+% the TMS pulse happens at the onset 
 +tms_sample find(trig==1);
  
-  * analyzing own data (playground) 
  
-====optional topics====+trialbeg tms_sample(:) - hdr.Fs*cfg.trialdef.pre; 
 +trialend tms_sample(:) + hdr.Fs*cfg.trialdef.post; 
 +offset   -hdr.Fs*cfg.trialdef.pre;
  
-  * connectivity analysis +trl = [trialbeg trialend]; 
-  * multivariate analysis +trl(:,3) = offset; 
-  * ...+</code>
  
-===== Organizational stuff ===== 
  
-This will be added as TODO list. 
  
- +  
workshop/trento.1344249168.txt.gz · Last modified: 2012/08/06 12:32 by robert

You are here: startworkshoptrento
This DokuWiki features an Anymorphic Webdesign theme, customised by Eelke Spaak and Stephen Whitmarsh.
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0