From f0a727dd55c645cfad176ab5f63c0f92414e32b8 Mon Sep 17 00:00:00 2001 From: tgiani Date: Mon, 9 Dec 2024 13:52:07 +0100 Subject: [PATCH] fix modes for singlet QED and use == in if statements --- crates/eko/src/lib.rs | 2 +- src/eko/kernels/non_singlet.py | 2 +- src/eko/kernels/singlet.py | 8 ++++---- src/eko/kernels/singlet_qed.py | 2 +- src/eko/kernels/valence_qed.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/eko/src/lib.rs b/crates/eko/src/lib.rs index b25520fba..f8aac3047 100644 --- a/crates/eko/src/lib.rs +++ b/crates/eko/src/lib.rs @@ -78,7 +78,7 @@ fn unravel_qed_ns(res: Vec>>, order_qcd: usize, order_qed: usiz #[no_mangle] pub unsafe extern "C" fn rust_quad_ker_qcd(u: f64, rargs: *mut c_void) -> f64 { let args = *(rargs as *mut QuadQCDargs); - let is_singlet = (100 == args.mode0) || (21 == args.mode0) || (90 == args.mode0); + let is_singlet = (100 == args.mode0) || (21 == args.mode0) || (90 == args.mode0)|| (22 == args.mode0) || (101 == args.mode0); let is_qed_valence = (10200 == args.mode0) || (10204 == args.mode0); // prepare Mellin stuff let path = mellin::TalbotPath::new(u, args.logx, is_singlet); diff --git a/src/eko/kernels/non_singlet.py b/src/eko/kernels/non_singlet.py index 1d25d5845..0e8352dda 100644 --- a/src/eko/kernels/non_singlet.py +++ b/src/eko/kernels/non_singlet.py @@ -375,7 +375,7 @@ def dispatcher(order, method, gamma_ns, a1, a0, nf, ev_op_iterations): # pylint return eko_ordered_truncated( gamma_ns, a1, a0, betalist, order, ev_op_iterations ) - if method is EvoMethods.TRUNCATED: + if method == EvoMethods.TRUNCATED: return eko_truncated(gamma_ns, a1, a0, betalist, order, ev_op_iterations) # NLO diff --git a/src/eko/kernels/singlet.py b/src/eko/kernels/singlet.py index 96f02a972..2ce7bce21 100644 --- a/src/eko/kernels/singlet.py +++ b/src/eko/kernels/singlet.py @@ -613,7 +613,7 @@ def dispatcher( # pylint: disable=too-many-return-statements # Common method for NLO and NNLO if method in [EvoMethods.ITERATE_EXACT, EvoMethods.ITERATE_EXPANDED]: return eko_iterate(gamma_singlet, a1, a0, betalist, order, ev_op_iterations) - if method is EvoMethods.PERTURBATIVE_EXACT: + if method == EvoMethods.PERTURBATIVE_EXACT: return eko_perturbative( gamma_singlet, a1, @@ -624,7 +624,7 @@ def dispatcher( # pylint: disable=too-many-return-statements ev_op_max_order, True, ) - if method is EvoMethods.PERTURBATIVE_EXPANDED: + if method == EvoMethods.PERTURBATIVE_EXPANDED: return eko_perturbative( gamma_singlet, a1, @@ -638,13 +638,13 @@ def dispatcher( # pylint: disable=too-many-return-statements if method in [EvoMethods.TRUNCATED, EvoMethods.ORDERED_TRUNCATED]: return eko_truncated(gamma_singlet, a1, a0, betalist, order, ev_op_iterations) # These methods are scattered for nlo and nnlo - if method is EvoMethods.DECOMPOSE_EXACT: + if method == EvoMethods.DECOMPOSE_EXACT: if order[0] == 2: return nlo_decompose_exact(gamma_singlet, a1, a0, betalist) if order[0] == 3: return nnlo_decompose_exact(gamma_singlet, a1, a0, betalist) return n3lo_decompose_exact(gamma_singlet, a1, a0, nf) - if method is EvoMethods.DECOMPOSE_EXPANDED: + if method == EvoMethods.DECOMPOSE_EXPANDED: if order[0] == 2: return nlo_decompose_expanded(gamma_singlet, a1, a0, betalist) if order[0] == 3: diff --git a/src/eko/kernels/singlet_qed.py b/src/eko/kernels/singlet_qed.py index d63a2f1ac..0a5716df8 100644 --- a/src/eko/kernels/singlet_qed.py +++ b/src/eko/kernels/singlet_qed.py @@ -97,7 +97,7 @@ def dispatcher( e_s : numpy.ndarray singlet EKO """ - if method is EvoMethods.ITERATE_EXACT: + if method == EvoMethods.ITERATE_EXACT: return eko_iterate( gamma_singlet, as_list, a_half, nf, order, ev_op_iterations, 4 ) diff --git a/src/eko/kernels/valence_qed.py b/src/eko/kernels/valence_qed.py index 8b83e1917..b5da158b4 100644 --- a/src/eko/kernels/valence_qed.py +++ b/src/eko/kernels/valence_qed.py @@ -45,7 +45,7 @@ def dispatcher( e_v : numpy.ndarray singlet EKO """ - if method is EvoMethods.ITERATE_EXACT: + if method == EvoMethods.ITERATE_EXACT: return eko_iterate( gamma_valence, as_list, a_half, nf, order, ev_op_iterations, 2 )