v2.0.0
Loading...
Searching...
No Matches
CONNECTIVITYLIB::PhaseLagIndex Class Reference

Phase Lag Index estimator (Stam et al. 2007); rejects zero-lag volume-conduction mixing. More...

#include <phaselagindex.h>

Public Types

typedef QSharedPointer< PhaseLagIndexSPtr
typedef QSharedPointer< const PhaseLagIndexConstSPtr
Public Types inherited from CONNECTIVITYLIB::AbstractMetric
typedef QSharedPointer< AbstractMetricSPtr
typedef QSharedPointer< const AbstractMetricConstSPtr

Public Member Functions

 PhaseLagIndex ()
Public Member Functions inherited from CONNECTIVITYLIB::AbstractMetric
 AbstractMetric ()

Static Public Member Functions

static Network calculate (ConnectivitySettings &connectivitySettings)

Static Protected Member Functions

static void compute (ConnectivitySettings::IntermediateTrialData &inputData, QVector< QPair< int, Eigen::MatrixXcd > > &vecPairCsdSum, QVector< QPair< int, Eigen::MatrixXd > > &vecPairCsdImagSignSum, QMutex &mutex, int iNRows, int iNFreqs, int iNfft, const QPair< Eigen::MatrixXd, Eigen::VectorXd > &tapers)
static void computePLI (ConnectivitySettings &connectivitySettings, Network &finalNetwork)

Additional Inherited Members

Static Public Attributes inherited from CONNECTIVITYLIB::AbstractMetric
static bool m_bStorageModeIsActive = false
static int m_iNumberBinStart = -1
static int m_iNumberBinAmount = -1

Detailed Description

Phase Lag Index estimator (Stam et al. 2007); rejects zero-lag volume-conduction mixing.

Computes the Phase Lag Index of Stam, Nolte & Daffertshofer (2007).

For every channel pair the estimator averages sign(Im(S_{xy}(f))) across DPSS-tapered trial spectra and returns the magnitude of that average. Zero-lag mixing (volume conduction, common reference) yields sign = 0 and is rejected; consistently lagged or leading interactions yield magnitudes close to 1. The per-trial accumulation is parallelised over trials via QtConcurrent and reduced under a single QMutex.

Definition at line 94 of file phaselagindex.h.

Inheritance diagram for CONNECTIVITYLIB::PhaseLagIndex:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

Const shared pointer type for PhaseLagIndex.

Definition at line 99 of file phaselagindex.h.

◆ SPtr

Shared pointer type for PhaseLagIndex.

Definition at line 98 of file phaselagindex.h.

Constructor & Destructor Documentation

◆ PhaseLagIndex()

PhaseLagIndex::PhaseLagIndex ( )
explicit

Constructs a PhaseLagIndex object.

Definition at line 56 of file phaselagindex.cpp.

Member Function Documentation

◆ calculate()

Network PhaseLagIndex::calculate ( ConnectivitySettings & connectivitySettings)
static

Calculates the PLI between the rows of the data matrix.

Parameters
[in]connectivitySettingsThe input data and parameters.
Returns
The connectivity information in form of a network structure.

Definition at line 62 of file phaselagindex.cpp.

◆ compute()

void PhaseLagIndex::compute ( ConnectivitySettings::IntermediateTrialData & inputData,
QVector< QPair< int, Eigen::MatrixXcd > > & vecPairCsdSum,
QVector< QPair< int, Eigen::MatrixXd > > & vecPairCsdImagSignSum,
QMutex & mutex,
int iNRows,
int iNFreqs,
int iNfft,
const QPair< Eigen::MatrixXd, Eigen::VectorXd > & tapers )
staticprotected

Computes the PLI values. This function gets called in parallel.

Parameters
[in]inputDataThe input data.
[out]

The sum of all CSD matrices for each trial.

Parameters
[out]

The sum of all imag sign CSD matrices for each trial.

Parameters
[in]mutexThe mutex used to safely access vecPairCsdSum.
[in]iNRowsThe number of rows.
[in]iNFreqsThe number of frequenciy bins.
[in]iNfftThe FFT length.
[in]tapersThe taper information.

Definition at line 164 of file phaselagindex.cpp.

◆ computePLI()

void PhaseLagIndex::computePLI ( ConnectivitySettings & connectivitySettings,
Network & finalNetwork )
staticprotected

Reduces the PLI computation to a final result.

Parameters
[out]connectivitySettingsThe input data.
[in]finalNetworkThe final network.

Definition at line 286 of file phaselagindex.cpp.


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