Skip to content

Commit

Permalink
Merge branch 'release/0.9.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhekhorn committed Jun 1, 2022
2 parents 708ccd3 + 625318b commit 16b4606
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 45 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ name: tests
on: push

jobs:
py37:
uses: N3PDF/workflows/.github/workflows/python-poetry-tests.yml@main
with:
python-version: "3.7"
poetry-extras: "-E mark"

py38:
uses: N3PDF/workflows/.github/workflows/python-poetry-tests.yml@main
with:
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
# Thanks https://github.com/bskinn/sphobjinv
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
"scipy": ("https://docs.scipy.org/doc/scipy", None),
"numpy": ("https://numpy.org/doc/stable", None),
}

Expand Down
2 changes: 1 addition & 1 deletion doc/source/theory/pQCD.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ evolution, always evaluating the strong coupling at :math:`\mu_R^2`.


* In ``ModSV='expanded'`` the |EKO| is multiplied by an additional kernel, such that
the scale variation is applied to the whole |PDF| set:
the scale variation is applied to the whole evolution operator:

.. math ::
\tilde{\mathbf{E}}(a_s \leftarrow a_s^0) & = \tilde{\mathbf{K}}(a_s) \tilde{\mathbf{E}}(a_s \leftarrow a_s^0) \\
Expand Down
14 changes: 8 additions & 6 deletions src/eko/interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,21 +562,23 @@ def __getitem__(self, item):
return self.basis[item]

def get_interpolation(self, targetgrid):
"""
Computes interpolation matrix between `targetgrid` and `xgrid`.
"""Computes interpolation matrix between `targetgrid` and `xgrid`.
.. math::
f(targetgrid) = R \\cdot f(xgrid)
Parameters
----------
targetgrid : array
grid to interpolate to
targetgrid : array
grid to interpolate to
Returns
-------
R : array
interpolation matrix, do be multiplied from the left(!)
R : array
interpolation matrix $R_{ij}$, where $i$ is the index over
`targetgrid`, and $j$ is the index on the internal basis (the
one stored in the :class:`InterpolatorDispatcher` instance)
"""
# trivial?
if len(targetgrid) == len(self.xgrid_raw) and np.allclose(
Expand Down
65 changes: 35 additions & 30 deletions src/eko/matching_conditions/operator_matrix_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

# _N3LO_ from . import as1, as2, as3

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -46,19 +48,22 @@ 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:
# 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)
# _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)
# return list of list keeping the non zero values
return [[el for el in sx_list if el != 0] for sx_list in sx]

Expand Down Expand Up @@ -102,8 +107,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)
# _N3LO_ if order >= 3:
# A_s[2] = as3.A_singlet(n, sx, sx_ns, nf, L)
return A_s


Expand Down Expand Up @@ -140,8 +145,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)
# _N3LO_ if order >= 3:
# A_ns[2] = as3.A_ns(n, sx, nf, L)
return A_ns


Expand Down Expand Up @@ -242,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:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Test N3LO OME
# _N3LO_ Test N3LO OME
import numpy as np

from eko.matching_conditions import as3
Expand Down

0 comments on commit 16b4606

Please sign in to comment.