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
walkthrough [2018/08/13 09:56]
149.203.254.243 [Visual data inspection]
walkthrough [2018/10/21 15:15] (current)
42.49.180.224 [Fieldtrip Walkthrough]
Line 15: Line 15:
 ====== Trial based analysis ====== ====== Trial based analysis ======
  
-===== Introduction ​===== +====== Fieldtrip Walkthrough =========== Data Structure in FieldTrip =====
- +
-In most cases you would like to analyze your data in respect to stimulus/​condition markers recorded within the data. Alternatively,​ you might want to define trials based upon visual inspection of the data, or based upon recordings of external device (eyetracker,​ EOG, SCR, TMS, etc) or logfile. For the sake of the purpose of overview only go into the first option although all these latter options are certainly supported in FieldTrip. If possible always record stimulus/​condition markers in your EEG/MEG data. It will make the analysis, if not life itself, substantially easier. You might have coded every stimulus with its own code, or rather used the marker to code the condition number. In any case, most probably the first step you want to do is to load your data and segment it into conditions according to the markers in the data. In the end you’ll just need to find a nice test-statistic,​ e.g. average alpha-power,​ and do your statistical comparison:​ +
- +
-{{:​wt_fig1b.png?​400}} +
- +
-===== Data Structure in FieldTrip =====+
  
 First of all it is very important to get comfortable with the way FieldTrip manages the structure of your data. Although it might take a little getting used to, in many ways it is obvious and determined by the inherent structure of the data. EEG and MEG data is composed of many channels and many time points. Therefore it contains a sample, a single number representing electrovolts or (square) tesla, for every Channel x Time point: First of all it is very important to get comfortable with the way FieldTrip manages the structure of your data. Although it might take a little getting used to, in many ways it is obvious and determined by the inherent structure of the data. EEG and MEG data is composed of many channels and many time points. Therefore it contains a sample, a single number representing electrovolts or (square) tesla, for every Channel x Time point:
Line 237: Line 231:
     cfg.method = '​mtmfft';​     cfg.method = '​mtmfft';​
     cfg.output = '​pow';​     cfg.output = '​pow';​
-    cfg.foi = [1:​30]; ​+    cfg.foi = [1:30]; 
 +    cfg.taper = '​dpss';​ 
 +    cfg.tapsmofrq = [2];
  
 Note that in cfg.foi we are now specifying a list of frequencies with steps of 1 Hz. It is also possible to specify a range (cfg.foilim = [1 30];) which will output an average power over these frequencies,​ or to take different size “steps” (cfg.foi = [1:2:30];). Note that in cfg.foi we are now specifying a list of frequencies with steps of 1 Hz. It is also possible to specify a range (cfg.foilim = [1 30];) which will output an average power over these frequencies,​ or to take different size “steps” (cfg.foi = [1:2:30];).
Line 302: Line 298:
 === ft_freqanalysis output === === ft_freqanalysis output ===
  
-We might go further into the output of ft_freqanalysis in a future release of this document but for now it suffices to say it gives a datastructure as output similar as the input structure but now with the field ''​.powspctrm''​ instead of ''​.trial''​ or ''​.avg.trial''​. +We might go further into the output of ft_freqanalysis in a future release of this document but for now it suffices to say it gives a datastructure as output similar as the input structure but now with the field ''​.powspctrm''​ instead of ''​.trial''​ or ''​.avg.trial''​. For further information see [[tutorial:​timefrequencyanalysis]] and [[tutorial::​plotting]]. 
  
 ====== Statistics ====== ​ ====== Statistics ====== ​
Line 382: Line 378:
  
 {{:​wt_fig19.png?​650}} {{:​wt_fig19.png?​650}}
-