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).

// Given an inverse kernel K (n_sources × n_channels)
// and a lead field L (n_channels × n_sources):
Eigen::MatrixXd R = InvResolutionMatrix::compute(K, L);
Eigen::VectorXd psf = InvResolutionMatrix::getPsf(R, sourceIdx);
Eigen::VectorXd ctf = InvResolutionMatrix::getCtf(R, sourceIdx);
Eigen::Matrix3f R
static Eigen::MatrixXd compute(const Eigen::MatrixXd &matInverseKernel, const Eigen::MatrixXd &matLeadField)
static Eigen::VectorXd getCtf(const Eigen::MatrixXd &matResolution, int iSourceIdx)
static Eigen::VectorXd getPsf(const Eigen::MatrixXd &matResolution, int iSourceIdx)

Definition at line 68 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.

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 153 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.

For each source, the spatial spread is the standard deviation of the squared PSF weighted by distance from the peak.

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: