By now our head model should be fully operational so we can start placing
artificial EEG sources within the brain volume. An _EEG source_ is just one
or more source grid locations having a common temporal activation pattern.
From a neurophysiological perspective, you can intuitively define an EEG
source as a compact cluster of neurons whose activity is well represented by
their average post-synaptic potentials. The time course of such average
post-synaptic potentials is what we call the temporal activation of the
which will create a dipole of random location and orientation.
The characteristics of the dipole are stored in property Source of the
myHead object. In my case, the characteristics of the random dipole are:
The information above tells us that our dipole is located at the coordinates
myHead.SourceSpace.pnt(146,:). It also tells us the orientation of the
dipole (a unit length vector) and its strength (the length of the dipole).
The result of multiplying the strength with the orientation vector is what
is called the dipole momentum. The activation of the dipole is its time
course. In this tutorial we will deal only with fixed dipoles (without temporal
variation of their time course). In the next tutorial
we will pay full attention to such a crucial feature of an EEG source.
The method add_source that we used to generate our random dipole has
several optional arguments that you can use to specify the characteristics
of the dipole. For instance, the following command:
will generate a dipole that is at least 1 mm deep in the brain and at most
30 mm away from the closest point on the inner skull surface. Note that
the new dipole was _added_ to our head model, i.e. the dipole that we
generated previously is still in myHead.Source. You can check how many
EEG sources your model has by inspecting property NbSources:
Plot the location of the dipoles that you generated above using the following
plot_source_dipoles(myHead, [1 2 3 4]);
where the second input argument is a vector with indices of the EEG sources
that you want to plot. The result of this command should be something similar
to the first figure in the gallery below (of course the dipole locations will be
different in your case, as they are random). Rotate the figure and check that
the third source is indeed much deeper than the first two sources.
The result is shown in the second figure below. The 'sizedata' argument
can be used to increase the default size of the source location markers.
If we also want to plot the orientation of the dipoles we can use:
Each EEG source generates a characteristic distribution of scalp potentials.
In the following I will loosely refer to such pattern as the _source leadfield_.
The _source leadfield_ is the normalized potential distribution that we would
see at the scalp if only the source of interest would be active and all other
sources would be silent. You can plot the source leadfield with the command:
A very important point is that the source leadfield is
completely independent of the temporal activation of the source. This means
that, if only one source is active, the normalized distribution of scalp
potentials will be the same at any time, even if the underlying source has very
complex temporal dynamics. This has also implications for localizing the source
afterwards because the only thing that we need to (attempt to) localize an EEG
source is its source leadfield.
You can also plot on the same figure the location and orientation of the source:
To be more realistic you can also simulate the presence of background (noisy)
activity. It is difficult to define what is noisy neural activity. The
easiest way is probably using an example. If you are interested in studying
the generators of EEG activity in the alpha band then we would regard as noisy
any neural activity that is not (closely) related to EEG-alpha.
You can generate background noise with the command: