Simulate

This page contains the documentation for ‘simulate.py’. This module provides functions to generate strain time series with both gravitational wave signals and glitches.

Glitch Simulations

GlitchPop.simulate.random_glitch(ifo, run, mu=0.1, duration=100, gps=0, interval=None, probs=[0.25, 0.25, 0.25, 0.25])

Randomly generates time series with Gaussian noise and glitches. Probabilities are in this order: blip, low frequency blip, tomte and koi fish.

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

Returns:

  • gwpy.timeseries.TimeSeries - h(t) w/ Gaussian noise and glitches

GlitchPop.simulate.determ_glitch(ifo, run, glitches, times, seeds, duration=100, gps=0, scale=1, suggest=True)

Generates deterministic time series w/ coloured Gaussian noise.

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

  • suggest (bool) - Option to use suggest bounds on parameter distributions

Returns:

  • gwpy.timeseries.TimeSeries - h(t) w/ Gaussian noise and glitches

GW + Glitch Simulations

GlitchPop.simulate.random_gw(ifo, run, gps=0, duration=500, mu_glitch=0.1, mu_gw=10e-5, interval=None, probs_glitch=[0.25,0.25,0.25,0.25], probs_gw=[1/3,1/3,1/3], precession=False)

Randomly simulates a single detector’s calibrated strain channel given two Poissonian rates. The probabilities for the GW signals are in this order: ‘BHBH’, ‘NSBH’ and ‘BNS’. This function can take a long time to run if the GW Poissonian rate is high and/or precession is enabled. The minimum suggested duration is 85 seconds.

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 - h(t) w/ gaussian noise, glitches and GWs

GlitchPop.simulate.determ_gw(ifo, ts, t_merge, signals, seeds, precession=False)

Deterministically simulates a single detector’s calibrated strain channel given random seeds.

Parameters:

  • ifo (string) - Interferometer abbreviation

  • ts (gwpy.timeseries.TimeSeries) - Time series to append GW signals to

  • t_merge (list) - List of CBC merger times

  • signals (list) - List of strings of CBC type, 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 - h(t) w/ gaussian noise, glitches and appended GWs

Tri-Detector Simulations

GlitchPop.simulate.random_tri_ifo(run, gps=0, duration=500, mu_glitch=0.1, mu_gw=10e-5, interval=None, probs_glitch=[0.25,0.25,0.25,0.25], probs_gw=[1/3,1/3,1/3], precession=False)

Randomly simulates a tri-detector network given two Poissonian rates. The tri-detector network used here is Hanford (H1), Livingston (L1) and Virgo (V1). The minimum suggested duration is 85 seconds.

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 - h(t) of H1 strain

  • gwpy.timeseries.TimeSeries - h(t) of L1 strain

  • gwpy.timeseries.TimeSeries - h(t) V1 strain

GlitchPop.simulate.determ_tri_ifo(h1, l1, v1, t_merge, signals=['BHBH'], seeds=[0], precession=False)

Deterministically simulates the 3 detector network.

Parameters:

  • h1 (gwpy.timeseries.TimeSeries) - H1 strain w/out GW signals

  • l1 (gwpy.timeseries.TimeSeries) - L1 strain w/out GW signals

  • v1 (gwpy.timeseries.TimeSeries) - V1 strain w/out GW signals

  • t_merge (list) - List of CBC merger times

  • signals (list) - List of strings of CBC type, 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 - h(t) of H1 strain

  • gwpy.timeseries.TimeSeries - h(t) of L1 strain

  • gwpy.timeseries.TimeSeries - h(t) V1 strain