Logo coherent WaveBurst  
Library Reference Guide
Logo
TestFrame4.C
Go to the documentation of this file.
1 //
2 // Test Create FrList
3 // Author : Gabriele Vedovato
4 
5 #define FRLIST_NAME "input/H1_LDAS_C02_L2.frl"
6 #define CHANNEL_NAME "H1:LDAS-STRAIN"
7 
8 using namespace CWB;
9 
11 
12 void TestFrame4() {
13 
15  x.start(942449664);
16  x.stop(x.start()+600);
17 
18  plot = new watplot(const_cast<char*>("plot"),200,20,800,500);
19  //plot->goptions(const_cast<char*>("alp logx logy"), 1, 0., 0., true, 0., 0.);
20  //plot->goptions(const_cast<char*>("alp logx logy"), 1, x.start(), x.start()+100., true, 10., 0.);
21  plot->goptions(const_cast<char*>("alp logx logy"), 1, x.start(), x.start()+100., true, 10., 0., true, 8.);
22  //plot->goptions(const_cast<char*>("alp logy"), 1, x.start(), x.stop(), true, 170., 190., true, 64.);
23  plot->gtitle(CHANNEL_NAME);
24 
25  int mkf_argc = 11;
26  const char *mkf_argv[11] = {"mkf", "-Bu","-Hp", "-o", "6", "-a", "200", "-s", "16384","-l",NULL};
27  Filter filter(mkf_argc, mkf_argv);
28 
30  int nfiles=ifr.getNfiles();
31  cout << "nfiles : " << nfiles << endl;
32 
33  char frName[512];
34  sprintf(frName,"%s-%s-%d-%d.gwf","H1","Filtered",int(x.start()),int(x.stop()-x.start()));
35  cout << frName << endl;
36 
37  frame ofr(frName,CHANNEL_NAME,"WRITE");
38  ofr.setFrName("H1:GW-H");
39 
40  //ifr >> x >> filter >> x >> *plot;
41  //ifr >> x >> filter >> x >> ofr;
42  //ifr >> x >> *plot >> x >> filter >> x >> ofr;
43  //ifr >> x >> filter >> x >> *plot >> x >> ofr;
44  //ifr >> x >> *plot >> x >> filter >> x >> *plot >> x >> ofr;
45 
46  char plName[512];
47  sprintf(plName,"%s-%s-%d-%d.png","H1","Filtered",int(x.start()),int(x.stop()-x.start()));
48  cout << plName << endl;
49  //plot->print(plName);
50  *plot >> plName;
51 
52  ifr.close();
53  ofr.close();
54 
55  //exit(0);
56 }
void gtitle(TString title="", TString xtitle="", TString ytitle="")
Definition: watplot.cc:1256
int nfiles
Definition: ced.hh:42
void TestFrame4()
Definition: TestFrame4.C:12
void setFrName(TString frName)
Definition: frame.hh:126
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<< "\ layers : "<< nLAYERS<< "\ dF(hz) : "<< dF<< "\ 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
void close()
Definition: frame.cc:296
virtual void start(double s)
Definition: wavearray.hh:137
#define FRLIST_NAME
Definition: TestFrame4.C:5
void goptions(char *opt=NULL, int col=1, double t1=0., double t2=0., bool fft=false, float f1=0., float f2=0., bool psd=false, float t3=0., bool oneside=false)
Definition: watplot.cc:1221
int getNfiles()
Definition: frame.hh:110
TString frName[NIFO_MAX]
char filter[1024]
virtual void stop(double s)
Definition: wavearray.hh:139
watplot * plot
Definition: TestFrame4.C:10
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
#define CHANNEL_NAME
Definition: TestFrame4.C:6