Omicron  4.2.0
An algorithm to detect and characterize transient events in gravitational-wave detectors
Oqplane.h
Go to the documentation of this file.
1 
6 #ifndef __Oqplane__
7 #define __Oqplane__
8 
9 #include <TriggerBuffer.h>
10 #include <Spectrum.h>
11 #include "Omap.h"
12 
13 using namespace std;
14 
23 class Oqplane: public Omap {
24 
25 public:
26 
44  Oqplane(const double aQ, const unsigned int aSampleFrequency,
45  const double aFrequencyMin, const double aFrequencyMax,
46  const unsigned int aTimeRange, const double aMaximumMismatch);
47 
51  virtual ~Oqplane(void);
52 
72  long unsigned int ProjectData(fft *aDataFft, const double aPadding=0.0);
73 
86  void FillMap(const string aContentType, const double aTimeStart, const double aTimeEnd);
87 
104  void AddTileSegments(Segments *aSegments, TH1D *aSnrThreshold,
105  const double aT0, const double aPadding);
106 
117  bool SaveTriggers(TriggerBuffer *aTriggers, const double aT0, Segments* aSeg);
118 
122  inline double GetSnrThr(void){ return SnrThr; };
123 
128  inline void SetSnrThr(const double aSnrThr=2.0){ SnrThr=aSnrThr; };
129 
136  inline double GetTileSnrSq(const unsigned int aTimeTileIndex, const unsigned int aBandIndex){
137  return TMath::Max(bandFFT[aBandIndex]->GetNorm2_t(aTimeTileIndex)-2.0,0.0);
138  };
139 
143  inline double GetSnrSqMax(void){ return SnrSqMax; };
144 
151  inline double GetTileAmplitudeSq(const unsigned int aTimeTileIndex, const unsigned int aBandIndex){
152  return GetTileSnrSq(aTimeTileIndex, aBandIndex)*bandNoiseAmplitude[aBandIndex]*bandNoiseAmplitude[aBandIndex];
153  };
154 
161  inline double GetTileAmplitude(const unsigned int aTimeTileIndex, const unsigned int aBandIndex){
162  return TMath::Sqrt(GetTileSnrSq(aTimeTileIndex, aBandIndex))*bandNoiseAmplitude[aBandIndex];
163  };
164 
172  void SetPower(Spectrum *aSpec1, Spectrum *aSpec2);
173 
174 private:
175 
176  // TRIGGER SELECTION
177  double SnrThr;
178  double SnrSqMax;
179 
180  // FREQUENCY BANDS
181  unsigned int *bandWindowSize;
182  double **bandWindow_r;
183  double **bandWindow_i;
185  fft **bandFFT;
186 
187  ClassDef(Oqplane,0)
188 };
189 
190 
191 #endif
192 
193 
Omicron multi-resolution time-frequency map.
const double const double aMaximumMismatch
Definition: Otile.cc:11
Create a time-frequency map for the Q-transform.
Definition: Omap.h:31
Create a time-frequency Q-plane.
Definition: Oqplane.h:23
double GetSnrSqMax(void)
Returns the maximum SNR squared estimated in the entire Q plane.
Definition: Oqplane.h:143
double GetTileAmplitude(const unsigned int aTimeTileIndex, const unsigned int aBandIndex)
Returns the amplitude estimated in a tile.
Definition: Oqplane.h:161
double GetTileSnrSq(const unsigned int aTimeTileIndex, const unsigned int aBandIndex)
Returns the SNR squared estimated in a tile.
Definition: Oqplane.h:136
double GetSnrThr(void)
Gets the tile SNR threshold.
Definition: Oqplane.h:122
unsigned int * bandWindowSize
Band bisquare window size.
Definition: Oqplane.h:181
Oqplane(const double aQ, const unsigned int aSampleFrequency, const double aFrequencyMin, const double aFrequencyMax, const unsigned int aTimeRange, const double aMaximumMismatch)
Constructor of the Oqplane class.
void SetSnrThr(const double aSnrThr=2.0)
Sets the tile SNR threshold.
Definition: Oqplane.h:128
double GetTileAmplitudeSq(const unsigned int aTimeTileIndex, const unsigned int aBandIndex)
Returns the amplitude squared estimated in a tile.
Definition: Oqplane.h:151
double ** bandWindow_i
Band bisquare windows (imaginary).
Definition: Oqplane.h:183
double SnrThr
SNR threshold to save tiles.
Definition: Oqplane.h:177
double SnrSqMax
Maximum SNR squared in the Q plane.
Definition: Oqplane.h:178
fft ** bandFFT
Band ffts.
Definition: Oqplane.h:185
double ** bandWindow_r
Band bisquare windows (real).
Definition: Oqplane.h:182
double * bandNoiseAmplitude
Band noise amplitude.
Definition: Oqplane.h:184