Commit c2078762 authored by Marc Arene's avatar Marc Arene
Browse files

moving logL computation for --plot_traj where it should be

parent 4982193a
......@@ -191,7 +191,6 @@ def NumericalGradientLeapfrog_ThreeDetectors_Trajectory(q_pos_0, p_mom_0, dlogL_
dlogL_pos = sampler.likelihood_gradient.calculate_dlogL_np()
q_pos_dict = sampler.likelihood.parameters
dlogTrajPi = sampler.traj_prior_gradients.calculate_dlogPi_np(q_pos_dict)
logL = sampler.likelihood_gradient.log_likelihood_at_point
p_mom += 0.5 * epsilon * (dlogL_pos + dlogTrajPi) * sampler.scales
......@@ -199,6 +198,7 @@ def NumericalGradientLeapfrog_ThreeDetectors_Trajectory(q_pos_0, p_mom_0, dlogL_
dlogL_fit_traj.append(dlogL_pos.tolist())
if RUN_CONST.plot_traj:
logL = sampler.likelihood_gradient.log_likelihood_at_point
logTrajPi = sampler.traj_priors.ln_prob(q_pos_dict)
H = computeHamiltonian(p_mom, logL, logTrajPi)
H_p_logL_logP_traj.append([H, 0.5 * (p_mom**2).sum(), logL, logTrajPi])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment