The purpose of this page is just to serve as todo or scratch pad for the development project and to list and share some ideas.

After making changes to the code and/or documentation, this page should remain on the wiki as a reminder of what was done and how it was done. However, there is no guarantee that this page is updated in the end to reflect the final state of the project

So chances are that this page is considerably outdated and irrelevant. The notes here might not reflect the current state of the code, and you should not use this as serious documentation.

FIXME This page is under construction

Create again, when finished, in the initial page under:

An overview on forward modeling

The goal of this tutorial is to give insights about biological electric-magnetic fields generated at the neural level and how this impacts signals from EEG, MEG, ECoG, single cell recordings, tetrodes, etc. A so-called forward solution is here intended as the set of equations which lead from sources in the brain to the signal recorded at the sensors level. The spatial pattern of activation corresponding to a specific neural source is called most of the times 'lead field'. The availability of such a model allows to calculate the inverse solution: (extract source characteristics from real recordings) and therefore to regress neurally related useful information. In practical terms a forward solution is a tool which is made available to users in order to be able to perform source reconstruction/localization (for example with beamforming). The final goal is the reconstruction of neural activity in terms of its time course and location in space.

A good tutorial for this topic is 'Electromagnetic Brain Mapping' from Baillet S et al, 2001. For MEG specific material, please refer also to: MEG community site

During a neural discharge two contributions to biological currents can be distinguished in the surrounding of the neuron: 1. an axonal current (also called primary), 2. an extracellular ionic current (also called secondary).

Pattern of primary and secondary neural currents (from Baillet et al)

The two currents (intra and extra-cellular) contribute differently to the signal of MEG and EEG/ECoG. In particular no intracellular current contribution is sensed by EEG, since its sensors are able to pick up only currents which travel in the extra-cellular medium. MEG though is sensitive both to fields generated by an activity which is internal to the neuron and to fields generated by secondary currents.

This section presents the classic Physics of Maxwell's equation for electromagnetism and on top of that discussed the assumptions which are made for such fields in the biological matter. See also A nice general tutorial on bioelectromagnetism


  • the quasistatic approximation of Maxwell's equations
  • magnetic and electric fields in an homogeneous piecewise conductor
  • the current dipole and the distributed sources configuration
  • realistically shaped conductor models

Differences emerge for the various neural recording techniques on how to build a forward model and this is due to technical and physiological reasons. Accordingly a series of models have been devised, which are recording-specific and will be explained here. One of the most important differences across methods takes into account the modeling of the volume conductor, which can be considered having different geometries (see also different conductor models). In order to build a forward model though, several steps are needed, among which the construction of conductor geometry, but also the source modeling and the estimation of physical parameters like i.e. conductivity. The next paragraph explains in details the steps to be executed in FieldTrip.

Check also 'The Forward model and Lead Field matrix' in HERE (MEG specific way to do that)

Ingredients to build the forward model

  • volume conductor geometry
  • Specific Maxwell equation into play (e.g. electric or magnetic field)
  • Type of source (simple/distributed)
  • Matter properties (conductivity)
  • Lead field algorithm

MEG forward models

  • single sphere
  • multiple spheres
  • BEM
  • Nolte

EEG forward models

  • single sphere
  • concentric spheres
  • BEM

ECoG forward models

  • BEM