Frequently Asked Questions
On this page you can find (and add) 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 wiki. Also tutorials can be added. Every time you explain somebody something about FieldTrip, please consider whether you could use the wiki for this so others can learn from it as well.
Reading and preprocessing data
- How can I consistently represent artifacts in my data?
- How can I convert one dataformat into an other?
- How can I find out what eventvalues and eventtypes there are in my data?
- How can I import my own dataformat?
- How can I inspect the electrode impedances of my data?
- How can I interpret the different types of padding that I find when dealing with artifacts?
- 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?
- How can I process continuous data without triggers?
- 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 can I transform trigger values from bits to decimal representation with a trialfun?
- How can I use the databrowser?
- How can extend the reading functions with a new dataformat?
- How does the CTF higher-order gradiometer work?
- How does the filter padding in preprocessing work?
- I have problems reading in neuroscan .cnt files. How can I fix this?
- I used ICA on my MEG data from before 2012 and now FieldTrip crashes, why is that?
- I used to work with trl-matrices that have more than 3 columns. Why is this not supported anymore?
- Is it possible to keep track of trial-specific information in my FieldTrip analysis pipeline?
- Reading is slow, can I write my raw data to a more efficient file format?
- The databrowser crashes and destroys the whole MATLAB session, how can I resolve this?
- What dataformats are supported?
- What kind of filters can I apply to my data?
- Why are the fileio functions stateless, does the fseek not make them very slow?
- Why is there a residual 50Hz line-noise component after applying a DFT filter?
- How can I check or decipher the sequence of triggers in my data?
- Why does my TFR contain NaNs?
- Why does my TFR look strange (part I, demeaning)?
- Why does my TFR look strange (part II, detrending)?
- What does “padding not sufficient for requested frequency resolution” mean?
- 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 ‘wavelet’ (formerly ‘wltconvol’) in ft_freqanalyis?
- What convention is used to define absolute phase in ‘mtmconvol’, ‘wavelet’ and ‘mtmfft’
- In what way can frequency domain data be represented in FieldTrip?
- What is the difference between coherence and coherency?
- How can I do time-frequency analysis on continuous data?
- How can I compute inter-trial coherence?
- Why am I not getting exact integer frequencies?
- How does mtmconvol work?
- 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?
- Should I use a Polhemus or a Structure Sensor to record electrode positions?
- 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?
- 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 use OpenMEEG for forward modelling?
- How can I visualize the different geometrical objects that are needed for forward and inverse computations?
- How do I install the OpenMEEG binaries?
- How is anatomical, functional or statistical “volume data” described?
- 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?
- What is the conductivity of the brain, CSF, skull and skin tissue?
- What kind of volume conduction models are implemented?
- Where can I find the dipoli command-line executable?
- Why is there a rim around the brain for which the source reconstruction is not computed?
- Why should I use an average reference for EEG source reconstruction?
- What is the difference between the ACPC, MNI, SPM and TAL coordinate systems?
- Where is the anterior commissure?
- How should I specify the fiducials?
- How do homogenous coordinate transformation matrices work?
- How to change the MRI orientation, the voxel size or the field-of-view?
- How NOT to interpret results from a cluster-based permutation test?
- Why should I use the cfg.correcttail option when using statistics_montecarlo?
- What is the idea behind statistical inference at the second-level?
- How can I use the ivar, uvar, wvar and cvar options to precisely control the permutations?
- How can I define neighbouring sensors?
- How does ft_prepare_neighbours work?
- How can I define my own neighbourhood template?
- Why are there multiple neighbour templates for the NeuroMag306 system?
- How can I test an interaction effect using cluster-based permutation tests?
- How can I determine the onset of an effect?
- How can I test for correlations between neuronal data and quantitative stimulus and behavioural variables?
Plotting and visualization
- Why does my anatomical MRI show upside-down when plotting it with ft_sourceplot?
- What is the plotting convention for anatomical MRIs?
- How can I visualize a ‘localspheres’ volume conductor model?
- I am having problems printing figures that use opacity
- I am getting strange artifacts in figures that use opacity
- 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?
- How do I construct a layout file for the plotting functions?
- What are the different Neuromag and Yokogawa layouts good for?
- How can I play back EEG/MEG and synchronous audio or video?
- How can I use my MacBook Pro for stimulus presentation in the MEG lab?
- How can I check the quality of an MEEG dataset?
- How can I monitor a subject’s head position during a MEG session?
- How can I visualize the Neuromag head position indicator coils?
- How can I change the head localization in a CTF dataset?
- How can I test the serial port connection between two computers?
Realtime data streaming and analysis
- How fast is the FieldTrip buffer for realtime data streaming?
- Does the FieldTrip realtime buffer only work with MATLAB?
- How should I get started with the FieldTrip realtime buffer?
Questions that pertain to corrupt datafiles
- 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
- How can I deal with a discontinuous Neuralynx recording?
Distributed computing with the MATLAB distributed computing toolbox
Distributed computing with fieldtrip/qsub on a HPC cluster
- How to get started with distributed computing using qsub?
- How to compile MATLAB code into stand-alone executables?
Distributed computing with fieldtrip/engine on a multicore computer
Distributed computing with fieldtrip/peer on a ad-hoc cluster
- How to get started with peer distributed computing on my own desktop computer?
- How can I use the command-line peerslave and optimize the MATLAB licenses?
- How can I combine FieldTrip with peer distributed computing?
- How can I read and write files if I use other people’s peers?
- What happens if a job fails to execute properly?
- Why does peercellfun resubmit jobs that take too long to get started?
- How can I debug a problematic distributed job?
- What happens with a job that has an error on the slave?
- How can I prevent a job from executing twice?
- How should I call peercellfun when a function requires many inputs (e.g. key-value pairs)?
- How can I set up the peer distributed computing on a single multicore computer?
- How can I set up the peer distributed computing on a small number of computers?
- How can I set up the peer distributed computing on a large linux cluster?
- Does a firewall affect the communication between peers?
- Why are the peers using multicast to announce themselves?___
- How can I stop the different threads created by peermaster and peerslave?
- How does the peer smartshare algorithm work?
- How does the peer smartmem algorithm work?
- How do I avoid having to allocate N copies of my data if I want to execute N jobs?
- Why are so many of the interesting functions in the private directories?
- MATLAB does not see the functions in the “private” directory
- MATLAB version 7.3 (2006b)crashes_when_I_try_to_do…
- MATLAB complains about a missing or invalid MEX file, what should I do?
- 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 OS X?
- How many lines of code does FieldTrip consist of?
- Should I add FieldTrip with all subdirectories to my MATLAB path?
- Can I prevent “external” toolboxes from being added to my MATLAB path?
- What is the relation between “events” (such_as_triggers)_and_“trials”?
- How to select the correct SPM toolbox?
- How can I determine the number of threads that MATLAB uses?
- Can I use Octave instead of MATLAB?
- What are the MATLAB requirements for using FieldTrip?
- Which external toolboxes are used by FieldTrip?
- Can I use FieldTrip without MATLAB license?
Code and development questions
- How are the various data structures defined?
- What does a typical call to a FieldTrip function look like?
- 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?
- Why is FieldTrip maintained in SVN and not in git?
- How to ask good questions to the community?
- 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 my message rejected from the email discussion list?
- How many people are subscribed to the email discussion list?
- How should I send example data to the developers?
- How should I refer to FieldTrip in my publication?
- Which version of FieldTrip should I download from the ftp server?
- I am having problems downloading from the ftp server
- I am working at the Donders, should I also download FieldTrip?
- Why is FieldTrip developed separately from EEGLAB?
- Can I get an offline version of the wiki documentation?
- Can I use the FieldTrip logo on my poster?
Various other questions
- What usage information is FieldTrip tracking?
- Why does my ICA output contain complex numbers?
- I used ICA on my MEG data from before 2012 and now FieldTrip crashes, why is that?
- How do I prevent FieldTrip from printing the time and memory after each function call?
- What types of datasets (and their respective analyses) are used on FieldTrip?
- Where can I find open access MEG/EEG data?
- Are the FieldTrip lectures available on video?
- How should I prepare for the upcoming FieldTrip workshop?
- How can I share my MEG or EEG dataset?
- What are the units of the data and of the derived results?
- Can I map different Electrode position layouts?
- How can I convert an anatomical MRI from DICOM into CTF format?
- How can I anonymize data processed in FieldTrip?
- How can I anonymize a CTF dataset?
- How can I anonymize or deidentify an anatomical MRI?
- How can I anonymize DICOM files?
- How should I specify the coordinate systems in a BIDS dataset?