Write
This page contains the documentation for ‘write.py’. This module provides functions to generate and write injection files for gravitational wave simulations, including random and deterministic glitches and gravitational waves. The injection files are in the form of a .json file.
Function Definitions
Randomly generates time series with glitches and writes to an injection file.
Parameters:
ifo (string) - Interferometer abbreviation
run (string) - Observing run
mu (float) - Poisson rate parameter; average number of glitches per second
duration (float) - Duration of time series
gps (float) - Starting GPS time of time series
interval (NoneType or float) - Optional interval of repeating glitches
probs (list) - List of probabilities of each type of glitch occurring; probabilities are blip, lfb, tomte, koi and sum to one
seed (int) - Random seed used to generate noise
scale (float) - Scale of Gaussian noise
file (bool) - Argument to enable the return of the injection file name
basename (string) - String to insert at the start of the file name, optional
gw_inject (bool) - Option to generate .json file with empty GW parameter columns
Returns:
gwpy.timeseries.TimeSeries - Time series with Gaussian noise and glitches
string - The injection file’s name (if file=True)
Deterministically generates time series with specified glitches and writes to an injection file.
Parameters:
ifo (string) - Interferometer abbreviation
run (string) - Observing run
glitches (list) - List containing strings of glitch types
seeds (list) - List containing integers of random seeds
duration (float) - Duration of time series
gps (float) - Starting GPS time of time series
scale (float) - Scale of Gaussian noise
basename (string) - String to insert at the start of the file name, optional
suggest (bool) - Option to use suggested bounds on parameter distributions
file (bool) - Option to return the file name of the generated .json file
gw_inject (bool) - Option to generate .json file with empty GW parameter columns
Returns:
gwpy.timeseries.TimeSeries - Time series with Gaussian noise and glitches
string - The injection file’s name (if file=True)
Deterministically simulates a single detector’s calibrated strain channel and writes an injection file with gravitational wave signals.
Parameters:
ifo (string) - Interferometer abbreviation
ts (gwpy.timeseries.TimeSeries) - Time series with noise and glitches
filename (string) - Name of the injection file that describes ts; must have columns with GW parameters
t_merge (list) - List of merger times
signals (list) - List of strings of CBC types, in order with merger times
seeds (list) - List of random seed integers, in order with merger times
precession (bool) - Optional argument to enable x & y spins
Returns:
gwpy.timeseries.TimeSeries - Time series with injected CBC signals
Randomly simulates a single detector’s calibrated strain channel with glitches and gravitational waves, and writes an injection file
Parameters:
ifo (string) - Interferometer abbreviation
run (string) - Observing run
gps (float) - Starting GPS time of time series
duration (float) - Duration of time series
mu_glitch (float) - Poisson rate parameter; average number of glitches per second
mu_gw (float) - Poisson rate parameter; average number of GWs per second
interval (NoneType or float) - Optional, repeating interval of glitches
probs_glitch (list) - List of floats containing probabilities of generating each glitch; Probabilities are blip, LFB, tomte, koi and sum to 1
probs_gw (list) - List of floats containing probabilities of generating each type of CBC signal; Probabilities are BHBH, NSBH, BNS and sum to 1
precession (bool) - Optional argument to enable x & y spins
Returns:
gwpy.timeseries.TimeSeries - Time series with Gaussian noise, glitches, and GWs
Deterministically simulates the 3-detector network and writes injection files with gravitational waves
Parameters:
h1 (gwpy.timeseries.TimeSeries) - H1 strain without GW signals
h1_file (string) - Name of the injection file that describes h1
l1 (gwpy.timeseries.TimeSeries) - L1 strain without GW signals
l1_file (string) - Name of the injection file that describes l1
v1 (gwpy.timeseries.TimeSeries) - V1 strain without GW signals
v1_file (string) - Name of the injection file that describes v1
t_merge (list) - List of CBC merger times
signals (list) - List of strings of CBC types, in order with merger times
seeds (list) - List of random seed integers, in order with merger times
precession (bool) - Optional argument to enable x & y spins
Returns:
gwpy.timeseries.TimeSeries - H1 strain with injected GWs
gwpy.timeseries.TimeSeries - L1 strain with injected GWs
gwpy.timeseries.TimeSeries - V1 strain with injected GWs
Randomly simulates the 3-detector network with glitches and gravitational waves, and writes injection files
Parameters:
run (string) - Observing run
gps (float) - Starting GPS time of time series
duration (float) - Duration of time series
mu_glitch (float) - Poisson rate parameter; average number of glitches per second
mu_gw (float) - Poisson rate parameter; average number of GWs per second
interval (NoneType or float) - Optional, repeating interval of glitches
probs_glitch (list) - List of floats containing probabilities of generating each glitch; Probabilities are blip, LFB, tomte, koi and sum to 1
probs_gw (list) - List of floats containing probabilities of generating each type of CBC signal; Probabilities are BHBH, NSBH, BNS and sum to 1
precession (bool) - Optional argument to enable x & y spins
Returns:
gwpy.timeseries.TimeSeries - H1 strain with Gaussian noise, glitches, and GWs
gwpy.timeseries.TimeSeries - L1 strain with Gaussian noise, glitches, and GWs
gwpy.timeseries.TimeSeries - V1 strain with Gaussian noise, glitches, and GWs