Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gwseries.hh
Go to the documentation of this file.
1 /**********************************************************
2  * Package: graphic wat Class Library
3  * File name: gwseries.hh
4  * Author: Gabriele Vedovato (vedovato@lnl.infn.it)
5  **********************************************************/
6 
7 #ifndef GWSERIES_HH
8 #define GWSERIES_HH
9 
10 #ifndef WSERIES_HH
11 #include "wseries.hh"
12 #endif
13 
14 #include "gwavearray.hh"
15 
16 template<class DataType_t>
17 class gWSeries : public WSeries<DataType_t>
18 {
19 public:
20 
21  gWSeries() : WSeries<DataType_t>() {this->Init();wsextern=false;} // Default constructor
22  gWSeries(const WSeries<DataType_t>&); // copy Constructor
24 
25  void Forward(int n = -1)
27  void Forward(wavearray<DataType_t> &w, int n = -1)
28  {WSeries<DataType_t>::Forward(w,n);this->Init();}
29  void Forward(wavearray<DataType_t> &w, Wavelet &s, int n = -1)
30  {WSeries<DataType_t>::Forward(w,s,n);this->Init();}
31 
32  virtual ~gWSeries(); // Destructor
33 
34  void Draw(GWAT_DRAW type=GWAT_TIME, TString options="ALP", Color_t color=kBlack)
35  {if(type==GWAT_SG) {DrawSG(NULL,options);return;}
36  if(this->getLevel()) return; else return gw->Draw(type,options,color);}
37 
38  watplot* DrawTime(TString options="ALP", Color_t color=kBlack) // *MENU*
39  {if(this->getLevel()) return NULL; else return gw->DrawTime(options,color);}
40  watplot* DrawFFT(TString options="ALP", Color_t color=kBlack) // *MENU*
41  {if(this->getLevel()) return NULL; else return gw->DrawFFT(options,color);}
43  {if(this->getLevel()) return NULL; else return gw->DrawTF(options);}
44  watplot* DrawSG(TString options="") // *MENU*
45  {return DrawSG(NULL,options);}
46 
48  TString options="ALP", Color_t color=kBlack)
49  {if(this->getLevel()) return; else return gw->Draw(x,type,options,color);}
50 
52  {DrawSG(x,options);return;}
53 
54  watplot* DrawTime(wavearray<DataType_t>* x, TString options="ALP", Color_t color=kBlack)
55  {if(this->getLevel()) return NULL; else return gw->DrawTime(x,options,color);}
56  watplot* DrawFFT(wavearray<DataType_t>* x, TString options="ALP", Color_t color=kBlack)
57  {if(this->getLevel()) return NULL; else return gw->DrawFFT(x,options,color);}
59  {if(this->getLevel()) return NULL; else return gw->DrawTF(x,options);}
61 
62  double GetTimeRange(double& tMin, double& tMax) {return gw->GetTimeRange(tMin,tMax);}
63  double GetCentralTime() {return gw->GetCentralTime();}
64  void TimeShift(double tShift=0.) {return gw->TimeShift(tShift);}
65  void PhaseShift(double pShift=0.) {return gw->PhaseShift(pShift);}
66 
67  CWB::STFT* GetSTFT() {return gw->GetSTFT();}
68  watplot* GetWATPLOT() {return gw->GetWATPLOT();}
69 
70  // print wseries parameters
71  virtual void Browse(TBrowser *b) {Draw();}
72 
73 private:
74 
75 // watplot* wts; //!
76 
78 
79  void Init();
80 
81  int rnID;
82  bool wsextern; // external WSeries
83 
84  ClassDef(gWSeries,1)
85 };
86 
87 #endif
void Draw(WSeries< DataType_t > *x, TString options="")
Definition: gwseries.hh:51
int rnID
Definition: gwseries.hh:81
void Forward(wavearray< DataType_t > &w, Wavelet &s, int n=-1)
Definition: gwseries.hh:29
int n
Definition: cwb_net.C:10
TString("c")
void TimeShift(double tShift=0.)
Definition: gwseries.hh:64
cout<< endl;cout<< "ts size = "<< ts.size()<< " ts rate = "<< ts.rate()<< endl;tf.Forward(ts, wdm);int levels=tf.getLevel();cout<< "tf size = "<< tf.size()<< endl;double dF=tf.resolution();double dT=1./(2 *dF);cout<< "rate(hz) : "<< RATE<< "\t layers : "<< nLAYERS<< "\t dF(hz) : "<< dF<< "\t dT(ms) : "<< dT *1000.<< endl;int itime=TIME_PIXEL_INDEX;int ifreq=FREQ_PIXEL_INDEX;int index=(levels+1)*itime+ifreq;double time=itime *dT;double freq=(ifreq >0)?ifreq *dF:dF/4;cout<< endl;cout<< "PIXEL TIME = "<< time<< " sec "<< endl;cout<< "PIXEL FREQ = "<< freq<< " Hz "<< endl;cout<< endl;wavearray< double > x
watplot * DrawTime(TString options="ALP", Color_t color=kBlack)
Definition: gwseries.hh:38
double GetCentralTime()
Definition: gwseries.hh:63
void Forward(int n=-1)
Definition: gwseries.hh:25
CWB::STFT * DrawTF(TString options="")
Definition: gwseries.hh:42
wavearray< double > w
Definition: Test1.C:27
int getLevel()
Definition: wseries.hh:91
double GetTimeRange(double &tMin, double &tMax)
Definition: gwseries.hh:62
void Init()
Definition: gwseries.cc:74
void Draw(GWAT_DRAW type=GWAT_TIME, TString options="ALP", Color_t color=kBlack)
Definition: gwseries.hh:34
virtual ~gWSeries()
Definition: gwseries.cc:32
GWAT_DRAW
Definition: gwat.hh:10
void Forward(wavearray< DataType_t > &w, int n=-1)
Definition: gwseries.hh:27
Definition: gwat.hh:14
CWB::STFT * DrawTF(wavearray< DataType_t > *x, TString options="")
Definition: gwseries.hh:58
void Draw(wavearray< DataType_t > *x, GWAT_DRAW type=GWAT_TIME, TString options="ALP", Color_t color=kBlack)
Definition: gwseries.hh:47
watplot * GetWATPLOT()
Definition: gwseries.hh:68
s s
Definition: cwb_net.C:137
char options[256]
watplot * DrawSG(TString options="")
Definition: gwseries.hh:44
gwavearray< DataType_t > * gw
Definition: gwseries.hh:77
CWB::STFT * GetSTFT()
Definition: gwseries.hh:67
virtual void Browse(TBrowser *b)
Definition: gwseries.hh:71
void Forward(int n=-1)
param: wavelet - n is number of steps (-1 means full decomposition)
Definition: wseries.cc:228
watplot * DrawFFT(wavearray< DataType_t > *x, TString options="ALP", Color_t color=kBlack)
Definition: gwseries.hh:56
void PhaseShift(double pShift=0.)
Definition: gwseries.hh:65
bool wsextern
Definition: gwseries.hh:82
watplot * DrawTime(wavearray< DataType_t > *x, TString options="ALP", Color_t color=kBlack)
Definition: gwseries.hh:54
watplot * DrawFFT(TString options="ALP", Color_t color=kBlack)
Definition: gwseries.hh:40
gWSeries()
Definition: gwseries.hh:21