Skip to content

Commit

Permalink
Update BBHX_Phenom.py
Browse files Browse the repository at this point in the history
  • Loading branch information
WuShichao authored Aug 23, 2024
1 parent 0b4d0f7 commit 3f5f6b2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions BBHX_Phenom.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def _bbhx_fd(
If true, the BBHx waveform generator is cached based on the computed
``mf_min``. Must be ``False`` if ``mf_min`` is specfied.
enable_flower_warn: bool
If False, it will turn off the warnning from `f_lower` calculation.
If False, it will turn off the warning from `f_lower` calculation.
Returns
-------
Expand Down Expand Up @@ -243,9 +243,8 @@ def _bbhx_fd(
t0=0
)
else:
err_msg = f"Don't recognise reference frame {ref_frame}. "
err_msg = f"Known frames are 'LISA' and 'SSB'."
ValueError(err_msg, RuntimeWarning)
err_msg = f"Don't recognise reference frame {ref_frame}. Known frames are 'LISA' and 'SSB'."
raise ValueError(err_msg)

# We follow the convention used in LAL and set the frequency based on the
# highest m mode. This means that lower m modes will start at later times.
Expand Down Expand Up @@ -283,8 +282,8 @@ def _bbhx_fd(
f_lower=interp_f_lower,
)
f_min_tobs = tf_track(t_obs_start) # in Hz
if np.abs(f_min - f_min_tobs) / f_min > 1e-2 and enable_flower_warn:
err_msg = f"Input 'f_lower' is significantly deviated from the value calculated from 't_obs_start'."
if enable_flower_warn and f_min < f_min_tobs:
err_msg = f"Input 'f_lower' is lower than the value calculated from 't_obs_start'."
warn(err_msg, RuntimeWarning)

# We want to cache the waveform generator, but as it takes a mass dependent
Expand Down Expand Up @@ -408,4 +407,4 @@ def _bbhx_fd(
if str(tdi) not in ['1.5', '2.0']:
raise ValueError("The TDI version only supports '1.5' and '2.0' for now.")

return output
return output

0 comments on commit 3f5f6b2

Please sign in to comment.