FEATURE: Implement new waveforms interface
Currently, bilby generates waveform polarizations via SimInspiralFD
. The new waveforms interface (report) adds a new way to handle waveform generation.
The basic principle behind the new interface is that you first define a generator for an approximant (e.g. gen = lalsim.SimInspiralChooseGenerator(approx, param_dict)
), from which you can compute the polarizations for a given dictionary of parameters (hp, hc = lalsim.SimInspiralGenerateF(T)DWaveform(param_dict, gen)
).
There is both a C-based interface and a Python-based interface. The C-based interface communicates with LALSimulation via SWIG-based wrappers, as usual. The Python-based interface makes use of the new PyGrav module. PyGrav provides the LALCompactBinaryCoalescenceGenerator
class, which can call waveforms from LALSimulation (using the same SWIG-wrapped functions). PyGrav can also support native Python waveforms which provide their own generator function. See this tutorial demonstrating the different ways of using the interface. In order to use PyGrav, your environment must have LALSuite installed from the new interface branch.
Going forward we will want bilby to be able to use this new interface. This will mainly require changes to bilby/gw/source.py
, and several tests will need to be carried out to ensure consistency between the different methods. There should also be a way to switch between the old/new ways by passing it as an option in bilby.
Note that the interface (especially the Python side) is still undergoing development, so this may affect things on the bilby end.