The Neurophysiological Biomarker Toolbox (NBT)

Part III: Localizing EEG sources

Back to the tutorial homepage

In this last part of the tutorial we will attempt to solve the EEG inverse problem. That is, given a distribution of scalp potentials we will attempt to localize the underlying EEG sources. In fact this is just one part of the inverse solution. The full solution involves also the reconstruction of the temporal activation of the underlying EEG sources. However, we will leave that for a future tutorial where our EEG sources will have time-varying activation patterns.

In this part III of the tutorial you may use some the sources that you generated in Part II or you may as well generate new sources altogether. I will follow the latter approach. If you decide to use new sources then you should first remove the old ones:

myHead = remove_source(myHead, 1:5);

Localizing a single dipole

Let's generate a radial and superficial dipole:

myHead = add_source(myHead, 'Name', 'radial', 'strength', 1, ...
	'MaxDepth', 10, 'Angle', 0)
plot_source_leadfield(myHead, 1, 'momemtum', 50)

Now let's plot the scalp potentials that we would measure in such a single dipole scenario:

plot_scalp_potentials(myHead, 'time', 1)

The result is shown below.

The source leadfield generated by a superficial and radial dipole

As we have single EEG source and no noise, the distribution of scalp potentials (what we are measuring) is identical to the leadfield generated by the only underlying EEG source (what we need for source localization). This is obviously an ideal scenario and we would expect to be able to solve the inverse problem accurately. Let's try:

myHead = inverse_solution(myHead);
plot_inverse_solution_dipoles(myHead, 'time', 1);

The first command above will estimate the location of the source using a Minimum Norm Estimate (MNE), which is the method employed, for instance, by the MNE software. The generated figure is shown below:

The inverse solution (black filled markers) and the true localization of the underlying dipole (green empty marker)

Although you can barely see it in the figure above, the inverse solver estimated non-zero activation not only at the true location of the dipole, but also at many other locations of the source grid. You can actually inspect the activation values that were estimated at each source voxel with the command:

plot(1:myHead.NbSourceVoxels, myHead.InverseSolution.strength);
xlabel('Source grid voxel number');
ylabel('Estimated source strength');

which, in my case, looks like this:

The source strength at each source grid location estimated by the MNE approach)

Indeed, the only source grid location at which the strength is significantly different from zero is voxel 245, which is also the location of the true underlying dipole:

ans = 
           name: 'radial'
       strength: 1
    orientation: [0.5630 0.8133 0.1466]
          angle: 0
            pnt: 245
       momemtum: [0.5630 0.8133 0.1466]
     activation: 1

Background Noise

To make our simulations a bit more realistic, we will add some background noise having half the strength of our EEG source of interest:

myHead = add_source_noise(myHead, 'strength', 0.5);

Now let's plot the source leadfield corresponding to the noisy source and the scalp potentials that we would measure in this noisy scenario:

plot_source_leadfield(myHead, 2, 'momemtum', 25);
set(gcf, 'Name', 'Background noise leadfield');
plot_scalp_potentials(myHead, 'time', 1);
set(gcf, 'Name', 'Measured scalp potentials');

The two resulting figures are shown below, together with the pattern of scalp potentials that we obtained in the noise-free scenario:

The leadfield generated by the background noise The potentials measured at the scalp The source leadfield generated by the underlying EEG source of interest

As you can see the distribution of scalp potentials still resembles the source leadfield but has been disturbed by the noise. Let's localize the underlying source and plot the estimate:

myHead = inverse_solution(myHead);
plot_inverse_solution_dipoles(myHead, 'time', 1);
plot_inverse_solution_dipoles(myHead, 'time', 1, 'exp', 4);

The latter command will use a higher weighting exponent for the plot so that stronger voxel activations will appear even stronger and weak activations will look even weaker. The resulting figures are shown below:

Source voxel activation strength for the noisy scenario with a single EEG source Source voxel activation strength for the noisy scenario with a single EEG source using a higher weighting exponent, which highlights the strongest voxel activations

As you can see, the inverse estimate has deteriorated considerably and it is now much more difficult to tell where the source of interest is located. Still, if you would inspect myHead.InverseSolution.strength you would discover that the strongest voxel is still 245, i.e. the true location of the underlying EEG dipole.

Use the tools that I used above to determine how strong the noise should be for the inverse solution to fail to identify the location of the EEG source.

Try yourself

Depending on how much time you still have left, use the tutorial scripts to find out how effective the inverse solution is in the following scenarios:

  1. Multiple EEG sources of interest
  2. Deep sources
  3. Non-radial sources
  4. Sources consisting of many dipoles
  5. Any complex scenario that you may think of

tutorial/tutorial_dipoles/source_localization.txt · Last modified: 2013/01/31 01:12 by Simon-Shlomo Poil
The NBTwiki platform - version 2.8 - 9 May 2013
Copyright (C) 2008-2015