Skip to content

Commit

Permalink
Fix test sv
Browse files Browse the repository at this point in the history
  • Loading branch information
niclaurenti committed Jan 9, 2024
1 parent 3bc4fb7 commit 0f46f58
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/eko/evolution_operator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import ekore.anomalous_dimensions.unpolarized.time_like as ad_ut

from .. import basis_rotation as br
from .. import interpolation, mellin
from .. import constants, interpolation, mellin
from .. import scale_variations as sv
from ..kernels import non_singlet as ns
from ..kernels import non_singlet_qed as qed_ns
Expand Down Expand Up @@ -505,7 +505,7 @@ def quad_ker_qed(
# scale var exponentiated is directly applied on gamma
if sv_mode == sv.Modes.exponentiated:
gamma_s = sv.exponentiated.gamma_variation_qed(
gamma_s, order, nf, L, alphaem_running
gamma_s, order, nf, constants.lepton_number(mu2_to), L, alphaem_running
)
ker = qed_s.dispatcher(
order,
Expand Down Expand Up @@ -533,7 +533,7 @@ def quad_ker_qed(
# scale var exponentiated is directly applied on gamma
if sv_mode == sv.Modes.exponentiated:
gamma_v = sv.exponentiated.gamma_variation_qed(
gamma_v, order, nf, L, alphaem_running
gamma_v, order, nf, constants.lepton_number(mu2_to), L, alphaem_running
)
ker = qed_v.dispatcher(
order,
Expand All @@ -558,7 +558,7 @@ def quad_ker_qed(
# scale var exponentiated is directly applied on gamma
if sv_mode == sv.Modes.exponentiated:
gamma_ns = sv.exponentiated.gamma_variation_qed(
gamma_ns, order, nf, L, alphaem_running
gamma_ns, order, nf, constants.lepton_number(mu2_to), L, alphaem_running
)
ker = qed_ns.dispatcher(
order,
Expand Down
4 changes: 2 additions & 2 deletions src/eko/scale_variations/exponentiated.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def gamma_variation(gamma, order, nf, L):


@nb.njit(cache=True)
def gamma_variation_qed(gamma, order, nf, L, alphaem_running):
def gamma_variation_qed(gamma, order, nf, nl, L, alphaem_running):
"""Adjust the anomalous dimensions with the scale variations.
Parameters
Expand All @@ -71,6 +71,6 @@ def gamma_variation_qed(gamma, order, nf, L, alphaem_running):
gamma[1:, 0] = gamma_variation(gamma[1:, 0], order, nf, L)
if alphaem_running:
if order[1] >= 2:
beta0qed = beta.beta_qed((0, 2), nf)
beta0qed = beta.beta_qed((0, 2), nf, nl)
gamma[0, 2] += beta0qed * gamma[0, 1] * L
return gamma
8 changes: 4 additions & 4 deletions tests/eko/scale_variations/test_exponentiated.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ def test_gamma_ns_qed_fact():
[0.15, 0.0, 0.0, 0.0, 0.0],
]
).transpose()
gamma_ns_as1aem1_0 = gamma_variation_qed(gamma_ns.copy(), (1, 1), 3, 0, True)
gamma_ns_as1aem1_0 = gamma_variation_qed(gamma_ns.copy(), (1, 1), 3, 3, 0, True)
np.testing.assert_allclose(gamma_ns_as1aem1_0, gamma_ns)
gamma_ns_as1aem1_1 = gamma_variation_qed(gamma_ns.copy(), (1, 1), 3, -1, True)
gamma_ns_as1aem1_1 = gamma_variation_qed(gamma_ns.copy(), (1, 1), 3, 3, -1, True)
np.testing.assert_allclose(gamma_ns_as1aem1_1, gamma_ns)
gamma_ns_as2aem2_1 = gamma_variation_qed(gamma_ns.copy(), (2, 2), 3, -1, True)
gamma_ns_as2aem2_1 = gamma_variation_qed(gamma_ns.copy(), (2, 2), 3, 3, -1, True)
assert gamma_ns_as2aem2_1[2, 0] < gamma_ns[2, 0]
assert gamma_ns_as2aem2_1[0, 2] > gamma_ns[0, 2] # beta0qed < 0
gamma_ns_as4aem2_1 = gamma_variation_qed(gamma_ns.copy(), (4, 2), 3, -1, True)
gamma_ns_as4aem2_1 = gamma_variation_qed(gamma_ns.copy(), (4, 2), 3, 3, -1, True)
gamma_ns_N3LO_1 = gamma_variation(gamma_ns.copy()[1:, 0], (4, 0), 3, -1)
np.testing.assert_allclose(gamma_ns_as4aem2_1[1:, 0], gamma_ns_N3LO_1)

0 comments on commit 0f46f58

Please sign in to comment.