Skip to content

Commit

Permalink
Support for eccentricity and mean_per_ano parameters
Browse files Browse the repository at this point in the history
* add the new parameters
* set new parameters to zero if not specified
  • Loading branch information
AntoniRamosBuades authored and raffienficiaud committed Nov 28, 2024
1 parent df5fc04 commit 392918b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bilby/gw/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def convert_to_lal_binary_black_hole_parameters(parameters):
)
converted_parameters[f"cos_tilt_{idx}"] = 1.0

for key in ["phi_jl", "phi_12"]:
for key in ["phi_jl", "phi_12","eccentricity","mean_per_ano"]:
if key not in converted_parameters:
converted_parameters[key] = 0.0

Expand Down
14 changes: 8 additions & 6 deletions bilby/gw/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


def gwsignal_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, **kwargs):
phi_12, a_2, tilt_2, phi_jl, theta_jn, phase, eccentricity, mean_per_ano, **kwargs):
"""
A binary black hole waveform model using GWsignal
Expand Down Expand Up @@ -48,6 +48,10 @@ def gwsignal_binary_black_hole(frequency_array, mass_1, mass_2, luminosity_dista
Angle between the total binary angular momentum and the line of sight
phase: float
The phase at coalescence
eccentricity: float
Orbital eccentricity
mean_per_ano: float
Mean anomaly
kwargs: dict
Optional keyword arguments
Supported arguments:
Expand Down Expand Up @@ -83,8 +87,8 @@ def gwsignal_binary_black_hole(frequency_array, mass_1, mass_2, luminosity_dista
=====
This function is a temporary wrapper to the interface that will
likely be significantly changed or removed in a future release.
This version is only intended to be used with `SEOBNRv5HM` and `SEOBNRv5PHM` and
does not have full functionality for other waveform models.
This version is only intended to be used with ``SEOBNRv5HM``, ``SEOBNRv5EHM``
and ``SEOBNRv5PHM`` and does not have full functionality for other waveform models.
"""

from lalsimulation.gwsignal import GenerateFDWaveform
Expand All @@ -103,7 +107,7 @@ def gwsignal_binary_black_hole(frequency_array, mass_1, mass_2, luminosity_dista
waveform_kwargs.update(kwargs)

waveform_approximant = waveform_kwargs['waveform_approximant']
if waveform_approximant not in ["SEOBNRv5HM", "SEOBNRv5PHM"]:
if waveform_approximant not in ["SEOBNRv5HM", "SEOBNRv5EHM", "SEOBNRv5PHM"]:
if waveform_approximant == "IMRPhenomXPHM":
logger.warning("The new waveform interface is unreviewed for this model" +
"and it is only intended for testing.")
Expand Down Expand Up @@ -141,9 +145,7 @@ def gwsignal_binary_black_hole(frequency_array, mass_1, mass_2, luminosity_dista
phi_12=phi_12, a_1=a_1, a_2=a_2, mass_1=mass_1 * utils.solar_mass, mass_2=mass_2 * utils.solar_mass,
reference_frequency=reference_frequency, phase=phase)

eccentricity = 0.0
longitude_ascending_nodes = 0.0
mean_per_ano = 0.0

# Check if conditioning is needed
condition = 0
Expand Down

0 comments on commit 392918b

Please sign in to comment.