Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TestReadWaveform.C
Go to the documentation of this file.
1 {
2  //
3  // Read & Draw Waveforms
4  // Author : Gabriele Vedovato
5 
6  CWB::mdc MDC;
7 
9  //MDC.ReadWaveform(x,"Waveforms/s11.2.h.dat");
10  //MDC.ReadWaveform(x,"Waveforms/data.GRW.md.h10kpc.15_3.2.txt");
11  MDC.ReadWaveform(x,"Waveforms/SG554Q8d9.txt",16384.);
12 
13  cout << x.size() << " " << x.start() << " " << x.rate() << endl;
14 
15  double hrss=0;
16  for(int i=0;i<x.size();i++) hrss+=x[i]*x[i];
17  hrss=sqrt(hrss/x.rate());
18  for(int i=0;i<x.size();i++) x[i]/=hrss;
19 
20 
21  //MDC.Dump("TEST_WF_DUMP.txt",x);
22 
23  //MDC.Draw(x);
24  //MDC.Draw(x,MDC_FFT);
25  MDC.Draw(x,MDC_TF);
26 
27  //exit(0);
28 }
wavearray< double > x
virtual size_t size() const
Definition: wavearray.hh:127
watplot * Draw(TString name, int id=0, TString polarization="hp", MDC_DRAW type=MDC_TIME, TString options="ALP", Color_t color=kBlack)
Definition: mdc.cc:2288
virtual void rate(double r)
Definition: wavearray.hh:123
CWB::mdc * MDC
virtual void start(double s)
Definition: wavearray.hh:119
i drho i
Definition: mdc.hh:174
double hrss
Definition: TestMDC.C:70
Definition: mdc.hh:216
void ReadWaveform(wavearray< double > &x, TString fName, double srate)
Definition: mdc.cc:1848