quick intro to fieldtrip intro to fieldtrip.pdffieldtrip data structures (example) data = hdr: [1x1...
TRANSCRIPT
![Page 1: Quick intro to FieldTrip intro to FieldTrip.pdfFieldTrip data structures (example) data = hdr: [1x1 struct] Header info label: {306x1 cell} Channel names time: {1x600 cell} Time axis](https://reader034.vdocuments.us/reader034/viewer/2022050219/5f64add434a0c06d493b2c45/html5/thumbnails/1.jpg)
Quick intro to FieldTrip
Get started in 5 minutes
![Page 2: Quick intro to FieldTrip intro to FieldTrip.pdfFieldTrip data structures (example) data = hdr: [1x1 struct] Header info label: {306x1 cell} Channel names time: {1x600 cell} Time axis](https://reader034.vdocuments.us/reader034/viewer/2022050219/5f64add434a0c06d493b2c45/html5/thumbnails/2.jpg)
![Page 3: Quick intro to FieldTrip intro to FieldTrip.pdfFieldTrip data structures (example) data = hdr: [1x1 struct] Header info label: {306x1 cell} Channel names time: {1x600 cell} Time axis](https://reader034.vdocuments.us/reader034/viewer/2022050219/5f64add434a0c06d493b2c45/html5/thumbnails/3.jpg)
What is FieldTrip?
An open-source MATLAB toolbox for processing and analysing electrophysiological data
Data-processing
Analysis of evoked and induced responses
Source analysis
Connectivity
Group analysis
Statistics
![Page 4: Quick intro to FieldTrip intro to FieldTrip.pdfFieldTrip data structures (example) data = hdr: [1x1 struct] Header info label: {306x1 cell} Channel names time: {1x600 cell} Time axis](https://reader034.vdocuments.us/reader034/viewer/2022050219/5f64add434a0c06d493b2c45/html5/thumbnails/4.jpg)
Set up FieldTrip
Download FieldTrip:
http://www.fieldtriptoolbox.org/download
• Sign up
• Find current date
• Download
• Put in easy to access folder (e.g. /home/ or C:/)
GitHub:
http://github.com/fieldtrip/fieldtrip
![Page 5: Quick intro to FieldTrip intro to FieldTrip.pdfFieldTrip data structures (example) data = hdr: [1x1 struct] Header info label: {306x1 cell} Channel names time: {1x600 cell} Time axis](https://reader034.vdocuments.us/reader034/viewer/2022050219/5f64add434a0c06d493b2c45/html5/thumbnails/5.jpg)
Set up FieldTrip
In Matlab terminal:> addpath ‘~/mypath/fieldtrip’
> ft_defaults
> cd ‘/my_working_directory’
NB: If you have SPM as a default path, remove before setting up FieldTrip.
> restoredefaultpath
![Page 6: Quick intro to FieldTrip intro to FieldTrip.pdfFieldTrip data structures (example) data = hdr: [1x1 struct] Header info label: {306x1 cell} Channel names time: {1x600 cell} Time axis](https://reader034.vdocuments.us/reader034/viewer/2022050219/5f64add434a0c06d493b2c45/html5/thumbnails/6.jpg)
FieldTrip functions
data_out = ft_functionname(cfg)
data_out = ft_functionname(cfg, data_in)
”cfg” is configuration structurecfg.key1 = value1
cfg.key2 = value2
...etc.
Tip: Start each new cfg by clearing previouscfg = []; %Reset cfg
![Page 7: Quick intro to FieldTrip intro to FieldTrip.pdfFieldTrip data structures (example) data = hdr: [1x1 struct] Header info label: {306x1 cell} Channel names time: {1x600 cell} Time axis](https://reader034.vdocuments.us/reader034/viewer/2022050219/5f64add434a0c06d493b2c45/html5/thumbnails/7.jpg)
Need more help?
Get documentation for functions for help, cfg options, etc, use the help function in MATLAB:> help ft_functionname
Online tutorial, examples and documentation:http://www.fieldtriptoolbox.org/
![Page 8: Quick intro to FieldTrip intro to FieldTrip.pdfFieldTrip data structures (example) data = hdr: [1x1 struct] Header info label: {306x1 cell} Channel names time: {1x600 cell} Time axis](https://reader034.vdocuments.us/reader034/viewer/2022050219/5f64add434a0c06d493b2c45/html5/thumbnails/8.jpg)
FieldTrip data structures (example)
data =
hdr: [1x1 struct] Header infolabel: {306x1 cell} Channel namestime: {1x600 cell} Time axis for each trialtrial: {1x600 cell} Trial data [channels x timepoints]fsample: 200 Sampling frequency (Hz)sampleinfo: [600x2 double] [Start end] of each trial in raw datatrialinfo: [600x3 double] Trial bookkeepinggrad: [1x1 struct] Gradiometer positions, etcelec: [1x1 struct] Electrode positions, etccfg: [1x1 struct] Previous configuration (for bookkeeping)
![Page 9: Quick intro to FieldTrip intro to FieldTrip.pdfFieldTrip data structures (example) data = hdr: [1x1 struct] Header info label: {306x1 cell} Channel names time: {1x600 cell} Time axis](https://reader034.vdocuments.us/reader034/viewer/2022050219/5f64add434a0c06d493b2c45/html5/thumbnails/9.jpg)
What is in the data structures?
> cfg = [];
> cfg.layout = 'neuromag306mag.lay‘;
> ft_multiplotER(cfg, timelockeds{:});
![Page 10: Quick intro to FieldTrip intro to FieldTrip.pdfFieldTrip data structures (example) data = hdr: [1x1 struct] Header info label: {306x1 cell} Channel names time: {1x600 cell} Time axis](https://reader034.vdocuments.us/reader034/viewer/2022050219/5f64add434a0c06d493b2c45/html5/thumbnails/10.jpg)
Summary
data_out = ft_functionname(cfg, data_in)
help ft_functionname
Write variable name in terminal to see what it contain
![Page 11: Quick intro to FieldTrip intro to FieldTrip.pdfFieldTrip data structures (example) data = hdr: [1x1 struct] Header info label: {306x1 cell} Channel names time: {1x600 cell} Time axis](https://reader034.vdocuments.us/reader034/viewer/2022050219/5f64add434a0c06d493b2c45/html5/thumbnails/11.jpg)
megnord.org/2018/workshops.html