hveto.config module

Configuration files for Hveto

How to write a configuration file

The hveto command-line executable can run without a configuration file, and will auto-select the primary channel, and attempt to auto-detect which auxiliary channels are available. It will also inset a minimal list of ‘unsafe’ channels so that the analysis isn’t totally meaningless.

However, the way that things are auto-detected means that the resulting output isn’t exactly reproducable after-the-fact in general. If someone adds or removes data for an auxiliary channel, a rerun will operate over a different channel lists, and confusion will reign.

So, it is highly recommended that you use a custom configuration file for your analyses. It could be that the configuration file never changes, but the very fact that it exists should mean that you are in much greater control over what the output will look like.

Each of the below sections lists the valid options and a description of what the value should be, and then an example of what that section might look like in the INI format:

[hveto]

snr-thresholds

A comma-separated list of signal-to-noise ratio thresholds over which to test each auxiliary channel

time-windows

A comma-separated list of time windows (in seconds) over which to test each auxiliary channel

minimum-significance

The significance value below which to stop the analysis

[hveto]
; comma-separated list of SNR thresholds (pass >=)
snr-thresholds = 7.75, 8, 8.5, 9, 10, 11, 12, 15, 20, 40, 100, 300
; comma-separated list of time windows
time-windows = .1, .2, .4, .8, 1
minimum-significance = 5

[primary]

channel

The name of the primary channel

trigger-generator

The name of the primary trigger generator

snr-threshold

The minimum threshold on signal-to-noise ratio for primary channel events to be included in the analysis

frequency-range

The (low, high) frequency range of interest for this analysis. Note that for CBC trigger generators, the 'template_duration' column is used here.

read-format

The format name to use when reading files for this trigger generator

read-columns

The list of three column names equivalent to time-like,frequency-like,snr-like for this trigger generator

[primary]
; use Omicron calibrated strain as primary
channel = %(IFO)s:GDS-CALIB_STRAIN
trigger-generator = omicron
; SNR threshold (pass >=)
snr-threshold = 6
; flow, fhigh
frequency-range = 0, 2048.
; format
read-format = ligolw
read-tablename = sngl_burst
; read-columns to read
read-columns = peak, peak_frequency, snr

Note

In this section the %(IFO)s interpolation variable has been used. This can be used throughout the configuration so that you only have to write one for all interferometers, with the correct two-character prefix being inserted automatically at run time.

Note

As well as the above, users can specify arguments to be used when automatically discovering triggers. Any option that begins trigfind- will be passed to the trigfind.find_trigger_urls function as a keyword argument.

Specifically, to specify the specific run associated with the daily-cbc event generator, you can give

[primary]
trigger-generator = daily-cbc
trigfind-run = bbh_gds
trigfind-filetag = 16SEC_CLUSTERED
read-format = ligolw
read-tablename = sngl_inspiral
read-columns = end,template_duration,snr

[auxiliary]

trigger-generator

The name of the auxiliary trigger generator

frequency-range

The (low, high) frequency range of interest

read-format

The format name to use when reading files for this trigger generator

read-columns

The list of three column names equivalent to time-like,frequency-like,snr-like for this trigger generator

channels

a tab-indented, line-delimited list of auxiliary channel names

[auxiliary]
trigger-generator = omicron
; flow, fhigh
frequency-range = 0, 2048
; file format
read-format = ligolw
read-tablename = sngl_burst
; read-columns to read
read-columns = peak, peak_frequency, snr
; give tab-indented, line-separated list of channels
channels =
    %(IFO)s:ASC-AS_B_RF45_I_PIT_OUT_DQ
    %(IFO)s:ASC-AS_A_RF45_Q_PIT_OUT_DQ
    %(IFO)s:ASC-X_TR_B_NSUM_OUT_DQ
    %(IFO)s:ISI-ITMX_ST2_BLND_X_GS13_CUR_IN1_DQ
    %(IFO)s:ASC-REFL_A_RF9_I_YAW_OUT_DQ
    %(IFO)s:ASC-AS_A_RF45_Q_YAW_OUT_DQ

Note

As with the [primary] section, users can specify trigfind- arguments to customise trigger-file discovery.

[segments]

