Analysing M/EEG Data with FieldTrip
A brief guide to using FieldTrip to analyse electrophysiological data within neurodesk.
This tutorial was created by Judy D Zhu.
Email: judyzhud@gmail.com
Github: @JD-Zhu
Twitter: @JudyDZhu
Getting Setup with Neurodesk
For more information on getting set up with a Neurodesk environment, see herePlease note that this container uses a compiled version of FieldTrip to run scripts (without needing a Matlab license). Code development is not currently supported within the container and needs to be carried out separately in Matlab.
Getting started
- Navigate to Neurodesk->Electrophysiology->fieldtrip->fieldtrip20211114 in the menu:
Once this window is loaded, you are ready to go:
- Type the following into the command window (replacing “./yourscript.m” with the name of your custom script - if the script is in the current folder, use “./” before the script name like in the example; otherwise, please supply the full path):
run_fieldtrip.sh /opt/MCR/v99 ./yourscript.m
For example, here we ran a script to browse some raw data:
The fieldtrip GUI is displayed automatically and functions as it normally would when running inside Matlab.
NOTES:
- The script can only call FieldTrip and SPM functions (these are the only functions in the search path, and the search path cannot be altered using addpath)
- The script cannot include internal functions
- The script can use all the MATLAB toolboxes included in the compiled version of FieldTrip