Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cwb_mkhtml_pe.C
Go to the documentation of this file.
1 // make the html pe report : used by the cwb_report command
2 {
3 
4  CWB::Toolbox::checkFile(gSystem->Getenv("CWB_ROOTLOGON_FILE"));
5  CWB::Toolbox::checkFile(gSystem->Getenv("CWB_PARAMETERS_FILE"));
6  CWB::Toolbox::checkFile(gSystem->Getenv("CWB_UPARAMETERS_FILE"));
7  CWB::Toolbox::checkFile(gSystem->Getenv("CWB_PPARAMETERS_FILE"));
8  CWB::Toolbox::checkFile(gSystem->Getenv("CWB_UPPARAMETERS_FILE"));
9  CWB::Toolbox::checkFile(gSystem->Getenv("CWB_EPPARAMETERS_FILE"));
10 
11  // create body.html file
12 
17 
18  // if CWB_DOC_URL is define then man infos are added to web pages
20  if(gSystem->Getenv("CWB_DOC_URL")!=NULL) {
21  cwb_doc_url=TString(gSystem->Getenv("CWB_DOC_URL"));
22  }
23 
24  ofstream out;
25  char fileout[256];
26 
27  // --------------------------------------------------------------------
28  // create prc html body
29  // --------------------------------------------------------------------
30 
31  sprintf(fileout,"%s/prc_body.html", pp_dir);
32  cout << fileout << endl;
33  out.open(fileout,ios::out);
34  if (!out.good()) {cout << "cwb_mkhtml_pe.C : Error Opening File : " << fileout << endl;exit(1);}
35 
36  MakePlotsHtmlTable(&out,"antenna pattern (same psd) : sensitivity & alignment",
37  "data/antpat_sensitivity.png","data/antpat_alignment.png");
38  MakePlotsHtmlTable(&out,"injected vs reconstructed locations of the detected events",
39  "data/inj_detected_antpat.png","data/rec_detected_antpat.png");
40  MakePlotsHtmlTable(&out,"injected vs detected events distributions : SNRnet & distance",
41  "data/inj_vs_rec_snr.png","data/inj_vs_rec_distance.png");
42  MakePlotsHtmlTable(&out,"search area & pp plot","data/search_area.png","data/pp_plot_prc.png");
43  MakePlotsHtmlTable(&out,"cos_theta distribution","data/cos_theta.png","580");
44  MakePlotsHtmlTable(&out,"Sky Localization Median vs Network SNR","data/median50_vs_snr.png","data/median90_vs_snr.png");
45 
46  out.close();
47 
48  // --------------------------------------------------------------------
49  // create wrc html body
50  // --------------------------------------------------------------------
51 
52  sprintf(fileout,"%s/wrc_body.html", pp_dir);
53  cout << fileout << endl;
54  out.open(fileout,ios::out);
55  if (!out.good()) {cout << "cwb_mkhtml_pe.C : Error Opening File : " << fileout << endl;exit(1);}
56 
57  MakePlotsHtmlTable(&out,"Reconstructed SNRnet vs Injected SNRnet","data/osnr_vs_isnr.png","580");
58  MakePlotsHtmlTable(&out,"Residual Energy (Distrbution/PP-plot)","data/nre_vs_isnr.png","data/pp_plot_nre.png");
59  MakePlotsHtmlTable(&out,"Overlap/Fitting Factors","data/of_vs_isnr.png","data/ff_vs_isnr.png");
60  MakePlotsHtmlTable(&out,"","data/of_vs_ff.png","data/of_vs_nre.png");
61  MakePlotsHtmlTable(&out,"Frequency Residual Energy (Distrbution/PP-plot)","data/pp_plot_fre.png","580");
62 
63  out.close();
64 
65  // --------------------------------------------------------------------
66  // create mchirp html body
67  // --------------------------------------------------------------------
68 
69  sprintf(fileout,"%s/mchirp_body.html", pp_dir);
70  cout << fileout << endl;
71  out.open(fileout,ios::out);
72  if (!out.good()) {cout << "cwb_mkhtml_pe.C : Error Opening File : " << fileout << endl;exit(1);}
73 
74  MakePlotsHtmlTable(&out,"Chirp Mass","data/omch_vs_imch.png","data/dmch_vs_isnr.png");
75  MakePlotsHtmlTable(&out,"Chirp Mass Error","data/emch_vs_imch.png","data/emch_vs_isnr.png");
76  MakePlotsHtmlTable(&out,"Chirp Ellipticity","data/elch_vs_imch.png","data/elch_vs_isnr.png");
77  MakePlotsHtmlTable(&out,"Chirp Pixel Fraction","data/pfch_vs_imch.png","data/pfch_vs_isnr.png");
78  MakePlotsHtmlTable(&out,"Chirp Energy Fraction","data/efch_vs_imch.png","data/efch_vs_isnr.png");
79  MakePlotsHtmlTable(&out,"PE Chirp Mass","data/opemch_vs_isnr.png","data/epemch_vs_isnr.png");
80 
81  out.close();
82 
83 
84  exit(0);
85 }
86 
void MakePlotsHtmlTable(ofstream *out, TString title, TString png1, TString png2="")
Definition: Toolfun.hh:799
TString cwb_doc_url
Definition: cwb_mkhtml_pe.C:19
TString("c")
sprintf(netdir,"%s/%s", pp_dir, pp_data_dir)
static bool checkFile(TString fName, bool question=false, TString message="")
Definition: Toolbox.cc:3956
ofstream out
Definition: cwb_mkhtml_pe.C:24
TString PP_DATA_PATH
Definition: cwb_mkhtml_pe.C:14
char netdir[1024]
TString PP_DATA_DIR
Definition: cwb_mkhtml_pe.C:16
char fileout[256]
Definition: cwb_mkhtml_pe.C:25
char pp_dir[512]
Definition: test_config1.C:155
char pp_data_dir[1024]
exit(0)