v2.0.0
Loading...
Searching...
No Matches
fwd_field_map.h File Reference

Sphere-model field interpolator that maps measured MEG/EEG values onto a dense scalp or cortical surface. More...

#include "fwd_global.h"
#include <Eigen/Core>
#include <memory>
#include "fwd_coil_set.h"
#include <fiff/fiff_info.h>
Include dependency graph for fwd_field_map.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  FWDLIB::FwdFieldMap
 Computes the per-vertex sensor-to-surface mapping matrix used to render a continuous scalp/cortex field that exactly reproduces the recorded MEG/EEG values. 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.

Detailed Description

Sphere-model field interpolator that maps measured MEG/EEG values onto a dense scalp or cortical surface.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.0.0
Date
February 2026

Field mapping is the dual of source estimation: instead of recovering cortical currents, it produces a smooth continuous field on a target surface that exactly reproduces the recorded sensor values. The classical MNE approach (Hamalainen 1994; Ahlfors et al. 2010) treats every sensor as a dipole layer on a sphere fitted to the head and evaluates the Legendre-series lead-field dot products ⟨L_i, L_j⟩ between sensor pairs (self_dots) and between sensors and surface vertices (surface_dots). Solving the regularised system (Gᵢⱼ + λI) x = b yields per-vertex interpolation weights.

FwdFieldMap implements that recipe for the spherical-model special case: fast _fast_sphere_dot_r0 lead-field dots, an SVD-based pseudo-inverse with eigenvalue truncation (miss) for regularisation, and optional pre-projection through the SSP operator to keep the map orthogonal to projected-out noise subspaces. The output matrix is channel-to-vertex and is reused across every sample of a recording.

Ported from MNE-Python (BSD-3-Clause): _do_self_dots, _do_surface_dots, _fast_sphere_dot_r0 (mne/forward/_lead_dots.py); _compute_mapping_matrix, _pinv_trunc (mne/forward/_field_interpolation.py).

Definition in file fwd_field_map.h.