pygwb.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.
Examples
To illustrate how to create a simulator
object, we start by
importing the relevant packages:
>>> import numpy as np
>>> from pygwb.simulator import Simulator
>>> import bilby.gw.detector as bilbydet
For concreteness, we will simulate a signal for the LIGO Hanford-Livingston baseline. We create the two detectors as follows:
>>> H1 = bilbydet.get_empty_interferometer('H1')
>>> L1 = bilbydet.get_empty_interferometer('L1')
As an example, we consider a flat signal PSD:
>>> freqs = np.linspace(0, 1000, 10000)
>>> signal = gwpy.frequencyseries.FrequencySeries(1e-42*np.ones(10000), frequencies=freqs)
The simulator object is then created as follows:
>>> simulator_object = Simulator(interferometers = [H1,L1], N_segments = 1, duration = 64,
sampling_frequency = 1024, intensity_GW = signal)
The actual data is then simulated by calling the generate_data
method:
>>> data = simulator_object.generate_data()
For more information, we refer the reader to the simulator
tutorials.
Classes
|