Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TestFrame5.C
Go to the documentation of this file.
1 //
2 // Test Create FrList
3 // Author : Gabriele Vedovato
4 
5 {
6  #define FRLIST_NAME "input/H1_LDAS_C02_L2.frl"
7  #define CHANNEL_NAME "H1:LDAS-STRAIN"
8 
9  double start = 942449664;
10  double stop = start+600;
13 
14  double sRate = 8192./2; // if > 0 && > (original srate) data are resampled to sRate
15 
17 
19  cout << "nfiles : " << nfiles << endl;
20  frfile FRF = fr.getFrList(start, stop, 0);
22  fr.setSRIndex(12);
24 
25  cout << "srate " << yy.rate() << endl;
26 
27  watplot plot(const_cast<char*>("plot"),200,20,800,500);
28 
29  char gtitle[256];
30  sprintf(gtitle,"Original PSD (Black) Reasampled PSD (Red)");
31  plot.gtitle(gtitle,"frequency (Hz)","strain/#sqrt{Hz}");
32  plot.goptions(const_cast<char*>("alp logy"), 1, 0, 0, true, 0,xx.rate()/2., true, 32);
33 
34  xx >> plot; yy >> plot;
35 /*
36  char ofName[256];
37  sprintf(ofName,"ResamplePSD.png");
38  cout << "write results to " << ofName << endl;
39  TString gfile=ofName;
40  plot >> gfile;
41 
42  exit(0);
43 */
44 }
double sRate
Definition: TestFrame5.C:14
virtual void rate(double r)
Definition: wavearray.hh:123
cout<< "skymap size : "<< L<< endl;for(int l=0;l< L;l++) sm.set(l, l);sm > const_cast< char * >("skymap.dat")
double stop
Definition: TestFrame5.C:10
plot gtitle(gtitle,"frequency (Hz)","strain/#sqrt{Hz}")
#define CHANNEL_NAME
int nfiles
Definition: TestFrame5.C:18
frfile FRF[nIFO+1]
Definition: cwb_net.C:251
int getNfiles()
Definition: frame.hh:92
void setSRIndex(int srIndex)
Definition: frame.hh:96
wavearray< double > xx
Definition: TestFrame5.C:11
wavearray< double > yy
Definition: TestFrame5.C:12
CWB::frame fr(FRLIST_NAME)
void readFrames(char *filename, char *channel, wavearray< double > &w)
Definition: frame.cc:810
cout<< "nfiles : "<< nfiles<< endl;frfile FRF=fr.getFrList(start, stop, 0);fr.readFrames(FRF, const_cast< char * >CHANNEL_NAME), xx);fr.setSRIndex(12);fr.readFrames(FRF, const_cast< char * >CHANNEL_NAME), yy);cout<< "srate "<< yy.rate()<< endl;watplot plot(const_cast< char * >"plot"), 200, 20, 800, 500);char gtitle[256];sprintf(gtitle,"Original PSD (Black) Reasampled PSD (Red)");plot.gtitle(gtitle,"frequency (Hz)","strain/#sqrt{Hz}");plot.goptions(const_cast< char * >"alp logy"), 1, 0, 0, true, 0, xx.rate()/2., true, 32);xx > plot
Definition: TestFrame5.C:34
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
frfile getFrList(int istart, int istop, int segEdge)
Definition: frame.cc:509
#define FRLIST_NAME