hveto.html module

HTML utilities for hveto

hveto.html.banner(ifo, start, end)[source]

Initialise a new markup banner

Parameters

ifo : str

the interferometer prefix

start : int

the GPS start time of the analysis

end : int

the GPS end time of the analysis

Returns

page : markup.page

the structured markup to open an HTML document

hveto.html.bold_param(key, value, **attrs)[source]

Write a (key, value) pair in HTML as <p><b>key</b>: value</p>

Parameters

key : str

the element to be rendered in bold

value : str

the explanation/description of the key

**attrs

HTML attributes for the containing <p> tag

Returns
htmlstr
hveto.html.navbar(ifo, gpstime, winners=[])[source]

Initialise a new markup.page

Parameters

ifo : str

the interferometer prefix

gpstime : float

the central GPS time of the analysis

winners : list

list of round winners for navbar table of contents

Returns

page : markup.page

the structured markup to open an HTML document

hveto.html.wrap_html(func)[source]

Decorator to wrap a function with init_page and close_page calls

This allows inner HTML methods to be written with minimal arguments and content, hopefully making things simpler

hveto.html.write_about_page(configfile, prog=None)[source]

Write a page explaining how an hveto analysis was completed

Parameters

ifo : str

the prefix of the interferometer used in this analysis

start : int

the GPS start time of the analysis

end : int

the GPS end time of the analysis

configfile : str

the path of the configuration file to embed

prog : str, optional

name of the program which produced this page, defaults to the script run on the command-line

outdir : str, optional

the output directory for the HTML

Returns

index : str

the path of the HTML written for this analysis

hveto.html.write_hveto_page(rounds, plots, context='default')[source]

Write the Hveto results to HTML

Parameters

ifo : str

the prefix of the interferometer used in this analysis

start : int

the GPS start time of the analysis

end : int

the GPS end time of the analysis

rounds : list of HvetoRound

the rounds produced by this analysis

plots : list of str

the list of summary plots

outdir : str, optional

the output directory for the HTML

winners : list of str, optional

list of channels that won each round

context : str, optional

the bootstrap context class for this result, see the bootstrap docs for more details

Returns

index : str

the path of the HTML written for this analysis

hveto.html.write_null_page(reason, context='info')[source]

Write the Hveto results to HTML

Parameters

ifo : str

the prefix of the interferometer used in this analysis

start : int

the GPS start time of the analysis

end : int

the GPS end time of the analysis

reason : str

the explanation for this null result

context : str, optional

the bootstrap context class for this result, see the bootstrap docs for more details

outdir : str, optional

the output directory for the HTML

Returns

index : str

the path of the HTML written for this analysis

hveto.html.write_round(round_, context)[source]

Write the HTML summary for a specific round

Parameters

round_ : HvetoRound

the analysis round object

context : str

context for bootstrap objects, default: info

Returns

page : page

the formatted HTML for this round

hveto.html.write_summary(rounds, plots=[], header='Summary', plotsperrow=4, tableclass='table table-sm table-hover')[source]

Write the Hveto analysis summary HTML

Parameters

rounds : list of HvetoRound

the list of round objects produced by this analysis

plots : list of str, optional

the list of summary plots to display underneath the summary table

header : str, optional

the text for the section header (<h2>)

plotsperrow : int, optional

the number of plots to display in each row

tableclass : str, optional

the class for the summary <table>

Returns

page : page

the formatted markup object containing the analysis summary table, and images