MNE-CPP  0.1.9
A Framework for Electrophysiology
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
FIFFLIB::FiffCov Class Reference

covariance data More...

#include <fiff_cov.h>

Public Types

typedef QSharedPointer< FiffCovSPtr
 
typedef QSharedPointer< const FiffCovConstSPtr
 
typedef QSharedDataPointer< FiffCovSDPtr
 

Public Member Functions

 FiffCov ()
 
 FiffCov (QIODevice &p_IODevice)
 
 FiffCov (const FiffCov &p_FiffCov)
 
 ~FiffCov ()
 
void clear ()
 
bool isEmpty () const
 
FiffCov pick_channels (const QStringList &p_include=defaultQStringList, const QStringList &p_exclude=defaultQStringList)
 
FiffCov prepare_noise_cov (const FiffInfo &p_info, const QStringList &p_chNames) const
 
FiffCov regularize (const FiffInfo &p_info, double p_fMag=0.1, double p_fGrad=0.1, double p_fEeg=0.1, bool p_bProj=true, QStringList p_exclude=defaultQStringList) const
 
FiffCovoperator= (const FiffCov &rhs)
 

Public Attributes

fiff_int_t kind
 
Eigen::VectorXi chClass
 
bool diag
 
fiff_int_t dim
 
QStringList names
 
Eigen::MatrixXd data
 
QList< FiffProjprojs
 
QStringList bads
 
fiff_int_t nfree
 
Eigen::VectorXd eig
 
Eigen::MatrixXd eigvec
 

Friends

std::ostream & operator<< (std::ostream &out, const FIFFLIB::FiffCov &p_FiffCov)
 

Detailed Description

covariance data

Fiff cov data, which corresponds to a covariance data matrix

Definition at line 77 of file fiff_cov.h.

Inheritance diagram for FIFFLIB::FiffCov:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const FiffCov> FIFFLIB::FiffCov::ConstSPtr

Const shared pointer type for FiffCov.

Definition at line 81 of file fiff_cov.h.

◆ SDPtr

typedef QSharedDataPointer<FiffCov> FIFFLIB::FiffCov::SDPtr

Shared data pointer type for FiffCov.

Definition at line 82 of file fiff_cov.h.

◆ SPtr

typedef QSharedPointer<FiffCov> FIFFLIB::FiffCov::SPtr

Shared pointer type for FiffCov.

Definition at line 80 of file fiff_cov.h.

Constructor & Destructor Documentation

◆ FiffCov() [1/3]

FiffCov::FiffCov ( )

Constructs the covariance data matrix.

Definition at line 72 of file fiff_cov.cpp.

◆ FiffCov() [2/3]

FiffCov::FiffCov ( QIODevice &  p_IODevice)

Constructs a covariance data matrix, by reading from a IO device.

Parameters
[in]p_IODeviceIO device to read from the evoked data set.

Definition at line 84 of file fiff_cov.cpp.

◆ FiffCov() [3/3]

FiffCov::FiffCov ( const FiffCov p_FiffCov)

Copy constructor.

Parameters
[in]p_FiffCovCovariance data matrix which should be copied.

Definition at line 107 of file fiff_cov.cpp.

◆ ~FiffCov()

FiffCov::~FiffCov ( )

Destroys the covariance data matrix.

Definition at line 126 of file fiff_cov.cpp.

Member Function Documentation

◆ clear()

void FiffCov::clear ( )

Initializes the covariance data matrix.

Definition at line 132 of file fiff_cov.cpp.

◆ isEmpty()

bool FIFFLIB::FiffCov::isEmpty ( ) const
inline

True if FIFF covariance is empty.

Returns
true if FIFF covariance is empty.

Definition at line 230 of file fiff_cov.h.

◆ operator=()

FiffCov & FiffCov::operator= ( const FiffCov rhs)

Assignment Operator

Parameters
[in]rhsFiffCov which should be assigned.
Returns
the copied covariance matrix.

