Diana Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
QChannelCovariance Class Reference

Complex covariance matrix of an array of bolometers. More...

Inheritance diagram for QChannelCovariance:

Public Member Functions

 QChannelCovariance ()
 ctor More...
 
 QChannelCovariance (size_t nfreq, const std::vector< int > &channels)
 ctor with also allocates space for matrix More...
 
void Clear ()
 clear members More...
 
void SetNFreq (size_t nfreq)
 set number of frequencies More...
 
void SetChannels (const std::vector< int > &channels)
 set channels More...
 
void SetCovariance (int chI, int chJ, const Diana::QVectorC &cov)
 set covariance (size equal to nfreq) of channels I and J More...
 
void SetNEvents (int chI, int chJ, int nev)
 set number of events of the couple I,J More...
 
size_t GetNFreq () const
 get number of frequencies More...
 
std::vector< int > GetChannels () const
 get channels More...
 
size_t GetNChan () const
 get number of channels
More...
 
Diana::QVectorC GetCovariance (int chI, int chJ) const
 get covariance between channel I and J More...
 
Diana::QVectorC GetCovarianceByIndex (int i, int j) const
 
int GetNEvents (int chI, int chJ) const
 get number of events of the couple I,J More...
 
QChannelCovariance Inverse () const
 get inverse matrix More...
 
QChannelCovariance GetSubMatrix (const std::vector< int > &channels) const
 Get sub matrix of channels. More...
 
Diana::QVectorC GetCorrelation (int chI, int chJ) const
 get correlation More...
 
double GetMeanCorrelation (int chI, int chJ, int fmin=-1, int fmax=-1) const
 get mean correlation between frequency indices fmin and fmax of the couple (chI,chJ) More...
 
std::vector< int > GetChannelsByCorrelation (int chI, int fmin=-1, int fmax=-1) const
 get mean correlation between frequency indices fmin and fmax of the couple (chI,chJ) More...
 
void DumpMeanCorrelationMatrix (std::ostream &o, const int fmin=-1, const int fmax=-1) const
 dump mean correlation matrix More...
 
void Dump (std::ostream &o) const
 dump summary of content More...
 

Private Member Functions

void Channels2Indices (const int chI, const int chJ, int &i, int &j) const
 convert channel numbers to indices More...
 
 QObjectDef (QChannelCovariance, 2)
 

Private Attributes

std::vector< Diana::QMatrixC > fCovariance
 
std::map< int, int > fChannels
 map real channel number into channel index More...
 
Diana::QMatrix fNevents
 number of events used to build each element of fCovariance More...
 

Detailed Description

Complex covariance matrix of an array of bolometers.

Author
C. Mancini, M. Vignati

Definition at line 18 of file QChannelCovariance.hh.

Constructor & Destructor Documentation

◆ QChannelCovariance() [1/2]

QChannelCovariance::QChannelCovariance ( )

ctor

Definition at line 13 of file QChannelCovariance.cc.

◆ QChannelCovariance() [2/2]

QChannelCovariance::QChannelCovariance ( size_t  nfreq,
const std::vector< int > &  channels 
)

ctor with also allocates space for matrix

Definition at line 17 of file QChannelCovariance.cc.

References SetChannels(), and SetNFreq().

Member Function Documentation

◆ Channels2Indices()

void QChannelCovariance::Channels2Indices ( const int  chI,
const int  chJ,
int &  i,
int &  j 
) const
private

convert channel numbers to indices

Definition at line 242 of file QChannelCovariance.cc.

References DianaThrow, err, fChannels, and QERR_SIZE_NOT_MATCH.

Referenced by GetCovariance(), GetNEvents(), SetCovariance(), and SetNEvents().

◆ Clear()

void QChannelCovariance::Clear ( )
inline

clear members

Definition at line 28 of file QChannelCovariance.hh.

References fChannels, fCovariance, and fNevents.

Referenced by SetNFreq().

◆ Dump()

void QChannelCovariance::Dump ( std::ostream &  o) const

dump summary of content

Definition at line 194 of file QChannelCovariance.cc.

References fCovariance, fNevents, and GetChannels().

◆ DumpMeanCorrelationMatrix()

void QChannelCovariance::DumpMeanCorrelationMatrix ( std::ostream &  o,
const int  fmin = -1,
const int  fmax = -1 
) const

dump mean correlation matrix

Definition at line 218 of file QChannelCovariance.cc.

References fChannels, and GetMeanCorrelation().

◆ GetChannels()

std::vector< int > QChannelCovariance::GetChannels ( ) const

get channels

Definition at line 69 of file QChannelCovariance.cc.

References fChannels.

Referenced by Dump(), and GetChannelsByCorrelation().

◆ GetChannelsByCorrelation()

std::vector< int > QChannelCovariance::GetChannelsByCorrelation ( int  chI,
int  fmin = -1,
int  fmax = -1 
) const

get mean correlation between frequency indices fmin and fmax of the couple (chI,chJ)

