Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
PORTER Edward
GWHMC
Commits
c2078762
Commit
c2078762
authored
Apr 08, 2021
by
Marc Arene
Browse files
moving logL computation for --plot_traj where it should be
parent
4982193a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
Library/BNS_HMC_Tools.py
Library/BNS_HMC_Tools.py
+1
-1
No files found.
Library/BNS_HMC_Tools.py
View file @
c2078762
...
...
@@ -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
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment