Skip to content

Commit

Permalink
Add alternative names for eccentric orbit params for use with pycbc i…
Browse files Browse the repository at this point in the history
…nfra
  • Loading branch information
prayush committed Jun 24, 2024
1 parent e96127a commit 05541b8
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions pycbc/waveform/waveform.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,15 +593,25 @@ 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"]),
f_lower=float(input_params["f_lower"]),
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)),
Expand Down

0 comments on commit 05541b8

Please sign in to comment.