v2.0.0
Loading...
Searching...
No Matches
INVLIB::InvResolutionMatrix Class Reference

Resolution matrix analysis for linear inverse operators. More...

#include <inv_resolution_matrix.h>

Static Public Member Functions

static Eigen::MatrixXd compute (const Eigen::MatrixXd &matInverseKernel, const Eigen::MatrixXd &matLeadField)
static Eigen::VectorXd getPsf (const Eigen::MatrixXd &matResolution, int iSourceIdx)
static Eigen::VectorXd getCtf (const Eigen::MatrixXd &matResolution, int iSourceIdx)
static Eigen::MatrixXd getPsfs (const Eigen::MatrixXd &matResolution, const Eigen::VectorXi &vecSourceIdx)
static Eigen::MatrixXd getCtfs (const Eigen::MatrixXd &matResolution, const Eigen::VectorXi &vecSourceIdx)
static Eigen::VectorXd spatialSpread (const Eigen::MatrixXd &matResolution, const Eigen::MatrixX3d &matPositions)
static Eigen::VectorXd peakLocalisationError (const Eigen::MatrixXd &matResolution, const Eigen::MatrixX3d &matPositions)

Detailed Description

Resolution matrix analysis for linear inverse operators.

The resolution matrix R = K · L, where K is the inverse operator (kernel) and L is the lead field (forward operator). Columns of R are point-spread functions (PSFs) and rows are cross-talk functions (CTFs).

Definition at line 62 of file inv_resolution_matrix.h.

Member Function Documentation

◆ compute()

MatrixXd InvResolutionMatrix::compute ( const Eigen::MatrixXd & matInverseKernel,
const Eigen::MatrixXd & matLeadField )
static

Compute the resolution matrix R = inverseKernel × leadField.

Parameters
[in]matInverseKernelInverse operator matrix (n_sources × n_channels).
[in]matLeadFieldForward operator / lead field (n_channels × n_sources).
Returns
Resolution matrix (n_sources × n_sources).

Definition at line 42 of file inv_resolution_matrix.cpp.

◆ getCtf()

VectorXd InvResolutionMatrix::getCtf ( const Eigen::MatrixXd & matResolution,
int iSourceIdx )
static

Extract the cross-talk function (CTF) for a given source index. The CTF is the row of the resolution matrix at the source index.

Parameters
[in]matResolutionResolution matrix (n_sources × n_sources).
[in]iSourceIdxSource index.
Returns
CTF vector (n_sources).

Definition at line 69 of file inv_resolution_matrix.cpp.

◆ getCtfs()

MatrixXd InvResolutionMatrix::getCtfs ( const Eigen::MatrixXd & matResolution,
const Eigen::VectorXi & vecSourceIdx )
static

Extract CTFs for multiple source indices.

Parameters
[in]matResolutionResolution matrix.
[in]vecSourceIdxSource indices.
Returns
Matrix where each row is a CTF (n_indices × n_sources).

Definition at line 99 of file inv_resolution_matrix.cpp.

◆ getPsf()

VectorXd InvResolutionMatrix::getPsf ( const Eigen::MatrixXd & matResolution,
int iSourceIdx )
static

Extract the point-spread function (PSF) for a given source index. The PSF is the column of the resolution matrix at the source index.

Parameters
[in]matResolutionResolution matrix (n_sources × n_sources).
[in]iSourceIdxSource index.
Returns
PSF vector (n_sources).

Definition at line 57 of file inv_resolution_matrix.cpp.

◆ getPsfs()

MatrixXd InvResolutionMatrix::getPsfs ( const Eigen::MatrixXd & matResolution,
const Eigen::VectorXi & vecSourceIdx )
static

Extract PSFs for multiple source indices.

Parameters
[in]matResolutionResolution matrix.
[in]vecSourceIdxSource indices.
Returns
Matrix where each column is a PSF (n_sources × n_indices).

Definition at line 81 of file inv_resolution_matrix.cpp.

◆ peakLocalisationError()

VectorXd InvResolutionMatrix::peakLocalisationError ( const Eigen::MatrixXd & matResolution,
const Eigen::MatrixX3d & matPositions )
static

Compute peak localisation error for each source.

Distance between true source location and the location of the maximum of the PSF ("peak_err" of mne.minimum_norm.resolution_metrics; pass the transposed resolution matrix for the CTF metric).

Parameters
[in]matResolutionResolution matrix (n_sources × n_sources).
[in]matPositionsSource positions (n_sources × 3).
Returns
Peak localisation error per source (n_sources).

Definition at line 143 of file inv_resolution_matrix.cpp.

◆ spatialSpread()

VectorXd InvResolutionMatrix::spatialSpread ( const Eigen::MatrixXd & matResolution,
const Eigen::MatrixX3d & matPositions )
static

Compute spatial spread (peak-width) metric for each source.

The spatial deviation "sd_ext" of mne.minimum_norm.resolution_metrics: the root-mean-square distance from the true source, weighted by the squared PSF. Pass the transposed resolution matrix for the CTF metric. Distances are in the units of matPositions (mne reports cm).

Parameters
[in]matResolutionResolution matrix (n_sources × n_sources).
[in]matPositionsSource positions (n_sources × 3).
Returns
Spatial spread per source (n_sources).

Definition at line 117 of file inv_resolution_matrix.cpp.


The documentation for this class was generated from the following files: