From ac1e1fb4e8659c78fa234dc9ce7dd31b0debd513 Mon Sep 17 00:00:00 2001 From: Felix Hekhorn Date: Tue, 31 May 2022 12:50:10 +0200 Subject: [PATCH 1/4] Comment as3 fncs --- .../matching_conditions/operator_matrix_element.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/eko/matching_conditions/operator_matrix_element.py b/src/eko/matching_conditions/operator_matrix_element.py index 8b6df8784..eec3fd3f8 100644 --- a/src/eko/matching_conditions/operator_matrix_element.py +++ b/src/eko/matching_conditions/operator_matrix_element.py @@ -13,7 +13,9 @@ from .. import basis_rotation as br from .. import harmonics from ..evolution_operator import Operator, QuadKerBase -from . import as1, as2, as3 +from . import as1, as2 + +# from . import as1, as2, as3 logger = logging.getLogger(__name__) @@ -102,8 +104,8 @@ def A_singlet(order, n, sx, nf, L, is_msbar, sx_ns=None): A_s[0] = as1.A_singlet(n, sx, L) if order >= 2: A_s[1] = as2.A_singlet(n, sx, L, is_msbar) - if order >= 3: - A_s[2] = as3.A_singlet(n, sx, sx_ns, nf, L) + # if order >= 3: + # A_s[2] = as3.A_singlet(n, sx, sx_ns, nf, L) return A_s @@ -140,8 +142,8 @@ def A_non_singlet(order, n, sx, nf, L): A_ns[0] = as1.A_ns(n, sx, L) if order >= 2: A_ns[1] = as2.A_ns(n, sx, L) - if order >= 3: - A_ns[2] = as3.A_ns(n, sx, nf, L) + # if order >= 3: + # A_ns[2] = as3.A_ns(n, sx, nf, L) return A_ns From 1eab251ba3c30bf4aa0792824524138daf70219a Mon Sep 17 00:00:00 2001 From: Felix Hekhorn Date: Tue, 31 May 2022 12:51:52 +0200 Subject: [PATCH 2/4] Remove some harmonics from cache --- src/eko/matching_conditions/operator_matrix_element.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/eko/matching_conditions/operator_matrix_element.py b/src/eko/matching_conditions/operator_matrix_element.py index eec3fd3f8..6a46650ab 100644 --- a/src/eko/matching_conditions/operator_matrix_element.py +++ b/src/eko/matching_conditions/operator_matrix_element.py @@ -57,10 +57,10 @@ def compute_harmonics_cache(n, order, is_singlet): if order == 2: # Add Sm21 to cache sx[2, 1] = harmonics.Sm21(n, sx[0, 0], sx[0, -1], is_singlet) - if order == 3: - # Add weight 3 and 4 to cache - sx[2, 1:-2] = harmonics.s3x(n, sx[:, 0], sx[:, -1], is_singlet) - sx[3, 1:-1] = harmonics.s4x(n, sx[:, 0], sx[:, -1], is_singlet) + # if order == 3: + # # Add weight 3 and 4 to cache + # sx[2, 1:-2] = harmonics.s3x(n, sx[:, 0], sx[:, -1], is_singlet) + # sx[3, 1:-1] = harmonics.s4x(n, sx[:, 0], sx[:, -1], is_singlet) # return list of list keeping the non zero values return [[el for el in sx_list if el != 0] for sx_list in sx] From d5b755554a114d8206bd4a0fb0bc0a6da9839fba Mon Sep 17 00:00:00 2001 From: Felix Hekhorn Date: Tue, 31 May 2022 14:16:37 +0200 Subject: [PATCH 3/4] Fix tests --- .../operator_matrix_element.py | 49 ++++++++++--------- ...ing_n3lo.py => skip_test_matching_n3lo.py} | 2 +- 2 files changed, 27 insertions(+), 24 deletions(-) rename tests/eko/{test_matching_n3lo.py => skip_test_matching_n3lo.py} (99%) diff --git a/src/eko/matching_conditions/operator_matrix_element.py b/src/eko/matching_conditions/operator_matrix_element.py index 6a46650ab..c0eaa8621 100644 --- a/src/eko/matching_conditions/operator_matrix_element.py +++ b/src/eko/matching_conditions/operator_matrix_element.py @@ -48,13 +48,16 @@ def compute_harmonics_cache(n, order, is_singlet): """ # max harmonics sum weight for each qcd order - max_weight = {1: 2, 2: 3, 3: 5} + max_weight = {1: 2, 2: 3, 3: 3} + # _N3LO_ max_weight = {1: 2, 2: 3, 3: 5} # max number of harmonics sum of a given weight for each qcd order - n_max_sums_weight = {1: 1, 2: 3, 3: 7} + n_max_sums_weight = {1: 1, 2: 3, 3: 3} + # _N3LO_ n_max_sums_weight = {1: 1, 2: 3, 3: 7} sx = harmonics.base_harmonics_cache( n, is_singlet, max_weight[order], n_max_sums_weight[order] ) - if order == 2: + # _N3LO_ if order == 2: + if order >= 2: # Add Sm21 to cache sx[2, 1] = harmonics.Sm21(n, sx[0, 0], sx[0, -1], is_singlet) # if order == 3: @@ -104,7 +107,7 @@ def A_singlet(order, n, sx, nf, L, is_msbar, sx_ns=None): A_s[0] = as1.A_singlet(n, sx, L) if order >= 2: A_s[1] = as2.A_singlet(n, sx, L, is_msbar) - # if order >= 3: + # _N3LO_ if order >= 3: # A_s[2] = as3.A_singlet(n, sx, sx_ns, nf, L) return A_s @@ -142,7 +145,7 @@ def A_non_singlet(order, n, sx, nf, L): A_ns[0] = as1.A_ns(n, sx, L) if order >= 2: A_ns[1] = as2.A_ns(n, sx, L) - # if order >= 3: + # _N3LO_ if order >= 3: # A_ns[2] = as3.A_ns(n, sx, nf, L) return A_ns @@ -244,24 +247,24 @@ def quad_ker( sx = compute_harmonics_cache(ker_base.n, order, ker_base.is_singlet) sx_ns = None - if order == 3 and ( - (backward_method != "" and ker_base.is_singlet) - or (mode0 == 100 and mode0 == 100) - ): - # At N3LO for A_qq singlet or backward you need to compute - # both the singlet and non-singlet like harmonics - # avoiding recomputing all of them ... - sx_ns = sx.copy() - smx_ns = harmonics.smx(ker_base.n, np.array([s[0] for s in sx]), False) - for w, sm in enumerate(smx_ns): - sx_ns[w][-1] = sm - sx_ns[2][2] = harmonics.S2m1(ker_base.n, sx[0][1], smx_ns[0], smx_ns[1], False) - sx_ns[2][3] = harmonics.Sm21(ker_base.n, sx[0][0], smx_ns[0], False) - sx_ns[3][5] = harmonics.Sm31(ker_base.n, sx[0][0], smx_ns[0], smx_ns[1], False) - sx_ns[3][4] = harmonics.Sm211(ker_base.n, sx[0][0], sx[0][1], smx_ns[0], False) - sx_ns[3][3] = harmonics.Sm22( - ker_base.n, sx[0][0], sx[0][1], smx_ns[1], sx_ns[3][5], False - ) + # _N3LO_ if order == 3 and ( + # (backward_method != "" and ker_base.is_singlet) + # or (mode0 == 100 and mode0 == 100) + # ): + # # At N3LO for A_qq singlet or backward you need to compute + # # both the singlet and non-singlet like harmonics + # # avoiding recomputing all of them ... + # sx_ns = sx.copy() + # smx_ns = harmonics.smx(ker_base.n, np.array([s[0] for s in sx]), False) + # for w, sm in enumerate(smx_ns): + # sx_ns[w][-1] = sm + # sx_ns[2][2] = harmonics.S2m1(ker_base.n, sx[0][1], smx_ns[0], smx_ns[1], False) + # sx_ns[2][3] = harmonics.Sm21(ker_base.n, sx[0][0], smx_ns[0], False) + # sx_ns[3][5] = harmonics.Sm31(ker_base.n, sx[0][0], smx_ns[0], smx_ns[1], False) + # sx_ns[3][4] = harmonics.Sm211(ker_base.n, sx[0][0], sx[0][1], smx_ns[0], False) + # sx_ns[3][3] = harmonics.Sm22( + # ker_base.n, sx[0][0], sx[0][1], smx_ns[1], sx_ns[3][5], False + # ) # compute the ome if ker_base.is_singlet: diff --git a/tests/eko/test_matching_n3lo.py b/tests/eko/skip_test_matching_n3lo.py similarity index 99% rename from tests/eko/test_matching_n3lo.py rename to tests/eko/skip_test_matching_n3lo.py index 753d52ebc..1205dd46a 100644 --- a/tests/eko/test_matching_n3lo.py +++ b/tests/eko/skip_test_matching_n3lo.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Test N3LO OME +# _N3LO_ Test N3LO OME import numpy as np from eko.matching_conditions import as3 From d1406bae3fbcf69c51efcd7ce9da238597f6a7b6 Mon Sep 17 00:00:00 2001 From: Felix Hekhorn Date: Tue, 31 May 2022 14:18:20 +0200 Subject: [PATCH 4/4] Add more recover marker --- src/eko/matching_conditions/operator_matrix_element.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/eko/matching_conditions/operator_matrix_element.py b/src/eko/matching_conditions/operator_matrix_element.py index c0eaa8621..bbf62c15c 100644 --- a/src/eko/matching_conditions/operator_matrix_element.py +++ b/src/eko/matching_conditions/operator_matrix_element.py @@ -15,7 +15,7 @@ from ..evolution_operator import Operator, QuadKerBase from . import as1, as2 -# from . import as1, as2, as3 +# _N3LO_ from . import as1, as2, as3 logger = logging.getLogger(__name__) @@ -60,7 +60,7 @@ def compute_harmonics_cache(n, order, is_singlet): if order >= 2: # Add Sm21 to cache sx[2, 1] = harmonics.Sm21(n, sx[0, 0], sx[0, -1], is_singlet) - # if order == 3: + # _N3LO_ if order == 3: # # Add weight 3 and 4 to cache # sx[2, 1:-2] = harmonics.s3x(n, sx[:, 0], sx[:, -1], is_singlet) # sx[3, 1:-1] = harmonics.s4x(n, sx[:, 0], sx[:, -1], is_singlet)