Multi-shell spherical head model with Berg-Scherg equivalent-source approximation for fast EEG forward computation. More...
#include "fwd_global.h"#include "fwd_eeg_sphere_layer.h"#include "fwd_coil_set.h"#include <Eigen/Core>#include <QDebug>#include <memory>#include <vector>

Go to the source code of this file.
Classes | |
| struct | FWDLIB::fitUserRec |
| Workspace for the linear least-squares fit of Berg-Scherg parameters in the EEG sphere model (SVD matrices, residuals, weights). More... | |
| class | FWDLIB::FwdEegSphereModel |
| Multi-shell concentric-sphere head model holding the Berg-Scherg equivalent-source parameters that accelerate the de Munck Legendre series for EEG, plus the Sarvas closed-form coefficients used for the spherically-symmetric MEG forward solution. More... | |
Namespaces | |
| namespace | FWDLIB |
| Forward modelling — BEM solver, spherical models, sensor/coil definitions and the lead-field assembly that links current dipoles to MEG/EEG sensor readings. | |
Typedefs | |
| using | FWDLIB::fitUser = fitUserRec* |
Multi-shell spherical head model with Berg-Scherg equivalent-source approximation for fast EEG forward computation.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2017-2026 MNE-CPP Authors
For EEG, the exact potential of a current dipole in a layered sphere is a Legendre series whose convergence slows dramatically as the dipole approaches the inner-skull boundary, making the analytic solution expensive at realistic source eccentricities. Berg & Scherg (1994) showed that the series can be reproduced to four-digit accuracy by replacing it with a small set (typically 3) of equivalent dipoles inside a single homogeneous sphere, whose magnitudes and radial positions are obtained once per model via a non-linear least-squares fit. FwdEegSphereModel stores both the concentric layers and the fitted Berg-Scherg parameters mu / lambda so subsequent dipole evaluations cost only a few image-charge contributions.
For MEG, the Sarvas (1987) closed-form expression — also implemented here — gives the analytic magnetic field of a dipole in a spherically symmetric conductor with no series at all, because the radial conductivity profile drops out of the Biot-Savart line integral.
Refactored from MNE-C fwd_eeg_sphere_model.c / fwd_types.h (fwdEegSphereModelRec); the embedded fitUserRec carries the SVD workspace of the Berg-Scherg fit.
Definition in file fwd_eeg_sphere_model.h.