Frequently Asked Questions
On this page you can find answers to a variety of FieldTrip and MATLAB related questions.
We invite you to add your own example scripts or frequently asked questions on the website. Also tutorials can be added. Every time you explain somebody something about FieldTrip, please consider whether you could use the website for this, so others can learn from it as well.
Reading and preprocessing data
- How can I use the databrowser?
- How can I inspect the electrode impedances of my data?
- Should I rereference my EEG data prior to, or after ICA?
- I used to work with trl-matrices that have more than 3 columns. Why is this not supported anymore?
Specific data formats
- How can I read EGI mff data without the JVM?
- How can I read all channels from an EDF file that contains multiple sampling rates?
- How does the CTF higher-order gradiometer work?
- How can I extend the reading functions with a new dataformat?
- I have problems reading in neuroscan .cnt files. How can I fix this?
- Why are the fileio functions stateless, does the fseek not make them very slow?
- How can I import my own dataformat?
- How can I deal with a discontinuous Neuralynx recording?
- How can I fix a corrupt CTF meg4 data file?
- How can I fix a corrupt CTF res4 header file?
- How can I read corrupted (unsaved)_CTF_data?
- I am having problems reading the CTF .hc headcoordinates file
- Reading is slow, can I write my raw data to a more efficient file format?
- What dataformats are supported?
- How can I append the files of two separate recordings?
- How can I convert one dataformat into an other?
- How can I merge two datasets that were acquired simultaneously with different amplifiers?
- How can I preprocess a dataset that is too large to fit into memory?
Trials, triggers and events
- How can I check or decipher the sequence of triggers in my data?
- How can I find out what eventvalues and eventtypes there are in my data?
- How can I process continuous data without triggers?
- How can I transform trigger values from bits to decimal representation with a trialfun?
- Is it possible to keep track of trial-specific information in my FieldTrip analysis pipeline?
- What kind of filters can I apply to my data?
- Do I need to resample my data, and if so, how is this to be done?
- I used ICA on my MEG data from before 2012 and now FieldTrip crashes, why is that?
- Why does my ICA output contain complex numbers?
- How can I consistently represent artifacts in my data?
- How can I interpret the different types of padding that I find when dealing with artifacts?
- How does the filter padding in preprocessing work?
- Why is there a residual 50Hz line-noise component after applying a DFT filter?
- How can I compute inter-trial coherence?
- How can I do time-frequency analysis on continuous data?
- How does mtmconvol work?
- How to interpret the sign of the phase slope index?
- In what way can frequency domain data be represented in FieldTrip?
- What convention is used to define absolute phase in ‘mtmconvol’, ‘wavelet’ and ‘mtmfft’
- What does “padding not sufficient for requested frequency resolution” mean?
- What is the difference between coherence and coherency?
- Why am I not getting exact integer frequencies?
- Why does my TFR contain NaNs?
- Why does my TFR look strange (part I, demeaning)?
- Why does my TFR look strange (part II, detrending)?
- Why is the largest peak in the spectrum at the frequency which is 1/segment length?
- Why does my output.freq not match my cfg.foi when using ‘mtmconvol’ in ft_freqanalyis?
- Why does my output.freq not match my cfg.foi when using ‘mtmfft’ in ft_freqanalyis?
- Why does my output.freq not match my cfg.foi when using ‘wavelet’ (formerly ‘wltconvol’) in ft_freqanalyis?
- Does it make sense to subtract the ERP prior to time frequency analysis, to distinguish evoked from induced power?
- Can I do combined EEG and MEG source reconstruction?
- Can I restrict the source reconstruction to the grey matter?
- How are electrodes, magnetometers or gradiometers described?
- How are the LPA and RPA points defined?
- How are the different head and MRI coordinate systems defined?
- How can I check whether the grid that I have is aligned to the segmented volume and to the sensor gradiometer?
- How can I convert an anatomical mri from DICOM into CTF format?
- How can I determine the anatomical label of a source or electrode?
- How can I fine-tune my BEM volume conduction model?
- How can I map source locations onto an anatomical label in an atlas?
- How can I visualize the different geometrical objects that are needed for forward and inverse computations?
- How do I install the OpenMEEG binaries?
- How do homogenous coordinate transformation matrices work?
- How is anatomical, functional or statistical “volume data” described?
- How should I specify the fiducials?
- How to change the MRI orientation, the voxel size or the field-of-view?
- How to coregister an anatomical MRI with the gradiometer or electrode positions?
- Is it good or bad to have dipole locations outside of the brain for which the source reconstruction is computed?
- Is it important to have accurate measurements of electrode locations for EEG source reconstruction?
- My MRI is upside down, is this a problem?
- Should I use a Polhemus or a Structure Sensor to record electrode positions?
- What is the conductivity of the brain, CSF, skull and skin tissue?
- What is the difference between the ACPC, MNI, SPM and TAL coordinate systems?
- What kind of volume conduction models are implemented?
- Where can I find the dipoli command-line executable?
- Where is the anterior commissure?
- Why is there a rim around the brain for which the source reconstruction is not computed?
- Why is the source model deformed or incorrectly aligned after warping template?
- Why should I use an average reference for EEG source reconstruction?
- Why does my EEG headmodel look funny?
- How NOT to interpret results from a cluster-based permutation test?
- How can I define neighbouring sensors?
- How can I determine the onset of an effect?
- How can I test an interaction effect using cluster-based permutation tests?
- Should I use t or F values for cluster-based permutation tests?
- How can I test for correlations between neuronal data and quantitative stimulus and behavioural variables?
- How can I test whether a behavioral measure is phasic?
- How can I use the ivar, uvar, wvar and cvar options to precisely control the permutations?
- How does ft_prepare_neighbours work?
- What is the idea behind statistical inference at the second-level?
- Why are there multiple neighbour templates for the NeuroMag306 system?
- Why should I use the cfg.correcttail option when using statistics_montecarlo?
Plotting and visualization
- How can I play back EEG/MEG and synchronous audio or video?
- How can I visualize a ‘localspheres’ volume conductor model?
- How do I construct a layout file for the plotting functions?
- I am getting strange artifacts in figures that use opacity
- I am having problems printing figures that use opacity
- What are the different Neuromag and Yokogawa layouts good for?
- What is a good way to save images for later processing in other software?
- What is the format of the layout file, which is used for plotting?
- What is the plotting convention for anatomical MRIs?
- Why does my anatomical MRI show upside-down when plotting it with ft_sourceplot?
- Which colormaps are supported?
- How can I change the head localization in a CTF dataset?
- How can I monitor a subject’s head position during a MEG session?
- How can I test the serial port connection between two computers?
- How can I use my MacBook Pro for stimulus presentation in the MEG lab?
- How can I visualize the Neuromag head position indicator coils?
Realtime data streaming and analysis
- Does the FieldTrip realtime buffer only work with MATLAB?
- How fast is the FieldTrip buffer for realtime data streaming?
- How should I get started with the FieldTrip realtime buffer?
Distributed computing with the MATLAB distributed computing toolbox
Distributed computing with fieldtrip/qsub on a HPC cluster
- How to compile MATLAB code into stand-alone executables?
- How to get started with distributed computing using qsub?
- Can I prevent “external” toolboxes from being added to my MATLAB path?
- Can I use FieldTrip without MATLAB license?
- Can I use Octave instead of MATLAB?
- How can I compile the mex files and command-line programs?
- How can I compile the mex files on 64-bit Windows?
- How can I compile the mex files on macOS?
- How many lines of code does FieldTrip consist of?
- How to select the correct SPM toolbox?
- MATLAB complains about a missing or invalid MEX file, what should I do?
- MATLAB complains that mexmaci64 cannot be opened because the developer cannot be verified
- MATLAB does not see the functions in the “private” directory
- MATLAB version 7.3 (2006b)crashes_when_I_try_to_do…
- Should I add FieldTrip with all subdirectories to my MATLAB path?
- The databrowser crashes and destroys the whole MATLAB session, how can I resolve this?
- What are the MATLAB requirements for using FieldTrip?
- What is the relation between “events” (such as_triggers) and “trials”?
- Which external toolboxes are used by FieldTrip?
- Why are so many of the interesting functions in the private directories?
Code and development questions
- How are the various data structures defined?
- How can I debug my analysis script if a FieldTrip function gives an error?
- How can I keep track of the changes to the code?
- What does a typical call to a FieldTrip function look like?
- Why is FieldTrip maintained in SVN and not in git?
- Can I get an offline version of the website documentation?
- Can I use the FieldTrip logo on my poster?
- How many people are subscribed to the email discussion list?
- How should I refer to FieldTrip in my publication?
- How should I send example data to the developers?
- How to ask good questions to the community?
- I am having problems downloading
- I am working at the Donders, should I also download FieldTrip?
- Which version of FieldTrip should I download?
- Why am I not allowed to post to the discussion list?
- Why am I not receiving emails from the discussion list?
- Why am I receiving warnings about too many bouncing emails?
- Why is FieldTrip developed separately from EEGLAB?
- Why is my message rejected from the email discussion list?
Various other questions
- Are the FieldTrip lectures available on video?
- Can I map different electrode position layouts?
- Can I organize my own FieldTrip workshop?
- How can I anonymize DICOM files?
- How can I anonymize a CTF dataset?
- How can I anonymize data processed in FieldTrip?
- How can I anonymize or deidentify an anatomical MRI?
- How can I convert an anatomical MRI from DICOM into CTF format?
- How can I share my MEG data?
- How do I prevent FieldTrip from printing the time and memory after each function call?
- How should I prepare for the upcoming FieldTrip workshop?
- How should I specify the coordinate systems in a BIDS dataset?
- What are the units of the data and of the derived results?
- What types of datasets (and their respective analyses) are used on FieldTrip?
- What usage information is FieldTrip tracking?
- Where can I find open access MEG/EEG data?
- Which methodological details should I report in an EEG/MEG manuscript?