gwdetchar.omega.html module

Utilties for writing omega scan HTML pages

gwdetchar.omega.html.navbar(ifo, gpstime, toc={})[source]

Initialise a new markup.page

Parameters:

ifo : str

the interferometer prefix

gpstime : float

the central GPS time of the analysis

toc : dict

metadata dictionary for navbar table of contents

Returns:

page : markup.page

the structured markup to open an HTML document

Create a Bootstrap button object that toggles between plot types.

Parameters:

plottype : str

the type of plot to toggle toward

channel : OmegaChannel

the channel object corresponding to the plots shown

pranges : list of `int`s

a list of ranges for the time axis of each plot

Returns:

page : page

a markup page object

gwdetchar.omega.html.update_toc(toc, channel, name='GW')[source]

Add a channel to the page table of contents

Parameters:

toc : dict

dictionary used as table of contents for a bootstrap page

channel : OmegaChannel

channel to be added to toc

name : str, optional

name of a channel’s block, default: 'GW'

Returns:

out : dict

the updated dictionary

gwdetchar.omega.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

gwdetchar.omega.html.write_about_page(configfiles)[source]

Write a page explaining how a Qscan analysis was completed

Parameters:

ifo : str

the prefix of the interferometer used in this analysis

gpstime : float

the central GPS time of the analysis

configfiles : list of str

list of paths of the configuration files to embed

outdir : str, optional

the output directory for the HTML

Returns:

index : str

the path of the HTML written for this analysis

gwdetchar.omega.html.write_block(blockkey, block, context, tableclass='table table-condensed table-hover table-bordered table-responsive desktop-only')[source]

Write the HTML summary for a specific block of channels

Parameters:

blockkey: `str`

the key labeling the channel block

block : dict of OmegaChannel

a list of channels and their analysis attributes

context : str

the type of Bootstrap <panel> object to use, color-coded by GWO standards (must be one of ‘default’, ‘primary’, ‘success’, ‘info’, ‘warning’, or ‘danger’)

tableclass : str, optional

the class for the summary <table>

Returns:

page : page

the formatted HTML for this block

gwdetchar.omega.html.write_null_page(reason, context='default')[source]

Write the Qscan results to HTML

Parameters:

ifo : str

the prefix of the interferometer used in this analysis

gpstime : float

the central GPS 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

Returns:

index : str

the path of the HTML written for this analysis

gwdetchar.omega.html.write_qscan_page(blocks, context)[source]

Write the Qscan results to HTML

Parameters:

ifo : str

the prefix of the interferometer used in this analysis

gpstime : float

the central GPS time of the analysis

blocks : dict of OmegaChannel

the channel blocks scanned in the analysis

context : str, optional

the type of Bootstrap <panel> object to use, color-coded by GWO standard

Returns:

index : str

the path of the HTML written for this analysis

gwdetchar.omega.html.write_ranking(toc, primary, thresh=6.5, tableclass='table table-condensed table-hover table-bordered table-responsive')[source]

Write a table of channels ranked by their similarity to the primary

Parameters:

toc : dict

metadata dictionary for navbar table of contents

primary : str

the name of the primary channel

thresh : float

the minimum correlation amplitude for appearing in this table

tableclass : str, optional

the class for the summary <table>

Returns:

page : page

the formatted markup object containing the analysis summary table

gwdetchar.omega.html.write_summary(ifo, gpstime, incomplete=False, context='default', header='Summary', tableclass='table table-condensed table-hover table-responsive')[source]

Write the Qscan analysis summary HTML

Parameters:

ifo : str

the interferometer prefix

gpstime : float

the central GPS time of the analysis

incomplete : bool

boolean switch to determine whether the scan is still in progress

context : str, optional

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

header : str, optional

the text for the section header (<h2>)

tableclass : str, optional

the class for the summary <table>

Returns:

page : page

the formatted markup object containing the analysis summary table

gwdetchar.omega.html.write_summary_table(blocks, correlated, base='.')[source]

Write a summary table in various formats for users to download

Parameters:

blocks : dict of OmegaChannel

the channel blocks scanned in the analysis

correlated : bool

Boolean switch to determine if cross-correlation is included

base : str

the path for the <base> tag to link in the <head>