Skip to content

Commit

Permalink
fix LO singlet test
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomomagni committed Feb 13, 2024
1 parent 5725ce0 commit 7815a09
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/eko/scale_variations/test_expanded.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from eko.kernels import non_singlet, singlet
from eko.quantities.heavy_quarks import QuarkMassScheme
from eko.scale_variations import Modes, expanded, exponentiated
from ekore.anomalous_dimensions import exp_matrix_2D
from ekore.anomalous_dimensions.unpolarized.space_like import gamma_ns, gamma_singlet


Expand Down Expand Up @@ -136,11 +137,12 @@ def compute_a_s(q2, nf, order):
def scheme_diff(g, L, order, is_singlet):
""":math:`ker_A / ker_B` for truncated expansion."""

idx = np.eye(2) if is_singlet else 1
if order == (1, 0):
a0 = compute_a_s(q02, nf, order)
b0 = beta_qcd_as2(nf)
diff = (idx + b0 * L * a0) ** (g[0] / b0)
diff = (1.0 + b0 * L * a0) ** (g[0] / b0)
if is_singlet:
diff = exp_matrix_2D(np.log(1.0 + b0 * L * a0) * g[0] / b0)[0]
# TODO: add higher order expressions
return diff

Expand Down Expand Up @@ -215,8 +217,7 @@ def scheme_diff(g, L, order, is_singlet):

s_diff = scheme_diff(gs, L, order, True)
np.testing.assert_allclose(
np.diag(ker_a / ker_b),
np.diag(s_diff),
ker_a @ np.linalg.inv(ker_b),
s_diff,
err_msg=f"L={L},order={order},singlet",
rtol=4e-3,
)

0 comments on commit 7815a09

Please sign in to comment.