Skip to content

Commit

Permalink
Merge branch 'master' into read-legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhekhorn committed Jan 13, 2025
2 parents d2b5bdb + c161129 commit 82192b6
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 19 deletions.
3 changes: 2 additions & 1 deletion doc/source/overview/tutorials/alpha_s.ipynb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions doc/source/overview/tutorials/dglap.ipynb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions doc/source/overview/tutorials/pdf.ipynb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/ekobox/evol_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def evolve_pdfs(
# equal points are allowed by LHAPDF
if q2block_per_nf[nfs[j]][-1] > q2block_per_nf[nfs[j + 1]][0]:
raise ValueError(
f"Last scale point for nf={nfs[j]} is bigger than first in nf={nfs[j+1]}"
f"Last scale point for nf={nfs[j]} is bigger than first in nf={nfs[j + 1]}"
)

# update op and th cards
Expand Down
2 changes: 1 addition & 1 deletion src/ekomark/benchmark/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def run_me(self, theory, ocard, _pdf):
print(f"Operator written to {path}")
else:
# load
print(f"Using cached eko data: {os.path.relpath(path,os.getcwd())}")
print(f"Using cached eko data: {os.path.relpath(path, os.getcwd())}")

if self.plot_operator:
from ekomark.plots import ( # pylint:disable=import-error,import-outside-toplevel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ def gamma_gg(n, nf, cache, variation):
- 705978.0 * (-(1 / (-1 + n) ** 2) + 1 / n**2)
- 2192234.0 * 1 / ((-1 + n) * n)
+ 1730508.0 * (1 / (2 + 3 * n + n**2))
+ 353143.0
* ((12 + 9 * n + n**2) / (6 * n + 11 * n**2 + 6 * n**3 + n**4))
+ 353143.0 * ((12 + 9 * n + n**2) / (6 * n + 11 * n**2 + 6 * n**3 + n**4))
- 2602682.0 * (-(1 / n**2) + 1 / (1 + n) ** 2)
+ 178960.0 * 2 / n**3
- 218133.0 * (-(6 / n**4))
Expand Down
4 changes: 2 additions & 2 deletions tests/eko/evolution_operator/test_flavors.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ def test_rotate_matching_qed():
def test_rotate_matching_is_inv():
def replace_names(k):
for q in range(4, 6 + 1):
k = k.replace(br.quark_names[q - 1] + "+", f"T{q**2-1}").replace(
br.quark_names[q - 1] + "-", f"V{q**2-1}"
k = k.replace(br.quark_names[q - 1] + "+", f"T{q**2 - 1}").replace(
br.quark_names[q - 1] + "-", f"V{q**2 - 1}"
)
return k

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ def test_qg_momentum():
cache = harmonics.cache.reset()
np.testing.assert_allclose(
-as2.gamma_qg(N, nf, cache),
4
* nf
* (0.574074 * CF - 2 * CA * (-7 / 18 + 1 / 6 * (5 - np.pi**2 / 3)))
* TR,
4 * nf * (0.574074 * CF - 2 * CA * (-7 / 18 + 1 / 6 * (5 - np.pi**2 / 3))) * TR,
)


Expand All @@ -60,8 +57,7 @@ def test_gg_momentum():
cache = harmonics.cache.reset()
np.testing.assert_almost_equal(
-as2.gamma_gg(N, nf, cache),
4
* (-1.7537256813471833 * CA**2 + ((29 * CA) / 27 - (28 * CF) / 27) * nf * TR),
4 * (-1.7537256813471833 * CA**2 + ((29 * CA) / 27 - (28 * CF) / 27) * nf * TR),
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,25 @@ def test_gamma_ns():
# as4
assert_allclose(
ad_us.gamma_ns(
(4, 0), br.non_singlet_pids_map["ns-"], 1, nf, n3lo_ad_variation, use_fhmruvv = False
(4, 0),
br.non_singlet_pids_map["ns-"],
1,
nf,
n3lo_ad_variation,
use_fhmruvv=False,
),
np.zeros(4),
atol=2e-4,
)
# N3LO valence has a spurious pole, need to add a small shift
assert_allclose(
ad_us.gamma_ns(
(4, 0), br.non_singlet_pids_map["nsV"], 1 + 1e-6, nf, n3lo_ad_variation, use_fhmruvv = False
(4, 0),
br.non_singlet_pids_map["nsV"],
1 + 1e-6,
nf,
n3lo_ad_variation,
use_fhmruvv=False,
),
np.zeros(4),
atol=5e-4,
Expand Down

0 comments on commit 82192b6

Please sign in to comment.