From 05541b8526a4a7d4de49a4aa2ca05f54ec3d8ec1 Mon Sep 17 00:00:00 2001 From: Prayush Kumar Date: Tue, 25 Jun 2024 00:22:15 +0530 Subject: [PATCH] Add alternative names for eccentric orbit params for use with pycbc infra --- pycbc/waveform/waveform.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pycbc/waveform/waveform.py b/pycbc/waveform/waveform.py index 5c313885192..d41d9aa07d5 100644 --- a/pycbc/waveform/waveform.py +++ b/pycbc/waveform/waveform.py @@ -593,6 +593,16 @@ def get_td_waveform(template=None, **kwargs): os.environ["ModePNOrder"] = "8" os.environ["InspiralEndRadius"] = "4.0" + if "eccentricity" in input_params: + eccentricity = float(input_params.get("eccentricity", 0)) + else: + eccentricity = float(input_params.get("alpha", 0)) + if "mean_anomaly" in input_params: + mean_anomaly = float(input_params.get("mean_anomaly", 0)) + elif "mean_per_ano" in input_params: + mean_anomaly = float(input_params.get("mean_per_ano", 0)) + else: + mean_anomaly = float(input_params.get("alpha1", 0)) esigma_params = dict( mass1=float(input_params["mass1"]), mass2=float(input_params["mass2"]), @@ -600,8 +610,8 @@ def get_td_waveform(template=None, **kwargs): delta_t=float(input_params["delta_t"]), spin1z=float(input_params.get("spin1z", 0)), spin2z=float(input_params.get("spin2z", 0)), - eccentricity=float(input_params.get("eccentricity", 0)), - mean_anomaly=float(input_params.get("mean_per_ano", 0)), + eccentricity=eccentricity, + mean_anomaly=mean_anomaly, coa_phase=float(input_params.get("coa_phase", 0)), distance=float(input_params.get("distance", 1.0)), inclination=float(input_params.get("inclination", 0)),