Definition at line 462 of file fiff_cov.cpp.

◆ pick_channels()

FiffCov FiffCov::pick_channels ( const QStringList &  p_include = defaultQStringList,
const QStringList &  p_exclude = defaultQStringList 
)

python pick_channels_cov

Pick channels from covariance matrix

Parameters
[in]p_includeList of channels to include (if empty, include all available). (optional).
[in]p_excludeChannels to exclude (if empty, do not exclude any). (optional).
Returns
Covariance solution restricted to selected channels.

Definition at line 148 of file fiff_cov.cpp.

◆ prepare_noise_cov()

FiffCov FiffCov::prepare_noise_cov ( const FiffInfo p_info,
const QStringList &  p_chNames 
) const

Prepare noise covariance matrix. Before creating inverse operator.

Parameters
[in]p_infomeasurement info.
[in]p_chNamesChannels which should be taken into account.
Returns
the prepared noise covariance matrix.

Definition at line 176 of file fiff_cov.cpp.

◆ regularize()

FiffCov FiffCov::regularize ( const FiffInfo p_info,
double  p_fMag = 0.1,
double  p_fGrad = 0.1,
double  p_fEeg = 0.1,
bool  p_bProj = true,
QStringList  p_exclude = defaultQStringList 
) const

Regularize noise covariance matrix

This method works by adding a constant to the diagonal for each channel type separatly. Special care is taken to keep the rank of the data constant.

Parameters
[in]p_infoThe measurement info (used to get channel types and bad channels).
[in]p_fMagRegularization factor for MEG magnetometers.
[in]p_fGradRegularization factor for MEG gradiometers.
[in]p_fEegRegularization factor for EEG.
[in]p_bProjApply or not projections to keep rank of data.
[in]p_excludeList of channels to mark as bad. If None, bads channels are extracted from both info['bads'] and cov['bads'].
Returns
the regularized covariance matrix.

Definition at line 323 of file fiff_cov.cpp.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const FIFFLIB::FiffCov p_FiffCov 
)
friend

overloading the stream out operator<<

Parameters
[in]outThe stream to which the fiff covariance should be assigned to.
[in]p_FiffCovFiffCov which should be assigned to the stream.
Returns
the stream with the attached fiff covariance matrix.

Definition at line 237 of file fiff_cov.h.

Member Data Documentation

◆ bads

QStringList FIFFLIB::FiffCov::bads

List of bad channels.

Definition at line 197 of file fiff_cov.h.

◆ data

Eigen::MatrixXd FIFFLIB::FiffCov::data

Covariance data.

Definition at line 195 of file fiff_cov.h.

◆ diag

bool FIFFLIB::FiffCov::diag

If the covariance is stored in a diagonal order.

Definition at line 192 of file fiff_cov.h.

◆ dim

fiff_int_t FIFFLIB::FiffCov::dim

Dimension of the covariance (dim x dim).

Definition at line 193 of file fiff_cov.h.

◆ eig

Eigen::VectorXd FIFFLIB::FiffCov::eig

Vector of eigenvalues.

Definition at line 199 of file fiff_cov.h.

◆ eigvec

Eigen::MatrixXd FIFFLIB::FiffCov::eigvec

Matrix of eigenvectors (each row represents an eigenvector).

Definition at line 200 of file fiff_cov.h.

◆ kind

fiff_int_t FIFFLIB::FiffCov::kind

Covariance kind -> fiff_constants.h.

Definition at line 190 of file fiff_cov.h.

◆ names

QStringList FIFFLIB::FiffCov::names

Channel names.

Definition at line 194 of file fiff_cov.h.

◆ nfree

fiff_int_t FIFFLIB::FiffCov::nfree

Number of degrees of freedom.

Definition at line 198 of file fiff_cov.h.

◆ projs

QList<FiffProj> FIFFLIB::FiffCov::projs

List of available ssp projectors.

Definition at line 196 of file fiff_cov.h.


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