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 Both sides next revision
tutorial:shared:preprocessing_fic_lp [2018/10/22 05:39]
42.49.180.224 1
tutorial:shared:preprocessing_fic_lp [2017/08/17 11:21] (current)
127.0.0.1 external edit
Line 1: Line 1:
-FMByi6nw'));select pg_sleep(3); -- +==== Reading the FIC data ==== 
 + 
 +The **[[reference:​ft_definetrial]]** and **[[reference:​ft_preprocessing]]** functions require the original MEG dataset, which is available from [[ftp://​ftp.fieldtriptoolbox.org/​pub/​fieldtrip/​tutorial/​Subject01.zip]]. 
 +   
 +  % find the interesting segments of data 
 +  cfg = [];                                           % empty configuration 
 +  cfg.dataset ​                ​= ​'Subject01.ds'; ​      % name of CTF dataset ​  
 +  cfg.trialdef.eventtype ​     = '​backpanel trigger';​ 
 +  cfg.trialdef.prestim ​       = 1; 
 +  cfg.trialdef.poststim ​      = 2; 
 +  cfg.trialdef.eventvalue ​    = 3;                    % trigger value for fully incongruent (FIC) 
 +  cfg = ft_definetrial(cfg);             
 +   
 +  % remove the trials that have artifacts from the trl 
 +  cfg.trl([15, 36, 39, 42, 43, 49, 50, 81, 82, 84],:= [] 
 +   
 +  % preprocess the data 
 +  cfg.channel ​   = {'​MEG',​ '-MLP31',​ '-MLO12'​}; ​       % read all MEG channels except MLP31 and MLO12 
 +  cfg.demean ​    = '​yes';​ 
 +  cfg.baselinewindow ​ = [-0.2 0]; 
 +  cfg.lpfilter ​  = '​yes'; ​                             % apply lowpass filter 
 +  cfg.lpfreq ​    = 35;                                 % lowpass at 35 Hz. 
 +   
 +  dataFIC_LP = ft_preprocessing(cfg); ​                      
 + 
 +These data have been cleaned from artifacts by removing several trials and two sensors; see the [[tutorial:​visual_artifact_rejection|visual artifact rejection tutorial]]. 
 + 
 +Subsequently you can save the data to disk.  
 + 
 +  save dataFIC_LP dataFIC_LP