Diana Software
MNoiseCrossFrequencyCovariance.hh
Go to the documentation of this file.
1 #ifndef _M_NOISECROSSCORRELATION_HH_
2 #define _M_NOISECROSSCORRELATION_HH_
3 
46 #include "QModule.hh"
47 #include "QFFT.hh"
48 #include "QMatrixC.hh"
49 #include "QVectorC.hh"
50 #include <map>
51 
52 
53 namespace Diana {class QRealComplexFFT;};
54 
55 class MNoiseCrossFrequencyCovariance : public Diana::QModule {
56 
57  public:
58 
60  void Init(Diana::QEvent& ev);
61 
63  void Do(Diana::QEvent& ev, const Diana::QEventList& neighbours);
64 
66  void Done();
67  private:
68 
69  int Transform(const Diana::QVector& in, Diana::QVectorC& out);
70  class ChannelInfo {
71  public:
72  ChannelInfo() { fNevents = 0; }
73  Diana::QMatrixC fCovarianceFreq;
74  Diana::QVector fPower; // single chan
75  Diana::QVectorC fCoherence; //single chan
76  size_t fNevents;
77  };
78 
79 
80  std::vector<int> fChannelList;
81 
82  size_t fTimeLength;
83  std::map<int,std::map<int,ChannelInfo> > fRosetta;
84  std::string fOutput;
85 
86  Diana::QFFT::WindowType fWindowType;
88  Diana::QRealComplexFFT* fTransformer;
89 
90 
93  std::string fValidityKind;
94 
97 
100 
103 
105  std::vector<int> fSRuns;
106 
108 
109  std::string fPulseLabel;
110 
111 
112 };
113 
114 #endif
115 
compute correlation between different frequencies
std::map< int, std::map< int, ChannelInfo > > fRosetta
int fValidityStart
Validity start first run (or dataset) of validity.
std::vector< int > fSRuns
vector of runs used for nps calculation
int Transform(const Diana::QVector &in, Diana::QVectorC &out)
int fValidityEnd
Validity end last run (or dataset) of validity.
std::string fValidityKind
Validity kind defines the kind of validity range for covariance matrix (run or dataset)
void Init(Diana::QEvent &ev)
Init method.
void Do(Diana::QEvent &ev, const Diana::QEventList &neighbours)
Do method. Declare and implement only one of the two versions.
Wrapper for a specific QRealComplexFFT algorithm class.
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...