3 # Copyright (C) 2011 Chad Hanna
4 # Copyright (C) 2019 Patrick Godwin
6 # This program is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by the
8 # Free Software Foundation; either version 2 of the License, or (at your
9 # option) any later version.
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14 # Public License for more details.
16 # You should have received a copy of the GNU General Public License along
17 # with this program; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 # This program makes a summary web page of a gstlal inspiral analysis.
23 import sys, os, glob, shutil, time
28 from optparse
import OptionParser
29 from ligo.scald
import report
31 ABOUT_URL =
'https://docs.google.com/document/d/12wJjCz8L1UczqRm86q3-EFnpnIZ2FHPSwKR_kym2L5g/pub?embedded=true'
32 SCHEDULE_URL =
'https://docs.google.com/spreadsheets/d/e/2PACX-1vR1XwazhZYoVbMXFZCq_s2rlzyNwcF0xC4kyhnKrCeXFSWte-2jRodL590RU3PsoX4OVypYyAZ7Nl_8/pubhtml?widget=true&headers=false'
33 IMAGE_URL =
'https://results.ligo.uwm.edu/~gstlalcbc/share/vis/gstlal.png'
37 with open(path,
'r') as f:
38 return json.loads(f.read())
41 def parse_command_line():
42 parser = OptionParser(usage =
"%prog [options] [file ...]", description =
"%prog summary web page")
43 parser.add_option(
"--webserver-dir", help =
"Set the directory for the webserver. Required. Example /archive/home/channa/public_html/highmass_months_23-24_summary_page")
44 parser.add_option(
"--open-box", action =
"store_true", help =
"Produce open box page")
45 parser.add_option(
"--output-user-tag", action =
"append", metavar =
"name", help =
"Set the basename for image search")
46 parser.add_option(
"--title", default=
"gstlal_inspiral offline analysis")
47 parser.add_option(
"--glob-path", help =
"This is the path to search for images")
49 opts, filenames = parser.parse_args()
50 return opts, filenames
57 opts, files = parse_command_line()
59 thisreport = report.Report(
'gstlal analysis', image=IMAGE_URL)
62 os.makedirs(opts.webserver_dir)
66 os.makedirs(opts.webserver_dir+
'_lite')
76 summary = report.Tab(
'Summary')
77 injparams = report.Tab(
'Injection Parameters')
78 injrecovery = report.Tab(
'Injection Recovery')
79 sens = report.Tab(
'Search Sensitivity')
80 back = report.Tab(
'Background')
81 money = report.Tab(
'Money Plots')
82 about_doc = report.Tab(
'About', url=ABOUT_URL)
83 sched_doc = report.Tab(
'Schedule', url=SCHEDULE_URL)
87 # Add summary page content to the summary page tab
90 summary += report.Header(
'Summary')
92 tabledata = load_json(os.path.join(opts.glob_path,
'%s_plot_summary.json' % opts.output_user_tag[0]))
93 summary += report.Table(
'Search Summary').save(tabledata, opts.webserver_dir)
95 tabledata = load_json(os.path.join(opts.glob_path,
'%s_segment_table.json' % opts.output_user_tag[0]))
96 summary += report.Table(
'Segments').save(tabledata, opts.webserver_dir)
98 summary += report.Description(
"This page was generated on %s by %s in the working directory: %s" % (time.strftime(
"%Y-%m-%d %H:%M"), os.environ[
"USER"], os.environ[
"PWD"]))
100 thisreport += summary
103 # Add injection parameter content
106 injparams += report.Header(
'Injection Parameters')
107 injparams += report.Description(
"Injections are the addition of simulated signals into the gravitational wave strain data. They are useful for diagnosing the pipeline and measuring the sensitivity. Care is taken to ensure that the input distribution is sensible. The remaining sections describe the input distributions for the injections. They are not necessarily what is analyzed since the analyzed segments are not used for determining the injection sets (i.e. injections may be scheduled for times when a detector is not even functioning).")
108 injparams += report.Description(
"The following plots are typically produced by injection waveform type. Several injection runs of the same waveform (with different random seeds) are often done. Here all runs of the same waveform type are shown together.")
110 imgfooter =
"Above are the injected mass parameters for the simulations done. Typically injections are done uniformally in component mass unless the waveform approximant cannot support certain mass ratios."
111 injparams += report.ImageGrid(
"Injected Parameters (m1 and m2)", grid_size=2, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*6_sim_dist_m1_m2*.png'))
113 imgfooter =
"Unless doing a directed search injections are uniform in time. Although the correct distance distribution would be uniform in volume typically logarithmic injections are done"
114 injparams += report.ImageGrid(
"Injected Parameters time and distance", grid_size=2, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*6_sim_dist_time_distance*.png'))
116 imgfooter =
"Unless doing a directed search injections are uniform on the sky."
117 injparams += report.ImageGrid(
"Injected Parameters RA and DEC", grid_size=2, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*6_sim_dist_ra_dec*.png'))
119 imgfooter =
"Unless doing a directed search injections are uniform in sin(inclination) and polarizations."
120 injparams += report.ImageGrid(
"Injected Parameters inclination and polarization", grid_size=2, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*6_sim_dist_inc_pol*.png'))
122 imgfooter =
"The Z component spins of the injection set. Often injections are done without spin, so don't be surprised if these are zero."
123 injparams += report.ImageGrid(
"Injected Parameters Z component spin", grid_size=2, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*6_sim_dist_spin1z_spin2z*.png'))
125 thisreport += injparams
128 # Add injection accuracy content
131 injrecovery += report.Header(
"Injection Accuracy")
132 injrecovery += report.Description(
"The accuracy of recovered parameters aids at diagnosing the performance of the pipeline as well as hinting at the possibility of measuring certain parameters. Mass parameters for the low mass search are often recovered better than mass parameters for the high mass search.")
134 injrecovery += report.ImageGrid(
"Mchirp Parameter Accuracy", grid_size=3, footer=
"Accuracy of chirp mass").glob(os.path.join(opts.glob_path,
'*2_mchirp_acc_frac_*.png'))
136 injrecovery += report.ImageGrid(
"Eta Parameter Accuracy", grid_size=3, footer=
"Accuracy of eta").glob(os.path.join(opts.glob_path,
'*2_eta_acc_frac_*.png'))
138 injrecovery += report.ImageGrid(
"Total Mass Parameter Accuracy", grid_size=3, footer=
"Accuracy of total mass").glob(os.path.join(opts.glob_path,
'*2_mtotal_acc_frac_*.png'))
140 injrecovery += report.ImageGrid(
"Time Parameter Accuracy", grid_size=3, footer=
"Accuracy of time").glob(os.path.join(opts.glob_path,
'*2_t_acc_*.png'))
142 injrecovery += report.ImageGrid(
"Effective Spin Accuracy", grid_size=3, footer=
"Accuracy of mass-weighted spin").glob(os.path.join(opts.glob_path,
'*2_chi_acc_scatter*.png'))
144 injrecovery += report.ImageGrid(
"SNR Recovery", grid_size=3, footer=
"Injected expected SNR vs recovered SNR").glob(os.path.join(opts.glob_path,
'*2_snr_*.png'))
146 imgfooter =
"This is the distance at which you should see a 1.4 1.4 Msun binary at SNR 8. The first panel shows the time evolution of the horizon distance and the second panel shows the same information in histogram form."
147 injrecovery += report.ImageGrid(
"Horizon distance", grid_size=1, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*HORIZON*.png'))
150 # Add injection missed / found content
153 injrecovery += report.Header(
"Injection Missed/Found")
154 injrecovery += report.Description(
"""Measuring the found and missed injections as a function of various parameters aids in diagnosing the pipeline as well as providing the expected sensitivity of the pipeline to real signals. The plots in this section show the missed and found injections as a for the various IFO times for coincident triggers. We allow double coincident events so some categories can have multiple types of found injections (for example H1L1 and H1H2L1 triggers in H1H2L1 time). Because of ambiguity concerning the time of an injection and the injection window it is occasionally possible to find an injection in more detectors than what the "time
" refers to. For example, an injection's geocentric end time might be in H1L1 time but that might occur near a boundary where H2 was also on. Thus one could find an H1L1 injection in H1H2L1 time.""")
156 injrecovery += report.Header(
"Found / Missed Summary Table")
157 for tag in opts.output_user_tag:
158 tabledata = load_json(os.path.join(opts.glob_path,
'%s_injection_summary.json' % tag))
159 injrecovery += report.Description(
"Summary of missed and found injections broken up by detector time for %s" % tag)
160 injrecovery += report.Table(
'Injection Summary Table for %s' % tag).save(tabledata, opts.webserver_dir)
162 injrecovery += report.Header(
'Found / Missed Plots')
163 for tag in opts.output_user_tag:
164 visible =
'ALL_LLOID_COMBINED' in tag
166 plots = os.path.join(opts.glob_path,
'*%s*1_d_vs_mchirp_*.png' % tag)
167 imgfooter =
"Distance of found and missed injections as a function of chirp mass: %s" % tag
168 injrecovery += report.ImageGrid(
"Distance vs. chirp mass: %s" % tag, grid_size=2, footer=imgfooter, visible=visible).glob(plots)
170 plots = os.path.join(opts.glob_path,
'*%s*1_deff_vs_mchirp_*.png' % tag)
171 imgfooter =
"Effective distance of found and missed injections as a function of chirp mass: %s" % tag
172 injrecovery += report.ImageGrid(
"Effective distance vs. chirp mass: %s" % tag, grid_size=2, footer=imgfooter, visible=visible).glob(plots)
174 plots = os.path.join(opts.glob_path,
'*%s*1_chirpdist_vs_mchirp_*.png' % tag)
175 imgfooter =
"Chirp distance of found and missed injections as a function of chirp mass. For low mass systems the chirp mass scales out of the expected amplitude. The chirp distance utilizes this and rescales the distance to be appropriate for a NS-NS binary. At low total mass the missed/found barrier should be flat on this plot: %s" % tag
176 injrecovery += report.ImageGrid(
"Chirp distance vs. chirp mass: %s" % tag, grid_size=2, footer=imgfooter, visible=visible).glob(plots)
178 injrecovery += report.Header(
"Found / Missed Total Mass")
179 for tag in opts.output_user_tag:
180 visible =
'ALL_LLOID_COMBINED' in tag
181 plots = os.path.join(opts.glob_path,
'%s*1_deff_vs_mtotal_*.png' % tag)
182 imgfooter =
"Effective distance of found and missed injections as a function of total mass: %s" % tag
183 injrecovery += report.ImageGrid(
"Effective distance vs. total mass: %s" % tag, grid_size=2, footer=imgfooter, visible=visible).glob(plots)
185 injrecovery += report.Header(
"Found / Missed Eta")
186 for tag in opts.output_user_tag:
187 visible =
'ALL_LLOID_COMBINED' in tag
188 plots = os.path.join(opts.glob_path,
'*%s*1_chirpdist_vs_eta_*.png' % tag)
189 imgfooter =
"Effective distance of found and missed injections as a function of symmetric mass ratio eta: %s" % tag
190 injrecovery += report.ImageGrid(
"Effective distance vs. eta: %s" % tag, grid_size=2, footer=imgfooter, visible=visible).glob(plots)
192 injrecovery += report.Header(
"Found / Missed Time")
193 for tag in opts.output_user_tag:
194 visible =
'ALL_LLOID_COMBINED' in tag
195 plots = os.path.join(opts.glob_path,
'*%s*1_deff_vs_t_*.png' % tag)
196 imgfooter =
"Effective distance of found and missed injections as a function of time: %s" % tag
197 injrecovery += report.ImageGrid(
"Effective distance vs. time: %s" % tag, grid_size=2, footer=imgfooter, visible=visible).glob(plots)
199 injrecovery += report.Header(
"Found / Missed Spin")
200 for tag in opts.output_user_tag:
201 visible =
'ALL_LLOID_COMBINED' in tag
202 plots = os.path.join(opts.glob_path,
'*%s*1_deff_vs_chi_*.png' % tag)
203 imgfooter =
"Effective distance of found and missed injections as a function of mass-weighted spin: %s" % tag
204 injrecovery += report.ImageGrid(
"Effective distance vs. mass-weighted spin: %s" % tag, grid_size=2, footer=imgfooter, visible=visible).glob(plots)
206 injrecovery += report.Header(
"Found / Missed Expected SNR")
207 for tag in opts.output_user_tag:
208 visible =
'ALL_LLOID_COMBINED' in tag
210 plots = os.path.join(opts.glob_path,
'*%s*1_dec_expsnr_vs_mchirp_*.png' % tag)
211 imgfooter =
"Expected SNR of found and missed injections as a function of chirp mass: %s" % tag
212 injrecovery += report.ImageGrid(
"Expected SNR vs. chirp mass: %s" % tag, grid_size=2, footer=imgfooter, visible=visible).glob(plots)
214 plots = os.path.join(opts.glob_path,
'*%s*1_dec_expsnr_vs_mtotal_*.png' % tag)
215 imgfooter =
"Expected SNR of found and missed injections as a function of total mass: %s" % tag
216 injrecovery += report.ImageGrid(
"Expected SNR vs. total mass: %s" % tag, grid_size=2, footer=imgfooter, visible=visible).glob(plots)
218 plots = os.path.join(opts.glob_path,
'*%s*1_dec_expsnr_vs_eta_*.png' % tag)
219 imgfooter =
"Expected SNR of found and missed injections as a function of symmetric mass ratio eta: %s" % tag
220 injrecovery += report.ImageGrid(
"Expected SNR vs. eta: %s" % tag, grid_size=2, footer=imgfooter, visible=visible).glob(plots)
222 plots = os.path.join(opts.glob_path,
'*%s*1_dec_expsnr_vs_cgi_*.png' % tag)
223 imgfooter =
"Expected SNR of found and missed injections as a function of mass-weighted spin: %s" % tag
224 injrecovery += report.ImageGrid(
"Expected SNR vs. mass-weighted spin: %s" % tag, grid_size=2, footer=imgfooter, visible=visible).glob(plots)
226 plots = os.path.join(opts.glob_path,
'*%s*1_dec_expsnr_vs_t_*.png' % tag)
227 imgfooter =
"Expected SNR of found and missed injections as a function of time: %s" % tag
228 injrecovery += report.ImageGrid(
"Expected SNR vs. time: %s" % tag, grid_size=2, footer=imgfooter, visible=visible).glob(plots)
230 injrecovery += report.Header(
"Missed Table")
231 for tag in opts.output_user_tag:
232 tabledata = load_json(os.path.join(opts.glob_path,
'%s_missed_summary.json' % tag))
233 injrecovery += report.Table(
'Missed Injection Table for %s' % tag).save(tabledata, opts.webserver_dir)
235 thisreport += injrecovery
238 # Add sensitivity content
241 sens += report.Header(
'Sensitivity')
243 sens += report.Description(
"""This page shows plots that characterize the overall sensitivity of the search. The detection rate is directly proportional to the observed sensitive volume, which is a function of the significance threshold used to identify candidates. These plots are useful for determining how sensitive the search was to the input injection population. Since the search sensitivity is a strong function of the intrinsic parameters of the target source, we break down the sensitive into bins of these parameters. Here we show the sensitivity as a function of source type: BNS mchirp between 0.8 and 2, NSBH between 2 and 4.5, BBH between 4.5 and 45.0, IMBH between 45.0 and 450.0""")
245 for tag in opts.output_user_tag:
246 visible =
'ALL_LLOID_COMBINED' in tag
247 plots = os.path.join(opts.glob_path,
'*%s*_BINNED_BY_SOURCE_TYPE*.png' % tag)
248 imgfooter =
"Binned by source type"
249 sens += report.ImageGrid(
"Sensitive volume (V*T) and mean sensitive distance: %s" % tag, grid_size=3, footer=imgfooter, visible=visible).glob(plots)
254 # Add background content
257 back += report.Header(
'Background')
258 back += report.Description(
"This page shows the ingredients that go into ranking events and determining the False alarm probability.")
260 imgfooter =
"Single detector triggers coincident in time-shifted analyses."
261 back += report.ImageGrid(
"Background Triggers", grid_size=3, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*3_bgparams_*_vs_snr*.png'))
262 back += report.ImageGrid(
"SNR Ratios", grid_size=3, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*SNR_PDF*.png'))
263 back += report.ImageGrid(
"Rates", grid_size=3, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*RATES*.png'))
265 back += report.Header(
"SNR and chi-squared")
266 back += report.ImageGrid(
"Single Detector Background SNR-chisq Distributions", grid_size=3).glob(os.path.join(opts.glob_path,
'*BACKGROUND_PDF_SNRCHI2*.png'))
267 back += report.ImageGrid(
"Single Detector Signal Chisq (Conditional) Distributions", grid_size=3).glob(os.path.join(opts.glob_path,
'*INJECTION_PDF_SNRCHI2*.png'))
268 back += report.ImageGrid(
"Single Detector Likelihood Ratios", grid_size=3).glob(os.path.join(opts.glob_path,
'*LR_SNRCHI2*.png'))
270 back += report.ImageGrid(
"Single Detector Signal Chisq (Conditional) Distributions: Zero lag", grid_size=3).glob(os.path.join(opts.glob_path,
'*ZERO_LAG_PDF_SNRCHI2*.png'))
276 back += report.Description(
"The chi-squared test checks that the snr accumulated matches expectation.")
278 imgfooter =
"Chi-squared vs snr for single detectors after coincidence. Blue points are full data zero lag, red are software injections and black are time slides."
279 back += report.ImageGrid(
"Chi-squared Distributions", grid_size=3, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*3_chi2_vs_rho_*closedbox*.png'))
281 imgfooter =
"Comparison of SNR in pairs of detectors."
282 back += report.ImageGrid(
"Signal-to-Noise Ratio", grid_size=3, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*4_rho_*_vs_*closedbox*.png'))
284 imgfooter =
"Comparison of effective distance in pairs of detectors."
285 back += report.ImageGrid(
"Effective Distance", grid_size=3, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*4_deff_*_vs_*closedbox*.png'))
288 back += report.Header(
'Open Box Results')
290 imgfooter =
"Chi-squared vs snr for single detectors after coincidence. Blue points are full data zero lag, red are software injections and black are time slides."
291 back += report.ImageGrid(
"Chi-squared Distributions: Zero lag", grid_size=3, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*3_chi2_vs_rho_*openbox*.png'))
293 imgfooter =
"Comparison of SNR in pairs of detectors."
294 back += report.ImageGrid(
"Signal-to-Noise Ratio: Zero lag", grid_size=3, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*4_rho_*_vs_*openbox*.png'))
296 imgfooter =
"Comparison of effective distance in pairs of detectors."
297 back += report.ImageGrid(
"Effective Distance", grid_size=3, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*4_deff_*_vs_*openbox*.png'))
302 # Add results content
305 money += report.Header(
'Money Plots')
306 money += report.Description(
"This section provides the detection statistic plots and a summary of the loudest event.")
308 money += report.Header(
'Closed Box Results')
309 imgfooter =
"Comparison of single time slide event rate to event rate expected from background as a function of threshold."
310 money += report.ImageGrid(
"Rate vs. Threshold", grid_size=3, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*5_count_vs_*_closedbox*.png'))
312 tabledata = load_json(os.path.join(opts.glob_path,
'%sbgsummary_table.json' % opts.output_user_tag[0]))
313 money += report.Table(
'Closed Box Summary Table').save(tabledata, opts.webserver_dir)
316 money += report.Header(
'Open Box Results')
317 imgfooter =
"Comparison of single time slide event rate to event rate expected from background as a function of threshold."
318 money += report.ImageGrid(
"Rate vs. Threshold", grid_size=3, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*5_count_vs_*_openbox*.png'))
320 tabledata = load_json(os.path.join(opts.glob_path,
'%ssummary_table.json' % opts.output_user_tag[0]))
321 money += report.Table(
'Open Box Summary Table').save(tabledata, opts.webserver_dir)
326 # Add search documentation
329 thisreport += about_doc
330 thisreport += sched_doc
336 thisreport.save(opts.webserver_dir)
339 # set up a lite version of the summary page
342 reportlite = report.Report(
'gstlal analysis', image=IMAGE_URL)
344 summary = report.Tab(
'Summary')
345 about_doc = report.Tab(
'About', url=ABOUT_URL)
346 sched_doc = report.Tab(
'Schedule', url=SCHEDULE_URL)
352 summary += report.Header(
'Summary')
354 tabledata = load_json(os.path.join(opts.glob_path,
'%s_plot_summary.json' % opts.output_user_tag[0]))
355 summary += report.Table(
'Search Summary').save(tabledata, opts.webserver_dir+
'_lite')
357 ## Include horizon distance plots
358 imgfooter =
"This is the distance at which you should see a 1.4 1.4 Msun binary at SNR 8. The first panel shows the time evolution of the horizon distance and the second panel shows the same information in histogram form."
359 summary += report.ImageGrid(
"Horizon distance", grid_size=1, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*HORIZON*.png'))
361 ## Include found/missed as function of decisive characteristic SNR
362 summary += report.Header(
"Found / Missed Expected SNR")
363 summary += report.Description(
"""Measuring the found and missed injections as a function of various parameters aids in diagnosing the pipeline as well as providing the expected sensitivity of the pipeline to real signals. The plots in this section show the missed and found injections for the various IFO times for coincident triggers.""")
365 tabledata = load_json(os.path.join(opts.glob_path,
'%s_injection_summary.json' % opts.output_user_tag[0]))
366 footer =
"Summary of missed and found injections broken up by detector time for %s" % opts.output_user_tag[0]
367 summary += report.Table(
'Injection Summary Table', footer=footer).save(tabledata, opts.webserver_dir+
'_lite')
369 plots = os.path.join(opts.glob_path,
'*%s*1_dec_expsnr_vs_mchirp_*.png' % opts.output_user_tag[0])
370 imgfooter =
"Expected SNR of found and missed injections as a function of chirp mass: %s" % opts.output_user_tag[0]
371 summary += report.ImageGrid(
"Expected SNR vs. chirp mass", grid_size=4, footer=imgfooter).glob(plots)
373 ## Include missed injection table
374 summary += report.Header(
"Missed Table")
375 tabledata = load_json(os.path.join(opts.glob_path,
'%s_missed_summary.json' % opts.output_user_tag[0]))
376 summary += report.Table(
'Missed Injection Table for %s' % opts.output_user_tag[0]).save(tabledata, opts.webserver_dir+
'_lite')
378 ## Include search sensitivity binned by source type
379 summary += report.Header(
'Search Sensitivity')
380 summary += report.Description(
"""These plots characterize the overall sensitivity of the search. The detection rate is directly proportional to the observed sensitive volume, which is a function of the significance threshold used to identify candidates. These plots are useful for determining how sensitive the search was to the input injection population. Here we show the sensitivity as a function of source type: BNS mchirp between 0.8 and 2, NSBH between 2 and 4.5, BBH between 4.5 and 45.0, IMBH between 45.0 and 450.0""")
382 plots = os.path.join(opts.glob_path,
'*%s*_BINNED_BY_SOURCE_TYPE*.png' % opts.output_user_tag[0])
383 imgfooter =
"Binned by source type"
384 summary += report.ImageGrid(
"Sensitive volume (V*T) and mean sensitive distance: %s" % opts.output_user_tag[0], grid_size=4, footer=imgfooter, visible=False).glob(plots)
386 ## Include FAP estimation plots
387 summary += report.Header(
"SNR and chi-squared")
388 summary += report.ImageGrid(
"Single Detector Background SNR-chisq Distributions", grid_size=4).glob(os.path.join(opts.glob_path,
'*BACKGROUND_PDF_SNRCHI2*.png'))
389 summary += report.ImageGrid(
"Single Detector Signal Chisq (Conditional) Distributions", grid_size=4).glob(os.path.join(opts.glob_path,
'*INJECTION_PDF_SNRCHI2*.png'))
391 summary += report.ImageGrid(
"Single Detector Signal Chisq (Conditional) Distributions: Zero lag", grid_size=4).glob(os.path.join(opts.glob_path,
'*ZERO_LAG_PDF_SNRCHI2*.png'))
393 ## Include Chi-square distribution plots
394 summary += report.Header(
"Chi-squared Distributions")
395 summary += report.Description(
"The chi-squared test checks that the snr accumulated matches expectation.")
397 imgfooter =
"Chi-squared vs snr for single detectors after coincidence. Blue points are full data zero lag, red are software injections and black are time slides."
398 summary += report.ImageGrid(
"Chi-squared Distributions", grid_size=3, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*3_chi2_vs_rho_*closedbox*.png'))
400 summary += report.ImageGrid(
"Chi-squared Distributions: Zero lag", grid_size=3, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*3_chi2_vs_rho_*openbox*.png'))
402 ## Include IFAR, lnL plots + summary table
403 summary += report.Header(
'Money Plots')
404 summary += report.Description(
"This section provides the detection statistic plots and a summary of the loudest event.")
406 imgfooter =
"Comparison of single time slide event rate to event rate expected from background as a function of threshold."
407 summary += report.ImageGrid(
"Rate vs. Threshold", grid_size=3, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*5_count_vs_*_closedbox*.png'))
409 tabledata = load_json(os.path.join(opts.glob_path,
'%sbgsummary_table.json' % opts.output_user_tag[0]))
410 summary += report.Table(
'Closed Box Summary Table').save(tabledata, opts.webserver_dir+
'_lite')
413 imgfooter =
"Comparison of single time slide event rate to event rate expected from background as a function of threshold."
414 summary += report.ImageGrid(
"Rate vs. Threshold: Zero lag", grid_size=3, footer=imgfooter).glob(os.path.join(opts.glob_path,
'*5_count_vs_*_openbox*.png'))
416 tabledata = load_json(os.path.join(opts.glob_path,
'%ssummary_table.json' % opts.output_user_tag[0]))
417 summary += report.Table(
'Open Box Summary Table').save(tabledata, opts.webserver_dir+
'_lite')
419 reportlite += summary
422 # Add search documentation
425 reportlite += about_doc
426 reportlite += sched_doc
432 reportlite.save(opts.webserver_dir +
"_lite", config_name=
'report_lite')