Allow lal dictionary to be passed through to `_base_lal_cbc_fd_waveform`
If we allow _base_lal_cbc_fd_waveform
to be passed a lal.dict
rather than creating it itself, it will probably make it easier to include deviation parameters for tests of GR, e.g, #432 (closed).
I think the only change within bilby
would be at https://git.ligo.org/lscsoft/bilby/blob/master/bilby/gw/source.py#L324 do
waveform_dictionary = waveform_kwargs.get("lal_dictionary", lal.CreateDict())
The new syntax would be something like
def non_gr_binary_black_hole(
frequency_array, mass_1, mass_2, luminosity_distance, a_1, tilt_1,
phi_12, a_2, tilt_2, phi_jl, theta_jn, phase, non_gr_parameter_1,
non_gr_parameter_2, **kwargs):
waveform_kwargs = dict(
waveform_approximant='IMRPhenomPv2', reference_frequency=50.0,
minimum_frequency=20.0, maximum_frequency=frequency_array[-1],
pn_spin_order=-1, pn_tidal_order=-1, pn_phase_order=-1, pn_amplitude_order=0)
waveform_kwargs.update(kwargs)
lal_dictionary = lal.CreateDict()
# insert non-GR parameters
waveform_kwargs["lal_dictionary"] = lal_dictionary
return _base_lal_cbc_fd_waveform(
frequency_array=frequency_array, mass_1=mass_1, mass_2=mass_2,
luminosity_distance=luminosity_distance, theta_jn=theta_jn, phase=phase,
a_1=a_1, a_2=a_2, tilt_1=tilt_1, tilt_2=tilt_2, phi_12=phi_12,
phi_jl=phi_jl, **waveform_kwargs)
Edited by Colm Talbot