Logo coherent WaveBurst  
Library Reference Guide
Logo
Posterior2XML.C
Go to the documentation of this file.
1 // --------------------------------------------------------------------------------------------------------------------------
2 //
3 // sampleFile : input posterior sample file produced by PE
4 // xmlFile : output xml file
5 // options
6 // --gps_start_time : gps start time
7 // if(gps_start_time<=0) the posterior time is used
8 // -- gps_stop_time : gps stop time
9 // -- time_step : injection time step
10 // -- seed : if (<0) the parameters are read sequentially from posterior sample
11 // : if (>0) the parameters are read randomly (uniformely with seed) from posterior sample
12 // --waveform : if declared it overwrite the approximant declared in the posteriors
13 // --source : if declared it is added to the SimInspiralTable->source (max length=20)
14 // --ninjections : number of xml entries (only for gps_stop_time<=0)
15 // --clb_file : if defined then it is used to dump the calibration parameters (same format as for posteriors sample)
16 //
17 // --------------------------------------------------------------------------------------------------------------------------
18 
19 {
20  // Example: create xml & clb files from posterior samples file for chunk 19
21 
22  TString options = "";
23  options += "--gps_start_time 1185217218 "; // start gps time chunk 19
24  options += "--gps_stop_time 1185937218 "; // stop gps time chunk 19
25  options += "--time_step 150 "; // time step between injections
26  options += "--seed 1 "; // seed>=0 -> injections are selected randomly from the posterior samples
27  options += "--clb_file posterior_samples_K19_TS150s.clb "; // name of output calibration file (optional)
28  options += "--source GWXXYYZZ "; // set source name
29 
30 // options += "--waveform IMRPhenomPv2 "; // force approximant
31 // options += "--ninjections 1000 "; // number of output injection (only if --gps_start_time<=0)
32 
33  TString posteriorFile = "posterior_samples.dat"; // input posterior samples file
34  TString xmlFile = "posterior_samples_K19_TS150s.xml"; // output xml file
35 
36  CWB::mdc::Posterior2XML(posteriorFile, xmlFile, options);
37 
38  exit(0);
39 }
exit(0)
TString("c")
TString posteriorFile
Definition: Posterior2XML.C:33
TString xmlFile
Definition: Posterior2XML.C:34
options
Definition: Posterior2XML.C:23
void Posterior2XML(TString gwname, int seed=-1)
Definition: GWOSC_Tools.C:160