pycbc.live package

Submodules

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.args_to_string(args)[source]

Convert the supplied arguments for SNR optimization config into a string - this is to be used when running subprocesses

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]

Module contents

This packages contains modules to help with pycbc live running