Skip to content

Commit

Permalink
handle corner case of eta=0.25 giving nan in phenom_d
Browse files Browse the repository at this point in the history
  • Loading branch information
deepchatterjeeligo committed Jan 30, 2024
1 parent 5eb5bd9 commit bb07b7d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ml4gw/waveforms/phenom_d.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ def rho3_fun(eta, eta2, xi):

def FinalSpin0815(eta, eta2, chi1, chi2):
Seta = torch.sqrt(1.0 - 4.0 * eta)
Seta = torch.nan_to_num(Seta) # avoid nan around eta = 0.25
m1 = 0.5 * (1.0 + Seta)
m2 = 0.5 * (1.0 - Seta)
m1s = m1 * m1
Expand Down

0 comments on commit bb07b7d

Please sign in to comment.