# Inverse source parameter estimates from EEG/MEG data

FieldTrip has a consistent set of low-level functions for source reconstruction, i.e. estimating the location, strength and other parameters of the sources in the brain that underly the observed EEG and MEG data. The usual mathematical description of the sources is the equivalent current dipole, which is why in the subsequent documentation you will often see *source* and *dipole* used exchangeably.

The objective of supplying these low-level functions as a separate module/toolbox are to

- facilitate the reuse of these functions in other open source projects (e.g. EEGLAB, SPM)
- facilitate the implementation and support for new inverse methods, esp. for external users/contributors
- facilitate the implementation of advanced features

The low-level functions are combined in the forward and the inverse toolboxes, which are released together with FieldTrip but can also be downloaded here as separate toolboxes. In the past these functions were combined in one toolbox.

Please note that if you are an end-user interested in analyzing experimental EEG/MEG data, you will probably will want to use the high-level FieldTrip functions. The functions such as **ft_preprocessing**, **ft_timelockanalysis** and **ft_sourceanalysis** provide a user-friendly interface that take care of all relevant analysis steps and the data bookkeeping.

## Module layout

The forward module contains the methods to compute the solution to the volume conduction problem, i.e. “What is the potential or field distribution given a known source?”.

The inverse module contains the methods to estimate the source parameters, i.e. to answer the question “What are the unknown source parameter estimates, given the observed EEG or MEG field distribution?”.

It contains high-level functions that are publicly available for experienced end-user. The functionality of these functions within these modules depend on low-level functions which are not available to the end-user and combined in a private directory.

## Supported methods for inverse estimation of the source parameters

The inverse methods for computing a source reconstruction can be divided into three categories: **dipole fitting** (using an overdetermined model with a few sources), **scanning** (using a metric that can be computed independently on each point of a source model) and **distributed source modelling** (using an underdetermined distributed source model). The following source reconstruction methods are implemented

### Dipole fitting

- simultaneous optimisation of position, orientation and strength
- symmetry constrains and/or fixed position, with free orientation and strength

### Scanning

- dynamic imaging of coherent sources (DICS)
- linear constrained minimum variance (LCMV)
- partial canonical coherence (PCC)
- multiple signal classification (MUSIC)
- scanning for residual variance
- scanning using sLORETA

### Distributed source modeling

- minimum norm estimation with and without noise regularisation (MNE)
- minimum norm estimation using eLORETA
- minimum norm estimation using Harmony

## Definition of the function-calls (API)

The functions for the inverse computation of the source activity, i.e. for computing the source reconstruction are

```
estimate = ft_inverse_dics(sourcemodel, sens, headmodel, dat, C, ...)
estimate = ft_inverse_dipolefit(sourcemodel, sens, headmodel, dat, ...)
estimate = ft_inverse_eloreta(sourcemodel, sens, headmodel, dat, C, ...)
estimate = ft_inverse_harmony(sourcemodel, sens, headmodel, dat, ...)
estimate = ft_inverse_lcmv(sourcemodel, sens, headmodel, dat, C, ...)
estimate = ft_inverse_mne(sourcemodel, sens, headmodel, dat, ...)
estimate = ft_inverse_music(sourcemodel, sens, headmodel, dat, ...)
estimate = ft_inverse_pcc(sourcemodel, sens, headmodel, dat, C, ...)
estimate = ft_inverse_rv(sourcemodel, sens, headmodel, dat, ...)
estimate = ft_inverse_sam(sourcemodel, sens, headmodel, dat, C, ...)
estimate = ft_inverse_sloreta(sourcemodel, sens, headmodel, dat, C, ...)
```

The input structure “sourcemodel” contains the source model used for the reconstruction, or the initial dipole positions for fitting.

The input structure “sens” contains the electrode positions or the gradiometer positions and orientations.

The input structure “headmodel” contains the geometry and conductivity of the volume conductor model.

Most functions have additional optional input arguments that are specified as key-value pairs.

## Related documentation

The literature references to the implemented methods are given here.

### Frequently asked questions about forward and inverse modeling:

- Where is the anterior commissure?
- Can I do combined EEG and MEG source reconstruction?
- Can I restrict the source reconstruction to the grey matter?
- How are the different head and MRI coordinate systems defined?
- How are the Left and Right Pre-Auricular (LPA and RPA) points 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 determine the anatomical label of a source or electrode?
- How can I fine-tune my BEM volume conduction model?
- How can I visualize the different geometrical objects that are needed for forward and inverse computations?
- 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?
- What is the conductivity of the brain, CSF, skull and skin tissue?
- What kind of volume conduction models of the head (head 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?

### Example material for forward and inverse modeling:

- Align EEG electrode positions to BEM headmodel
- Combined EEG and MEG source reconstruction
- Common filters in beamforming
- Compute forward simulated data and apply a beamformer scan
- Compute forward simulated data and apply a dipole fit
- Example use of the ft_compute_leadfield function
- Check the quality of the anatomical coregistration
- Create MNI-aligned grids in individual head-space
- Localizing the sources underlying the difference in event related fields
- Fit a dipole to the tactile ERF after mechanical stimulation
- How to create a head model if you do not have an individual MRI
- How to import data from MNE-Python and FreeSurfer
- Make leadfields using different headmodels
- Plotting the result of source reconstructing on a cortical mesh
- Source statistics
- Testing BEM created EEG lead fields
- Use your own forward leadfield model in an inverse beamformer computation

### Tutorial material for forward and inverse modeling:

- Localizing oscillatory sources using beamformer techniques
- Localizing visual gamma and cortico-muscular coherence using DICS
- Analysis of corticomuscular coherence
- Localizing electrodes using a 3D-scanner
- Creating a BEM volume conduction model of the head for source-reconstruction of EEG data
- Creating a FEM volume conduction model of the head for source-reconstruction of EEG data
- Creating a volume conduction model of the head for source-reconstruction of MEG data
- Introduction to the FieldTrip toolbox
- Source reconstruction of event-related fields using minimum-norm estimation
- Creating a sourcemodel for source-reconstruction of MEG or EEG data