bilby.gw.waveform_generator.GWSignalWaveformGenerator
- class bilby.gw.waveform_generator.GWSignalWaveformGenerator(spinning=True, eccentric=False, tidal=False, **kwargs)[source]
Bases:
WaveformGenerator
A wrapper to the `gwsignal waveform generator`_ that allows for use of arbitrary waveforms implemented as gwsignal generators and caches the generator between calls.
This wrapper allows sets of parameters to be enabled/disabled. When, e.g.,
spinning=False
all spin parameters will be fixed to zero.- Parameters:
- spinning: bool
Whether to model spins of the individual objects (default=True)
- eccentric: bool
Whether to model orbital eccentricity (default=False)
- tidal: bool
Whether to model tidal deformability of the individual objects (default=False)
- sampling_frequency: float, optional
The sampling frequency
- duration: float, optional
Time duration of data
- start_time: float, optional
Starting time of the time array
- parameters: dict, optional
Initial values for the parameters
- parameter_conversion: func, optional
Function to convert from sampled parameters to parameters of the waveform generator. The default value is the identity, i.e., it leaves the parameters unaffected.
- waveform_arguments: dict, optional
A dictionary of fixed keyword arguments to pass to the waveform generator. There is one required waveform argument
waveform_approximant
.- .. gwsignal waveform generator: https://docs.ligo.org/lscsoft/lalsuite/lalsimulation/classlalsimulation_1_1gwsignal_1_1core_1_1waveform_1_1_gravitational_wave_generator.html # noqa
- __init__(spinning=True, eccentric=False, tidal=False, **kwargs)[source]
The base waveform generator class.
- Parameters:
- sampling_frequency: float, optional
The sampling frequency
- duration: float, optional
Time duration of data
- start_time: float, optional
Starting time of the time array
- frequency_domain_source_model: func, optional
A python function taking some arguments and returning the frequency domain strain. Note the first argument must be the frequencies at which to compute the strain
- time_domain_source_model: func, optional
A python function taking some arguments and returning the time domain strain. Note the first argument must be the times at which to compute the strain
- parameters: dict, optional
Initial values for the parameters
- parameter_conversion: func, optional
Function to convert from sampled parameters to parameters of the waveform generator. Default value is the identity, i.e. it leaves the parameters unaffected.
- waveform_arguments: dict, optional
A dictionary of fixed keyword arguments to pass to either frequency_domain_source_model or time_domain_source_model.
Note: the arguments of frequency_domain_source_model (except the first, which is the frequencies at which to compute the strain) will be added to the WaveformGenerator object and initialised to None.
- __call__(*args, **kwargs)
Call self as a function.
Methods
__init__
([spinning, eccentric, tidal])The base waveform generator class.
frequency_domain_strain
(parameters)Wrapper to source_model.
time_domain_strain
(parameters)Wrapper to source_model.
Attributes
defaults
generator_pickles
The dictionary of parameters for source model.
- frequency_domain_strain(parameters)[source]
Wrapper to source_model.
Converts self.parameters with self.parameter_conversion before handing it off to the source model. Automatically refers to the time_domain_source model via NFFT if no frequency_domain_source_model is given.
- Parameters:
- parameters: dict, optional
Parameters to evaluate the waveform for, this overwrites self.parameters. If not provided will fall back to self.parameters.
- Returns:
- array_like: The frequency domain strain for the given set of parameters
- Raises:
- RuntimeError: If no source model is given
- property parameters
The dictionary of parameters for source model.
- Returns:
- dict: The dictionary of parameter key-value pairs
- time_domain_strain(parameters)[source]
Wrapper to source_model.
Converts self.parameters with self.parameter_conversion before handing it off to the source model. Automatically refers to the frequency_domain_source model via INFFT if no frequency_domain_source_model is given.
- Parameters:
- parameters: dict, optional
Parameters to evaluate the waveform for, this overwrites self.parameters. If not provided will fall back to self.parameters.
- Returns:
- array_like: The time domain strain for the given set of parameters
- Raises:
- RuntimeError: If no source model is given