url

The URL of the segment database

analysis-flag

The name of the data-quality flag indicating analysable times

padding

The (pre, post) padding to apply to the analysis segments [note both pre and post operate forward in time, so to pad out at the start of a segment (or in at the end), use a negative number]

veto-definer-file

The path of a veto-definer file to apply before analysis (can be a remote URL)

veto-definer-categories

Comma-separated list of category integers to apply, defaults to all flags in veto-definer file

[segments]
url = https://segments.ligo.org
; require full observation mode
analysis-flag = %(IFO)s:DMT-ANALYSIS_READY:1
; no padding by default
padding = 0, 0

[safety]

unsafe-channels

The list of unsafe channels (tab-indented, line-delimited)

[safety]
unsafe-channels =
    %(IFO)s:GDS-CALIB_STRAIN
    %(IFO)s:CAL-DELTAL_EXTERNAL_DQ
    %(IFO)s:OAF-CAL_DARM_DQ
    %(IFO)s:OMC-DCPD_SUM_OUT_DQ

Module API

class hveto.config.HvetoConfigParser(ifo=None, defaults={}, **kwargs)[source]

Bases: ConfigParser

Attributes
converters

Methods

add_section(section)

Create a new section in the configuration.

clear()

get(section, option, *[, raw, vars, fallback])

Get an option value for a given section.

getint(section, option, *[, raw, vars, fallback])

has_option(section, option)

Check for the existence of a given option in a given section. If the specified `section' is None or an empty string, DEFAULT is assumed. If the specified `section' does not exist, returns False.

has_section(section)

Indicate whether the named section is present in the configuration.

items([section, raw, vars])

Return a list of (name, value) tuples for each option in a section.

keys()

options(section)

Return a list of option names for the given section name.

pop(k[,d])

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem()

Remove a section from the parser and return it as a (section_name, section_proxy) tuple.

read(filenames)

Read and parse a filename or an iterable of filenames.

read_dict(dictionary[, source])

Read configuration from a dictionary.

read_file(f[, source])

Like read() but the argument must be a file-like object.

read_string(string[, source])

Read configuration from a given string.

readfp(fp[, filename])

Deprecated, use read_file instead.

remove_option(section, option)

Remove an option.

remove_section(section)

Remove a file section.

sections()

Return a list of section names, excluding [DEFAULT]

set(section, option[, value])

Set an option.

setdefault(k[,d])

update([E, ]**F)

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values()

write(fp[, space_around_delimiters])

Write an .ini-format representation of the configuration state.

defaults

getboolean

getfloat

getfloats

getparams

optionxform

set_hveto_defaults

HVETO_DEFAULTS = {'auxiliary': {'frequency-range': (30, 2048), 'trigger-generator': 'Omicron'}, 'hveto': {'minimum-significance': 5, 'snr-thresholds': (8, 10, 12, 15, 20, 50, 100, 300), 'time-windows': (0.1, 0.2, 0.5, 1, 2, 5)}, 'primary': {'channel': '%(IFO)s:GDS-CALIB_STRAIN', 'frequency-range': (30, 2048), 'snr-threshold': 8, 'trigger-generator': 'Omicron'}, 'safety': {'unsafe-channels': ['%(IFO)s:GDS-CALIB_STRAIN', '%(IFO)s:LDAS-STRAIN', '%(IFO)s:CAL-DELTAL_EXTERNAL_DQ', '%(IFO)s:DER_DATA_H', '%(IFO)s:h_4096Hz', '%(IFO)s:h_16384Hz']}, 'segments': {'analysis-flag': '%(IFO)s:DMT-ANALYSIS_READY:1', 'padding': (0, 0), 'url': 'https://segments.ligo.org'}}
getfloats(section, option)[source]
getparams(section, prefix)[source]
read(filenames)[source]

Read and parse a filename or an iterable of filenames.

Files that cannot be opened are silently ignored; this is designed so that you can specify an iterable of potential configuration file locations (e.g. current directory, user’s home directory, systemwide directory), and all existing configuration files in the iterable will be read. A single filename may also be given.

Return list of successfully read files.

set_hveto_defaults()[source]
hveto.config.comma_separated_floats(string)[source]