Expand description
Spherical forward model (EEG gain matrix computation).
Computes the lead-field (gain) matrix that maps dipole source activations to EEG electrode potentials using a multi-shell spherical head model.
§Model
The default 3-shell model (Berg & Scherg, 1994) uses:
| Shell | Radius (m) | Conductivity (S/m) |
|---|---|---|
| Brain | 0.067 | 0.33 |
| Skull | 0.070 | 0.0042 |
| Scalp | 0.075 | 0.33 |
The Berg & Scherg approximation replaces the exact series expansion with a small number of fitted dipoles (typically 3), making the computation fast while retaining good accuracy.
§Example
use exg_source::forward::{make_sphere_forward, SphereModel};
use exg_source::source_space::ico_source_space;
use ndarray::Array2;
// Electrode positions (simplified, 4 electrodes on the scalp)
let elec = Array2::from_shape_vec((4, 3), vec![
0.07, 0.0, 0.04,
-0.07, 0.0, 0.04,
0.0, 0.07, 0.04,
0.0,-0.07, 0.04,
]).unwrap();
// Source space
let (src_pos, src_nn) = ico_source_space(2, 0.06, [0.0, 0.0, 0.04]);
// Build forward model
let sphere = SphereModel::default();
let fwd = make_sphere_forward(&elec, &src_pos, &src_nn, &sphere);
assert_eq!(fwd.gain.nrows(), 4);
assert_eq!(fwd.n_sources, src_pos.nrows());§References
- Berg, P., & Scherg, M. (1994). A fast method for forward computation of multiple-shell spherical head models. Electroencephalography and Clinical Neurophysiology, 90(1), 58-64.
- de Munck, J. C. (1988). The potential distribution in a layered anisotropic spheroidal volume conductor. Journal of Applied Physics, 64(2).
Structs§
- Sphere
Model - Parameters of a multi-shell spherical head model.
Functions§
- make_
sphere_ forward - Compute a fixed-orientation EEG forward model using a spherical head.
- make_
sphere_ forward_ free - Compute a free-orientation EEG forward model using a spherical head.