Skip to content

Commit

Permalink
add chirp massto front line
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunHuangPhy committed Nov 18, 2024
1 parent d275e3e commit 34e32fa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions InferenceWorkflow/Likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,18 @@ def TidalLikihood_kernel(eps_total,pres_total,x,d1):
"""
kernelGW,chrip = x
MRT = []
chrip_mass = chrip.resample(1)
if d1 ==0 :
likelihood = -1e101
else:
d1 = 10**(d1)
if all(x<y for x,y in zip(eps_total[:], eps_total[1:])) and all(x<y for x, y in zip(pres_total[:], pres_total[1:])):
MRT = main.OutputMRTpoint(d1,eps_total,pres_total).T
chrip_mass = chrip.resample(1)
M1 = TOV_solver.m1_from_mc_m2(chrip_mass, MRT[1][0])
Tidal_line = main.OutputMRT('',eps_total,pres_total).T
if len(MRT[0]) == False or len(Tidal_line[0]) == False:
likelihood = -1e101
else:
chrip_mass = chrip.resample(1)
MTspline = interpolate.interp1d(Tidal_line[1]/Msun,Tidal_line[2])
point = np.array([[chrip_mass[0][0]], [MRT[1][0] / M1[0][0]],[ MTspline(M1)[0][0]], [MRT[2][0]]])
likelihood = np.log(kernelGW.evaluate(point))
Expand Down

0 comments on commit 34e32fa

Please sign in to comment.