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:
ifostr

the interferometer prefix

gpstimefloat

the central GPS time of the analysis

tocdict

metadata dictionary for navbar table of contents

Returns:
pagemarkup.page

the structured markup to open an HTML document

Create a Bootstrap button object that toggles between plot types.

Parameters:
plottypestr

the type of plot to toggle toward

channelOmegaChannel

the channel object corresponding to the plots shown

prangeslist of int

a list of ranges for the time axis of each plot

Returns:
pagepage

a markup page object

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

Add a channel to the page table of contents

Parameters:
tocdict

dictionary used as table of contents for a bootstrap page

channelOmegaChannel

channel to be added to toc

namestr, optional

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

Returns:
outdict

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, prog=None)[source]

Write a page explaining how a Qscan analysis was completed

Parameters:
ifostr

the prefix of the interferometer used in this analysis

gpstimefloat

the central GPS time of the analysis

configfileslist of str

list of paths of the configuration files to embed

progstr, optional

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

outdirstr, optional

the output directory for the HTML

Returns:
indexstr

the path of the HTML written for this analysis

gwdetchar.omega.html.write_block(blockkey, block, context, tableclass='table table-sm table-hover table-bordered  d-none d-lg-table')[source]

Write the HTML summary for a specific block of channels

Parameters:
blockkey: `str`

the key labeling the channel block

blockdict of OmegaChannel

a list of channels and their analysis attributes

contextstr

the type of Bootstrap <card> object to use, color-coded by GWO standards (must be one of ‘h1’, ‘l1’, ‘v1’, ‘k1’, ‘i1’, ‘g1’, or ‘network’)

tableclassstr, optional

the class for the summary <table>

Returns:
pagepage

the formatted HTML for this block

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

Write the Qscan results to HTML

Parameters:
ifostr

the prefix of the interferometer used in this analysis

gpstimefloat

the central GPS time of the analysis

reasonstr

the explanation for this null result

contextstr

type of bootstrap alert box to use, default: info

Returns:
indexstr

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:
ifostr

the prefix of the interferometer used in this analysis

gpstimefloat

the central GPS time of the analysis

blocksdict of OmegaChannel

the channel blocks scanned in the analysis

contextstr, optional

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

Returns:
indexstr

the path of the HTML written for this analysis

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

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

Parameters:
tocdict

metadata dictionary for navbar table of contents

primarystr

the name of the primary channel

threshfloat

the minimum correlation amplitude for appearing in this table

tableclassstr, optional

the class for the summary <table>

Returns:
pagepage

the formatted markup object containing the analysis summary table

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

Write the Qscan analysis summary HTML

Parameters:
ifostr

the interferometer prefix

gpstimefloat

the central GPS time of the analysis

incompletebool

boolean switch to determine whether the scan is still in progress

headerstr, optional

the text for the section header (<h2>)

tableclassstr, optional

the class for the summary <table>

Returns:
pagepage

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:
blocksdict of OmegaChannel

the channel blocks scanned in the analysis

correlatedbool

Boolean switch to determine if cross-correlation is included

basestr

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