Definition at line 172 of file QChannelCovariance.cc.

References CompareCorrelations(), GetChannels(), and GetMeanCorrelation().

◆ GetCorrelation()

Diana::QVectorC QChannelCovariance::GetCorrelation ( int  chI,
int  chJ 
) const

get correlation

Definition at line 137 of file QChannelCovariance.cc.

References GetCovariance(), and Re().

Referenced by GetMeanCorrelation().

◆ GetCovariance()

Diana::QVectorC QChannelCovariance::GetCovariance ( int  chI,
int  chJ 
) const

get covariance between channel I and J

Definition at line 81 of file QChannelCovariance.cc.

References Channels2Indices(), and fCovariance.

Referenced by GetCorrelation(), GetMeanCorrelation(), GetSubMatrix(), QMultiChannelDecorrelator::Init(), and QMultiChannelDecorrelatorOF::Init().

◆ GetCovarianceByIndex()

Diana::QVectorC QChannelCovariance::GetCovarianceByIndex ( int  i,
int  j 
) const

Definition at line 93 of file QChannelCovariance.cc.

References fCovariance.

◆ GetMeanCorrelation()

double QChannelCovariance::GetMeanCorrelation ( int  chI,
int  chJ,
int  fmin = -1,
int  fmax = -1 
) const

get mean correlation between frequency indices fmin and fmax of the couple (chI,chJ)

Definition at line 154 of file QChannelCovariance.cc.

References GetCorrelation(), GetCovariance(), and Re().

Referenced by DumpMeanCorrelationMatrix(), and GetChannelsByCorrelation().

◆ GetNChan()

size_t QChannelCovariance::GetNChan ( ) const
inline

get number of channels

Definition at line 50 of file QChannelCovariance.hh.

References fChannels.

◆ GetNEvents()

int QChannelCovariance::GetNEvents ( int  chI,
int  chJ 
) const

get number of events of the couple I,J

Definition at line 104 of file QChannelCovariance.cc.

References Channels2Indices(), and fNevents.

Referenced by GetSubMatrix().

◆ GetNFreq()

size_t QChannelCovariance::GetNFreq ( ) const
inline

get number of frequencies

Definition at line 46 of file QChannelCovariance.hh.

References fCovariance.

Referenced by QMultiChannelDecorrelatorOF::Filter(), and QMultiChannelDecorrelatorOF::Init().

◆ GetSubMatrix()

QChannelCovariance QChannelCovariance::GetSubMatrix ( const std::vector< int > &  channels) const

Get sub matrix of channels.

Definition at line 120 of file QChannelCovariance.cc.

References fCovariance, GetCovariance(), GetNEvents(), SetCovariance(), and SetNEvents().

Referenced by QMultiChannelDecorrelatorOF::Init().

◆ Inverse()

QChannelCovariance QChannelCovariance::Inverse ( ) const

get inverse matrix

Definition at line 111 of file QChannelCovariance.cc.

References fCovariance.

◆ QObjectDef()

QChannelCovariance::QObjectDef ( QChannelCovariance  ,
 
)
private

◆ SetChannels()

void QChannelCovariance::SetChannels ( const std::vector< int > &  channels)

set channels

Definition at line 29 of file QChannelCovariance.cc.

References fChannels, fCovariance, and fNevents.

Referenced by QChannelCovariance().

◆ SetCovariance()

void QChannelCovariance::SetCovariance ( int  chI,
int  chJ,
const Diana::QVectorC &  cov 
)

set covariance (size equal to nfreq) of channels I and J

Definition at line 42 of file QChannelCovariance.cc.

References Channels2Indices(), DianaThrow, err, fCovariance, and QERR_SIZE_NOT_MATCH.

Referenced by GetSubMatrix().

◆ SetNEvents()

void QChannelCovariance::SetNEvents ( int  chI,
int  chJ,
int  nev 
)

set number of events of the couple I,J

Definition at line 62 of file QChannelCovariance.cc.

References Channels2Indices(), and fNevents.

Referenced by GetSubMatrix().

◆ SetNFreq()

void QChannelCovariance::SetNFreq ( size_t  nfreq)

set number of frequencies

Definition at line 23 of file QChannelCovariance.cc.

References Clear(), and fCovariance.

Referenced by QChannelCovariance().

Member Data Documentation

◆ fChannels

std::map<int,int> QChannelCovariance::fChannels
private

map real channel number into channel index

Definition at line 88 of file QChannelCovariance.hh.

Referenced by Channels2Indices(), Clear(), DumpMeanCorrelationMatrix(), GetChannels(), GetNChan(), and SetChannels().

◆ fCovariance

std::vector<Diana::QMatrixC> QChannelCovariance::fCovariance
private

◆ fNevents

Diana::QMatrix QChannelCovariance::fNevents
private

number of events used to build each element of fCovariance

Definition at line 91 of file QChannelCovariance.hh.

Referenced by Clear(), Dump(), GetNEvents(), SetChannels(), and SetNEvents().


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