diff --git a/benchmarks/DSSV_bench.py b/benchmarks/DSSV_bench.py new file mode 100644 index 000000000..f10b0200d --- /dev/null +++ b/benchmarks/DSSV_bench.py @@ -0,0 +1,56 @@ +"""Benchmark DSSV pdf family. + +Note that the PDF set is private, but can be obtained from the +authors upon request. +""" +import numpy as np +from banana import register + +from eko import interpolation +from ekomark.benchmark.runner import Runner + +register(__file__) + + +class BenchmarkDSSV(Runner): + """Benchmark DSSV pdf family.""" + + external = "LHAPDF" + + # Rotate to evolution basis + rotate_to_evolution_basis = True + + def skip_pdfs(self, _theory): + return [-6, 6, 5, -5, 4, -4, 22, "ph", "T35", "V35", "T24", "V24", "T15", "V15"] + + def benchmark(self, Q0=1.65, Q2grid=(100,)): + theory_card = { + "Qref": 1.0, + "mc": 1.4, + "mb": 4.75, + "mt": 175, + "kcThr": 1.0, + "kbThr": 1.0, + "ktThr": 1.0, + "alphas": 0.49127999999999999, + "FNS": "ZM-VFNS", + "ModEv": "EXA", + "Q0": Q0, + "PTO": 1, + "MaxNfPdf": 3, + "MaxNfAs": 3, + } + + operator_card = { + "Q2grid": list(Q2grid), + "polarized": [True], + "interpolation_xgrid": interpolation.lambertgrid(50, 1e-5), + } + self.run([theory_card], [operator_card], ["DSSV_REP_LHAPDF6"]) + + +if __name__ == "__main__": + low2 = 5**2 + high2 = 30**2 + dssv = BenchmarkDSSV() + dssv.benchmark(Q0=np.sqrt(low2), Q2grid=[high2]) diff --git a/benchmarks/NNPDF_bench.py b/benchmarks/NNPDF_bench.py index 053c6960d..e0a90ec99 100644 --- a/benchmarks/NNPDF_bench.py +++ b/benchmarks/NNPDF_bench.py @@ -4,6 +4,7 @@ import numpy as np from banana import register +from eko import interpolation from ekomark.benchmark.runner import Runner register(__file__) @@ -90,14 +91,45 @@ def benchmark_nnlo(self, Q0=1.65, Q2grid=(100,)): self.run([theory_card], [operator_card], ["NNPDF40_nnlo_as_01180"]) +class BenchmarkNNPDFpol11(BenchmarkNNPDF): + """Benchmark NNPDFpol11""" + + def benchmark(self, Q0=1.65, Q2grid=(100,)): + theory_card = { + "Qref": 91.2, + "mc": 1.41421, + "mb": 4.75, + "mt": 175, + "kcThr": 1.0, + "kbThr": 1.0, + "ktThr": 1.0, + "alphas": 0.119002, + "alphaqed": 0.007496, + "FNS": "ZM-VFNS", + "ModEv": "TRN", + "Q0": Q0, + "PTO": 1, + } + + operator_card = { + **base_operator, + "Q2grid": list(Q2grid), + "polarized": [True], + "interpolation_xgrid": interpolation.lambertgrid(50, 1e-5), + } + self.run([theory_card], [operator_card], ["NNPDFpol11_100"]) + + if __name__ == "__main__": - low2 = 4**2 + low2 = 5**2 high2 = 30**2 # nn31 = BenchmarkNNPDF31() # # test forward # nn31.benchmark_nlo(Q0=np.sqrt(low2), Q2grid=[10]) # # test backward # #nn31.benchmark_nlo(Q0=np.sqrt(high2), Q2grid=[low2]) - nn40 = BenchmarkNNPDF40() - # nn40.benchmark_nnlo(Q2grid=[100]) - nn40.benchmark_nnlo(Q0=np.sqrt(high2), Q2grid=[low2]) + # nn40 = BenchmarkNNPDF40() + # # nn40.benchmark_nnlo(Q2grid=[100]) + # nn40.benchmark_nnlo(Q0=np.sqrt(high2), Q2grid=[low2]) + nnpol = BenchmarkNNPDFpol11() + nnpol.benchmark(Q0=np.sqrt(low2), Q2grid=[high2]) diff --git a/benchmarks/apfel_bench.py b/benchmarks/apfel_bench.py index ca1ca6dc8..ee1a39bd4 100644 --- a/benchmarks/apfel_bench.py +++ b/benchmarks/apfel_bench.py @@ -158,6 +158,16 @@ def benchmark_plain(self, pto): cartesian_product(th), operators.build(operators.apfel_config), ["ToyLH"] ) + def benchmark_plain_pol(self, pto): + """Plain configuration""" + + th = self.ffns_theory.copy() + th.update({"PTO": [pto]}) + th["ModEv"] = ["EXA"] # TODO for the time one is sufficient + op = operators.apfel_config.copy() + op["polarized"] = [True] + self.run(cartesian_product(th), operators.build(op), ["ToyLH"]) + def benchmark_sv(self, pto, svmode): """Scale Variation""" @@ -189,10 +199,11 @@ def benchmark_sv(self, pto, svmode): if __name__ == "__main__": - obj = BenchmarkVFNS() - # obj = BenchmarkFFNS() + # obj = BenchmarkVFNS() + obj = BenchmarkFFNS() + obj.benchmark_plain_pol(2) # obj.benchmark_plain(2) - obj.benchmark_sv(2, "exponentiated") + # obj.benchmark_sv(2, "exponentiated") # obj.benchmark_kthr(2) # obj.benchmark_msbar(2) diff --git a/benchmarks/lha_paper_bench.py b/benchmarks/lha_paper_bench.py index 0ada77907..e78765a60 100644 --- a/benchmarks/lha_paper_bench.py +++ b/benchmarks/lha_paper_bench.py @@ -3,9 +3,11 @@ """ import numpy as np from banana import register +from banana.data import cartesian_product from eko.interpolation import lambertgrid from ekomark.benchmark.runner import Runner +from ekomark.data import operators register(__file__) @@ -219,12 +221,34 @@ def benchmark_sv(self, pto): self.run_lha([low, high]) +class BenchmarkFFNS_polarized(BenchmarkFFNS): + def run_lha(self, theory_updates): + """Enforce operator grid and PDF. + + Parameters + ---------- + theory_updates : list(dict) + theory updates + """ + self.run( + theory_updates, + [ + { + "Q2grid": [1e4], + "ev_op_iterations": 10, + "interpolation_xgrid": lambertgrid(60).tolist(), + "polarized": True, + } + ], + ["ToyLH_polarized"], + ) + + if __name__ == "__main__": # Benchmark to LHA - obj = BenchmarkVFNS() + obj = BenchmarkFFNS_polarized() # obj = BenchmarkFFNS() - - # obj.benchmark_plain(0) + # obj.benchmark_plain(1) obj.benchmark_sv(1) # # VFNS benchmarks with LHA settings diff --git a/benchmarks/pegasus_bench.py b/benchmarks/pegasus_bench.py index 3e6e907c8..e3152148a 100644 --- a/benchmarks/pegasus_bench.py +++ b/benchmarks/pegasus_bench.py @@ -61,12 +61,12 @@ class BenchmarkVFNS(PegasusBenchmark): "nfref": 3, "nf0": 3, } - zm_theory = tolist(zm_theory) + vfns_theory = tolist(zm_theory) def benchmark_plain(self, pto): """Plain configuration""" - th = self.zm_theory.copy() + th = self.vfns_theory.copy() th.update( { "PTO": [pto], @@ -79,7 +79,7 @@ def benchmark_plain(self, pto): def benchmark_sv(self, pto, svmode): """Scale Variation""" - th = self.zm_theory.copy() + th = self.vfns_theory.copy() th.update( { "PTO": [pto], @@ -125,6 +125,15 @@ def benchmark_plain(self, pto): cartesian_product(th), operators.build(operators.pegasus_config), ["ToyLH"] ) + def benchmark_plain_pol(self, pto): + """Plain polarized configuration""" + + th = self.ffns_theory.copy() + th.update({"PTO": [pto]}) + op = operators.pegasus_config.copy() + op["polarized"] = [True] + self.run(cartesian_product(th), operators.build(op), ["ToyLH_polarized"]) + def benchmark_sv(self, pto, svmode): """Scale Variation""" @@ -143,9 +152,10 @@ def benchmark_sv(self, pto, svmode): if __name__ == "__main__": - obj = BenchmarkVFNS() - # obj = BenchmarkFFNS() + # obj = BenchmarkVFNS() + obj = BenchmarkFFNS() + obj.benchmark_plain_pol(1) # obj.benchmark_plain(1) - obj.benchmark_sv(2, "exponentiated") + # obj.benchmark_sv(2, "exponentiated") # vfns.benchmark_sv() diff --git a/doc/source/development/Benchmarks.rst b/doc/source/development/Benchmarks.rst index 758bae648..42b2bd795 100644 --- a/doc/source/development/Benchmarks.rst +++ b/doc/source/development/Benchmarks.rst @@ -45,6 +45,13 @@ List of bugs in :cite:`Dittmar:2005ed` - in table 15, part 1: :math:`xd_v(x=10^{-4}, \mu_F^2 = 10^4~\mathrm{GeV}^2) = 1.0699\cdot 10^{-4}` (wrong exponent) and :math:`xg(x=10^{-4}, \mu_F^2 = 10^4~\mathrm{GeV}^2) = 9.9694\cdot 10^{2}` (wrong exponent) +- in table 16: the distribution :math:`L_{m}` is not vanishing despite the benchmark table is produced using the + toy PDF used, defined in :eqref:`4.57`, has :math:`\bar{u} = \bar{d}`. This means that :math:`T_3` + is not correct. The whole colum of :math:`L_{m}` should be set to 0, sine at |LO| it is not possible + to generate a difference between :math:`\bar{u}` and :math:`\bar{d}` + +- in table 17: same as before :math:`L_{m}` is bugged. + LHAPDF ------ diff --git a/doc/source/refs.bib b/doc/source/refs.bib index 2864bb671..15fe80b7b 100644 --- a/doc/source/refs.bib +++ b/doc/source/refs.bib @@ -776,3 +776,55 @@ @article{Albino:2000cp pages = "93--102", year = "2001" } + +@article{Gluck:1995yr, + author = "Gluck, M. and Reya, E. and Stratmann, M. and Vogelsang, W.", + title = "{Next-to-leading order radiative parton model analysis of polarized deep inelastic lepton - nucleon scattering}", + eprint = "hep-ph/9508347", + archivePrefix = "arXiv", + reportNumber = "DO-TH-95-13, RAL-TR-95-042", + doi = "10.1103/PhysRevD.53.4775", + journal = "Phys. Rev. D", + volume = "53", + pages = "4775--4786", + year = "1996" +} + +@article{Floratos:1981hs, + author = "Floratos, E. G. and Kounnas, C. and Lacaze, R.", + title = "{Higher Order QCD Effects in Inclusive Annihilation and Deep Inelastic Scattering}", + reportNumber = "LPTENS-81-3", + doi = "10.1016/0550-3213(81)90434-X", + journal = "Nucl. Phys. B", + volume = "192", + pages = "417--462", + year = "1981" +} + +@article{Moch:2015usa, + author = "Moch, S. and Vermaseren, J. A. M. and Vogt, A.", + title = "{On \ensuremath{\gamma}5 in higher-order QCD calculations and the NNLO evolution of the polarized valence distribution}", + eprint = "1506.04517", + archivePrefix = "arXiv", + primaryClass = "hep-ph", + reportNumber = "DESY-15-061, NIKHEF-15-018, LTH-1042", + doi = "10.1016/j.physletb.2015.07.027", + journal = "Phys. Lett. B", + volume = "748", + pages = "432--438", + year = "2015" +} + +@article{Moch:2014sna, + author = "Moch, S. and Vermaseren, J. A. M. and Vogt, A.", + title = "{The Three-Loop Splitting Functions in QCD: The Helicity-Dependent Case}", + eprint = "1409.5131", + archivePrefix = "arXiv", + primaryClass = "hep-ph", + reportNumber = "DESY-14-157, NIKHEF-14-033, LTH-1023", + doi = "10.1016/j.nuclphysb.2014.10.016", + journal = "Nucl. Phys. B", + volume = "889", + pages = "351--400", + year = "2014" +} \ No newline at end of file diff --git a/doc/source/theory/pQCD.rst b/doc/source/theory/pQCD.rst index ad8422671..47f7a625f 100644 --- a/doc/source/theory/pQCD.rst +++ b/doc/source/theory/pQCD.rst @@ -64,6 +64,45 @@ coupling :math:`a_s(\mu^2)` and are given by :cite:`Moch:2004pa,Vogt:2004mw` Note the additional minus in the definition of :math:`\gamma`. +Polarized Splitting Functions +----------------------------- + +Polarized Altarelli-Parisi splitting kernels are implemented up to |NNLO| and expanded in powers of the strong coupling as in the previous section. +They are used to evolve longitudinally polarized parton distribution functions. +Unlike in the unpolarized case, where the probability of the splitting describes the momentum of parent and daughter partons with averaged spins, +the polarized splitting functions describe the parent and daughter momentums along with their spins +and thus take into account positive or negative helicities. +Throughout, the anomalous dimensions are defined as above and are represented with :math:`\gamma` and not :math:`\Delta\gamma` just like in the unpolarized case. + +The |LO| and |NLO| kernels are given in :cite:`Gluck:1995yr` and the |NNLO| in :cite:`Moch:2014sna` and :cite:`Moch:2015usa`. + +At |LO|, the non-singlet is the same in both the polarized and unpolarized case. +Due to helicity conservation, the first moment of the anomalous dimension is :math:`\gamma^{(0)}_{qq} (N=1) = \gamma^{(0)}_{qg} (N=1) = 0`. + +At |NLO|, the singlet entry of the quark-quark anomalous dimension can be decomposed into the pure singlet +(consisting of the flavour independent quark-quark and quark-antiquark anomalous dimensions) and the plus flavour asymmetry non-singlet: + +.. math :: + \gamma^{(1)}_{qq} =\gamma^{(1)}_{ps} + \gamma^{(1)}_{ns,+} + +The non-singlet sector in the polarized case swaps the plus and minus non-singlet relative to the unpolarized case. +This is because the polarized non-singlet splitting functions are defined as the difference between the probability of the polarized parton splitting into daughter partons of the same flavour +and daughters splitting into a different flavours and opposite helicity. The first moments of the anomalous dimensions are: + +.. math :: + \gamma^{(1)}_{ns,+} (N=1) &= 0 \\ + \gamma^{(1)}_{qq} (N=1) &= 24 C_F T_R \\ + \gamma^{(1)}_{qg} (N=1) &= 0 \\ + +At |NNLO| the non-singlet is further decomposed into the helicity difference quark-antiquark anomalous dimension called the valence polarized non-singlet and defined as: + +.. math :: + \gamma^{(2)}_{ns,v} =\gamma^{(2)}_{ns,-} + \gamma^{(2)}_{ns,s} + +where :math:`\gamma^{(2)}_{ns,-}` is the minus flavour asymmetry non-singlet and :math:`\gamma^{(2)}_{ns,s}` the sea-like polarized non-singlet. +The singlet entry :math:`\gamma^{(2)}_{qq}` is defined as above in the |NLO| case. + + Unified Splitting Functions --------------------------- @@ -83,6 +122,7 @@ where :math:`a = \alpha/(4\pi)`. The expression of the pure |QED| and of the mixed |QED| :math:`\otimes` |QCD| splitting kernels are given in :cite:`deFlorian:2015ujt,deFlorian:2016gvk` + Order specification ------------------- diff --git a/poetry.lock b/poetry.lock index d370e005c..a767df7a6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -38,14 +38,14 @@ files = [ [[package]] name = "astroid" -version = "2.13.4" +version = "2.14.2" description = "An abstract syntax tree for Python with inference support." category = "dev" optional = false python-versions = ">=3.7.2" files = [ - {file = "astroid-2.13.4-py3-none-any.whl", hash = "sha256:fe430a1dcc6af3abbccd29ba9f2544dcafc0610d37018b5102c232ff917e4bbf"}, - {file = "astroid-2.13.4.tar.gz", hash = "sha256:805d47d685a490f4024e3744064e919998b0eef6619e6ea6d2052deec5333fd5"}, + {file = "astroid-2.14.2-py3-none-any.whl", hash = "sha256:0e0e3709d64fbffd3037e4ff403580550f14471fd3eaae9fa11cc9a5c7901153"}, + {file = "astroid-2.14.2.tar.gz", hash = "sha256:a3cf9f02c53dd259144a7e8f3ccd75d67c9a8c716ef183e0c1f291bc5d7bb3cf"}, ] [package.dependencies] @@ -136,14 +136,14 @@ files = [ [[package]] name = "banana-hep" -version = "0.6.7" +version = "0.6.8" description = "Benchmark QCD physics" category = "main" optional = true -python-versions = ">=3.8.0,<3.11" +python-versions = ">=3.8.0,<3.12" files = [ - {file = "banana_hep-0.6.7-py3-none-any.whl", hash = "sha256:5d1d77c565f6c7852c1c1a5c09b9e6d01f99e5a5861554c5b5a4f0eb21a9ac84"}, - {file = "banana_hep-0.6.7.tar.gz", hash = "sha256:d2b9c6f13433c40526e0b572144bf93c0bc9ee0feb823c623c3854e0ab58563d"}, + {file = "banana_hep-0.6.8-py3-none-any.whl", hash = "sha256:fafaad5f74bcf6bd263c8899c37ee884e0b4ae0af374cde4b5c8d60794d9f212"}, + {file = "banana_hep-0.6.8.tar.gz", hash = "sha256:047ba50bbd88691dbd0336b561c413f971f5b4a37310aa88de8e04e8c0e41cc2"}, ] [package.dependencies] @@ -163,14 +163,14 @@ docs = ["Sphinx (>=4.3.2,<5.0.0)", "sphinx-rtd-theme (>=1.0.0,<2.0.0)", "sphinxc [[package]] name = "beautifulsoup4" -version = "4.11.1" +version = "4.11.2" description = "Screen-scraping library" category = "main" optional = false python-versions = ">=3.6.0" files = [ - {file = "beautifulsoup4-4.11.1-py3-none-any.whl", hash = "sha256:58d5c3d29f5a36ffeb94f02f0d786cd53014cf9b3b3951d42e0080d8a9498d30"}, - {file = "beautifulsoup4-4.11.1.tar.gz", hash = "sha256:ad9aa55b65ef2808eb405f46cf74df7fcb7044d5cbc26487f96eb2ef2e436693"}, + {file = "beautifulsoup4-4.11.2-py3-none-any.whl", hash = "sha256:0e79446b10b3ecb499c1556f7e228a53e64a2bfcebd455f370d8927cb5b59e39"}, + {file = "beautifulsoup4-4.11.2.tar.gz", hash = "sha256:bc4bdda6717de5a2987436fb8d72f45dc90dd856bdfd512a1314ce90349a0106"}, ] [package.dependencies] @@ -620,6 +620,7 @@ files = [ {file = "debugpy-1.6.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b5d1b13d7c7bf5d7cf700e33c0b8ddb7baf030fcf502f76fc061ddd9405d16c"}, {file = "debugpy-1.6.6-cp38-cp38-win32.whl", hash = "sha256:70ab53918fd907a3ade01909b3ed783287ede362c80c75f41e79596d5ccacd32"}, {file = "debugpy-1.6.6-cp38-cp38-win_amd64.whl", hash = "sha256:c05349890804d846eca32ce0623ab66c06f8800db881af7a876dc073ac1c2225"}, + {file = "debugpy-1.6.6-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:11a0f3a106f69901e4a9a5683ce943a7a5605696024134b522aa1bfda25b5fec"}, {file = "debugpy-1.6.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a771739902b1ae22a120dbbb6bd91b2cae6696c0e318b5007c5348519a4211c6"}, {file = "debugpy-1.6.6-cp39-cp39-win32.whl", hash = "sha256:549ae0cb2d34fc09d1675f9b01942499751d174381b6082279cf19cdb3c47cbe"}, {file = "debugpy-1.6.6-cp39-cp39-win_amd64.whl", hash = "sha256:de4a045fbf388e120bb6ec66501458d3134f4729faed26ff95de52a754abddb1"}, @@ -963,14 +964,14 @@ files = [ [[package]] name = "ipykernel" -version = "6.21.0" +version = "6.21.2" description = "IPython Kernel for Jupyter" category = "dev" optional = false python-versions = ">=3.8" files = [ - {file = "ipykernel-6.21.0-py3-none-any.whl", hash = "sha256:a9aaefb0cd6f44e3dcaeaafb9222862ae73831f71afd77f465fc83d6199d1888"}, - {file = "ipykernel-6.21.0.tar.gz", hash = "sha256:719eac0f1d86706589ee0910d6f785fd4c1ef123ab8e3466b8961c37991d0ef2"}, + {file = "ipykernel-6.21.2-py3-none-any.whl", hash = "sha256:430d00549b6aaf49bd0f5393150691edb1815afa62d457ee6b1a66b25cb17874"}, + {file = "ipykernel-6.21.2.tar.gz", hash = "sha256:6e9213484e4ce1fb14267ee435e18f23cc3a0634e635b9fb4ed4677b84e0fdf8"}, ] [package.dependencies] @@ -981,9 +982,10 @@ ipython = ">=7.23.1" jupyter-client = ">=6.1.12" jupyter-core = ">=4.12,<5.0.0 || >=5.1.0" matplotlib-inline = ">=0.1" +nest-asyncio = "*" packaging = "*" psutil = "*" -pyzmq = ">=17" +pyzmq = ">=20" tornado = ">=6.1" traitlets = ">=5.4.0" @@ -1457,64 +1459,65 @@ files = [ [[package]] name = "matplotlib" -version = "3.6.3" +version = "3.7.0" description = "Python plotting package" category = "main" optional = true python-versions = ">=3.8" files = [ - {file = "matplotlib-3.6.3-cp310-cp310-macosx_10_12_universal2.whl", hash = "sha256:80c166a0e28512e26755f69040e6bf2f946a02ffdb7c00bf6158cca3d2b146e6"}, - {file = "matplotlib-3.6.3-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:eb9421c403ffd387fbe729de6d9a03005bf42faba5e8432f4e51e703215b49fc"}, - {file = "matplotlib-3.6.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5223affa21050fb6118353c1380c15e23aedfb436bf3e162c26dc950617a7519"}, - {file = "matplotlib-3.6.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d00c248ab6b92bea3f8148714837937053a083ff03b4c5e30ed37e28fc0e7e56"}, - {file = "matplotlib-3.6.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca94f0362f6b6f424b555b956971dcb94b12d0368a6c3e07dc7a40d32d6d873d"}, - {file = "matplotlib-3.6.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:59400cc9451094b7f08cc3f321972e6e1db4cd37a978d4e8a12824bf7fd2f03b"}, - {file = "matplotlib-3.6.3-cp310-cp310-win32.whl", hash = "sha256:57ad1aee29043163374bfa8990e1a2a10ff72c9a1bfaa92e9c46f6ea59269121"}, - {file = "matplotlib-3.6.3-cp310-cp310-win_amd64.whl", hash = "sha256:1fcc4cad498533d3c393a160975acc9b36ffa224d15a6b90ae579eacee5d8579"}, - {file = "matplotlib-3.6.3-cp311-cp311-macosx_10_12_universal2.whl", hash = "sha256:d2cfaa7fd62294d945b8843ea24228a27c8e7c5b48fa634f3c168153b825a21b"}, - {file = "matplotlib-3.6.3-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:c3f08df2ac4636249b8bc7a85b8b82c983bef1441595936f62c2918370ca7e1d"}, - {file = "matplotlib-3.6.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ff2aa84e74f80891e6bcf292ebb1dd57714ffbe13177642d65fee25384a30894"}, - {file = "matplotlib-3.6.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:11011c97d62c1db7bc20509572557842dbb8c2a2ddd3dd7f20501aa1cde3e54e"}, - {file = "matplotlib-3.6.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1c235bf9be052347373f589e018988cad177abb3f997ab1a2e2210c41562cc0c"}, - {file = "matplotlib-3.6.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bebcff4c3ed02c6399d47329f3554193abd824d3d53b5ca02cf583bcd94470e2"}, - {file = "matplotlib-3.6.3-cp311-cp311-win32.whl", hash = "sha256:d5f18430f5cfa5571ab8f4c72c89af52aa0618e864c60028f11a857d62200cba"}, - {file = "matplotlib-3.6.3-cp311-cp311-win_amd64.whl", hash = "sha256:dfba7057609ca9567b9704626756f0142e97ec8c5ba2c70c6e7bd1c25ef99f06"}, - {file = "matplotlib-3.6.3-cp38-cp38-macosx_10_12_universal2.whl", hash = "sha256:9fb8fb19d03abf3c5dab89a8677e62c4023632f919a62b6dd1d6d2dbf42cd9f5"}, - {file = "matplotlib-3.6.3-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:bbf269e1d24bc25247095d71c7a969813f7080e2a7c6fa28931a603f747ab012"}, - {file = "matplotlib-3.6.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:994637e2995b0342699b396a320698b07cd148bbcf2dd2fa2daba73f34dd19f2"}, - {file = "matplotlib-3.6.3-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:77b384cee7ab8cf75ffccbfea351a09b97564fc62d149827a5e864bec81526e5"}, - {file = "matplotlib-3.6.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:73b93af33634ed919e72811c9703e1105185cd3fb46d76f30b7f4cfbbd063f89"}, - {file = "matplotlib-3.6.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:debeab8e2ab07e5e3dac33e12456da79c7e104270d2b2d1df92b9e40347cca75"}, - {file = "matplotlib-3.6.3-cp38-cp38-win32.whl", hash = "sha256:acc3b1a4bddbf56fe461e36fb9ef94c2cb607fc90d24ccc650040bfcc7610de4"}, - {file = "matplotlib-3.6.3-cp38-cp38-win_amd64.whl", hash = "sha256:1183877d008c752d7d535396096c910f4663e4b74a18313adee1213328388e1e"}, - {file = "matplotlib-3.6.3-cp39-cp39-macosx_10_12_universal2.whl", hash = "sha256:6adc441b5b2098a4b904bbf9d9e92fb816fef50c55aa2ea6a823fc89b94bb838"}, - {file = "matplotlib-3.6.3-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:6d81b11ede69e3a751424b98dc869c96c10256b2206bfdf41f9c720eee86844c"}, - {file = "matplotlib-3.6.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:29f17b7f2e068dc346687cbdf80b430580bab42346625821c2d3abf3a1ec5417"}, - {file = "matplotlib-3.6.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f56a7252eee8f3438447f75f5e1148a1896a2756a92285fe5d73bed6deebff4"}, - {file = "matplotlib-3.6.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bbddfeb1495484351fb5b30cf5bdf06b3de0bc4626a707d29e43dfd61af2a780"}, - {file = "matplotlib-3.6.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:809119d1cba3ece3c9742eb01827fe7a0e781ea3c5d89534655a75e07979344f"}, - {file = "matplotlib-3.6.3-cp39-cp39-win32.whl", hash = "sha256:e0a64d7cc336b52e90f59e6d638ae847b966f68582a7af041e063d568e814740"}, - {file = "matplotlib-3.6.3-cp39-cp39-win_amd64.whl", hash = "sha256:79e501eb847f4a489eb7065bb8d3187117f65a4c02d12ea3a19d6c5bef173bcc"}, - {file = "matplotlib-3.6.3-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2787a16df07370dcba385fe20cdd0cc3cfaabd3c873ddabca78c10514c799721"}, - {file = "matplotlib-3.6.3-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:68d94a436f62b8a861bf3ace82067a71bafb724b4e4f9133521e4d8012420dd7"}, - {file = "matplotlib-3.6.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81b409b2790cf8d7c1ef35920f01676d2ae7afa8241844e7aa5484fdf493a9a0"}, - {file = "matplotlib-3.6.3-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:faff486b36530a836a6b4395850322e74211cd81fc17f28b4904e1bd53668e3e"}, - {file = "matplotlib-3.6.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:38d38cb1ea1d80ee0f6351b65c6f76cad6060bbbead015720ba001348ae90f0c"}, - {file = "matplotlib-3.6.3-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:12f999661589981e74d793ee2f41b924b3b87d65fd929f6153bf0f30675c59b1"}, - {file = "matplotlib-3.6.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:01b7f521a9a73c383825813af255f8c4485d1706e4f3e2ed5ae771e4403a40ab"}, - {file = "matplotlib-3.6.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:9ceebaf73f1a3444fa11014f38b9da37ff7ea328d6efa1652241fe3777bfdab9"}, - {file = "matplotlib-3.6.3.tar.gz", hash = "sha256:1f4d69707b1677560cd952544ee4962f68ff07952fb9069ff8c12b56353cb8c9"}, + {file = "matplotlib-3.7.0-cp310-cp310-macosx_10_12_universal2.whl", hash = "sha256:3da8b9618188346239e51f1ea6c0f8f05c6e218cfcc30b399dd7dd7f52e8bceb"}, + {file = "matplotlib-3.7.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:c0592ba57217c22987b7322df10f75ef95bc44dce781692b4b7524085de66019"}, + {file = "matplotlib-3.7.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:21269450243d6928da81a9bed201f0909432a74e7d0d65db5545b9fa8a0d0223"}, + {file = "matplotlib-3.7.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eb2e76cd429058d8954121c334dddfcd11a6186c6975bca61f3f248c99031b05"}, + {file = "matplotlib-3.7.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:de20eb1247725a2f889173d391a6d9e7e0f2540feda24030748283108b0478ec"}, + {file = "matplotlib-3.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c5465735eaaafd1cfaec3fed60aee776aeb3fd3992aa2e49f4635339c931d443"}, + {file = "matplotlib-3.7.0-cp310-cp310-win32.whl", hash = "sha256:092e6abc80cdf8a95f7d1813e16c0e99ceda8d5b195a3ab859c680f3487b80a2"}, + {file = "matplotlib-3.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:4f640534ec2760e270801056bc0d8a10777c48b30966eef78a7c35d8590915ba"}, + {file = "matplotlib-3.7.0-cp311-cp311-macosx_10_12_universal2.whl", hash = "sha256:f336e7014889c38c59029ebacc35c59236a852e4b23836708cfd3f43d1eaeed5"}, + {file = "matplotlib-3.7.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:3a10428d4f8d1a478ceabd652e61a175b2fdeed4175ab48da4a7b8deb561e3fa"}, + {file = "matplotlib-3.7.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:46ca923e980f76d34c1c633343a72bb042d6ba690ecc649aababf5317997171d"}, + {file = "matplotlib-3.7.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c849aa94ff2a70fb71f318f48a61076d1205c6013b9d3885ade7f992093ac434"}, + {file = "matplotlib-3.7.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:827e78239292e561cfb70abf356a9d7eaf5bf6a85c97877f254009f20b892f89"}, + {file = "matplotlib-3.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:691ef1f15360e439886186d0db77b5345b24da12cbc4fc57b26c4826db4d6cab"}, + {file = "matplotlib-3.7.0-cp311-cp311-win32.whl", hash = "sha256:21a8aeac39b4a795e697265d800ce52ab59bdeb6bb23082e2d971f3041074f02"}, + {file = "matplotlib-3.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:01681566e95b9423021b49dea6a2395c16fa054604eacb87f0f4c439750f9114"}, + {file = "matplotlib-3.7.0-cp38-cp38-macosx_10_12_universal2.whl", hash = "sha256:cf119eee4e57389fba5ac8b816934e95c256535e55f0b21628b4205737d1de85"}, + {file = "matplotlib-3.7.0-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:21bd4033c40b95abd5b8453f036ed5aa70856e56ecbd887705c37dce007a4c21"}, + {file = "matplotlib-3.7.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:111ef351f28fd823ed7177632070a6badd6f475607122bc9002a526f2502a0b5"}, + {file = "matplotlib-3.7.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:f91d35b3ef51d29d9c661069b9e4ba431ce283ffc533b981506889e144b5b40e"}, + {file = "matplotlib-3.7.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0a776462a4a63c0bfc9df106c15a0897aa2dbab6795c693aa366e8e283958854"}, + {file = "matplotlib-3.7.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0dfd4a0cbd151f6439e6d7f8dca5292839ca311e7e650596d073774847ca2e4f"}, + {file = "matplotlib-3.7.0-cp38-cp38-win32.whl", hash = "sha256:56b7b79488209041a9bf7ddc34f1b069274489ce69e34dc63ae241d0d6b4b736"}, + {file = "matplotlib-3.7.0-cp38-cp38-win_amd64.whl", hash = "sha256:8665855f3919c80551f377bc16df618ceabf3ef65270bc14b60302dce88ca9ab"}, + {file = "matplotlib-3.7.0-cp39-cp39-macosx_10_12_universal2.whl", hash = "sha256:f910d924da8b9fb066b5beae0b85e34ed1b6293014892baadcf2a51da1c65807"}, + {file = "matplotlib-3.7.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:cf6346644e8fe234dc847e6232145dac199a650d3d8025b3ef65107221584ba4"}, + {file = "matplotlib-3.7.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3d1e52365d8d5af699f04581ca191112e1d1220a9ce4386b57d807124d8b55e6"}, + {file = "matplotlib-3.7.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c869b646489c6a94375714032e5cec08e3aa8d3f7d4e8ef2b0fb50a52b317ce6"}, + {file = "matplotlib-3.7.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f4ddac5f59e78d04b20469bc43853a8e619bb6505c7eac8ffb343ff2c516d72f"}, + {file = "matplotlib-3.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb0304c1cd802e9a25743414c887e8a7cd51d96c9ec96d388625d2cd1c137ae3"}, + {file = "matplotlib-3.7.0-cp39-cp39-win32.whl", hash = "sha256:a06a6c9822e80f323549c6bc9da96d4f233178212ad9a5f4ab87fd153077a507"}, + {file = "matplotlib-3.7.0-cp39-cp39-win_amd64.whl", hash = "sha256:cb52aa97b92acdee090edfb65d1cb84ea60ab38e871ba8321a10bbcebc2a3540"}, + {file = "matplotlib-3.7.0-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3493b48e56468c39bd9c1532566dff3b8062952721b7521e1f394eb6791495f4"}, + {file = "matplotlib-3.7.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7d0dcd1a0bf8d56551e8617d6dc3881d8a1c7fb37d14e5ec12cbb293f3e6170a"}, + {file = "matplotlib-3.7.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:51fb664c37714cbaac69c16d6b3719f517a13c96c3f76f4caadd5a0aa7ed0329"}, + {file = "matplotlib-3.7.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:4497d88c559b76da320b7759d64db442178beeea06a52dc0c629086982082dcd"}, + {file = "matplotlib-3.7.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:9d85355c48ef8b9994293eb7c00f44aa8a43cad7a297fbf0770a25cdb2244b91"}, + {file = "matplotlib-3.7.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:03eb2c8ff8d85da679b71e14c7c95d16d014c48e0c0bfa14db85f6cdc5c92aad"}, + {file = "matplotlib-3.7.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:71b751d06b2ed1fd017de512d7439c0259822864ea16731522b251a27c0b2ede"}, + {file = "matplotlib-3.7.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:b51ab8a5d5d3bbd4527af633a638325f492e09e45e78afdf816ef55217a09664"}, + {file = "matplotlib-3.7.0.tar.gz", hash = "sha256:8f6efd313430d7ef70a38a3276281cb2e8646b3a22b3b21eb227da20e15e6813"}, ] [package.dependencies] contourpy = ">=1.0.1" cycler = ">=0.10" fonttools = ">=4.22.0" +importlib-resources = {version = ">=3.2.0", markers = "python_version < \"3.10\""} kiwisolver = ">=1.0.1" -numpy = ">=1.19" +numpy = ">=1.20" packaging = ">=20.0" pillow = ">=6.2.0" -pyparsing = ">=2.2.1" +pyparsing = ">=2.3.1" python-dateutil = ">=2.7" [[package]] @@ -1546,14 +1549,14 @@ files = [ [[package]] name = "mistune" -version = "2.0.4" +version = "2.0.5" description = "A sane Markdown parser with useful plugins and renderers" category = "main" optional = false python-versions = "*" files = [ - {file = "mistune-2.0.4-py2.py3-none-any.whl", hash = "sha256:182cc5ee6f8ed1b807de6b7bb50155df7b66495412836b9a74c8fbdfc75fe36d"}, - {file = "mistune-2.0.4.tar.gz", hash = "sha256:9ee0a66053e2267aba772c71e06891fa8f1af6d4b01d5e84e267b4570d4d9808"}, + {file = "mistune-2.0.5-py2.py3-none-any.whl", hash = "sha256:bad7f5d431886fcbaf5f758118ecff70d31f75231b34024a1341120340a65ce8"}, + {file = "mistune-2.0.5.tar.gz", hash = "sha256:0246113cb2492db875c6be56974a7c893333bf26cd92891c85f63151cee09d34"}, ] [[package]] @@ -1660,6 +1663,18 @@ nbformat = "*" sphinx = ">=1.8" traitlets = ">=5" +[[package]] +name = "nest-asyncio" +version = "1.5.6" +description = "Patch asyncio to allow nested event loops" +category = "dev" +optional = false +python-versions = ">=3.5" +files = [ + {file = "nest_asyncio-1.5.6-py3-none-any.whl", hash = "sha256:b9a953fb40dceaa587d109609098db21900182b16440652454a146cffb06e8b8"}, + {file = "nest_asyncio-1.5.6.tar.gz", hash = "sha256:d267cc1ff794403f7df692964d1d2a3fa9418ffea2a3f6859a439ff482fef290"}, +] + [[package]] name = "numba" version = "0.55.2" @@ -2011,19 +2026,19 @@ files = [ [[package]] name = "platformdirs" -version = "2.6.2" +version = "3.0.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"}, - {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"}, + {file = "platformdirs-3.0.0-py3-none-any.whl", hash = "sha256:b1d5eb14f221506f50d6604a561f4c5786d9e80355219694a1b244bcd96f4567"}, + {file = "platformdirs-3.0.0.tar.gz", hash = "sha256:8a1228abb1ef82d788f74139988b137e78692984ec7b08eaa6c65f1723af28f9"}, ] [package.extras] -docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] +docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2.1)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] [[package]] name = "pluggy" @@ -2175,18 +2190,18 @@ plugins = ["importlib-metadata"] [[package]] name = "pylint" -version = "2.15.10" +version = "2.16.2" description = "python code static checker" category = "dev" optional = false python-versions = ">=3.7.2" files = [ - {file = "pylint-2.15.10-py3-none-any.whl", hash = "sha256:9df0d07e8948a1c3ffa3b6e2d7e6e63d9fb457c5da5b961ed63106594780cc7e"}, - {file = "pylint-2.15.10.tar.gz", hash = "sha256:b3dc5ef7d33858f297ac0d06cc73862f01e4f2e74025ec3eff347ce0bc60baf5"}, + {file = "pylint-2.16.2-py3-none-any.whl", hash = "sha256:ff22dde9c2128cd257c145cfd51adeff0be7df4d80d669055f24a962b351bbe4"}, + {file = "pylint-2.16.2.tar.gz", hash = "sha256:13b2c805a404a9bf57d002cd5f054ca4d40b0b87542bdaba5e05321ae8262c84"}, ] [package.dependencies] -astroid = ">=2.12.13,<=2.14.0-dev0" +astroid = ">=2.14.2,<=2.16.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = {version = ">=0.2", markers = "python_version < \"3.11\""} isort = ">=4.2.5,<6" @@ -2617,14 +2632,14 @@ test = ["asv", "gmpy2", "mpmath", "pooch", "pytest", "pytest-cov", "pytest-timeo [[package]] name = "setuptools" -version = "67.0.0" +version = "67.3.2" description = "Easily download, build, install, upgrade, and uninstall Python packages" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "setuptools-67.0.0-py3-none-any.whl", hash = "sha256:9d790961ba6219e9ff7d9557622d2fe136816a264dd01d5997cfc057d804853d"}, - {file = "setuptools-67.0.0.tar.gz", hash = "sha256:883131c5b6efa70b9101c7ef30b2b7b780a4283d5fc1616383cdf22c83cbefe6"}, + {file = "setuptools-67.3.2-py3-none-any.whl", hash = "sha256:bb6d8e508de562768f2027902929f8523932fcd1fb784e6d573d2cafac995a48"}, + {file = "setuptools-67.3.2.tar.gz", hash = "sha256:95f00380ef2ffa41d9bba85d95b27689d923c93dfbafed4aecd7cf988a25e012"}, ] [package.extras] @@ -2658,14 +2673,14 @@ files = [ [[package]] name = "soupsieve" -version = "2.3.2.post1" +version = "2.4" description = "A modern CSS selector implementation for Beautiful Soup." category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "soupsieve-2.3.2.post1-py3-none-any.whl", hash = "sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759"}, - {file = "soupsieve-2.3.2.post1.tar.gz", hash = "sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"}, + {file = "soupsieve-2.4-py3-none-any.whl", hash = "sha256:49e5368c2cda80ee7e84da9dbe3e110b70a4575f196efb74e51b94549d921955"}, + {file = "soupsieve-2.4.tar.gz", hash = "sha256:e28dba9ca6c7c00173e34e4ba57448f0688bb681b7c5e8bf4971daafc093d69a"}, ] [[package]] @@ -2706,19 +2721,20 @@ test = ["cython", "html5lib", "pytest", "pytest-cov", "typed-ast"] [[package]] name = "sphinx-rtd-theme" -version = "1.1.1" +version = "1.2.0" description = "Read the Docs theme for Sphinx" category = "main" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" files = [ - {file = "sphinx_rtd_theme-1.1.1-py2.py3-none-any.whl", hash = "sha256:31faa07d3e97c8955637fc3f1423a5ab2c44b74b8cc558a51498c202ce5cbda7"}, - {file = "sphinx_rtd_theme-1.1.1.tar.gz", hash = "sha256:6146c845f1e1947b3c3dd4432c28998a1693ccc742b4f9ad7c63129f0757c103"}, + {file = "sphinx_rtd_theme-1.2.0-py2.py3-none-any.whl", hash = "sha256:f823f7e71890abe0ac6aaa6013361ea2696fc8d3e1fa798f463e82bdb77eeff2"}, + {file = "sphinx_rtd_theme-1.2.0.tar.gz", hash = "sha256:a0d8bd1a2ed52e0b338cbe19c4b2eef3c5e7a048769753dac6a9f059c7b641b8"}, ] [package.dependencies] -docutils = "<0.18" -sphinx = ">=1.6,<6" +docutils = "<0.19" +sphinx = ">=1.6,<7" +sphinxcontrib-jquery = {version = ">=2.0.0,<3.0.0 || >3.0.0", markers = "python_version > \"3\""} [package.extras] dev = ["bump2version", "sphinxcontrib-httpdomain", "transifex-client", "wheel"] @@ -2776,20 +2792,35 @@ test = ["pytest"] [[package]] name = "sphinxcontrib-htmlhelp" -version = "2.0.0" +version = "2.0.1" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, - {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, + {file = "sphinxcontrib-htmlhelp-2.0.1.tar.gz", hash = "sha256:0cbdd302815330058422b98a113195c9249825d681e18f11e8b1f78a2f11efff"}, + {file = "sphinxcontrib_htmlhelp-2.0.1-py3-none-any.whl", hash = "sha256:c38cb46dccf316c79de6e5515e1770414b797162b23cd3d06e67020e1d2a6903"}, ] [package.extras] lint = ["docutils-stubs", "flake8", "mypy"] test = ["html5lib", "pytest"] +[[package]] +name = "sphinxcontrib-jquery" +version = "2.0.0" +description = "Extension to include jQuery on newer Sphinx releases" +category = "main" +optional = false +python-versions = ">=2.7" +files = [ + {file = "sphinxcontrib-jquery-2.0.0.tar.gz", hash = "sha256:8fb65f6dba84bf7bcd1aea1f02ab3955ac34611d838bcc95d4983b805b234daa"}, + {file = "sphinxcontrib_jquery-2.0.0-py3-none-any.whl", hash = "sha256:ed47fa425c338ffebe3c37e1cdb56e30eb806116b85f01055b158c7057fdb995"}, +] + +[package.dependencies] +setuptools = "*" + [[package]] name = "sphinxcontrib-jsmath" version = "1.0.1" @@ -2893,7 +2924,7 @@ greenlet = {version = "!=0.4.17", markers = "python_version >= \"3\" and (platfo [package.extras] aiomysql = ["aiomysql", "greenlet (!=0.4.17)"] -aiosqlite = ["aiosqlite", "greenlet (!=0.4.17)", "typing-extensions (!=3.10.0.1)"] +aiosqlite = ["aiosqlite", "greenlet (!=0.4.17)", "typing_extensions (!=3.10.0.1)"] asyncio = ["greenlet (!=0.4.17)"] asyncmy = ["asyncmy (>=0.2.3,!=0.2.4)", "greenlet (!=0.4.17)"] mariadb-connector = ["mariadb (>=1.0.1,!=1.1.2)"] @@ -2903,14 +2934,14 @@ mssql-pyodbc = ["pyodbc"] mypy = ["mypy (>=0.910)", "sqlalchemy2-stubs"] mysql = ["mysqlclient (>=1.4.0)", "mysqlclient (>=1.4.0,<2)"] mysql-connector = ["mysql-connector-python"] -oracle = ["cx-oracle (>=7)", "cx-oracle (>=7,<8)"] +oracle = ["cx_oracle (>=7)", "cx_oracle (>=7,<8)"] postgresql = ["psycopg2 (>=2.7)"] postgresql-asyncpg = ["asyncpg", "greenlet (!=0.4.17)"] postgresql-pg8000 = ["pg8000 (>=1.16.6,!=1.29.0)"] postgresql-psycopg2binary = ["psycopg2-binary"] postgresql-psycopg2cffi = ["psycopg2cffi"] pymysql = ["pymysql", "pymysql (<1)"] -sqlcipher = ["sqlcipher3-binary"] +sqlcipher = ["sqlcipher3_binary"] [[package]] name = "stack-data" @@ -3014,14 +3045,14 @@ test = ["argcomplete (>=2.0)", "pre-commit", "pytest", "pytest-mock"] [[package]] name = "typing-extensions" -version = "4.4.0" +version = "4.5.0" description = "Backported and Experimental Type Hints for Python 3.7+" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, - {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, + {file = "typing_extensions-4.5.0-py3-none-any.whl", hash = "sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4"}, + {file = "typing_extensions-4.5.0.tar.gz", hash = "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb"}, ] [[package]] @@ -3043,24 +3074,24 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "virtualenv" -version = "20.17.1" +version = "20.19.0" description = "Virtual Python Environment builder" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "virtualenv-20.17.1-py3-none-any.whl", hash = "sha256:ce3b1684d6e1a20a3e5ed36795a97dfc6af29bc3970ca8dab93e11ac6094b3c4"}, - {file = "virtualenv-20.17.1.tar.gz", hash = "sha256:f8b927684efc6f1cc206c9db297a570ab9ad0e51c16fa9e45487d36d1905c058"}, + {file = "virtualenv-20.19.0-py3-none-any.whl", hash = "sha256:54eb59e7352b573aa04d53f80fc9736ed0ad5143af445a1e539aada6eb947dd1"}, + {file = "virtualenv-20.19.0.tar.gz", hash = "sha256:37a640ba82ed40b226599c522d411e4be5edb339a0c0de030c0dc7b646d61590"}, ] [package.dependencies] distlib = ">=0.3.6,<1" filelock = ">=3.4.1,<4" -platformdirs = ">=2.4,<3" +platformdirs = ">=2.4,<4" [package.extras] -docs = ["proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-argparse (>=0.3.2)", "sphinx-rtd-theme (>=1)", "towncrier (>=22.8)"] -testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=21.3)", "pytest (>=7.0.1)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.6.1)", "pytest-randomly (>=3.10.3)", "pytest-timeout (>=2.1)"] +docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=22.12)"] +test = ["covdefaults (>=2.2.2)", "coverage (>=7.1)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23)", "pytest (>=7.2.1)", "pytest-env (>=0.8.1)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.10)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)"] [[package]] name = "wcwidth" @@ -3173,14 +3204,14 @@ files = [ [[package]] name = "zipp" -version = "3.12.0" +version = "3.13.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "zipp-3.12.0-py3-none-any.whl", hash = "sha256:9eb0a4c5feab9b08871db0d672745b53450d7f26992fd1e4653aa43345e97b86"}, - {file = "zipp-3.12.0.tar.gz", hash = "sha256:73efd63936398aac78fd92b6f4865190119d6c91b531532e798977ea8dd402eb"}, + {file = "zipp-3.13.0-py3-none-any.whl", hash = "sha256:e8b2a36ea17df80ffe9e2c4fda3f693c3dad6df1697d3cd3af232db680950b0b"}, + {file = "zipp-3.13.0.tar.gz", hash = "sha256:23f70e964bc11a34cef175bc90ba2914e1e4545ea1e3e2f67c079671883f9cb6"}, ] [package.extras] @@ -3195,4 +3226,4 @@ mark = ["banana-hep", "sqlalchemy", "pandas", "matplotlib"] [metadata] lock-version = "2.0" python-versions = "^3.8,<3.11" -content-hash = "353908a1dad777bf5ca1b4204500c6ee7cbc3da671d3b234a29d5adc34eb5349" +content-hash = "0813035b8f6fa92fa6a2c55fe8a46bc1cb94eef03a088811e764c43bf31f6abf" diff --git a/pyproject.toml b/pyproject.toml index cebf5d0ee..cdf9bae73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ sphinx-rtd-theme = { version = "^1.0.0", optional = true } sphinxcontrib-bibtex = { version = "^2.4.1", optional = true } nbsphinx = { version = "^0.8.8", optional = true } # ekomark -banana-hep = { version = "^0.6.6", optional = true } +banana-hep = { version = "^0.6.8", optional = true } sqlalchemy = { version = "^1.4.21", optional = true } pandas = { version = "^1.3.0", optional = true } matplotlib = { version = "^3.5.1", optional = true } diff --git a/src/eko/evolution_operator/grid.py b/src/eko/evolution_operator/grid.py index 270d434a8..8e8fc923b 100644 --- a/src/eko/evolution_operator/grid.py +++ b/src/eko/evolution_operator/grid.py @@ -106,6 +106,8 @@ def __init__( if order == (1, 0) and method != "iterate-exact": logger.warning("Evolution: In LO we use the exact solution always!") + logger.info(dict(polarized=configs.polarized)) + self.config = config self.q2_grid = mu2grid self.managers = dict( diff --git a/src/ekomark/benchmark/external/LHA_polarized.yaml b/src/ekomark/benchmark/external/LHA_polarized.yaml new file mode 100644 index 000000000..48b863132 --- /dev/null +++ b/src/ekomark/benchmark/external/LHA_polarized.yaml @@ -0,0 +1,91 @@ +#:cite:`Dittmar:2005ed` +table16: # LO + part1: # mu_f^2 = mu_{f,0}^2 (=2) + u_v: [1.6366e-5,8.2024e-5,4.1110e-4,2.0604e-3,1.0326e-2,5.1723e-2,2.4582e-1,3.6473e-1,2.5008e-1,8.4769e-2,4.4680e-3] + d_v: [-6.2946e-6,-3.1548e-5,-1.5811e-4,-7.9245e-4,-3.9716e-3,-1.9886e-2,-9.1636e-2,-1.1370e-1,-5.7710e-2,-1.1990e-2,-2.1365e-4] + L_m: [-7.9433e-5,-1.5849e-4,-3.1621e-4,-6.3052e-4,-1.2501e-3,-2.3412e-3,-2.3972e-3,-5.7388e-4,-6.3457e-5,-1.9651e-6,-9.689e-10] + L_p: [-1.5887e-3,-3.1698e-3,-6.3241e-3,-1.2610e-2,-2.5003e-2,-4.6825e-2,-4.7943e-2,-1.1478e-2,-1.2691e-3,-3.9301e-5,-1.9378e-8] + s_p: [-3.9716e-4,-7.9244e-4,-1.5810e-3,-3.1526e-3,-6.2507e-3,-1.1706e-2,-1.1986e-2,-2.8694e-3,-3.1729e-4,-9.8254e-6,-4.8444e-9] + c_p: [0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0] + b_p: [0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0] + g: [4.7434e-4,1.5000e-3,4.7432e-3,1.4993e-2,4.7197e-2,1.4265e-1,2.8009e-1,1.3808e-1,3.3146e-2,3.0496e-3,1.4230e-5] + + part2: # FFNS at mu_f^2 = 1e4 + u_v: [4.8350e-5,2.3504e-4,1.1220e-3,5.1990e-3,2.2900e-2,9.1489e-2,2.6494e-1,2.2668e-1,9.7647e-2,1.9545e-2,4.1768e-4] + d_v: [-1.8556e-5,-9.0090e-5,-4.2916e-4,-1.9818e-3,-8.6763e-3,-3.4200e-2,-9.1898e-2,-6.2946e-2,-1.9652e-2,-2.3809e-3,-1.7059e-5] + L_m: [-1.0385e-4,-2.0700e-4,-4.1147e-4,-8.0948e-4,-1.5309e-3,2.4502e-3,-1.5309e-3,-2.1104e-4,-1.4789e-5,-2.7279e-7,-5.494e-11] + L_p: [-3.5124e-3,-7.7716e-3,-1.6007e-2,-2.8757e-2,-4.0166e-2,-3.3928e-2,-8.5427e-3,-6.6698e-4,1.8850e-5,4.1807e-6,7.6712e-9] + s_p: [-1.2370e-3,-2.8508e-3,-5.9463e-3,-1.0331e-2,-1.2428e-2,-4.7126e-3,3.3830e-3,7.2173e-4,8.3371e-5,3.4543e-6,4.1103e-9] + c_p: [-7.1774e-4,-1.8158e-3,-3.8889e-3,-6.2836e-3,-4.7739e-3,7.5385e-3,1.1037e-2,1.7769e-3,1.5732e-4,4.8183e-6,4.3850e-9] + b_p: [0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0] + g: [1.4116e-2,4.2163e-2,1.0922e-1,2.4069e-1,4.2181e-1,4.9485e-1,2.0503e-1,3.3980e-2,4.3802e-3,2.6355e-4,9.8421e-7] + + part3: # ZM-VFNS at mu_f^2 = 1e4 + u_v: [4.9026e-5,2.3818e-4,1.1359e-3,5.2567e-3,2.3109e-2,9.2035e-2,2.6478e-1,2.2495e-1,9.6318e-2,1.9147e-2,4.0430e-4] + d_v: [-1.8815e-5,-9.1286e-5,-4.3445e-4,-2.0035e-3,-8.7537e-3,-3.4391e-2,-9.1762e-2,-6.2376e-2,-1.9353e-2,-2.3281e-3,-1.6480e-5] + L_m: [-1.0422e-4,-2.0774e-4,-4.1289e-4,-8.1206e-4,-1.5345e-3,-2.4501e-3,-1.5206e-3,-2.0811e-4,-1.4496e-5,-2.6556e-7,-5.285e-11] + L_p: [-3.5315e-3,-7.8108e-3,-1.6070e-2,-2.8811e-2,-4.0125e-2,-3.3804e-2,-8.5181e-3,-6.6195e-4,1.8549e-5,4.0936e-6,7.4351e-9] + s_p: [-1.2447e-3,-2.8667e-3,-5.9705e-3,-1.0345e-2,-1.2390e-2,-4.6512e-3,3.3438e-3,7.0957e-4,8.1756e-5,3.3746e-6,3.9818e-9] + c_p: [-7.2356e-4,-1.8280e-3,-3.9060e-3,-6.2849e-3,-4.7174e-3,7.5994e-3,1.0947e-2,1.7501e-3,1.5424e-4,4.7024e-6,4.2460e-9] + b_p: [-6.2276e-4,-1.5301e-3,-3.1196e-3,-4.5871e-3,-2.4822e-3,6.4665e-3,6.5223e-3,9.2045e-4,7.8577e-5,2.4901e-6,2.6319e-9] + g: [1.3726e-2,4.1011e-2,1.0615e-1,2.3343e-1,4.0743e-1,4.7445e-1,1.9402e-1,3.1960e-2,4.1226e-3,2.4888e-4,9.2939e-7] + + +table17: # NLO FFNS at mu_f^2 = 1e4 + part1: # mu_r^2 = mu_f^2 + u_v: [6.7336e-5,3.1280e-4,1.4180e-3,6.2085e-3,2.5741e-2,9.6288e-2,2.5843e-1,2.1248e-1,8.9180e-2,1.7300e-2,3.4726e-4] + d_v: [-2.5747e-5,-1.1938e-4,-5.3982e-4,-2.3546e-3,-9.7004e-3,-3.5778e-2,-8.9093e-2,-5.8641e-2,-1.7817e-2,-2.0885e-3,-1.4028e-5] + L_m: [-1.1434e-4,-2.3497e-4,-4.8579e-4,-9.8473e-4,-1.8276e-3,-2.6427e-3,-1.4593e-3,-1.9269e-4,-1.3125e-5,-2.3388e-7,-4.407e-11] + L_p: [-5.2002e-3,-1.0725e-2,-1.9994e-2,-3.1788e-2,-3.8222e-2,-2.6437e-2,-7.5546e-3,-1.2210e-3,-9.1573e-5,-1.9691e-6,-4.247e-9] + s_p: [-2.0528e-3,-4.2774e-3,-7.8594e-3,-1.1749e-2,-1.1427e-2,-1.2328e-3,3.4258e-3,3.5155e-4,1.9823e-5,1.8480e-7,-1.903e-9] + c_p: [-1.5034e-3,-3.1845e-3,-5.6970e-3,-7.5376e-3,-3.6138e-3,1.0869e-2,1.0639e-2,1.3138e-3,8.5435e-5,1.3541e-6,-1.683e-9] + b_p: [0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0] + g: [2.6955e-2,6.5928e-2,1.4414e-1,2.7537e-1,4.3388e-1,4.8281e-1,2.0096e-1,3.4126e-2,4.5803e-3,2.9526e-4,1.2520e-6] + part2: # mu_r^2 = 2mu_f^2 + u_v: [6.1781e-5,2.8974e-4,1.3281e-3,5.8891e-3,2.4777e-2,9.4371e-2,2.6008e-1,2.1837e-1,9.3169e-2,1.8423e-2,3.8293e-4] + d_v: [-2.3641e-5,-1.1068e-4,-5.0612e-4,-2.2361e-3,-9.3502e-3,-3.5129e-2,-8.9915e-2,-6.0497e-2,-1.8699e-2,-2.2357e-3,-1.5559e-5] + L_m: [-1.1137e-4,-2.2755e-4,-4.6740e-4,-9.4412e-4,-1.7632e-3,-2.6087e-3,-1.4923e-3,-2.0143e-4,-1.3954e-5,-2.5360e-7,-4.952e-11] + L_p: [-4.6947e-3,-9.8528e-3,-1.8799e-2,-3.0787e-2,-3.8610e-2,-2.8767e-2,-8.3806e-3,-1.2157e-3,-7.9331e-5,-1.0062e-6,-1.955e-9] + s_p: [-1.8092e-3,-3.8580e-3,-7.2908e-3,-1.1292e-2,-1.1658e-2,-2.3430e-3,3.1932e-3,3.9810e-4,3.0091e-5,7.6483e-7,-7.298e-10] + c_p: [-1.2695e-3,-2.7838e-3,-5.1629e-3,-7.1363e-3,-3.9083e-3,9.7922e-3,1.0585e-2,1.4042e-3,9.9849e-5,2.0328e-6,-4.822e-10] + b_p: [0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0] + g: [2.2530e-2,5.7272e-2,1.2975e-1,2.5644e-1,4.1725e-1,4.7804e-1,2.0495e-1,3.5366e-2,4.7690e-3,3.0796e-4,1.3247e-6] + part3: # mu_r^2 = 1/2 mu_f^2 + u_v: [7.4443e-5,3.4143e-4,1.5256e-3,6.5726e-3,2.6766e-2,9.8073e-2,2.5628e-1,2.0709e-1,8.5835e-2,1.6405e-2,3.2011e-4] + d_v: [-2.8435e-5,-1.3016e-4,-5.8002e-4,-2.4891e-3,-1.0070e-2,-3.6370e-2,-8.8133e-2,-5.6988e-2,-1.7089e-2,-1.9723e-3,-1.2870e-5] + L_m: [-1.1815e-4,-2.4482e-4,-5.1085e-4,-1.0409e-3,-1.9171e-3,-2.6942e-3,-1.4304e-3,-1.8541e-4,-1.2463e-5,-2.1859e-7,-4.000e-11] + L_p: [-5.7829e-3,-1.1668e-2,-2.1193e-2,-3.2697e-2,-3.7730e-2,-2.4056e-2,-6.9572e-3,-1.3308e-3,-1.1920e-4,-3.6817e-6,-8.173e-9] + s_p: [-2.3341e-3,-4.7305e-3,-8.4295e-3,-1.2166e-2,-1.1160e-2,-1.2354e-4,3.5561e-3,2.5993e-4,2.6972e-6,-7.4795e-7,-3.886e-9] + c_p: [-1.7739e-3,-3.6168e-3,-6.2295e-3,-7.8952e-3,-3.2890e-3,1.1929e-2,1.0604e-2,1.1855e-3,6.4995e-5,3.4496e-7,-3.686e-9] + b_p: [0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0,0.0000e+0] + g: [3.2071e-2,7.5123e-2,1.5788e-1,2.9079e-1,4.4380e-1,4.8272e-1,1.9831e-1,3.3524e-2,4.5044e-3,2.9100e-4,1.2230e-6] + + +table18: # NLO ZM-VFNS at mu_f^2 = 1e4 + part1: # mu_r^2 = mu_f^2 + u_v: [6.8787e-5,3.1881e-4,1.4413e-3,6.2902e-3,2.5980e-2,9.6750e-2,2.5807e-1,2.1104e-1,8.8199e-2,1.7027e-2,3.3898e-4] + d_v: [-2.6297e-5,-1.2165e-4,-5.4856e-4,-2.3849e-3,-9.7872e-3,-3.5935e-2,-8.8905e-2,-5.8186e-2,-1.7601e-2,-2.0531e-3,-1.3676e-5] + L_m: [-1.1496e-4,-2.3638e-4,-4.8893e-4,-9.9100e-4,-1.8364e-3,-2.6452e-3,-1.4509e-3,-1.9054e-4,-1.2924e-5,-2.2921e-7,-4.284e-11] + L_p: [-5.2176e-3,-1.0770e-2,-2.0077e-2,-3.1883e-2,-3.8224e-2,-2.6306e-2,-7.4778e-3,-1.2026e-3,-8.9668e-5,-1.9243e-6,-4.260e-9] + s_p: [-2.0592e-3,-4.2953e-3,-7.8934e-3,-1.1785e-2,-1.1416e-2,-1.1774e-3,3.4207e-3,3.4999e-4,1.9771e-5,1.8384e-7,-1.916e-9] + c_p: [-1.5076e-3,-3.1979e-3,-5.7228e-3,-7.5596e-3,-3.5879e-3,1.0917e-2,1.0591e-2,1.3015e-3,8.4378e-5,1.3298e-6,-1.701e-9] + b_p: [-1.2411e-3,-2.4951e-3,-4.1488e-3,-4.8420e-3,-1.1723e-3,8.1196e-3,6.1480e-3,7.2795e-4,5.2125e-5,1.2157e-6,-7.492e-11] + g: [2.5681e-2,6.3021e-2,1.3809e-1,2.6411e-1,4.1601e-1,4.6178e-1,1.9143e-1,3.2621e-2,4.4207e-3,2.8887e-4,1.2435e-6] + part2: # mu_r^2 = 2mu_f^2 + u_v: [6.2819e-5,2.9408e-4,1.3450e-3,5.9485e-3,2.4951e-2,9.4706e-2,2.5982e-1,2.1732e-1,9.2445e-2,1.8219e-2,3.7653e-4] + d_v: [-2.4035e-5,-1.1232e-4,-5.1245e-4,-2.2582e-3,-9.4134e-3,-3.5243e-2,-8.9780e-2,-6.0165e-2,-1.8539e-2,-2.2090e-3,-1.5285e-5] + L_m: [-1.1180e-4,-2.2855e-4,-4.6965e-4,-9.4866e-4,-1.7698e-3,-2.6108e-3,-1.4862e-3,-1.9984e-4,-1.3804e-5,-2.5004e-7,-4.855e-11] + L_p: [-4.6896e-3,-9.8538e-3,-1.8815e-2,-3.0816e-2,-3.8618e-2,-2.8761e-2,-8.3807e-3,-1.2086e-3,-7.8411e-5,-9.8927e-7,-2.005e-9] + s_p: [-1.8050e-3,-3.8554e-3,-7.2936e-3,-1.1297e-2,-1.1654e-2,-2.3471e-3,3.1615e-3,3.9371e-4,2.9799e-5,7.5552e-7,-7.599e-10] + c_p: [-1.2637e-3,-2.7780e-3,-5.1597e-3,-7.1323e-3,-3.8925e-3,9.7827e-3,1.0522e-2,1.3919e-3,9.8805e-5,2.0057e-6,-5.171e-10] + b_p: [-1.0544e-3,-2.2077e-3,-3.8359e-3,-4.7404e-3,-1.5608e-3,7.5188e-3,6.1973e-3,7.6929e-4,5.7333e-5,1.4438e-6,3.809e-10] + g: [2.1305e-2,5.4411e-2,1.2368e-1,2.4503e-1,3.9912e-1,4.5698e-1,1.9561e-1,3.3906e-2,4.6166e-3,3.0231e-4,1.3232e-6] + part3: # mu_r^2 = 1/2 mu_f^2 + u_v: [7.6699e-5,3.5067e-4,1.5611e-3,6.6957e-3,2.7125e-2,9.8758e-2,2.5572e-1,2.0497e-1,8.4404e-2,1.6013e-2,3.0848e-4] + d_v: [-2.9289e-5,-1.3364e-4,-5.9329e-4,-2.5346e-3,-1.0200e-2,-3.6602e-2,-8.7847e-2,-5.6318e-2,-1.6775e-2,-1.9215e-3,-1.2377e-5] + L_m: [-1.1912e-4,-2.4707e-4,-5.1593e-4,-1.0509e-3,-1.9310e-3,-2.6980e-3,-1.4179e-3,-1.8228e-4,-1.2174e-5,-2.1196e-7,-3.829e-11] + L_p: [-5.8548e-3,-1.1806e-2,-2.1406e-2,-3.2903e-2,-3.7698e-2,-2.3675e-2,-6.7523e-3,-1.2965e-3,-1.1604e-4,-3.6047e-6,-8.129e-9] + s_p: [-2.3667e-3,-4.7934e-3,-8.5248e-3,-1.2252e-2,-1.1127e-2,5.1386e-5,3.5944e-3,2.6142e-4,2.8309e-6,-7.4260e-7,-3.873e-9] + c_p: [-1.8030e-3,-3.6731e-3,-6.3125e-3,-7.9608e-3,-3.2334e-3,1.2092e-2,1.0578e-2,1.1713e-3,6.3682e-5,3.1714e-7,-3.681e-9] + b_p: [-1.4521e-3,-2.7846e-3,-4.4072e-3,-4.8402e-3,-7.5827e-4,8.6053e-3,6.0904e-3,6.8941e-4,4.7009e-5,9.6419e-7,-6.816e-10] + g: [3.1009e-2,7.2690e-2,1.5274e-1,2.8097e-1,4.2756e-1,4.6241e-1,1.8838e-1,3.1884e-2,4.3221e-3,2.8268e-4,1.2009e-6] diff --git a/src/ekomark/benchmark/external/LHA_utils.py b/src/ekomark/benchmark/external/LHA_utils.py index b9a000ae6..fc29af48e 100644 --- a/src/ekomark/benchmark/external/LHA_utils.py +++ b/src/ekomark/benchmark/external/LHA_utils.py @@ -1,6 +1,4 @@ -""" -Implementation of :cite:`Giele:2002hx` and :cite:`Dittmar:2005ed` (NNLO) -""" +"""Implementation of :cite:`Giele:2002hx` and :cite:`Dittmar:2005ed` (NNLO and polarized).""" import pathlib import numpy as np @@ -54,23 +52,24 @@ # rotate basis def rotate_data(raw, is_ffns_nnlo=False, rotate_to_evolution_basis=False): - """ - Rotate data either to flavor space or evolution space (from LHA space) - which is yet an other basis. + """Rotate data in flavor space. + + Rotate either to flavor basis or evolution basis from the LHA basis, which is yet an other basis. Parameters ---------- - raw : dict - data - is_ffns_nnlo : bool - special table for NNLO FFNS - rotate_to_evolution_basis : bool - to evolution basis? + raw : dict + data + is_ffns_nnlo : bool + special table for NNLO FFNS + rotate_to_evolution_basis : bool + to evolution basis? Returns ------- - dict - rotated data + dict + rotated data + """ inp = [] label_list = raw_label_list @@ -95,11 +94,9 @@ def rotate_data(raw, is_ffns_nnlo=False, rotate_to_evolution_basis=False): # s_v = c_v count twice to_evolution[3, 4] = -2 to_evolution[3, -4] = 2 - for l in label_list: inp.append(raw[l]) inp = np.array(inp) - flav_pdfs = np.dot(to_flavor, inp) # additional rotation to evolution basis if necessary @@ -109,36 +106,40 @@ def rotate_data(raw, is_ffns_nnlo=False, rotate_to_evolution_basis=False): return dict(zip(br.flavor_basis_pids, flav_pdfs)) -def compute_LHA_data( - theory, operators, rotate_to_evolution_basis=False -): # pylint: disable=too-many-statements disable=too-many-branches - """ - Setup LHA benchmark :cite:`Giele:2002hx` +def compute_LHA_data(theory, operators, rotate_to_evolution_basis=False): + """Implement LHA benchmark :cite:`Giele:2002hx`. Parameters ---------- - theory : dict - theory card - operators : dict - operators card - rotate_to_evolution_basis : bool - rotate to evolution basis + theory : dict + theory card + operators : dict + operators card + rotate_to_evolution_basis : bool + rotate to evolution basis Returns ------- - ref : dict - output containing: target_xgrid, values - """ + dict + output containing: target_xgrid, values + """ + polarized = operators["polarized"] Q2grid = operators["Q2grid"] if not np.allclose(Q2grid, [1e4]): raise ValueError("Q2grid has to be [1e4]") + order = theory["PTO"] + # select which data + if polarized and order <= 1: + yaml_file = "LHA_polarized.yaml" + elif polarized and order > 1: + raise ValueError("LHA tables beyond NLO do not exist for polarized Case") + else: + yaml_file = "LHA.yaml" # load data - with open(here / "LHA.yaml", encoding="utf-8") as o: + with open(here / yaml_file, encoding="utf-8") as o: data = yaml.safe_load(o) - fns = theory["FNS"] - order = theory["PTO"] xif = (theory["fact_to_ren_scale_ratio"]) ** 2 if order == 0 and xif != 1.0: raise ValueError("LO LHA tables with scale variations are not available") @@ -153,22 +154,21 @@ def compute_LHA_data( part = 2 else: part = 1 - if fns == "FFNS": if order == 0: - table = 2 part = 2 + table = 16 if polarized else 2 elif order == 1: - table = 3 + table = 17 if polarized else 3 elif order == 2: is_ffns_nnlo = True table = 14 elif fns == "ZM-VFNS": if order == 0: - table = 2 part = 3 + table = 16 if polarized else 2 elif order == 1: - table = 4 + table = 18 if polarized else 4 elif order == 2: table = 15 @@ -185,24 +185,33 @@ def compute_LHA_data( return ref -def save_initial_scale_plots_to_pdf(path): - """ - Plots all PDFs at the inital scale. +def save_initial_scale_plots_to_pdf(path, is_pol): + r"""Plot all PDFs at the initial scale. - The reference values are given in Table 2 part 1 of :cite:`Giele:2002hx`. + The reference values are given in Table 2 part 1 :cite:`Giele:2002hx` + or Table 16 part 1 (polarized) :cite:`Dittmar:2005ed` . - This excercise was usfull in order to detect the missing 2 in the definition of + This exercise was useful in order to detect the missing 2 in the definition of :math:`L_+ = 2(\\bar u + \\bar d)` Parameters ---------- - path : str + path : str output path + is_pol : bool + polarized pdf data + """ # load data - with open(here / "LHA.yaml", encoding="utf-8") as o: + if not is_pol: + yaml_file = "LHA.yaml" + table = "table2" + else: + yaml_file = "LHA_polarized.yaml" + table = "table16" + with open(here / yaml_file, encoding="utf-8") as o: data = yaml.safe_load(o) - LHA_init_grid_ref = data["table2"]["part1"] + LHA_init_grid_ref = data[table]["part1"] with PdfPages(path) as pp: # iterate all raw labels for j, label in enumerate(raw_label_list): diff --git a/src/ekomark/benchmark/external/apfel_utils.py b/src/ekomark/benchmark/external/apfel_utils.py index 0fb2303c4..8b871b89e 100644 --- a/src/ekomark/benchmark/external/apfel_utils.py +++ b/src/ekomark/benchmark/external/apfel_utils.py @@ -66,6 +66,7 @@ def compute_apfel_data( # apfel.SetGridParameters(3, 50, 3, 8e-1) # init evolution + apfel.SetPolarizedEvolution(operators["polarized"]) apfel.InitializeAPFEL() print(f"Loading APFEL took {(time.perf_counter() - apf_start)} s") diff --git a/src/ekomark/benchmark/external/lhapdf_utils.py b/src/ekomark/benchmark/external/lhapdf_utils.py index fa3095d51..669563dea 100644 --- a/src/ekomark/benchmark/external/lhapdf_utils.py +++ b/src/ekomark/benchmark/external/lhapdf_utils.py @@ -1,6 +1,4 @@ -""" -LHAPDF interface -""" +"""LHAPDF interface.""" import numpy as np from eko import basis_rotation as br @@ -12,29 +10,27 @@ def compute_LHAPDF_data(operators, pdf, skip_pdfs, rotate_to_evolution_basis=Fal Parameters ---------- - operators : dict - operators card - pdf : lhapdf_type - pdf - skip_pdfs : list - list of pdfs (pid or name) to skip - rotate_to_evolution_basis: bool - rotate to evolution basis + operators : dict + operators card + pdf : lhapdf_type + pdf + skip_pdfs : list + list of pdfs (pid or name) to skip + rotate_to_evolution_basis: bool + rotate to evolution basis Returns ------- - ref : dict - output containing: target_xgrid, values - """ + ref : dict + output containing: target_xgrid, values - target_xgrid = operators["xgrid"] + """ + target_xgrid = operators["interpolation_xgrid"] out_tabs = {} for q2 in operators["Q2grid"]: - tab = {} for pid in br.flavor_basis_pids: - if pid in skip_pdfs: continue diff --git a/src/ekomark/benchmark/external/pegasus_utils.py b/src/ekomark/benchmark/external/pegasus_utils.py index b6abaf7e2..d3b0f28ac 100644 --- a/src/ekomark/benchmark/external/pegasus_utils.py +++ b/src/ekomark/benchmark/external/pegasus_utils.py @@ -47,16 +47,28 @@ def compute_pegasus_data(theory, operators, skip_pdfs, rotate_to_evolution_basis if theory["Q0"] != theory["Qref"]: raise ValueError("Initial scale Q0 must be equal to Qref in Pegasus.") - pegasus.initevol( - imodev, theory["PTO"], ivfns, nf, theory["fact_to_ren_scale_ratio"] ** 2 - ) - pegasus.initinp( - theory["alphas"], - theory["Qref"] ** 2, - (theory["kcThr"] * theory["mc"]) ** 2, - (theory["kbThr"] * theory["mb"]) ** 2, - (theory["ktThr"] * theory["mt"]) ** 2, - ) + if operators["polarized"]: + pegasus.initpol( + imodev, theory["PTO"], ivfns, nf, theory["fact_to_ren_scale_ratio"] ** 2 + ) + pegasus.initpinp( + theory["alphas"], + theory["Qref"] ** 2, + (theory["kcThr"] * theory["mc"]) ** 2, + (theory["kbThr"] * theory["mb"]) ** 2, + (theory["ktThr"] * theory["mt"]) ** 2, + ) + else: + pegasus.initevol( + imodev, theory["PTO"], ivfns, nf, theory["fact_to_ren_scale_ratio"] ** 2 + ) + pegasus.initinp( + theory["alphas"], + theory["Qref"] ** 2, + (theory["kcThr"] * theory["mc"]) ** 2, + (theory["kbThr"] * theory["mb"]) ** 2, + (theory["ktThr"] * theory["mt"]) ** 2, + ) # better return always the flavor basis and then rotate # if rotate_to_evolution_basis: diff --git a/src/ekore/anomalous_dimensions/polarized/space_like/__init__.py b/src/ekore/anomalous_dimensions/polarized/space_like/__init__.py index 1b64ab235..ccd70e2d1 100644 --- a/src/ekore/anomalous_dimensions/polarized/space_like/__init__.py +++ b/src/ekore/anomalous_dimensions/polarized/space_like/__init__.py @@ -9,13 +9,111 @@ """ import numba as nb +import numpy as np + +from .... import harmonics +from . import as1, as2, as3 + + +@nb.njit(cache=True) +def compute_cache(n, pto): + """Compute the harmonic cache for polarized anomalous dimension. + + Parameters + ---------- + n : complex + Mellin variable + pto : int + perturbative order + + Returns + ------- + list + harmonics cache + + """ + max_weight = pto if pto != 3 else 4 + cache = harmonics.sx(n, max_weight) + return cache @nb.njit(cache=True) -def gamma_ns(_order, _mode, _n, _nf): - raise NotImplementedError("Polarised, space-like is not yet implemented") +def gamma_ns(order, mode, n, nf): + r"""Compute the tower of the non-singlet anomalous dimensions. + + Parameters + ---------- + order : tuple(int,int) + perturbative orders + mode : 10201 | 10101 | 10200 + sector identifier + n : complex + Mellin variable + nf : int + Number of active flavors + + Returns + ------- + numpy.ndarray + non-singlet anomalous dimensions + + """ + # cache the s-es + sx = compute_cache(n, order[0] + 1) + # now combine + gamma_ns = np.zeros(order[0], np.complex_) + gamma_ns[0] = as1.gamma_ns(n, sx[0]) + # NLO and beyond + if order[0] >= 2: + if mode == 10101: + gamma_ns_1 = as2.gamma_nsp(n, nf, sx) + # To fill the full valence vector in NNLO we need to add gamma_ns^1 explicitly here + elif mode in [10201, 10200]: + gamma_ns_1 = as2.gamma_nsm(n, nf, sx) + else: + raise NotImplementedError("Non-singlet sector is not implemented") + gamma_ns[1] = gamma_ns_1 + if order[0] >= 3: + if mode == 10101: + gamma_ns_2 = as3.gamma_nsp(n, nf, sx) + elif mode == 10201: + gamma_ns_2 = as3.gamma_nsm(n, nf, sx) + elif mode == 10200: + gamma_ns_2 = as3.gamma_nsv(n, nf, sx) + gamma_ns[2] = gamma_ns_2 + if order[0] >= 4: + raise NotImplementedError("Polarized beyond NNLO is not yet implemented") + return gamma_ns @nb.njit(cache=True) -def gamma_singlet(_order, _n, _nf): - raise NotImplementedError("Polarised, space-like is not yet implemented") +def gamma_singlet(order, n, nf): + r"""Compute the tower of the singlet anomalous dimensions matrices. + + Parameters + ---------- + order : tuple(int,int) + perturbative orders + n : complex + Mellin variable + nf : int + Number of active flavors + + Returns + ------- + numpy.ndarray + singlet anomalous dimensions matrices + + """ + # cache the s-es + sx = compute_cache(n, order[0] + 1) + + gamma_s = np.zeros((order[0], 2, 2), np.complex_) + gamma_s[0] = as1.gamma_singlet(n, sx[0], nf) + if order[0] >= 2: + gamma_s[1] = as2.gamma_singlet(n, nf, sx) + if order[0] >= 3: + gamma_s[2] = as3.gamma_singlet(n, nf, sx) + if order[0] >= 4: + raise NotImplementedError("Polarized beyond NNLO is not yet implemented") + return gamma_s diff --git a/src/ekore/anomalous_dimensions/polarized/space_like/as1.py b/src/ekore/anomalous_dimensions/polarized/space_like/as1.py new file mode 100644 index 000000000..c3d84c1ed --- /dev/null +++ b/src/ekore/anomalous_dimensions/polarized/space_like/as1.py @@ -0,0 +1,107 @@ +"""The |LO| Altarelli-Parisi splitting kernels.""" + +import numba as nb +import numpy as np + +from eko import constants + +from ...unpolarized.space_like.as1 import gamma_ns + + +@nb.njit(cache=True) +def gamma_qg(N, nf): + r"""Compute the |LO| polarized quark-gluon anomalous dimension :cite:`Gluck:1995yr` (eq A.1). + + Parameters + ---------- + N : complex + Mellin moment + nf : int + Number of active flavors + + Returns + ------- + complex + |LO| polarized quark-gluon anomalous dimension :math:`\\gamma_{qg}^{(0)}(N)` + + """ + gamma = -(N - 1) / N / (N + 1) + result = 2.0 * constants.TR * 2.0 * nf * gamma + return result + + +@nb.njit(cache=True) +def gamma_gq(N): + r"""Compute the |LO| polarized gluon-quark anomalous dimension :cite:`Gluck:1995yr` (eq A.1). + + Parameters + ---------- + N : complex + Mellin moment + + Returns + ------- + complex + |LO| gluon-quark anomalous dimension :math:`\\gamma_{gq}^{(0)}(N)` + + """ + gamma = -(N + 2) / N / (N + 1) + result = 2.0 * constants.CF * gamma + return result + + +@nb.njit(cache=True) +def gamma_gg(N, s1, nf): + r"""Compute the |LO| polarized gluon-gluon anomalous dimension :cite:`Gluck:1995yr` (eq A.1). + + Parameters + ---------- + N : complex + Mellin moment + s1 : complex + harmonic sum :math:`S_{1}` + nf : int + Number of active flavors + + Returns + ------- + complex + |LO| gluon-gluon anomalous dimension :math:`\\gamma_{gg}^{(0)}(N)` + + """ + gamma = -s1 + 2 / N / (N + 1) + result = constants.CA * (-4.0 * gamma - 11.0 / 3.0) + 4.0 / 3.0 * constants.TR * nf + return result + + +@nb.njit(cache=True) +def gamma_singlet(N, s1, nf): + r"""Compute the |LO| polarized singlet anomalous dimension matrix. + + .. math:: + \gamma_S^{(0)} = \left(\begin{array}{cc} + \gamma_{qq}^{(0)} & \gamma_{qg}^{(0)}\\ + \gamma_{gq}^{(0)} & \gamma_{gg}^{(0)} + \end{array}\right) + + Parameters + ---------- + N : complex + Mellin moment + s1 : complex + harmonic sum :math:`S_{1}` + nf : int + Number of active flavors + + Returns + ------- + numpy.ndarray + |LO| singlet anomalous dimension matrix :math:`\gamma_{S}^{(0)}(N)` + + """ + gamma_qq = gamma_ns(N, s1) + gamma_S_0 = np.array( + [[gamma_qq, gamma_qg(N, nf)], [gamma_gq(N), gamma_gg(N, s1, nf)]], + np.complex_, + ) + return gamma_S_0 diff --git a/src/ekore/anomalous_dimensions/polarized/space_like/as2.py b/src/ekore/anomalous_dimensions/polarized/space_like/as2.py new file mode 100644 index 000000000..2b63a2dc3 --- /dev/null +++ b/src/ekore/anomalous_dimensions/polarized/space_like/as2.py @@ -0,0 +1,211 @@ +"""The |NLO| Altarelli-Parisi splitting kernels.""" + +import numba as nb +import numpy as np + +from eko.constants import CA, CF, TR + +from .... import harmonics +from ....harmonics.constants import zeta2, zeta3 + +# Non Singlet sector is swapped +from ...unpolarized.space_like.as2 import gamma_nsm as gamma_nsp +from ...unpolarized.space_like.as2 import gamma_nsp as gamma_nsm + + +@nb.njit(cache=True) +def gamma_ps(n, nf): + r"""Compute the |NLO| polarized pure-singlet quark-quark anomalous dimension :cite:`Gluck:1995yr` (eq A.3). + + Parameters + ---------- + n : complex + Mellin moment + nf : int + number of active flavors + + Returns + ------- + complex + |NLO| pure-singlet quark-quark anomalous dimension :math:`\\gamma_{ps}^{(1)}(n)` + + """ + gqqps1_nfcf = (2 * (n + 2) * (1 + 2 * n + n**3)) / ((1 + n) ** 3 * n**3) + result = 4.0 * TR * nf * CF * gqqps1_nfcf + return result + + +@nb.njit(cache=True) +def gamma_qg(n, nf, sx): + r"""Compute the |NLO| polarized quark-gluon singlet anomalous dimension :cite:`Gluck:1995yr` (eq A.4). + + Parameters + ---------- + n : complex + Mellin moment + nf : int + number of active flavors + sx : numpy.ndarray + List of harmonic sums: :math:`S_{1},S_{2}` + + Returns + ------- + complex + |NLO| quark-gluon singlet anomalous dimension :math:`\\gamma_{qg}^{(1)}(n)` + + """ + S1 = sx[0] + S2 = sx[1] + Sp2m = harmonics.S2((n - 1) / 2) + gqg1_nfca = ( + (S1**2 - S2 + Sp2m) * (n - 1) / (n * (n + 1)) + - 4 * S1 / (n * (1 + n) ** 2) + - (-2 - 7 * n + 3 * n**2 - 4 * n**3 + n**4 + n**5) + / (n**3 * (1 + n) ** 3) + ) * 2.0 + gqg1_nfcf = ( + (-(S1**2) + S2 + 2 * S1 / n) * (n - 1) / (n * (n + 1)) + - (n - 1) + * (1 + 3.5 * n + 4 * n**2 + 5 * n**3 + 2.5 * n**4) + / (n**3 * (1 + n) ** 3) + + 4 * (n - 1) / (n**2 * (1 + n) ** 2) + ) * 2 + result = 4.0 * TR * nf * (CA * gqg1_nfca + CF * gqg1_nfcf) + return result + + +@nb.njit(cache=True) +def gamma_gq(n, nf, sx): + r"""Compute the |NLO| polarized gluon-quark singlet anomalous dimension :cite:`Gluck:1995yr` (eq A.5). + + Parameters + ---------- + n : complex + Mellin moment + nf : int + number of active flavors + sx : numpy.ndarray + List of harmonic sums: :math:`S_{1},S_{2}` + + Returns + ------- + complex + |NLO| gluon-quark singlet anomalous dimension :math:`\\gamma_{gq}^{(1)}(n)` + + """ + S1 = sx[0] + S2 = sx[1] + Sp2m = harmonics.S2((n - 1) / 2) + ggq1_cfcf = ( + (2 * (S1**2 + S2) * (n + 2)) / (n * (n + 1)) + - (2 * S1 * (n + 2) * (1 + 3 * n)) / (n * (1 + n) ** 2) + - ((n + 2) * (2 + 15 * n + 8 * n**2 - 12.0 * n**3 - 9.0 * n**4)) + / (n**3 * (1 + n) ** 3) + + 8 * (n + 2) / (n**2 * (1 + n) ** 2) + ) * 0.5 + ggq1_cfca = -( + -(-(S1**2) - S2 + Sp2m) * (n + 2) / (n * (n + 1)) + - S1 * (12 + 22 * n + 11 * n**2) / (3 * n**2 * (n + 1)) + + (36 + 72 * n + 41 * n**2 + 254 * n**3 + 271 * n**4 + 76 * n**5) + / (9 * n**3 * (1 + n) ** 3) + ) + ggq1_cfnf = (-S1 * (n + 2)) / (3 * n * (n + 1)) + ((n + 2) * (2 + 5 * n)) / ( + 9 * n * (1 + n) ** 2 + ) + result = 4 * CF * (CA * ggq1_cfca + CF * ggq1_cfcf + 4.0 * TR * nf * ggq1_cfnf) + return result + + +@nb.njit(cache=True) +def gamma_gg(n, nf, sx): + r"""Compute the |NLO| polarized gluon-gluon singlet anomalous dimension :cite:`Gluck:1995yr` (eq A.6). + + Parameters + ---------- + n : complex + Mellin moment + nf : int + number of active flavors + sx : numpy.ndarray + List of harmonic sums: :math:`S_{1},S_{2}` + + Returns + ------- + complex + |NLO| gluon-quark singlet anomalous dimension :math:`\\gamma_{gq}^{(1)}(n)` + + """ + S1 = sx[0] + Sp1m = harmonics.S1((n - 1) / 2) + Sp2m = harmonics.S2((n - 1) / 2) + Sp3m = harmonics.S3((n - 1) / 2) + S1h = harmonics.S1(n / 2) + SSCHLM = ( + zeta2 / 2 * (+Sp1m - S1h + 2 / n) + - S1 / n**2 + - harmonics.g_functions.mellin_g3(n, S1) + - 5 * zeta3 / 8 + ) + ggg1_caca = ( + -4 * S1 * Sp2m + - Sp3m + + 8 * SSCHLM + + 8 * Sp2m / (n * (n + 1)) + + 2.0 + * S1 + * (72 + 144 * n + 67 * n**2 + 134 * n**3 + 67 * n**4) + / (9 * n**2 * (n + 1) ** 2) + - ( + 144 + + 258 * n + + 7 * n**2 + + 698 * n**3 + + 469 * n**4 + + 144 * n**5 + + 48 * n**6 + ) + / (9 * n**3 * (1 + n) ** 3) + ) * 0.5 + ggg1_canf = ( + -5 * S1 / 9 + + (-3 + 13 * n + 16 * n**2 + 6 * n**3 + 3 * n**4) + / (9 * n**2 * (1 + n) ** 2) + ) * 4 + ggg1_cfnf = (4 + 2 * n - 8 * n**2 + n**3 + 5 * n**4 + 3 * n**5 + n**6) / ( + n**3 * (1 + n) ** 3 + ) + result = 4 * (CA**2 * ggg1_caca + TR * nf * (CA * ggg1_canf + CF * ggg1_cfnf)) + return result + + +@nb.njit(cache=True) +def gamma_singlet(n, nf, sx): + r"""Compute the |NLO| polarized singlet anomalous dimension matrix. + + .. math:: + \gamma_S^{(1)} = \left(\begin{array}{cc} + \gamma_{qq}^{(1)} & \gamma_{qg}^{(1)}\\ + \gamma_{gq}^{(1)} & \gamma_{gg}^{(1)} + \end{array}\right) + + Parameters + ---------- + n : complex + Mellin moment + nf : int + Number of active flavors + sx: list + harmonics cache + + Returns + ------- + numpy.ndarray + |NLO| singlet anomalous dimension matrix :math:`\gamma_{S}^{(1)}(N)` + + """ + gamma_qq = gamma_nsp(n, nf, sx) + gamma_ps(n, nf) + gamma_S_0 = np.array( + [[gamma_qq, gamma_qg(n, nf, sx)], [gamma_gq(n, nf, sx), gamma_gg(n, nf, sx)]], + np.complex_, + ) + return gamma_S_0 diff --git a/src/ekore/anomalous_dimensions/polarized/space_like/as3.py b/src/ekore/anomalous_dimensions/polarized/space_like/as3.py new file mode 100644 index 000000000..9ba7c32db --- /dev/null +++ b/src/ekore/anomalous_dimensions/polarized/space_like/as3.py @@ -0,0 +1,432 @@ +"""The |NNLO| polarized Altarelli-Parisi splitting kernels.""" + +import numba as nb +import numpy as np + +from .... import harmonics +from ....harmonics.constants import zeta2 + +# Non Singlet sector is swapped +from ...unpolarized.space_like.as3 import gamma_nsm as gamma_nsp +from ...unpolarized.space_like.as3 import gamma_nsp as gamma_nsm + + +@nb.njit(cache=True) +def gamma_gg(N, nf, sx): + r"""Compute the parametrized |NNLO| gluon-gluon polarized anomalous dimension. + + Implement Eq. (4.12) of :cite:`Moch:2014sna`. + + Parameters + ---------- + n : complex + Mellin moment + nf : int + Number of active flavors + sx : np.ndarray + List of harmonic sums: :math:`S_{1},S_{2},S_{3},S_{4}` + + Returns + ------- + complex + |NNLO| gluon-gluon anomalous dimension :math:`\\gamma_{gg}^{(2)}(N)` + + """ + S1 = sx[0] + S2 = sx[1] + E1 = S1 / N**2 + (-zeta2 + S2) / N + gg_nf0 = ( + +4427.76 + - 12292 * E1 + + 12096 / N**5 + - 22665.0 / N**4 + + 21804 / N**3 + - 23091 / N**2 + + 33631.5 / N + - 7002 / (1 + N) ** 4 + - 1726 / (1 + N) ** 3 + - 13247 / (1 + N) ** 2 + - 39925 / (1 + N) + + 13447 / (2 + N) + - 4576 / (3 + N) + - 2643.52 * S1 + + (9446 * S1) / N + - (13247 * S1) / (1 + N) + ) + gg_nf1 = ( + -528.536 + - 7932 * E1 + - 6128 / (9 * N**5) + + 2146.79 / N**4 + - 3754.4 / N**3 + + 3524 / N**2 + - 1585.67 / N + - 786.0 / (1 + N) ** 4 + + 1226.2 / (1 + N) ** 3 + - 6746 / (1 + N) ** 2 + + 2648.6 / (1 + N) + - 2160.8 / (2 + N) + + 1251.7 / (3 + N) + + 412.172 * S1 + + (7041.7 * S1) / N + - (6746 * S1) / (1 + N) + ) + gg_nf2 = ( + 6.4607 + - 16.944 * E1 + + 7.0854 / N**4 + - 13.358 / N**3 + + 13.29 / N**2 + - 18.3838 / N + + 31.528 / (1 + N) ** 3 + + 32.905 / (1 + N) + - 18.3 / (2 + N) + + 2.637 / (3 + N) + + (16 * S1) / 9 + + (0.21 * S1) / N + ) + return -(gg_nf0 + gg_nf1 * nf + gg_nf2 * nf**2) + + +@nb.njit(cache=True) +def gamma_qg(N, nf, sx): + r"""Compute the parametrized |NNLO| quark-gluon polarized anomalous dimension. + + Implement Eq. (4.10) of :cite:`Moch:2014sna`. + + Parameters + ---------- + n : complex + Mellin moment + nf : int + Number of active flavors + sx : np.ndarray + List of harmonic sums: :math:`S_{1},S_{2},S_{3},S_{4}` + + Returns + ------- + complex + |NNLO| quark-gluon anomalous dimension :math:`\\gamma_{qg}^{(2)}(N)` + + """ + S1, S2, S3, S4 = sx + B3 = (-(S1**3) - 3 * S1 * S2 - 2 * S3) / N + B4 = (S1**4 + 6 * S1**2 * S2 + 3 * S2**2 + 8 * S1 * S3 + 6 * S4) / N + E1 = S1 / N**2 + (-zeta2 + S2) / N + qg_nf1 = ( + -5.3 * B3 + + 3.784 * B4 + + 825.4 * E1 + - 1208 / N**5 + + 2313.84 / N**4 + - 1789.6 / N**3 + + 1461.2 / N**2 + - 2972.4 / N + + 439.8 / (1 + N) ** 4 + + 2290.6 / (1 + N) ** 3 + + 4672 / (1 + N) + - 1221.6 / (2 + N) + - 18 / (3 + N) + - (278.32 * S1) / N + - (90.26 * S1**2) / N + - (90.26 * S2) / N + ) + qg_nf2 = ( + 0.7374 * B3 + - 47.3 * E1 + + 128 / (3 * N**5) + - 184.434 / N**4 + + 393.92 / N**3 + - 526.3 / N**2 + + 499.65 / N + - 61.116 / (1 + N) ** 4 + + 358.2 / (1 + N) ** 3 + - 432.18 / (1 + N) + - 141.63 / (2 + N) + - 11.34 / (3 + N) + + (6.256 * S1) / N + + (7.32 * S1**2) / N + + (7.32 * S2) / N + ) + return -(qg_nf1 * nf + qg_nf2 * nf**2) + + +@nb.njit(cache=True) +def gamma_gq(N, nf, sx): + r"""Compute the parametrized |NNLO| gluon-quark polarized anomalous dimension. + + Implement Eq. (4.11) of :cite:`Moch:2014sna`. + + Parameters + ---------- + n : complex + Mellin moment + nf : int + Number of active flavors + sx : np.ndarray + List of harmonic sums: :math:`S_{1},S_{2},S_{3},S_{4}` + + Returns + ------- + complex + |NNLO| gluon-quark anomalous dimension :math:`\\gamma_{gq}^{(2)}(N)` + + """ + S1, S2, S3, S4 = sx + B3 = (-(S1**3) - 3 * S1 * S2 - 2 * S3) / N + B4 = (S1**4 + 6 * S1**2 * S2 + 3 * S2**2 + 8 * S1 * S3 + 6 * S4) / N + E1 = S1 / N**2 + (-zeta2 + S2) / N + gq_nf0 = ( + 59.3 * B3 + + 5.143 * B4 + - 1424.8 * E1 + + 92096 / (27 * N**5) + - 5328.02 / N**4 + + 4280 / N**3 + - 4046.6 / N**2 + + 6159 / N + - 1050.6 / (1 + N) ** 4 + - 1701.4 / (1 + N) ** 3 + - 3825.9 / (1 + N) + + 1942.0 / (2 + N) + - 742.1 / (3 + N) + - (1843.7 * S1) / N + + (451.55 * S1**2) / N + + (451.55 * S2) / N + ) + gq_nf1 = ( + -4.963 * B3 + - 16.18 * E1 + - 1024 / (9 * N**5) + + 236.323 / N**4 + - 404.92 / N**3 + + 308.98 / N**2 + - 301.07 / N + + 180.138 / (1 + N) ** 4 + - 253.06 / (1 + N) ** 3 + - 296 / (1 + N) + + 406.13 / (2 + N) + - 101.62 / (3 + N) + + (171.78 * S1) / N + - (47.86 * S1**2) / N + - (47.86 * S2) / N + ) + gq_nf2 = ( + -(64 / (9 * N)) + - 32 / (9 * (1 + N) ** 3) + - 32 / (27 * (1 + N) ** 2) + + 160 / (27 * (1 + N)) + - (128 * S1) / (27 * N) + - (32 * S1) / (9 * (1 + N) ** 2) + - (32 * S1) / (27 * (1 + N)) + + (32 * S1**2) / (9 * N) + - (16 * S1**2) / (9 * (1 + N)) + + (32 * S2) / (9 * N) + - (16 * S2) / (9 * (1 + N)) + ) + return -(gq_nf0 + gq_nf1 * nf + gq_nf2 * nf**2) + + +@nb.njit(cache=True) +def gamma_ps(N, nf, sx): + r"""Compute the parametrized |NNLO| pure-singlet quark-quark polarized anomalous dimension. + + Implement Eq. (4.9) of :cite:`Moch:2014sna`. + + Parameters + ---------- + n : complex + Mellin moment + nf : int + Number of active flavors + sx : np.ndarray + List of harmonic sums: :math:`S_{1},S_{2},S_{3},S_{4}` + + Returns + ------- + complex + |NNLO| pure-singlet quark-quark anomalous dimension :math:`\\gamma_{ps}^{(2)}(N)` + + """ + S1, S2, S3, _ = sx + B3 = (-(S1**3) - 3 * S1 * S2 - 2 * S3) / N + B31 = ( + -((1 / (1 + N) + S1) ** 3) + - 3 * (1 / (1 + N) + S1) * (1 / (1 + N) ** 2 + S2) + - 2 * (1 / (1 + N) ** 3 + S3) + ) / (1 + N) + E1 = S1 / N**2 + (-zeta2 + S2) / N + E11 = (1 / (1 + N) + S1) / (1 + N) ** 2 + (1 / (1 + N) ** 2 - zeta2 + S2) / (1 + N) + ps_nf1 = ( + 1 + / 9 + * ( + -58.869 * B3 + + 58.869 * B31 + + 2093.13 * E1 + - 2093.13 * E11 + - 2752 / N**5 + + 4909.67 / N**4 + - 6634.8 / N**3 + + 6651.0 / N**2 + - 12263.4 / N + + 2752 / (1 + N) ** 5 + - 508.669 / (1 + N) ** 4 + + 13160.0 / (1 + N) ** 3 + - 8493.84 / (1 + N) ** 2 + + 26820.0 / (1 + N) + - 4401.0 / (2 + N) ** 4 + - 6298.2 / (2 + N) ** 3 + - 20629.8 / (2 + N) + + 7579.89 / (3 + N) + - 1506.69 / (4 + N) + + (1842.84 * S1) / N + + (226.98 * S1) / (1 + N) ** 2 + - (1842.84 * S1) / (1 + N) + - (113.49 * S1**2) / N + + (113.49 * S1**2) / (1 + N) + - (113.49 * S2) / N + + (113.49 * S2) / (1 + N) + ) + ) + ps_nf2 = ( + 1 + / 9 + * ( + -(63.4014 / N**4) + + 239.166 / N**3 + - 409.338 / N**2 + + 442.17 / N + + 107.968 / (1 + N) ** 4 + - 79.389 / (1 + N) ** 3 + + 494.991 / (1 + N) ** 2 + - 719.1 / (1 + N) + - 44.5662 / (2 + N) ** 4 + - 191.826 / (2 + N) ** 3 + + 238.167 / (2 + N) + + 34.1784 / (3 + N) + + 4.5846 / (4 + N) + - (85.653 * S1) / N + - (32.049 * S1) / (1 + N) ** 2 + + (85.653 * S1) / (1 + N) + + (16.0245 * S1**2) / N + - (16.0245 * S1**2) / (1 + N) + + (16.0245 * S2) / N + - (16.0245 * S2) / (1 + N) + ) + ) + return -(ps_nf1 * nf + ps_nf2 * nf**2) + + +@nb.njit(cache=True) +def gamma_nss(N, nf, sx): + r"""Compute the |NNLO| sea-like polarized non-singlet anomalous dimension. + + Implement Eq. (24) of :cite:`Moch:2015usa`. + + Parameters + ---------- + n : complex + Mellin moment + nf : int + Number of active flavors + sx : np.ndarray + List of harmonic sums: :math:`S_{1},S_{2},S_{3},S_{4}` + + Returns + ------- + complex + |NNLO| valence non-singlet anomalous dimension + :math:`\\gamma_{ns,s}^{(2)}(N)` + + """ + S1 = sx[0] + S3 = sx[2] + Sm1, Sm2, Sm3, _ = harmonics.smx(N, sx, False) + Sm21 = harmonics.Sm21(N, S1, Sm1, False) + nss_nf1 = ( + 40 + / 9 + * ( + 1 / N**2 + + ( + -(2 / N**2) + - 12 / (N**4 * (1 + N) ** 4) + - 42 / (N**3 * (1 + N) ** 3) + - 14 / (N**2 * (1 + N) ** 2) + + 8 / (N * (1 + N)) + ) + * S1 + + (4 / (N**2 * (1 + N) ** 2) + 6 / (N * (1 + N))) * S3 + + ( + -(4 / N**2) + + 8 / (N**3 * (1 + N) ** 3) + + 20 / (N**2 * (1 + N) ** 2) + + 8 / (N * (1 + N)) + ) + * Sm2 + + (32 * Sm21) / (N * (1 + N)) + + (8 / (N**2 * (1 + N) ** 2) - 20 / (N * (1 + N))) * Sm3 + + (-(16 / (N**2 * (1 + N) ** 2)) + 8 / (N * (1 + N))) + * (S1 * Sm2 - Sm21 + Sm3) + ) + ) + return -(nss_nf1 * nf) + + +@nb.njit(cache=True) +def gamma_nsv(N, nf, sx): + r"""Compute the |NNLO| valence polarized non-singlet anomalous dimension. + + Implement Eq. (23) of :cite:`Moch:2015usa`. + + Parameters + ---------- + n : complex + Mellin moment + nf : int + Number of active flavors + sx : list + harmonics cache + + Returns + ------- + complex + |NNLO| valence non-singlet anomalous dimension + :math:`\\gamma_{ns,v}^{(2)}(N)` + + """ + return gamma_nsm(N, nf, sx) + gamma_nss(N, nf, sx) + + +@nb.njit(cache=True) +def gamma_singlet(N, nf, sx): + r"""Compute the |NNLO| polarized singlet anomalous dimension matrix. + + .. math:: + \gamma_S^{(1)} = \left(\begin{array}{cc} + \gamma_{qq}^{(2)} & \gamma_{qg}^{(2)}\\ + \gamma_{gq}^{(2)} & \gamma_{gg}^{(2)} + \end{array}\right) + + Parameters + ---------- + n : complex + Mellin moment + nf : int + Number of active flavors + sx: list + harmonics cache + + Returns + ------- + numpy.ndarray + |NNLO| singlet anomalous dimension matrix :math:`\gamma_{S}^{(2)}(N)` + + """ + gamma_qq = gamma_nsp(N, nf, sx) + gamma_ps(N, nf, sx) + gamma_S_0 = np.array( + [[gamma_qq, gamma_qg(N, nf, sx)], [gamma_gq(N, nf, sx), gamma_gg(N, nf, sx)]], + np.complex_, + ) + return gamma_S_0 diff --git a/tests/eko/evolution_operator/test_init.py b/tests/eko/evolution_operator/test_init.py index a3c0f9e6f..ddda30d13 100644 --- a/tests/eko/evolution_operator/test_init.py +++ b/tests/eko/evolution_operator/test_init.py @@ -16,7 +16,7 @@ def test_quad_ker_errors(): - for p, t in [(True, False), (False, True), (True, True)]: + for p, t in [(False, True), (True, True)]: for mode0 in [br.non_singlet_pids_map["ns+"], 21]: with pytest.raises(NotImplementedError): quad_ker( @@ -53,69 +53,70 @@ def test_quad_ker(monkeypatch): monkeypatch.setattr(ns, "dispatcher", lambda *args: 1.0) monkeypatch.setattr(s, "dispatcher", lambda *args: np.identity(2)) for is_log in [True, False]: - res_ns = quad_ker( - u=0, - order=(1, 0), - mode0=br.non_singlet_pids_map["ns+"], - mode1=0, - method="", - is_log=is_log, - logx=0.0, - areas=np.zeros(3), - as1=1, - as0=2, - nf=3, - L=0, - ev_op_iterations=0, - ev_op_max_order=(0, 0), - sv_mode=1, - is_threshold=False, - is_polarized=False, - is_time_like=False, - ) - np.testing.assert_allclose(res_ns, 0.0) - res_s = quad_ker( - u=0, - order=(1, 0), - mode0=100, - mode1=100, - method="", - is_log=is_log, - logx=0.123, - areas=np.zeros(3), - as1=1, - as0=2, - nf=3, - L=0, - ev_op_iterations=0, - ev_op_max_order=(0, 0), - sv_mode=1, - is_threshold=False, - is_polarized=False, - is_time_like=False, - ) - np.testing.assert_allclose(res_s, 1.0) - res_s = quad_ker( - u=0, - order=(1, 0), - mode0=100, - mode1=21, - method="", - is_log=is_log, - logx=0.0, - areas=np.zeros(3), - as1=1, - as0=2, - nf=3, - L=0, - ev_op_iterations=0, - ev_op_max_order=(0, 0), - sv_mode=1, - is_threshold=False, - is_polarized=False, - is_time_like=False, - ) - np.testing.assert_allclose(res_s, 0.0) + for polarized in [True, False]: + res_ns = quad_ker( + u=0, + order=(1, 0), + mode0=br.non_singlet_pids_map["ns+"], + mode1=0, + method="", + is_log=is_log, + logx=0.1, + areas=[0.1, 0.2, 0.3], + as1=1, + as0=2, + nf=3, + L=0, + ev_op_iterations=0, + ev_op_max_order=(0, 0), + sv_mode=1, + is_threshold=False, + is_polarized=polarized, + is_time_like=False, + ) + np.testing.assert_allclose(res_ns, 1.0) + res_s = quad_ker( + u=0, + order=(1, 0), + mode0=100, + mode1=100, + method="", + is_log=is_log, + logx=0.123, + areas=np.zeros(3), + as1=1, + as0=2, + nf=3, + L=0, + ev_op_iterations=0, + ev_op_max_order=(0, 0), + sv_mode=1, + is_threshold=False, + is_polarized=polarized, + is_time_like=False, + ) + np.testing.assert_allclose(res_s, 1.0) + res_s = quad_ker( + u=0, + order=(1, 0), + mode0=100, + mode1=21, + method="", + is_log=is_log, + logx=0.0, + areas=np.zeros(3), + as1=1, + as0=2, + nf=3, + L=0, + ev_op_iterations=0, + ev_op_max_order=(0, 0), + sv_mode=1, + is_threshold=False, + is_polarized=polarized, + is_time_like=False, + ) + np.testing.assert_allclose(res_s, 0.0) for label in [(br.non_singlet_pids_map["ns+"], 0), (100, 100)]: for sv in [2, 3]: res_sv = quad_ker( diff --git a/tests/eko/scale_variations/test_expanded.py b/tests/eko/scale_variations/test_expanded.py index 2a95edcb3..c0f6d4c2b 100644 --- a/tests/eko/scale_variations/test_expanded.py +++ b/tests/eko/scale_variations/test_expanded.py @@ -1,10 +1,10 @@ import numpy as np from eko import basis_rotation as br -from ekore.anomalous_dimensions.unpolarized.space_like import gamma_ns, gamma_singlet from eko.beta import beta_qcd_as2, beta_qcd_as3 from eko.kernels import non_singlet, singlet from eko.scale_variations import Modes, expanded, exponentiated +from ekore.anomalous_dimensions.unpolarized.space_like import gamma_ns, gamma_singlet def test_modes(): diff --git a/tests/ekore/anomalous_dimensions/polarized/space_like/test_ad_as1.py b/tests/ekore/anomalous_dimensions/polarized/space_like/test_ad_as1.py new file mode 100755 index 000000000..42fee408b --- /dev/null +++ b/tests/ekore/anomalous_dimensions/polarized/space_like/test_ad_as1.py @@ -0,0 +1,32 @@ +# Test LO Polarized splitting functions +import numpy as np + +import ekore.anomalous_dimensions.polarized.space_like.as1 as as1 +from eko import constants +from ekore import harmonics + +NF = 5 + + +def test_quark_momentum(): + # quark momentum + N = complex(2.0, 0.0) + s1 = harmonics.S1(N) + np.testing.assert_almost_equal( + as1.gamma_ns(N, s1) + as1.gamma_gq(N), + (4 * constants.CF) / 3, + ) + + +def test_gluon_momentum(): + # gluon momentum + N = complex(2.0, 0.0) + s1 = harmonics.S1(N) + np.testing.assert_almost_equal( + as1.gamma_qg(N, NF) + as1.gamma_gg(N, s1, NF), 3 + NF / 3 + ) + + +def test_qg_helicity_conservation(): + N = complex(1.0, 0.0) + np.testing.assert_almost_equal(as1.gamma_qg(N, NF), 0) diff --git a/tests/ekore/anomalous_dimensions/polarized/space_like/test_ad_as2.py b/tests/ekore/anomalous_dimensions/polarized/space_like/test_ad_as2.py new file mode 100755 index 000000000..c26f2f6c5 --- /dev/null +++ b/tests/ekore/anomalous_dimensions/polarized/space_like/test_ad_as2.py @@ -0,0 +1,63 @@ +# Test NLO Polarized splitting functions +import numpy as np + +import ekore.anomalous_dimensions.polarized.space_like.as2 as as2 +from eko.constants import CA, CF, TR +from ekore import harmonics + +nf = 5 + + +def test_qg_helicity_conservation(): + N = complex(1.0, 0.0) + sx = harmonics.sx(N, max_weight=4) + np.testing.assert_almost_equal(as2.gamma_qg(N, nf, sx), 0) + + +def test_qq_momentum(): + N = complex(1.0, 0.0) + sx = harmonics.sx(N, max_weight=2) + np.testing.assert_almost_equal( + as2.gamma_singlet(N, nf, sx)[0, 0], 12 * TR * nf * CF, decimal=5 + ) + + +def test_ps_momentum(): + N = complex(2.0, 0.0) + np.testing.assert_allclose(-as2.gamma_ps(N, nf), -4.0 * TR * nf * CF * 13 / 27) + + +def test_qg_momentum(): + N = complex(2.0, 0.0) + sx = harmonics.sx(N, 2) + np.testing.assert_allclose( + -as2.gamma_qg(N, nf, sx), + 4 + * nf + * (0.574074 * CF - 2 * CA * (-7 / 18 + 1 / 6 * (5 - np.pi**2 / 3))) + * TR, + ) + + +def test_gq_momentum(): + N = complex(2.0, 0.0) + sx = harmonics.sx(N, 2) + np.testing.assert_allclose( + -as2.gamma_gq(N, nf, sx), + 4 + * ( + -2.074074074074074 * CF**2 + + CA * CF * (29 / 54 - 2 / 3 * (1 / 2 - np.pi**2 / 3)) + + (4 * CF * nf * TR) / 27 + ), + ) + + +def test_gg_momentum(): + N = complex(2.0, 0.0) + sx = harmonics.sx(N, 2) + np.testing.assert_almost_equal( + -as2.gamma_gg(N, nf, sx), + 4 + * (-1.7537256813471833 * CA**2 + ((29 * CA) / 27 - (28 * CF) / 27) * nf * TR), + ) diff --git a/tests/ekore/anomalous_dimensions/polarized/space_like/test_ad_as3.py b/tests/ekore/anomalous_dimensions/polarized/space_like/test_ad_as3.py new file mode 100755 index 000000000..1b21097c6 --- /dev/null +++ b/tests/ekore/anomalous_dimensions/polarized/space_like/test_ad_as3.py @@ -0,0 +1,47 @@ +# Test NNLO Polarized splitting functions +import numpy as np + +import ekore.anomalous_dimensions.polarized.space_like.as3 as as3 +import ekore.anomalous_dimensions.unpolarized.space_like.as3 as as3_unpol +from ekore import harmonics + +nf = 5 + + +def test_gluon_momentum(): + # gluon momentum + N = complex(2.0, 0.0) + sx = harmonics.sx(N, max_weight=4) + np.testing.assert_allclose( + as3.gamma_qg(N, nf, sx) + as3.gamma_gg(N, nf, sx), 9.26335, rtol=7e-4 + ) + + +def test_qg_helicity_conservation(): + N = complex(1.0, 0.0) + sx = harmonics.sx(N, max_weight=4) + np.testing.assert_almost_equal(as3.gamma_qg(N, nf, sx), 0.00294317) + + +def test_ns_sea(): + ref_moments = [ + -220 / 3, + -103175 / 34992, + -4653353 / 5467500, + -7063530941 / 17425497600, + -218695344199 / 911421315000, + ] + for i, mom in enumerate(ref_moments): + N = 1 + 2 * i + sx = harmonics.sx(N, max_weight=4) + np.testing.assert_allclose(-as3.gamma_nss(N, nf, sx), mom * nf, rtol=7e-7) + + +def test_ns(): + N = complex(3.45, 0.0) + sx = harmonics.sx(N, max_weight=4) + np.testing.assert_allclose( + as3.gamma_nsv(N, nf, sx), as3.gamma_nsm(N, nf, sx) + as3.gamma_nss(N, nf, sx) + ) + np.testing.assert_allclose(as3_unpol.gamma_nsm(N, nf, sx), as3.gamma_nsp(N, nf, sx)) + np.testing.assert_allclose(as3_unpol.gamma_nsp(N, nf, sx), as3.gamma_nsm(N, nf, sx)) diff --git a/tests/ekore/anomalous_dimensions/polarized/space_like/test_init.py b/tests/ekore/anomalous_dimensions/polarized/space_like/test_init.py index 3cb137b13..98e753c05 100644 --- a/tests/ekore/anomalous_dimensions/polarized/space_like/test_init.py +++ b/tests/ekore/anomalous_dimensions/polarized/space_like/test_init.py @@ -1,10 +1,51 @@ +import numpy as np import pytest +from numpy.testing import assert_allclose, assert_almost_equal import ekore.anomalous_dimensions.polarized.space_like as ad_ps +from eko import basis_rotation as br +from ekore import harmonics -def test_init(): +def test_shapes(): + for k in range(1, 3 + 1): + assert ad_ps.gamma_ns((k, 0), 10101, 2.0, 4).shape == (k,) + assert ad_ps.gamma_singlet((k, 0), 2.0, 4).shape == (k, 2, 2) + + +def test_gamma_ns(): + nf = 3 + # LO + assert_almost_equal( + ad_ps.gamma_ns((3, 0), br.non_singlet_pids_map["ns+"], 1, nf)[0], 0.0 + ) + # NLO + assert_allclose( + ad_ps.gamma_ns((2, 0), br.non_singlet_pids_map["ns+"], 1, nf), + np.zeros(2), + atol=2e-6, + ) + # NNLO + assert_allclose( + ad_ps.gamma_ns((3, 0), br.non_singlet_pids_map["ns+"], 1, nf), + np.zeros(3), + atol=2e-4, + ) + assert not np.array_equal( + ad_ps.gamma_ns((3, 0), br.non_singlet_pids_map["nsV"], 1, nf), np.zeros(3) + ) + + +def test_not_implemeted(monkeypatch): + with pytest.raises(NotImplementedError): + ad_ps.gamma_ns((4, 0), br.non_singlet_pids_map["ns-"], 1.234, 4) with pytest.raises(NotImplementedError): - ad_ps.gamma_ns((1, 0), 0, 1.0, 4) + ad_ps.gamma_ns((2, 0), 10202, 1.234, 4) + N = 2.345 + monkeypatch.setattr( + ad_ps, + "compute_cache", + lambda *args: harmonics.sx(N, 4), + ) with pytest.raises(NotImplementedError): - ad_ps.gamma_singlet((1, 0), 1.0, 4) + ad_ps.gamma_singlet((4, 0), N, 4)