Adding a function to LALSimInspiral.c to return whether an approximant is parameterized by the spins at f_ref or flow
Description
This merge request introduces the function XLALSimInspiralGetSpinFreqFromApproximant in LALSimInspiral.c (with associated changes in LALSimInspiral.h). This function returns whether the approximant passed to it is parameterized by its spins at f_ref (0), flow (1), is nonprecessing (2), or has more complicated behaviour (3, for the NR_hdf5
approximant). Access to this information is needed for, e.g., setting the initial frequency for spin evolution, which is the immediate use of this new function: It will be used in the script evolve_spins_and_append_samples.py in !906 (merged) to replace the current list of waveforms parameterized by the spins at flow in that script. The reviewers for that merge request (John Veitch and David Keitel) and one of the waveform chairs (Sebastian Khan) agreed that it is good to have this information in a centralized function, and John suggested basing the function off of XLALSimInspiralGetSpinSupportFromApproximant, as I have done.
I have checked that the Python version of this function returns the appropriate value for all the SEOBNRv3* waveforms (the only ones currently parameterized by the spins at flow, to my knowledge) as well as for a few other waveforms. I also checked that this function does not return any errors for all the approximants implemented in LALSimulation, using /home/nathan.johnson-mcdaniel/lalsim_spin_freq_coding/check_approx_enums_spinfreq_etc.py
on LHO.
API Changes and Justification
Backwards Compatible Changes
-
This change introduces no API changes -
This change adds new API calls
Backwards Incompatible Changes
-
This change modifies an existing API -
This change removes an existing API
Review Status
This has not yet been reviewed.