Logo coherent WaveBurst  
Library Reference Guide
Logo
MakeInj_TimeSeries.C
Go to the documentation of this file.
2 
3 #define APPROX "EXP02"
4 #define XML_FILE "../EXP02/freffix/posterior_samples_S190521g_EXP02_map.xml"
5 #define GEO_CENTER_TIME 1242442967.473284864
6 
7 #define BEG_TIME 1242442957
8 #define END_TIME 1242442977
9 
11 
12  #define N_IFOS 3
13 
14  TString ifo[N_IFOS]={"L1","H1","V1"};
15 
16  // set inspiral parms
17 
18  MDC = new CWB::mdc(N_IFOS,ifo);
20  inspOptions+="--xml "+TString(XML_FILE)+ " ";
21  inspOptions+= "--dir ./ ";
22  MDC->SetInspiral("PE",inspOptions);
23 
24  // get mdc buffer draw waveform
26  for(int i=0;i<N_IFOS;i++) {
27  w[i].resize(10*16384);
28  w[i].rate(16384);
29  w[i].start(GEO_CENTER_TIME-5);
30 
31  MDC->Get(w[i],ifo[i]); // get waveform
32 
33  //w[i].start(0);
34  //MDC->DrawTime(w[i],"ALP ZOOM");
35  //MDC->DrawFFT(w[i],"ALP ZOOM");
36  //return
37 
38  TString ofName = TString::Format("cWB_S190521g_%s_map_%.3f_%s.txt",APPROX,w[i].start(),ifo[i].Data());
39  ofstream out;
40  out.open(ofName.Data(),ios::out);
41  if (!out.good()) {cout << "Error Opening Output File : " << ofName.Data() << endl;exit(1);}
42  cout << "Create Output File : " << ofName.Data() << endl;
43  out.precision(19);
44  for(int j=0;j<6*w[i].rate();j+=8) {
45  double dt = 1./w[i].rate();
46  double t = w[i].start()+j*dt;
47  out << t << "\t" << w[i][j] << endl;
48  }
49  out.close();
50  }
51  exit(0);
52 }
wavearray< double > t(hp.size())
TString ofName
TString Get(wavearray< double > &x, TString ifo)
Definition: mdc.cc:1529
virtual void rate(double r)
Definition: wavearray.hh:141
void MakeInj_TimeSeries()
TString("c")
ofstream out
Definition: cwb_merge.C:214
TString mdc[4]
virtual void start(double s)
Definition: wavearray.hh:137
int j
Definition: cwb_net.C:28
i drho i
char ifo[NIFO_MAX][8]
wavearray< double > w
Definition: Test1.C:27
CWB::mdc * MDC
Definition: mdc.hh:248
#define APPROX
TString inspOptions
double dt
#define GEO_CENTER_TIME
#define XML_FILE
#define N_IFOS
virtual void resize(unsigned int)
Definition: wavearray.cc:463
exit(0)