v2.0.0
Loading...
Searching...
No Matches
UTILSLIB::SSS Class Reference

#include <sss.h>

Classes

struct  Basis
 Precomputed SSS basis and projectors for a given sensor array. More...

Public Types

using Params = SSSParams

Static Public Member Functions

static Basis computeBasis (const FIFFLIB::FiffInfo &fiffInfo, const Params &params=Params())
static Eigen::MatrixXd apply (const Eigen::MatrixXd &matData, const Basis &basis)
static Eigen::MatrixXd applyTemporal (const Eigen::MatrixXd &matData, const Basis &basis, int iBufferLength=10000, double dCorrLimit=0.98)

Detailed Description

Definition at line 110 of file sss.h.

Member Typedef Documentation

◆ Params

Convenience alias so callers can still write SSS::Params.

Definition at line 113 of file sss.h.

Member Function Documentation

◆ apply()

MatrixXd SSS::apply ( const Eigen::MatrixXd & matData,
const Basis & basis )
static

Apply SSS to MEG data — suppress external (environmental) interference.

Parameters
[in]matDataFull sensor data (n_channels × n_samples). Non-MEG channels are passed through unchanged.
[in]basisPrecomputed basis from computeBasis().
Returns
SSS-cleaned data (n_channels × n_samples).

Definition at line 424 of file sss.cpp.

◆ applyTemporal()

MatrixXd SSS::applyTemporal ( const Eigen::MatrixXd & matData,
const Basis & basis,
int iBufferLength = 10000,
double dCorrLimit = 0.98 )
static

Apply temporal SSS (tSSS) — additionally suppress near-field artefacts.

tSSS processes the data in sliding windows and removes the temporal subspace of the external expansion that exceeds dCorrLimit (relative to the dominant singular value).

Parameters
[in]matDataFull sensor data (n_channels × n_samples).
[in]basisPrecomputed basis from computeBasis().
[in]iBufferLengthWindow length in samples (default 10000 ≈ 10 s at 1 kHz).
[in]dCorrLimitCorrelation threshold [0, 1]; singular vectors of the external subspace whose normalised value exceeds this are removed from the internal expansion (default 0.98).
Returns
tSSS-cleaned data (n_channels × n_samples).

Definition at line 452 of file sss.cpp.

◆ computeBasis()

SSS::Basis SSS::computeBasis ( const FIFFLIB::FiffInfo & fiffInfo,
const Params & params = Params() )
static

Build the SSS spherical-harmonic basis from MEG sensor geometry.

Only channels with kind == FIFFV_MEG_CH or FIFFV_REF_MEG_CH are used. Sensor positions and normals are taken from FiffChInfo::chpos (coil-centre single-point model).

Parameters
[in]fiffInfoMeasurement info containing channel positions.
[in]paramsSSS configuration (order, origin, regularisation).
Returns
Basis struct containing all projectors needed for SSS and tSSS.

Definition at line 301 of file sss.cpp.


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