From 236763f5c95efdc2aa56096a4a1a89d78ff63409 Mon Sep 17 00:00:00 2001 From: Bhooshan Gadre Date: Tue, 25 Jul 2023 03:12:18 -0700 Subject: [PATCH] fix f_ref for SEOBNRv5 --- pycbc/waveform/gwsignal_utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pycbc/waveform/gwsignal_utils.py b/pycbc/waveform/gwsignal_utils.py index e976cb7f676..58adcede9b1 100644 --- a/pycbc/waveform/gwsignal_utils.py +++ b/pycbc/waveform/gwsignal_utils.py @@ -20,10 +20,17 @@ 'f_final': 'f_max', } +def fix_SEOBNRv5_fref(par): + '''SEOBNRv5 expects f_ref != 0. Here we set it to f_lower if not given + ''' + if 'SEOBNRv5' in par['approximant'] and not par['f_ref']: + par['f_ref'] = par['f_lower'] + def to_gwsignal_dict(par): '''convert param dict to gws dict ''' + fix_SEOBNRv5_fref(par) # this is in-place params = {pycbc_to_gws.get(k, k): v for k, v in par.items() if (v is not None and pycbc_to_gws.get(k, k) in gws_units)}