API

The pygwb package consists of several modules, each with a distinct functionality. A summary of all pygwb modules, their interaction with each other, and the main external dependencies can be seen in the schema below. This API section contains information about each of the modules, as well as a description of all methods therein. The module documentation can be accessed through the table below for each of the modules, or through the table of contents on the left hand side of the page.

See also

Additional information about each of the modules can be found in the pygwb paper.

_images/pygwb_modules.png

detector

The detector module is a subclass of bilby's Interferometer class (more details here) which is charged with handling, storing and saving all relevant interferometer data.

baseline

The Baseline module is by design the core of the pygwb stochastic analysis.

network

The Network module is designed to handle two different tasks.

preprocessing

The preprocessing module combines all the functions that handle the preprocessing of the data used in the analysis.

spectral

The spectral module contains all functions in the pygwb package that are related to the computation of the power spectral density (PSD) and the cross spectral density (CSD).

coherence

The coherence module only contains one method, which is used to calculate the coherence spectrum given two power spectrograms and a cross-spectrogram.

postprocessing

The postprocessing module combines all methods which are useful in the end stages of the analysis, more specifically when combining spectrograms into spectra, and spectra into one overall point estimate for the gravitational-wave background.

omega_spectra

This module contains two classes that deal with the spectra and spectrograms in the pygwb analysis.

pe

The pe module performs parameter estimation (PE) as an integral part of the analysis, which naturally follows the computation of the optimal estimate of the gravitational-wave background (GWB).

statistical_checks

The statistical_checks module performs various tests by plotting different quantities and saving these plots.

simulator

This module provides an easy-to-use tool to simulate data, both a stochastic gravitational-wave background, as well as individual compact binary coalescence waveforms.

delta_sigma_cut

In general, the noise level in ground-based detectors changes slowly on time-scales of tens of minutes to hours.

notch

Realistic detector data will have noise lines and various other artefacts, which should not be included in the analysis (more information

constants

The constants module contains several constants that are used in stochastic gravitational-wave background searches, such as the speed of light and the Hubble parameter.

orfs

The relative position and orientation of two detectors is taken into account by the overlap reduction function (ORF) in gravitational-wave background searches.

parameters

Many parameters enter in a full gravitational-wave background analysis.

util

The util module combines miscellaneous functions used in several parts of the pygwb package.