Skip to content

Commit

Permalink
Only calculate uncertainty if converged
Browse files Browse the repository at this point in the history
  • Loading branch information
theHenks committed Sep 5, 2024
1 parent da66094 commit 91bb58d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aoefit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ function fit_single_aoe_compton(h::Histogram, ps::NamedTuple; uncertainty::Bool=
v -> - hist_loglike(x -> f_fit(x, NamedTuple{v_keys}(v)), h)
end

if uncertainty
if uncertainty && converged
# Calculate the Hessian matrix using ForwardDiff
H = ForwardDiff.hessian(f_loglike_array, tuple_to_array(v_ml))

Expand Down

0 comments on commit 91bb58d

Please sign in to comment.