pycbc.live package

Submodules

pycbc.live.significance_fits module

Functions for defining the live significance fits

pycbc.live.significance_fits.add_live_significance_duration_bin_options(parser)[source]

Add options used to calculate duration bin edges in live singles significance fits

pycbc.live.significance_fits.add_live_significance_trigger_pruning_options(parser)[source]

Add options used for pruning in live singles significance fits

pycbc.live.significance_fits.duration_bins_from_cli(args)[source]

Create the duration bins from CLI options.

pycbc.live.significance_fits.verify_live_significance_duration_bin_options(args, parser)[source]

Verify options used to calculate duration bin edges in live singles significance fits

pycbc.live.significance_fits.verify_live_significance_trigger_pruning_options(args, parser)[source]

Verify options used for pruning in live singles significance fits

pycbc.live.snr_optimizer module

This module contains functions for optimizing the signal-to-noise ratio of triggers produced by PyCBC Live. Also contained within this module are the command line arguments required and options group for the SNR optimization. This module is primarily used in the pycbc_optimize_snr program.

pycbc.live.snr_optimizer.callback_func(Xi, convergence=0)[source]
pycbc.live.snr_optimizer.check_snr_optimizer_options(args, parser)[source]

Deal with default options and required parameters given optimizer option

pycbc.live.snr_optimizer.compute_minus_network_snr(v, *argv)[source]
pycbc.live.snr_optimizer.compute_minus_network_snr_pso(v, *argv, **kwargs)[source]
pycbc.live.snr_optimizer.compute_network_snr_core(v, data, coinc_times, ifos, flen, approximant, flow, f_end, delta_f, sample_rate, raise_err=False)[source]

Compute network SNR as a function over mchirp, eta, and two aligned spin components, stored in that order in the sequence v.

Parameters:
  • v (list) – A list containing the input values for mchirp, eta, and spin components.

  • data (dict) – A dictionary containing keys of ifos (‘H1’, ‘L1’) and values of the frequency series data for those ifos

  • coinc_times (dict) – A dictionary containing the coincidence times for the network.

  • ifos (list) – A list of the ifos, e.g. [‘H1’, ‘L1’]

  • flen (float) – The length of the data.

  • approximant (str) – The approximant used for the waveform model.

  • flow (float) – The lower frequency bound.

  • f_end (float) – The upper frequency bound.

  • delta_f (float) – The frequency spacing.

  • sample_rate (float) – The sampling rate of the data.

  • raise_err (bool, optional) – A flag indicating whether to raise an error if an exception occurs during the computation. Defaults to False.

Returns:

  • network_snr (float) – The computed network SNR (Signal-to-Noise Ratio) value.

  • snr_series_dict (dict) – A dictionary containing the snr timeseries from each ifo.

pycbc.live.snr_optimizer.insert_snr_optimizer_options(parser)[source]
pycbc.live.snr_optimizer.optimize_di(bounds, cli_args, extra_args, initial_point)[source]
pycbc.live.snr_optimizer.optimize_pso(bounds, cli_args, extra_args, initial_point)[source]
pycbc.live.snr_optimizer.optimize_shgo(bounds, cli_args, extra_args, initial_point)[source]

pycbc.live.supervision module

This module contains functions for supervising codes to run regularly during pycbc_live production, taking input from the search and returning files which can be used in the search. This module is primarily used in the pycbc_live_supervise_* programs.

pycbc.live.supervision.dict_to_args(opts_dict)[source]

Convert an option dictionary into a list to be used by subprocess.run

pycbc.live.supervision.ensure_directories(control_values, day_str)[source]

Ensure that the required directories exist

pycbc.live.supervision.mail_volunteers_error(controls, mail_body_lines, subject)[source]

Email a list of people, defined by mail-volunteers-file To be used for errors or unusual occurences

pycbc.live.supervision.run_and_error(command_arguments, controls)[source]

Wrapper around subprocess.run to catch errors and send emails if required

Create a symbolic link replacing the destination and checking for errors.

pycbc.live.supervision.wait_for_utc_time(target_str)[source]

Wait until the UTC time is as given by target_str, in HH:MM:SS format.

Module contents

This packages contains modules to help with pycbc live running