From 638240caf9568c953f554c2ef442ad6570b5fd7b Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Wed, 18 Sep 2024 12:04:14 +0200 Subject: [PATCH 01/16] initialize pre-commit hooks --- .github/workflows/release.yml | 12 +++--- .pre-commit-config.yaml | 33 ++++++++++++++++ examples/cpp/advanced-filling.cpp | 1 - examples/cpp/merge-grids.cpp | 1 - examples/cpp/modify-grid.cpp | 1 - examples/fortran/lhapdf_example.f90 | 10 ++--- examples/fortran/pineappl.f90 | 20 +++++----- examples/fortran/test.f90 | 8 ++-- examples/python/dyaa.py | 3 +- examples/python/positivity.py | 2 +- pineappl_cli/tests/analyze.rs | 8 ++-- pineappl_cli/tests/channels.rs | 24 ++++++------ pineappl_cli/tests/convolve.rs | 44 +++++++++++----------- pineappl_cli/tests/diff.rs | 8 ++-- pineappl_cli/tests/evolve.rs | 4 +- pineappl_cli/tests/import.rs | 8 ++-- pineappl_cli/tests/merge.rs | 4 +- pineappl_cli/tests/orders.rs | 14 +++---- pineappl_cli/tests/pull.rs | 16 ++++---- pineappl_cli/tests/read.rs | 52 +++++++++++++------------- pineappl_cli/tests/uncert.rs | 30 +++++++-------- pineappl_cli/tests/write.rs | 58 ++++++++++++++--------------- pineappl_py/docs/source/conf.py | 30 +++++++-------- pineappl_py/tests/test_fk_table.py | 4 +- ruff.toml | 5 +++ 25 files changed, 217 insertions(+), 183 deletions(-) create mode 100644 .pre-commit-config.yaml create mode 100644 ruff.toml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3af3e2884..b61f71dbd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -244,17 +244,17 @@ jobs: --- src/combine.cxx 2024-04-23 16:35:27.000000000 +0200 +++ src/combine.cxx.new 2024-07-06 12:29:12.813303074 +0200 @@ -56,12 +56,6 @@ - } - - - -double integral( appl::TH1D* h ) { + } + + + -double integral( appl::TH1D* h ) { - double d = 0; - for ( int i=0 ; iGetNbinsX() ; i++ ) d += h->GetBinContent(i+1); - return d; -} - - - void print( appl::TH1D* h ) { + + void print( appl::TH1D* h ) { for ( int i=1 ; i<=h->GetNbinsX() ; i++ ) std::cout << h->GetBinContent(i) << " "; EOF # compile static libraries with PIC to make statically linking PineAPPL's CLI work diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..616cdab34 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,33 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +ci: + autofix_prs: false + skip: [fmt] +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-merge-conflict + - repo: https://github.com/astral-sh/ruff-pre-commit + # A fast Python linter and code formatter. See + # https://docs.astral.sh/ruff/ for more details. + rev: v0.6.5 + hooks: + - id: ruff + args: [--fix] + - id: ruff-format + - repo: local + hooks: + - id: fmt + name: cargo fmt + description: Format Rust files with cargo fmt. + entry: cargo fmt -- + language: system + files: ^crates/.*\.rs$ + args: [] + - repo: https://github.com/pre-commit/pre-commit + rev: v3.8.0 + hooks: + - id: validate_manifest diff --git a/examples/cpp/advanced-filling.cpp b/examples/cpp/advanced-filling.cpp index 126056cd5..c83e9e78b 100644 --- a/examples/cpp/advanced-filling.cpp +++ b/examples/cpp/advanced-filling.cpp @@ -66,4 +66,3 @@ int main() { // release memory pineappl_grid_delete(grid); } - diff --git a/examples/cpp/merge-grids.cpp b/examples/cpp/merge-grids.cpp index 3db2946aa..263e27f21 100644 --- a/examples/cpp/merge-grids.cpp +++ b/examples/cpp/merge-grids.cpp @@ -41,4 +41,3 @@ int main(int argc, char* argv[]) { pineappl_grid_delete(clone); pineappl_grid_delete(grid1); } - diff --git a/examples/cpp/modify-grid.cpp b/examples/cpp/modify-grid.cpp index 19a4baf6d..950407868 100644 --- a/examples/cpp/modify-grid.cpp +++ b/examples/cpp/modify-grid.cpp @@ -82,4 +82,3 @@ int main(int argc, char* argv[]) { // release memory pineappl_grid_delete(grid); } - diff --git a/examples/fortran/lhapdf_example.f90 b/examples/fortran/lhapdf_example.f90 index 9f835f820..969fcc487 100644 --- a/examples/fortran/lhapdf_example.f90 +++ b/examples/fortran/lhapdf_example.f90 @@ -26,7 +26,7 @@ program lhapdf_example call lhapdf_initpdfset_byname(0, "nCTEQ15_1_1") call lhapdf_initpdfset_byname(1, "nCTEQ15FullNuc_208_82") - + ! calling pineappl_grid_convolve without any flags xfx => xfx_test1 alphas => alphas_test1 @@ -48,7 +48,7 @@ function xfx_test1(pdg_id, x, q2, state) bind(c) use iso_c_binding implicit none - + integer(c_int32_t), value, intent(in) :: pdg_id real(c_double), value, intent(in) :: x, q2 type(c_ptr), value, intent(in) :: state @@ -61,7 +61,7 @@ function xfx_test2(pdg_id, x, q2, state) bind(c) use iso_c_binding implicit none - + integer(c_int32_t), value, intent(in) :: pdg_id real(c_double), value, intent(in) :: x, q2 type(c_ptr), value, intent(in) :: state @@ -78,7 +78,7 @@ function alphas_test1(q2, state) bind(c) use iso_c_binding implicit none - + real(c_double), value, intent(in) :: q2 type(c_ptr), value, intent(in) :: state real(c_double) :: alphas_test1 @@ -90,7 +90,7 @@ function alphas_test2(q2, state) bind(c) use iso_c_binding implicit none - + real(c_double), value, intent(in) :: q2 type(c_ptr), value, intent(in) :: state real(c_double) :: alphas_test2 diff --git a/examples/fortran/pineappl.f90 b/examples/fortran/pineappl.f90 index 3dbd63da5..470ec23c3 100644 --- a/examples/fortran/pineappl.f90 +++ b/examples/fortran/pineappl.f90 @@ -33,7 +33,7 @@ function pineappl_alphas(q2, state) bind(c) use iso_c_binding implicit none - + real(c_double), value, intent(in) :: q2 type (c_ptr), value, intent(in) :: state real(c_double) :: pineappl_alphas @@ -353,7 +353,7 @@ subroutine string_delete(string) bind(c, name = 'pineappl_string_delete') ! https://stackoverflow.com/a/20121335 and https://community.intel.com/t5/Intel-Fortran-Compiler/Converting-c-string-to-Fortran-string/m-p/959515 function c_f_string(c_str) result(f_str) use :: iso_c_binding - + type(c_ptr), intent(in) :: c_str character(kind=c_char), dimension(:), pointer :: arr_f_ptr => null() character(len=:, kind=c_char), allocatable :: f_str @@ -361,7 +361,7 @@ function c_f_string(c_str) result(f_str) length = strlen(c_str) call c_f_pointer(c_str, arr_f_ptr, [length]) - + if (.not.associated(arr_f_ptr)) then f_str = "NULL" return @@ -378,7 +378,7 @@ integer function pineappl_grid_bin_count(grid) implicit none type (pineappl_grid), intent(in) :: grid - + pineappl_grid_bin_count = grid_bin_count(grid%ptr) end function @@ -386,7 +386,7 @@ integer function pineappl_grid_bin_dimensions(grid) implicit none type (pineappl_grid), intent(in) :: grid - + pineappl_grid_bin_dimensions = grid_bin_dimensions(grid%ptr) end function @@ -439,9 +439,9 @@ type (pineappl_grid) function pineappl_grid_clone(grid) function pineappl_grid_convolve_with_one(grid, pdg_id, xfx, alphas, order_mask, lumi_mask, xi_ren, xi_fac, state) result(res) use iso_c_binding - + implicit none - + type (pineappl_grid), intent(in) :: grid integer, intent(in) :: pdg_id ! no pointer attribute here, see https://community.intel.com/t5/Intel-Fortran-Compiler/Segfault-when-passing-procedure-pointer-to-function-but-not-when/m-p/939797 @@ -478,9 +478,9 @@ function pineappl_grid_convolve_with_one(grid, pdg_id, xfx, alphas, order_mask, function pineappl_grid_convolve_with_two(grid, pdg_id1, xfx1, pdg_id2, xfx2, alphas, & order_mask, lumi_mask, xi_ren, xi_fac, state) result(res) use iso_c_binding - + implicit none - + type (pineappl_grid), intent(in) :: grid integer, intent(in) :: pdg_id1, pdg_id2 procedure (pineappl_xfx) :: xfx1, xfx2 @@ -570,7 +570,7 @@ function pineappl_grid_key_value(grid, key) result(res) type (pineappl_grid), intent(in) :: grid character (*), intent(in) :: key character (:), allocatable :: res - + res = c_f_string(grid_key_value(grid%ptr, key // c_null_char)) end function diff --git a/examples/fortran/test.f90 b/examples/fortran/test.f90 index 95ed75032..be7ad1426 100644 --- a/examples/fortran/test.f90 +++ b/examples/fortran/test.f90 @@ -1,7 +1,7 @@ program test_pineappl use pineappl use iso_c_binding - + implicit none integer, parameter :: dp = kind(0.0d0) @@ -164,7 +164,7 @@ function xfx1_test(pdg_id, x, q2, state) bind(c) use iso_c_binding implicit none - + integer(c_int32_t), value, intent(in) :: pdg_id real(c_double), value, intent(in) :: x, q2 type(c_ptr), value, intent(in) :: state @@ -177,7 +177,7 @@ function xfx2_test(pdg_id, x, q2, state) bind(c) use iso_c_binding implicit none - + integer(c_int32_t), value, intent(in) :: pdg_id real(c_double), value, intent(in) :: x, q2 type(c_ptr), value, intent(in) :: state @@ -190,7 +190,7 @@ function alphas_test(q2, state) bind(c) use iso_c_binding implicit none - + real(c_double), value, intent(in) :: q2 type(c_ptr), value, intent(in) :: state real(c_double) :: alphas_test diff --git a/examples/python/dyaa.py b/examples/python/dyaa.py index a9620b57c..0dc1312ef 100755 --- a/examples/python/dyaa.py +++ b/examples/python/dyaa.py @@ -4,6 +4,7 @@ import numpy as np import pineappl + def int_photo(s, t, u): """ Photon-photon matrix element. @@ -157,7 +158,7 @@ def main(calls, pdfname, filename): import lhapdf # pylint: disable=import-outside-toplevel pdf = lhapdf.mkPDF(pdfname, 0) - pdg_id = int(pdf.set().get_entry('Particle')) + pdg_id = int(pdf.set().get_entry("Particle")) # perform convolution dxsec = grid.convolve_with_one(pdg_id, pdf.xfxQ2, pdf.alphasQ2) for i in range(len(dxsec)): diff --git a/examples/python/positivity.py b/examples/python/positivity.py index 426a3600a..316a146d2 100755 --- a/examples/python/positivity.py +++ b/examples/python/positivity.py @@ -55,4 +55,4 @@ def main(filename, Q2): if __name__ == "__main__": - main("charm-positivity.pineappl", 1.5 ** 2) + main("charm-positivity.pineappl", 1.5**2) diff --git a/pineappl_cli/tests/analyze.rs b/pineappl_cli/tests/analyze.rs index 2b2f71fa9..5c6da48da 100644 --- a/pineappl_cli/tests/analyze.rs +++ b/pineappl_cli/tests/analyze.rs @@ -27,8 +27,8 @@ Options: -h, --help Print help "; -const CKF_STR: &str = "b etal bin-K c K c K c K c K c K - [] +const CKF_STR: &str = "b etal bin-K c K c K c K c K c K + [] -+----+----+-----+-+----+-+----+-+----+-+----+-+---- 0 2 2.25 1.17 0 1.30 3 -inf 1 -inf 2 0.00 4 0.00 1 2.25 2.5 1.17 0 1.31 3 -inf 1 -inf 2 0.00 4 0.00 @@ -42,8 +42,8 @@ const CKF_STR: &str = "b etal bin-K c K c K c K c K c K // TODO: understand these factors const CKF_WITH_DEFAULT_DENOMINATOR_STR: &str = - "b etal bin-K c K c K c K c K c K - [] + "b etal bin-K c K c K c K c K c K + [] -+----+----+------+-+------+-+----+-+----+-+----+-+---- 0 2 2.25 -13.20 0 -23.29 3 -inf 1 -inf 4 1.00 2 1.00 1 2.25 2.5 -14.37 0 -26.28 3 -inf 1 -inf 4 1.00 2 1.00 diff --git a/pineappl_cli/tests/channels.rs b/pineappl_cli/tests/channels.rs index a7556af1a..535884906 100644 --- a/pineappl_cli/tests/channels.rs +++ b/pineappl_cli/tests/channels.rs @@ -21,7 +21,7 @@ Options: "; const DEFAULT_STR: &str = "b etal c size c size c size c size c size - [] [%] [%] [%] [%] [%] + [] [%] [%] [%] [%] [%] -+----+----+-+------+-+------+-+-----+-+----+-+---- 0 2 2.25 0 111.32 3 -8.05 1 -3.31 4 0.02 2 0.01 1 2.25 2.5 0 112.20 3 -8.85 1 -3.38 4 0.02 2 0.01 @@ -34,8 +34,8 @@ const DEFAULT_STR: &str = "b etal c size c size c size c size c size "; const ABSOLUTE_STR: &str = - "b etal c dsig/detal c dsig/detal c dsig/detal c dsig/detal c dsig/detal - [] [pb] [pb] [pb] [pb] [pb] + "b etal c dsig/detal c dsig/detal c dsig/detal c dsig/detal c dsig/detal + [] [pb] [pb] [pb] [pb] [pb] -+----+----+-+-----------+-+------------+-+------------+-+------------+-+------------ 0 2 2.25 0 8.4002759e2 3 -6.0727462e1 1 -2.4969360e1 4 1.7176328e-1 2 8.8565923e-2 1 2.25 2.5 0 7.7448295e2 3 -6.1109036e1 1 -2.3319483e1 4 1.4518685e-1 2 8.3802762e-2 @@ -48,8 +48,8 @@ const ABSOLUTE_STR: &str = "; const ABSOLUTE_INTEGRATED_STR: &str = - "b etal c integ c integ c integ c integ c integ - [] [] [] [] [] [] + "b etal c integ c integ c integ c integ c integ + [] [] [] [] [] [] -+----+----+-+-----------+-+------------+-+------------+-+------------+-+------------ 0 2 2.25 0 2.1000690e2 3 -1.5181865e1 1 -6.2423401e0 4 4.2940819e-2 2 2.2141481e-2 1 2.25 2.5 0 1.9362074e2 3 -1.5277259e1 1 -5.8298709e0 4 3.6296712e-2 2 2.0950691e-2 @@ -61,8 +61,8 @@ const ABSOLUTE_INTEGRATED_STR: &str = 7 4 4.5 0 1.5943129e1 3 -1.1843361e0 1 -1.0028343e0 4 1.7077102e-3 2 9.6673424e-4 "; -const LIMIT_3_STR: &str = "b etal c size c size c size - [] [%] [%] [%] +const LIMIT_3_STR: &str = "b etal c size c size c size + [] [%] [%] [%] -+----+----+-+------+-+------+-+----- 0 2 2.25 0 111.32 3 -8.05 1 -3.31 1 2.25 2.5 0 112.20 3 -8.85 1 -3.38 @@ -80,7 +80,7 @@ For more information, try '--help'. "; const LUMIS_0123_STR: &str = "b etal c size c size c size c size - [] [%] [%] [%] [%] + [] [%] [%] [%] [%] -+----+----+-+------+-+------+-+-----+-+---- 0 2 2.25 0 111.32 3 -8.05 1 -3.31 2 0.01 1 2.25 2.5 0 112.20 3 -8.85 1 -3.38 2 0.01 @@ -93,7 +93,7 @@ const LUMIS_0123_STR: &str = "b etal c size c size c size c size "; const ORDERS_A2_AS1A2_STR: &str = "b etal c size c size c size c size c size - [] [%] [%] [%] [%] [%] + [] [%] [%] [%] [%] [%] -+----+----+-+------+-+------+-+-----+-+----+-+---- 0 2 2.25 0 111.24 3 -7.96 1 -3.27 2 0.00 4 0.00 1 2.25 2.5 0 112.12 3 -8.77 1 -3.35 2 0.00 4 0.00 @@ -106,8 +106,8 @@ const ORDERS_A2_AS1A2_STR: &str = "b etal c size c size c size c size "; const DONT_SORT_ABSOLUTE_STR: &str = - "b etal c dsig/detal c dsig/detal c dsig/detal c dsig/detal c dsig/detal - [] [pb] [pb] [pb] [pb] [pb] + "b etal c dsig/detal c dsig/detal c dsig/detal c dsig/detal c dsig/detal + [] [pb] [pb] [pb] [pb] [pb] -+----+----+-+-----------+-+------------+-+------------+-+------------+-+------------ 0 2 2.25 0 8.4002759e2 1 -2.4969360e1 2 8.8565923e-2 3 -6.0727462e1 4 1.7176328e-1 1 2.25 2.5 0 7.7448295e2 1 -2.3319483e1 2 8.3802762e-2 3 -6.1109036e1 4 1.4518685e-1 @@ -120,7 +120,7 @@ const DONT_SORT_ABSOLUTE_STR: &str = "; const DONT_SORT_STR: &str = "b etal c size c size c size c size c size - [] [%] [%] [%] [%] [%] + [] [%] [%] [%] [%] [%] -+----+----+-+------+-+-----+-+----+-+------+-+---- 0 2 2.25 0 111.32 1 -3.31 2 0.01 3 -8.05 4 0.02 1 2.25 2.5 0 112.20 1 -3.38 2 0.01 3 -8.85 4 0.02 diff --git a/pineappl_cli/tests/convolve.rs b/pineappl_cli/tests/convolve.rs index dbf0d107b..0adb3144a 100644 --- a/pineappl_cli/tests/convolve.rs +++ b/pineappl_cli/tests/convolve.rs @@ -18,8 +18,8 @@ Options: -h, --help Print help "; -const DEFAULT_STR: &str = "b etal dsig/detal - [] [pb] +const DEFAULT_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 7.5459110e2 1 2.25 2.5 6.9028342e2 @@ -37,8 +37,8 @@ const USE_ALPHAS_FROM_ERROR_STR: &str = "expected `use_alphas_from` to be `0` or const THREE_PDF_ERROR_STR: &str = "convolutions with 3 convolution functions is not supported "; -const FORCE_POSITIVE_STR: &str = "b etal dsig/detal - [] [pb] +const FORCE_POSITIVE_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 7.5461571e2 1 2.25 2.5 6.9032107e2 @@ -50,8 +50,8 @@ const FORCE_POSITIVE_STR: &str = "b etal dsig/detal 7 4 4.5 2.8422453e1 "; -const DEFAULT_MULTIPLE_PDFS_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed - [] [pb] [pb] [%] +const DEFAULT_MULTIPLE_PDFS_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed + [] [pb] [pb] [%] -+----+----+-----------+-------------+------------- 0 2 2.25 7.5459110e2 7.5459110e2 0.00 1 2.25 2.5 6.9028342e2 6.9028342e2 0.00 @@ -64,8 +64,8 @@ const DEFAULT_MULTIPLE_PDFS_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_ "; const MULTIPLE_PDFS_WITH_NEW_CONSTRUCTION_STR: &str = - "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed/1 - [] [pb] [pb] [%] + "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed/1 + [] [pb] [pb] [%] -+----+----+-----------+--------------+-------------- 0 2 2.25 7.5459110e2 7.5169067e2 -0.38 1 2.25 2.5 6.9028342e2 6.8612437e2 -0.60 @@ -77,8 +77,8 @@ const MULTIPLE_PDFS_WITH_NEW_CONSTRUCTION_STR: &str = 7 4 4.5 2.7517266e1 2.7259743e1 -0.94 "; -const MULTIPLE_PDFS_WITH_RELABELING_STR: &str = "b etal dsig/detal other mc=1.4 - [] [pb] [pb] [%] +const MULTIPLE_PDFS_WITH_RELABELING_STR: &str = "b etal dsig/detal other mc=1.4 + [] [pb] [pb] [%] -+----+----+-----------+-----------+------ 0 2 2.25 7.5459110e2 7.5169067e2 -0.38 1 2.25 2.5 6.9028342e2 6.8612437e2 -0.60 @@ -90,8 +90,8 @@ const MULTIPLE_PDFS_WITH_RELABELING_STR: &str = "b etal dsig/detal othe 7 4 4.5 2.7517266e1 2.7259743e1 -0.94 "; -const TWO_PDFS_WITH_ORDER_SUBSET_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed/1 - [] [pb] [pb] [%] +const TWO_PDFS_WITH_ORDER_SUBSET_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed/1 + [] [pb] [pb] [%] -+----+----+-----------+--------------+-------------- 0 2 2.25 6.5070305e2 6.4903968e2 -0.26 1 2.25 2.5 5.9601236e2 5.9329838e2 -0.46 @@ -104,8 +104,8 @@ const TWO_PDFS_WITH_ORDER_SUBSET_STR: &str = "b etal dsig/detal NNPDF31_nl "; const THREE_PDFS_STR: &str = - "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed/1 NNPDF31_nlo_as_0118_luxqed/2 - [] [pb] [pb] [%] [pb] [%] + "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed/1 NNPDF31_nlo_as_0118_luxqed/2 + [] [pb] [pb] [%] [pb] [%] -+----+----+-----------+--------------+--------------+--------------+-------------- 0 2 2.25 7.5459110e2 7.5169067e2 -0.38 7.5748758e2 0.38 1 2.25 2.5 6.9028342e2 6.8612437e2 -0.60 6.9177921e2 0.22 @@ -117,8 +117,8 @@ const THREE_PDFS_STR: &str = 7 4 4.5 2.7517266e1 2.7259743e1 -0.94 2.8446007e1 3.38 "; -const BINS_13567_STR: &str = "b etal dsig/detal - [] [pb] +const BINS_13567_STR: &str = "b etal dsig/detal + [] [pb] -+----+---+----------- 1 2.25 2.5 6.9028342e2 3 2.75 3 4.8552235e2 @@ -127,8 +127,8 @@ const BINS_13567_STR: &str = "b etal dsig/detal 7 4 4.5 2.7517266e1 "; -const INTEGRATED_STR: &str = "b etal integ - [] [] +const INTEGRATED_STR: &str = "b etal integ + [] [] -+----+----+----------- 0 2 2.25 1.8864777e2 1 2.25 2.5 1.7257086e2 @@ -140,8 +140,8 @@ const INTEGRATED_STR: &str = "b etal integ 7 4 4.5 1.3758633e1 "; -const INTEGRATED_MULTIPLE_PDFS_STR: &str = "b etal integ NNPDF31_nlo_as_0118_luxqed - [] [] [] [%] +const INTEGRATED_MULTIPLE_PDFS_STR: &str = "b etal integ NNPDF31_nlo_as_0118_luxqed + [] [] [] [%] -+----+----+-----------+-------------+------------- 0 2 2.25 1.8864777e2 1.8864777e2 0.00 1 2.25 2.5 1.7257086e2 1.7257086e2 0.00 @@ -153,8 +153,8 @@ const INTEGRATED_MULTIPLE_PDFS_STR: &str = "b etal integ NNPDF31_nlo_ 7 4 4.5 1.3758633e1 1.3758633e1 0.00 "; -const ORDERS_A2_A3_STR: &str = "b etal dsig/detal - [] [pb] +const ORDERS_A2_A3_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 6.4283381e2 1 2.25 2.5 5.8945001e2 diff --git a/pineappl_cli/tests/diff.rs b/pineappl_cli/tests/diff.rs index 6b3c59abd..edba619bc 100644 --- a/pineappl_cli/tests/diff.rs +++ b/pineappl_cli/tests/diff.rs @@ -23,7 +23,7 @@ Options: -h, --help Print help "; -const ORDERS1_A2_ORDERS2_A2_STR: &str = "b x1 O(as^0 a^2) +const ORDERS1_A2_ORDERS2_A2_STR: &str = "b x1 O(as^0 a^2) -+----+----+-----------+-----------+------- 0 2 2.25 6.5070305e2 6.5070305e2 0.000e0 1 2.25 2.5 5.9601236e2 5.9601236e2 0.000e0 @@ -36,7 +36,7 @@ const ORDERS1_A2_ORDERS2_A2_STR: &str = "b x1 O(as^0 a^2) "; const ORDERS1_A2_A2AS1_ORDERS2_A2_A2AS1_STR: &str = - "b x1 O(as^0 a^2) O(as^1 a^2) + "b x1 O(as^0 a^2) O(as^1 a^2) -+----+----+-----------+-----------+-------+-----------+-----------+------- 0 2 2.25 6.5070305e2 6.5070305e2 0.000e0 1.1175729e2 1.1175729e2 0.000e0 1 2.25 2.5 5.9601236e2 5.9601236e2 0.000e0 1.0083341e2 1.0083341e2 0.000e0 @@ -48,7 +48,7 @@ const ORDERS1_A2_A2AS1_ORDERS2_A2_A2AS1_STR: &str = 7 4 4.5 2.2383492e1 2.2383492e1 0.000e0 5.3540011e0 5.3540011e0 0.000e0 "; -const ORDERS1_A2_A2AS1_IGNORE_ORDERS_STR: &str = "b x1 diff +const ORDERS1_A2_A2AS1_IGNORE_ORDERS_STR: &str = "b x1 diff -+----+----+-----------+-----------+--------- 0 2 2.25 7.6246034e2 7.5459110e2 -1.032e-2 1 2.25 2.5 6.9684577e2 6.9028342e2 -9.417e-3 @@ -60,7 +60,7 @@ const ORDERS1_A2_A2AS1_IGNORE_ORDERS_STR: &str = "b x1 diff 7 4 4.5 2.7737493e1 2.7517266e1 -7.940e-3 "; -const SCALE2_2_STR: &str = "b x1 O(as^0 a^2) O(as^0 a^3) O(as^1 a^2) +const SCALE2_2_STR: &str = "b x1 O(as^0 a^2) O(as^0 a^3) O(as^1 a^2) -+----+----+-----------+-----------+-------+-------------+-------------+-------+-----------+-----------+------- 0 2 2.25 6.5070305e2 1.3014061e3 1.000e0 -7.8692484e0 -1.5738497e1 1.000e0 1.1175729e2 2.2351458e2 1.000e0 1 2.25 2.5 5.9601236e2 1.1920247e3 1.000e0 -6.5623495e0 -1.3124699e1 1.000e0 1.0083341e2 2.0166682e2 1.000e0 diff --git a/pineappl_cli/tests/evolve.rs b/pineappl_cli/tests/evolve.rs index c6e02d904..fa25760a0 100644 --- a/pineappl_cli/tests/evolve.rs +++ b/pineappl_cli/tests/evolve.rs @@ -105,8 +105,8 @@ const LHCB_WP_7TEV_V2_XIF_2_STR: &str = const LHCB_WP_7TEV_V2_XIF_2_ERROR_STR: &str = "Error: failed to evolve grid: no operator for muf2 = 25825.775616000003 found in [6456.443904000001] "; -const LHCB_WP_7TEV_OPTIMIZED_STR: &str = "b etal dsig/detal - [] [pb] +const LHCB_WP_7TEV_OPTIMIZED_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 7.8731123e2 1 2.25 2.5 7.1853181e2 diff --git a/pineappl_cli/tests/import.rs b/pineappl_cli/tests/import.rs index fca7b9e10..ad24e8e85 100644 --- a/pineappl_cli/tests/import.rs +++ b/pineappl_cli/tests/import.rs @@ -203,8 +203,8 @@ const IMPORT_FLEX_GRID_15_STR: &str = "b PineAPPL fastNLO rel. diff "; #[cfg(feature = "fktable")] -const IMPORT_DIS_FKTABLE_STR: &str = "b x1 diff - [] [] +const IMPORT_DIS_FKTABLE_STR: &str = "b x1 diff + [] [] --+--+--+------------- 0 0 1 1.8900584e0 1 1 2 1.4830883e0 @@ -229,8 +229,8 @@ const IMPORT_DIS_FKTABLE_STR: &str = "b x1 diff "; #[cfg(feature = "fktable")] -const IMPORT_HADRONIC_FKTABLE_STR: &str = "b x1 diff - [] [] +const IMPORT_HADRONIC_FKTABLE_STR: &str = "b x1 diff + [] [] -+-+-+----------- 0 0 1 7.7624461e2 "; diff --git a/pineappl_cli/tests/merge.rs b/pineappl_cli/tests/merge.rs index ae57dc5aa..fe06bed9e 100644 --- a/pineappl_cli/tests/merge.rs +++ b/pineappl_cli/tests/merge.rs @@ -13,8 +13,8 @@ Options: -h, --help Print help "; -const DEFAULT_STR: &str = "b etal dsig/detal - [] [pb] +const DEFAULT_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 1.5769498e3 1 2.25 2.5 1.4412311e3 diff --git a/pineappl_cli/tests/orders.rs b/pineappl_cli/tests/orders.rs index f63210640..32691dcc4 100644 --- a/pineappl_cli/tests/orders.rs +++ b/pineappl_cli/tests/orders.rs @@ -18,7 +18,7 @@ Options: "; const DEFAULT_STR: &str = "b etal dsig/detal O(as^0 a^2) O(as^1 a^2) O(as^0 a^3) - [] [pb] [%] [%] [%] + [] [pb] [%] [%] [%] -+----+----+-----------+-----------+-----------+----------- 0 2 2.25 7.5459110e2 100.00 17.17 -1.21 1 2.25 2.5 6.9028342e2 100.00 16.92 -1.10 @@ -30,8 +30,8 @@ const DEFAULT_STR: &str = "b etal dsig/detal O(as^0 a^2) O(as^1 a^2) O(as^ 7 4 4.5 2.7517266e1 100.00 23.92 -0.98 "; -const ABSOLUTE_STR: &str = "b etal dsig/detal O(as^0 a^2) O(as^1 a^2) O(as^0 a^3) - [] [pb] [pb] [pb] [pb] +const ABSOLUTE_STR: &str = "b etal dsig/detal O(as^0 a^2) O(as^1 a^2) O(as^0 a^3) + [] [pb] [pb] [pb] [pb] -+----+----+-----------+-----------+-----------+------------- 0 2 2.25 7.5459110e2 6.5070305e2 1.1175729e2 -7.8692484e0 1 2.25 2.5 6.9028342e2 5.9601236e2 1.0083341e2 -6.5623495e0 @@ -44,8 +44,8 @@ const ABSOLUTE_STR: &str = "b etal dsig/detal O(as^0 a^2) O(as^1 a^2) O(a "; const ABSOLUTE_INTEGRATED_STR: &str = - "b etal integ O(as^0 a^2) O(as^1 a^2) O(as^0 a^3) - [] [] [] [] [] + "b etal integ O(as^0 a^2) O(as^1 a^2) O(as^0 a^3) + [] [] [] [] [] -+----+----+-----------+-----------+-----------+------------- 0 2 2.25 1.8864777e2 1.6267576e2 2.7939322e1 -1.9673121e0 1 2.25 2.5 1.7257086e2 1.4900309e2 2.5208352e1 -1.6405874e0 @@ -58,7 +58,7 @@ const ABSOLUTE_INTEGRATED_STR: &str = "; const INTEGRATED_STR: &str = "b etal integ O(as^0 a^2) O(as^1 a^2) O(as^0 a^3) - [] [] [%] [%] [%] + [] [] [%] [%] [%] -+----+----+-----------+-----------+-----------+----------- 0 2 2.25 1.8864777e2 100.00 17.17 -1.21 1 2.25 2.5 1.7257086e2 100.00 16.92 -1.10 @@ -71,7 +71,7 @@ const INTEGRATED_STR: &str = "b etal integ O(as^0 a^2) O(as^1 a^2) O( "; const NORMALIZE_A2_AS1A2_STR: &str = "b etal dsig/detal O(as^0 a^2) O(as^1 a^2) O(as^0 a^3) - [] [pb] [%] [%] [%] + [] [pb] [%] [%] [%] -+----+----+-----------+-----------+-----------+----------- 0 2 2.25 7.5459110e2 85.34 14.66 -1.03 1 2.25 2.5 6.9028342e2 85.53 14.47 -0.94 diff --git a/pineappl_cli/tests/pull.rs b/pineappl_cli/tests/pull.rs index 6b6f6e86e..d2c0a4596 100644 --- a/pineappl_cli/tests/pull.rs +++ b/pineappl_cli/tests/pull.rs @@ -22,8 +22,8 @@ Options: "; // last two columns are zero because the PDFs don't have a photon -const DEFAULT_STR: &str = "b etal total c pull c pull c pull c pull c pull - [] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] +const DEFAULT_STR: &str = "b etal total c pull c pull c pull c pull c pull + [] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] -+----+----+-----+-+-----+-+-----+-+------+-+-----+-+----- 0 2 2.25 0.636 0 0.525 3 0.062 1 0.049 2 0.000 4 0.000 1 2.25 2.5 0.695 0 0.571 3 0.069 1 0.054 2 0.000 4 0.000 @@ -36,8 +36,8 @@ const DEFAULT_STR: &str = "b etal total c pull c pull c pull c pull c "; // last two columns are zero because the PDFs don't have a photon -const CL_90_STR: &str = "b etal total c pull c pull c pull c pull c pull - [] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] +const CL_90_STR: &str = "b etal total c pull c pull c pull c pull c pull + [] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] -+----+----+-----+-+-----+-+------+-+------+-+-----+-+----- 0 2 2.25 0.203 0 0.191 1 0.036 3 -0.024 2 0.000 4 0.000 1 2.25 2.5 0.222 0 0.211 1 0.038 3 -0.027 2 0.000 4 0.000 @@ -49,8 +49,8 @@ const CL_90_STR: &str = "b etal total c pull c pull c pull c pull c p 7 4 4.5 0.603 0 0.698 1 -0.063 3 -0.032 2 0.000 4 0.000 "; -const LIMIT_STR: &str = "b etal total c pull - [] [\u{3c3}] [\u{3c3}] +const LIMIT_STR: &str = "b etal total c pull + [] [\u{3c3}] [\u{3c3}] -+----+----+------+-+------ 0 2 2.25 -0.504 0 -0.504 1 2.25 2.5 -0.535 0 -0.535 @@ -62,8 +62,8 @@ const LIMIT_STR: &str = "b etal total c pull 7 4 4.5 -0.270 0 -0.270 "; -const REPLICA0_STR: &str = "b etal total c pull c pull c pull c pull c pull - [] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] +const REPLICA0_STR: &str = "b etal total c pull c pull c pull c pull c pull + [] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] -+----+----+---------+-+---------+-+----------+-+----------+-+----------+-+---------- 0 2 2.25 0.8254315 0 0.8205578 1 0.0381204 3 -0.0228547 4 -0.0068566 2 -0.0035354 1 2.25 2.5 0.9013633 0 0.8981709 1 0.0412455 3 -0.0280520 4 -0.0063410 2 -0.0036601 diff --git a/pineappl_cli/tests/read.rs b/pineappl_cli/tests/read.rs index 1c4958a03..4ece989e7 100644 --- a/pineappl_cli/tests/read.rs +++ b/pineappl_cli/tests/read.rs @@ -113,7 +113,7 @@ mg5amc_revno: 983 nnpdf_id: LHCBWZMU7TEV pineappl_gitversion: v0.4.1-114-gdce19e0 results: ---------------------------------------------------------------------- - PineAPPL MC sigma central min max + PineAPPL MC sigma central min max 1/100 sigma 1/1000 1/1000 1/1000 ---------------------------------------------------------------------- 3.772955e+02 3.772821e+02 0.165 0.022 0.0357 0.0392 0.0313 @@ -181,22 +181,22 @@ runcard: # update to_full * #*********************************************************************** # -#******************* +#******************* # Running parameters -#******************* +#******************* # #*********************************************************************** # Tag name for the run (one word) * #*********************************************************************** - tag_1 = run_tag ! name of the run + tag_1 = run_tag ! name of the run #*********************************************************************** # Number of LHE events (and their normalization) and the required * # (relative) accuracy on the Xsec. * # These values are ignored for fixed order runs * #*********************************************************************** - 10000 = nevents ! Number of unweighted events requested + 10000 = nevents ! Number of unweighted events requested -1.0 = req_acc ! Required accuracy (-1=auto determined from nevents) - -1 = nevt_job ! Max number of events per job in event generation. + -1 = nevt_job ! Max number of events per job in event generation. ! (-1= no split). #*********************************************************************** # Normalize the weights of LHE events such that they sum or average to * @@ -206,7 +206,7 @@ runcard: #*********************************************************************** # Number of points per itegration channel (ignored for aMC@NLO runs) * #*********************************************************************** - 0.0001 = req_acc_fo ! Required accuracy (-1=ignored, and use the + 0.0001 = req_acc_fo ! Required accuracy (-1=ignored, and use the ! number of points and iter. below) # These numbers are ignored except if req_acc_FO is equal to -1 5000 = npoints_fo_grid ! number of points to setup grids @@ -228,40 +228,40 @@ runcard: # PDF choice: this automatically fixes also alpha_s(MZ) and its evol. * #*********************************************************************** lhapdf = pdlabel ! PDF set - 324900 = lhaid ! If pdlabel=lhapdf, this is the lhapdf number. Only - ! numbers for central PDF sets are allowed. Can be a list; + 324900 = lhaid ! If pdlabel=lhapdf, this is the lhapdf number. Only + ! numbers for central PDF sets are allowed. Can be a list; ! PDF sets beyond the first are included via reweighting. #*********************************************************************** # Include the NLO Monte Carlo subtr. terms for the following parton * # shower (HERWIG6 | HERWIGPP | PYTHIA6Q | PYTHIA6PT | PYTHIA8) * # WARNING: PYTHIA6PT works only for processes without FSR!!!! * #*********************************************************************** - HERWIG6 = parton_shower + HERWIG6 = parton_shower 1.0 = shower_scale_factor ! multiply default shower starting ! scale by this factor #*********************************************************************** # Renormalization and factorization scales * # (Default functional form for the non-fixed scales is the sum of * -# the transverse masses divided by two of all final state particles * +# the transverse masses divided by two of all final state particles * # and partons. This can be changed in SubProcesses/set_scales.f or via * # dynamical_scale_choice option) * #*********************************************************************** True = fixed_ren_scale ! if .true. use fixed ren scale True = fixed_fac_scale ! if .true. use fixed fac scale - 80.352 = mur_ref_fixed ! fixed ren reference scale + 80.352 = mur_ref_fixed ! fixed ren reference scale 80.352 = muf_ref_fixed ! fixed fact reference scale -1 = dynamical_scale_choice ! Choose one (or more) of the predefined ! dynamical choices. Can be a list; scale choices beyond the ! first are included via reweighting 1.0 = mur_over_ref ! ratio of current muR over reference muR 1.0 = muf_over_ref ! ratio of current muF over reference muF -#*********************************************************************** +#*********************************************************************** # Reweight variables for scale dependence and PDF uncertainty * #*********************************************************************** 1.0, 2.0, 0.5 = rw_rscale ! muR factors to be included by reweighting 1.0, 2.0, 0.5 = rw_fscale ! muF factors to be included by reweighting - True = reweight_scale ! Reweight to get scale variation using the - ! rw_rscale and rw_fscale factors. Should be a list of + True = reweight_scale ! Reweight to get scale variation using the + ! rw_rscale and rw_fscale factors. Should be a list of ! booleans of equal length to dynamical_scale_choice to ! specify for which choice to include scale dependence. False = reweight_pdf ! Reweight to get PDF uncertainty. Should be a @@ -282,14 +282,14 @@ runcard: # MG5_aMC available, but available in Pythia8. * # -1: NNLL+NLO jet-veto computation. See arxiv:1412.8408 [hep-ph]. * #*********************************************************************** - 0 = ickkw + 0 = ickkw #*********************************************************************** # #*********************************************************************** # BW cutoff (M+/-bwcutoff*Gamma). Determines which resonances are * # written in the LHE event file * #*********************************************************************** - 15.0 = bwcutoff + 15.0 = bwcutoff #*********************************************************************** # Cuts on the jets. Jet clustering is performed by FastJet. * # - If gamma_is_j, photons are also clustered * @@ -345,9 +345,9 @@ runcard: # Use PineAPPL to generate PDF-independent fast-interpolation grid * # (https://zenodo.org/record/3992765#.X2EWy5MzbVo) * #*********************************************************************** - True = pineappl ! PineAPPL switch + True = pineappl ! PineAPPL switch #*********************************************************************** -#********************************************************************* +#********************************************************************* # Additional hidden parameters #********************************************************************* 5 = maxjetflavor # hidden_parameter @@ -360,7 +360,7 @@ runcard: ################################### ## INFORMATION FOR MASS ################################### -BLOCK MASS # +BLOCK MASS # 6 1.725000e+02 # mt 23 9.115350e+01 # mz 24 8.035200e+01 # mw @@ -386,7 +386,7 @@ BLOCK MASS # ################################### ## INFORMATION FOR SMINPUTS ################################### -BLOCK SMINPUTS # +BLOCK SMINPUTS # 2 1.166379e-05 # gf 3 1.180000e-01 # as (note that parameter not used if you use a pdf set) ################################### @@ -480,14 +480,14 @@ runshower = False /FixedOrderAnalysis/ ( is the name of the exported # process directory). See the # /FixedOrderAnalysis/analysis_*_template.f file for details # on how to write your own analysis. -# +# ####################################################################### # # Analysis format. @@ -501,7 +501,7 @@ FO_ANALYSIS_FORMAT = HwU # # # Needed extra-libraries (FastJet is already linked): -FO_EXTRALIBS = +FO_EXTRALIBS = # # (Absolute) path to the extra libraries. Directory names should be # separated by white spaces. @@ -509,7 +509,7 @@ FO_EXTRAPATHS = # # (Absolute) path to the dirs containing header files needed by the # libraries (e.g. C++ header files): -FO_INCLUDEPATHS = +FO_INCLUDEPATHS = # # User's analysis (to be put in the /FixedOrderAnalysis/ # directory). Please use .o as extension and white spaces to separate @@ -535,7 +535,7 @@ FO_ANALYSE = LHCB_WP_7TEV.o runcard_gitversion: 82de4ad x1_label: etal x1_label_tex: $\eta_{\bar{\ell}}$ -x1_unit: +x1_unit: y_label: dsig/detal y_label_tex: $\frac{\mathrm{d}\sigma}{\mathrm{d}\eta_{\bar{\ell}}}$ y_unit: pb diff --git a/pineappl_cli/tests/uncert.rs b/pineappl_cli/tests/uncert.rs index 2e44fff35..438604fa1 100644 --- a/pineappl_cli/tests/uncert.rs +++ b/pineappl_cli/tests/uncert.rs @@ -25,8 +25,8 @@ Options: "; const DEFAULT_STR: &str = - "b etal dsig/detal 324900 NNPDF40_nnlo_as_01180 - [] [pb] [pb] [%] [%] [pb] [%] [%] + "b etal dsig/detal 324900 NNPDF40_nnlo_as_01180 + [] [pb] [pb] [%] [%] [pb] [%] [%] -+----+----+-----------+-----------+--------+--------+-----------+--------+-------- 0 2 2.25 7.7302788e2 7.7302788e2 -0.67 0.67 7.7302788e2 -0.62 0.62 1 2.25 2.5 7.0634852e2 7.0634851e2 -0.72 0.72 7.0634851e2 -0.62 0.62 @@ -38,8 +38,8 @@ const DEFAULT_STR: &str = 7 4 4.5 2.9665790e1 2.9665790e1 -2.56 2.56 2.9665789e1 -3.51 3.51 "; -const CL_90_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed - [] [pb] [pb] [%] [%] +const CL_90_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed + [] [pb] [pb] [%] [%] -+----+----+-----------+-----------+---------+--------- 0 2 2.25 7.5459110e2 7.5461655e2 -1.87 1.87 1 2.25 2.5 6.9028342e2 6.9027941e2 -1.90 1.90 @@ -51,8 +51,8 @@ const CL_90_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed 7 4 4.5 2.7517266e1 2.7504644e1 -4.55 4.55 "; -const INTEGRATED_STR: &str = "b etal integ NNPDF31_nlo_as_0118_luxqed - [] [] [] [%] [%] +const INTEGRATED_STR: &str = "b etal integ NNPDF31_nlo_as_0118_luxqed + [] [] [] [%] [%] -+----+----+-----------+-----------+---------+--------- 0 2 2.25 1.8864777e2 1.8865414e2 -1.14 1.14 1 2.25 2.5 1.7257086e2 1.7256985e2 -1.16 1.16 @@ -64,8 +64,8 @@ const INTEGRATED_STR: &str = "b etal integ NNPDF31_nlo_as_0118_luxq 7 4 4.5 1.3758633e1 1.3752322e1 -2.77 2.77 "; -const ORDERS_A2_AS1A2_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed - [] [pb] [pb] [%] [%] +const ORDERS_A2_AS1A2_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed + [] [pb] [pb] [%] [%] -+----+----+-----------+-----------+---------+--------- 0 2 2.25 7.6246034e2 7.6248591e2 -1.14 1.14 1 2.25 2.5 6.9684577e2 6.9684166e2 -1.16 1.16 @@ -79,7 +79,7 @@ const ORDERS_A2_AS1A2_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118 const SCALE_ABS_STR: &str = "b etal dsig/detal (r=1,f=1) (r=2,f=2) (r=0.5,f=0.5) (r=2,f=1) (r=1,f=2) (r=0.5,f=1) (r=1,f=0.5) - [] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] + [] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] -+----+----+-----------+-----------+-----------+-------------+-----------+-----------+-----------+----------- 0 2 2.25 7.5459110e2 7.5459110e2 7.6745431e2 7.4296019e2 7.4384068e2 7.7529764e2 7.6796494e2 7.2595107e2 1 2.25 2.5 6.9028342e2 6.9028342e2 7.0221920e2 6.7923774e2 6.8058382e2 7.0957480e2 7.0235002e2 6.6417441e2 @@ -92,7 +92,7 @@ const SCALE_ABS_STR: &str = "; const SCALE_COV_STR: &str = "b etal dsig/detal 7pt scale (cov) - [] [pb] [%] + [] [pb] [%] -+----+----+-----------+-------+------- 0 2 2.25 7.5459110e2 -3.29 3.29 1 2.25 2.5 6.9028342e2 -3.30 3.30 @@ -105,7 +105,7 @@ const SCALE_COV_STR: &str = "b etal dsig/detal 7pt scale (cov) "; const SCALE_COV_9_STR: &str = "b etal dsig/detal 9pt scale (cov) - [] [pb] [%] + [] [pb] [%] -+----+----+-----------+-------+------- 0 2 2.25 7.5459110e2 -4.48 4.48 1 2.25 2.5 6.9028342e2 -4.48 4.48 @@ -117,8 +117,8 @@ const SCALE_COV_9_STR: &str = "b etal dsig/detal 9pt scale (cov) 7 4 4.5 2.7517266e1 -4.67 4.67 "; -const SCALE_ENV_STR: &str = "b etal dsig/detal 7pt-svar (env) - [] [pb] [%] +const SCALE_ENV_STR: &str = "b etal dsig/detal 7pt-svar (env) + [] [pb] [%] -+----+----+-----------+-------+------- 0 2 2.25 7.5459110e2 -3.80 2.74 1 2.25 2.5 6.9028342e2 -3.78 2.79 @@ -130,8 +130,8 @@ const SCALE_ENV_STR: &str = "b etal dsig/detal 7pt-svar (env) 7 4 4.5 2.7517266e1 -3.47 2.87 "; -const SCALE_ENV_9_STR: &str = "b etal dsig/detal 9pt-svar (env) - [] [pb] [%] +const SCALE_ENV_9_STR: &str = "b etal dsig/detal 9pt-svar (env) + [] [pb] [%] -+----+----+-----------+-------+------- 0 2 2.25 7.5459110e2 -5.61 4.04 1 2.25 2.5 6.9028342e2 -5.54 4.12 diff --git a/pineappl_cli/tests/write.rs b/pineappl_cli/tests/write.rs index ddf8c63d2..62dc43b1f 100644 --- a/pineappl_cli/tests/write.rs +++ b/pineappl_cli/tests/write.rs @@ -45,7 +45,7 @@ const CHANNEL_STR: &str = "c entry entry 4 1 × ( 2, 22) 1 × ( 4, 22) "; -const DEDUP_CHANNEL_DIFF_STR: &str = "b x1 O(as^0 a^2) O(as^0 a^3) O(as^1 a^2) +const DEDUP_CHANNEL_DIFF_STR: &str = "b x1 O(as^0 a^2) O(as^0 a^3) O(as^1 a^2) -+----+----+-----------+-----------+-------+-------------+-------------+-------+-----------+-----------+------- 0 2 2.25 6.5070305e2 6.5070305e2 0.000e0 -7.8692484e0 -7.8692484e0 0.000e0 1.1175729e2 1.1175729e2 0.000e0 1 2.25 2.5 5.9601236e2 5.9601236e2 0.000e0 -6.5623495e0 -6.5623495e0 0.000e0 1.0083341e2 1.0083341e2 0.000e0 @@ -57,8 +57,8 @@ const DEDUP_CHANNEL_DIFF_STR: &str = "b x1 O(as^0 a^2) 7 4 4.5 2.2383492e1 2.2383492e1 0.000e0 -2.2022770e-1 -2.2022770e-1 0.000e0 5.3540011e0 5.3540011e0 0.000e0 "; -const DEFAULT_STR: &str = "b etal dsig/detal - [] [pb] +const DEFAULT_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 7.5459110e2 1 2.25 2.5 6.9028342e2 @@ -70,15 +70,15 @@ const DEFAULT_STR: &str = "b etal dsig/detal 7 4 4.5 2.7517266e1 "; -const DELETE_BINS_02_57_STR: &str = "b etal dsig/detal - [] [pb] +const DELETE_BINS_02_57_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2.75 3 4.8552235e2 1 3 3.25 3.6195456e2 "; -const DELETE_BINS_25_STR: &str = "b etal dsig/detal - [] [pb] +const DELETE_BINS_25_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 7.5459110e2 1 2.25 2.5 6.9028342e2 @@ -108,7 +108,7 @@ four nnpdf_id: LHCBWZMU7TEV pineappl_gitversion: v0.4.1-114-gdce19e0 results: ---------------------------------------------------------------------- - PineAPPL MC sigma central min max + PineAPPL MC sigma central min max 1/100 sigma 1/1000 1/1000 1/1000 ---------------------------------------------------------------------- 3.772955e+02 3.772821e+02 0.165 0.022 0.0357 0.0392 0.0313 @@ -123,14 +123,14 @@ results: ---------------------------------------------------------------------- runcard_gitversion: 82de4ad x1_label: etal x1_label_tex: $\eta_{\bar{\ell}}$ -x1_unit: +x1_unit: y_label: dsig/detal y_label_tex: $\frac{\mathrm{d}\sigma}{\mathrm{d}\eta_{\bar{\ell}}}$ y_unit: pb "; -const MERGE_BINS_STR: &str = "b etal dsig/detal - [] [pb] +const MERGE_BINS_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 7.5459110e2 1 2.25 2.5 6.9028342e2 @@ -141,8 +141,8 @@ const MERGE_BINS_STR: &str = "b etal dsig/detal 6 3.5 4.5 7.1692887e1 "; -const REMAP_STR: &str = "b etal x2 x3 dsig/detal - [] [] [] [pb] +const REMAP_STR: &str = "b etal x2 x3 dsig/detal + [] [] [] [pb] -+--+--+-+-+-+-+----------- 0 0 1 0 2 1 2 3.7729555e1 1 0 1 0 2 2 3 3.4514171e1 @@ -157,8 +157,8 @@ const REMAP_STR: &str = "b etal x2 x3 dsig/detal const REMAP_NO_REMAPPER_STR: &str = "Error: grid does not have a remapper "; -const REWRITE_CHANNELS_CONVOLVE_STR: &str = "b etal dsig/detal - [] [pb] +const REWRITE_CHANNELS_CONVOLVE_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 7.5534392e2 1 2.25 2.5 6.9342538e2 @@ -173,14 +173,14 @@ const REWRITE_CHANNELS_CONVOLVE_STR: &str = "b etal dsig/detal const REWRITE_CHANNELS_STR: &str = "c entry entry entry entry entry entry -+--------------------------------+-------------------------------+-----------------------+--------------------------------+-----------------------+--------------------- 0 0.0000128881 × ( 2, -5) 0.050940490000000005 × ( 2, -3) 0.9490461561 × ( 2, -1) 0.0017222500000000003 × ( 4, -5) 0.9473907556 × ( 4, -3) 0.05089536 × ( 4, -1) -1 0.0017351381000000003 × (-5, 21) 0.9983312456 × (-3, 21) 0.9999415161 × (-1, 21) -2 1 × (22, -3) 1 × (22, -1) -3 0.9999995342 × ( 2, 21) 1.0000083656 × ( 4, 21) -4 1 × ( 2, 22) 1 × ( 4, 22) +1 0.0017351381000000003 × (-5, 21) 0.9983312456 × (-3, 21) 0.9999415161 × (-1, 21) +2 1 × (22, -3) 1 × (22, -1) +3 0.9999995342 × ( 2, 21) 1.0000083656 × ( 4, 21) +4 1 × ( 2, 22) 1 × ( 4, 22) "; -const SCALE_BY_BIN_STR: &str = "b etal dsig/detal - [] [pb] +const SCALE_BY_BIN_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 7.5459110e2 1 2.25 2.5 1.3805668e3 @@ -192,8 +192,8 @@ const SCALE_BY_BIN_STR: &str = "b etal dsig/detal 7 4 4.5 2.2013813e2 "; -const SCALE_BY_ORDER_STR: &str = "b etal dsig/detal - [] [pb] +const SCALE_BY_ORDER_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 4.3317419e2 1 2.25 2.5 3.9555841e2 @@ -219,8 +219,8 @@ const SPLIT_CHANNELS_STR: &str = "c entry 9 1 × ( 4, 22) "; -const MULTIPLE_ARGUMENTS_STR: &str = "b etal dsig/detal - [] [pb] +const MULTIPLE_ARGUMENTS_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.5 7.5454524e2 1 2.5 3 5.6456123e2 @@ -230,7 +230,7 @@ const MULTIPLE_ARGUMENTS_STR: &str = "b etal dsig/detal 5 4 4.5 2.9004607e1 "; -const ROTATE_PID_BASIS_NO_DIFF_STR: &str = "b x1 O(as^0 a^2) O(as^0 a^3) O(as^1 a^2) +const ROTATE_PID_BASIS_NO_DIFF_STR: &str = "b x1 O(as^0 a^2) O(as^0 a^3) O(as^1 a^2) -+----+----+-----------+-----------+-------+-------------+-------------+-------+-----------+-----------+------- 0 2 2.25 6.5070305e2 6.5070305e2 0.000e0 -7.8692484e0 -7.8692484e0 0.000e0 1.1175729e2 1.1175729e2 0.000e0 1 2.25 2.5 5.9601236e2 5.9601236e2 0.000e0 -6.5623495e0 -6.5623495e0 0.000e0 1.0083341e2 1.0083341e2 0.000e0 @@ -242,7 +242,7 @@ const ROTATE_PID_BASIS_NO_DIFF_STR: &str = "b x1 O(as^0 a^2) 7 4 4.5 2.2383492e1 2.2383492e1 0.000e0 -2.2022770e-1 -2.2022770e-1 0.000e0 5.3540011e0 5.3540011e0 0.000e0 "; -const ROTATE_PID_BASIS_DIFF_STR: &str = "b x1 O(as^0 a^2) O(as^0 a^3) O(as^1 a^2) +const ROTATE_PID_BASIS_DIFF_STR: &str = "b x1 O(as^0 a^2) O(as^0 a^3) O(as^1 a^2) -+----+----+-----------+-----------+----------+-------------+-------------+----------+-----------+-----------+---------- 0 2 2.25 6.5070305e2 6.5070305e2 -2.220e-16 -7.8692484e0 -7.8692484e0 -4.441e-16 1.1175729e2 1.1175729e2 -1.221e-15 1 2.25 2.5 5.9601236e2 5.9601236e2 -7.772e-16 -6.5623495e0 -6.5623495e0 -2.220e-16 1.0083341e2 1.0083341e2 -5.551e-16 @@ -416,8 +416,8 @@ const ROTATE_PID_BASIS_READ_CHANNELS_STR: &str = " c entry 157 0.03333333333333333 × (235, 22) "; -const REWRITE_ORDER_CONVOLVE_STR: &str = "b etal dsig/detal - [] [pb] +const REWRITE_ORDER_CONVOLVE_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 1.8216658e2 1 2.25 2.5 1.6597039e2 diff --git a/pineappl_py/docs/source/conf.py b/pineappl_py/docs/source/conf.py index 8c3b56cf3..416680e9e 100644 --- a/pineappl_py/docs/source/conf.py +++ b/pineappl_py/docs/source/conf.py @@ -7,25 +7,23 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information import pineappl -import sys -import pathlib -project = 'pineappl' -copyright = '2020–2024, the PineAPPL team' -author = 'the PineAPPL team' +project = "pineappl" +copyright = "2020–2024, the PineAPPL team" +author = "the PineAPPL team" release = pineappl.version version = release extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.autosectionlabel', - 'sphinx.ext.extlinks', - 'sphinx.ext.inheritance_diagram', - 'sphinx.ext.intersphinx', - 'sphinx.ext.napoleon', - 'sphinx.ext.todo', - 'sphinx_rtd_theme', + "sphinx.ext.autodoc", + "sphinx.ext.autosectionlabel", + "sphinx.ext.extlinks", + "sphinx.ext.inheritance_diagram", + "sphinx.ext.intersphinx", + "sphinx.ext.napoleon", + "sphinx.ext.todo", + "sphinx_rtd_theme", ] @@ -33,14 +31,14 @@ "rustdoc": ("https://docs.rs/pineappl/latest/pineappl/%s", "PineAPPL - %s"), } -templates_path = ['_templates'] +templates_path = ["_templates"] exclude_patterns = [] # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output -html_theme = 'sphinx_rtd_theme' -html_static_path = ['_static'] +html_theme = "sphinx_rtd_theme" +html_static_path = ["_static"] # TODO: find a way to reactivate apidoc, which doesn't seem to work for the moment. diff --git a/pineappl_py/tests/test_fk_table.py b/pineappl_py/tests/test_fk_table.py index af047ed8d..e7ba2853a 100644 --- a/pineappl_py/tests/test_fk_table.py +++ b/pineappl_py/tests/test_fk_table.py @@ -52,7 +52,7 @@ def test_convolve_with_one(self): ) assert False - except: + except: # noqa: E722 assert True # TODO: write a better test @@ -71,5 +71,5 @@ def test_convolve_with_one(self): ) assert False - except: + except: # noqa: E722 assert True diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 000000000..2d703f457 --- /dev/null +++ b/ruff.toml @@ -0,0 +1,5 @@ +# Do not check specific files or directories +extend-exclude = [ + "pineappl_cli/src/plot.py", + "pineappl_cli/src/subgrid-pull-plot.py", +] From 59289db07aea043462b4656992e784c203a1196e Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Wed, 18 Sep 2024 12:09:29 +0200 Subject: [PATCH 02/16] limit python character length to be 80 --- examples/python/dyaa.py | 4 +++- pineappl_py/tests/test_fk_table.py | 19 +++++++++++++++---- pineappl_py/tests/test_grid.py | 4 +++- ruff.toml | 2 ++ 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/examples/python/dyaa.py b/examples/python/dyaa.py index 0dc1312ef..bb5d4f57c 100755 --- a/examples/python/dyaa.py +++ b/examples/python/dyaa.py @@ -173,7 +173,9 @@ def main(calls, pdfname, filename): if __name__ == "__main__": # expose the arguments as script ap = argparse.ArgumentParser() - ap.add_argument("--calls", default=100000, type=int, help="Number of events") + ap.add_argument( + "--calls", default=100000, type=int, help="Number of events" + ) ap.add_argument( "--pdf", default="NNPDF31_nlo_as_0118_luxqed", diff --git a/pineappl_py/tests/test_fk_table.py b/pineappl_py/tests/test_fk_table.py index e7ba2853a..6724615a4 100644 --- a/pineappl_py/tests/test_fk_table.py +++ b/pineappl_py/tests/test_fk_table.py @@ -7,7 +7,9 @@ class TestFkTable: def fake_grid(self, bins=None): channels = [pineappl.boc.Channel([(1, 21, 1.0)])] orders = [pineappl.grid.Order(0, 0, 0, 0)] - bin_limits = np.array([1e-7, 1e-3, 1] if bins is None else bins, dtype=float) + bin_limits = np.array( + [1e-7, 1e-3, 1] if bins is None else bins, dtype=float + ) subgrid_params = pineappl.subgrid.SubgridParams() g = pineappl.grid.Grid(channels, orders, bin_limits, subgrid_params) return g @@ -43,7 +45,10 @@ def test_convolve_with_one(self): try: g.evolve_with_slice_iter( iter( - [(info, np.ndarray([0, 0, 0, 0])), (info, np.ndarray([0, 0, 0, 0]))] + [ + (info, np.ndarray([0, 0, 0, 0])), + (info, np.ndarray([0, 0, 0, 0])), + ] ), np.array([], dtype=bool), (1.0, 1.0), @@ -59,10 +64,16 @@ def test_convolve_with_one(self): try: g.evolve_with_slice_iter2( iter( - [(info, np.ndarray([0, 0, 0, 0])), (info, np.ndarray([0, 0, 0, 0]))] + [ + (info, np.ndarray([0, 0, 0, 0])), + (info, np.ndarray([0, 0, 0, 0])), + ] ), iter( - [(info, np.ndarray([0, 0, 0, 0])), (info, np.ndarray([0, 0, 0, 0]))] + [ + (info, np.ndarray([0, 0, 0, 0])), + (info, np.ndarray([0, 0, 0, 0])), + ] ), np.array([], dtype=bool), (1.0, 1.0), diff --git a/pineappl_py/tests/test_grid.py b/pineappl_py/tests/test_grid.py index f0678db99..e502315a0 100644 --- a/pineappl_py/tests/test_grid.py +++ b/pineappl_py/tests/test_grid.py @@ -17,7 +17,9 @@ class TestGrid: def fake_grid(self, bins=None): channels = [pineappl.boc.Channel([(1, 21, 0.1)])] orders = [pineappl.grid.Order(3, 0, 0, 0)] - bin_limits = np.array([1e-7, 1e-3, 1] if bins is None else bins, dtype=float) + bin_limits = np.array( + [1e-7, 1e-3, 1] if bins is None else bins, dtype=float + ) subgrid_params = pineappl.subgrid.SubgridParams() g = pineappl.grid.Grid(channels, orders, bin_limits, subgrid_params) return g diff --git a/ruff.toml b/ruff.toml index 2d703f457..0f2193385 100644 --- a/ruff.toml +++ b/ruff.toml @@ -3,3 +3,5 @@ extend-exclude = [ "pineappl_cli/src/plot.py", "pineappl_cli/src/subgrid-pull-plot.py", ] + +line-length = 80 From e549f67b1d3958bf41b4f133af64cd1d4b36c9d6 Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Wed, 18 Sep 2024 18:20:25 +0200 Subject: [PATCH 03/16] revert removal of trailing space in tests --- pineappl_cli/tests/analyze.rs | 8 ++--- pineappl_cli/tests/channels.rs | 24 +++++++------- pineappl_cli/tests/convolve.rs | 44 +++++++++++++------------- pineappl_cli/tests/diff.rs | 8 ++--- pineappl_cli/tests/evolve.rs | 4 +-- pineappl_cli/tests/import.rs | 8 ++--- pineappl_cli/tests/merge.rs | 4 +-- pineappl_cli/tests/orders.rs | 14 ++++---- pineappl_cli/tests/pull.rs | 16 +++++----- pineappl_cli/tests/read.rs | 52 +++++++++++++++--------------- pineappl_cli/tests/uncert.rs | 30 +++++++++--------- pineappl_cli/tests/write.rs | 58 +++++++++++++++++----------------- 12 files changed, 135 insertions(+), 135 deletions(-) diff --git a/pineappl_cli/tests/analyze.rs b/pineappl_cli/tests/analyze.rs index 5c6da48da..2b2f71fa9 100644 --- a/pineappl_cli/tests/analyze.rs +++ b/pineappl_cli/tests/analyze.rs @@ -27,8 +27,8 @@ Options: -h, --help Print help "; -const CKF_STR: &str = "b etal bin-K c K c K c K c K c K - [] +const CKF_STR: &str = "b etal bin-K c K c K c K c K c K + [] -+----+----+-----+-+----+-+----+-+----+-+----+-+---- 0 2 2.25 1.17 0 1.30 3 -inf 1 -inf 2 0.00 4 0.00 1 2.25 2.5 1.17 0 1.31 3 -inf 1 -inf 2 0.00 4 0.00 @@ -42,8 +42,8 @@ const CKF_STR: &str = "b etal bin-K c K c K c K c K c K // TODO: understand these factors const CKF_WITH_DEFAULT_DENOMINATOR_STR: &str = - "b etal bin-K c K c K c K c K c K - [] + "b etal bin-K c K c K c K c K c K + [] -+----+----+------+-+------+-+----+-+----+-+----+-+---- 0 2 2.25 -13.20 0 -23.29 3 -inf 1 -inf 4 1.00 2 1.00 1 2.25 2.5 -14.37 0 -26.28 3 -inf 1 -inf 4 1.00 2 1.00 diff --git a/pineappl_cli/tests/channels.rs b/pineappl_cli/tests/channels.rs index 535884906..a7556af1a 100644 --- a/pineappl_cli/tests/channels.rs +++ b/pineappl_cli/tests/channels.rs @@ -21,7 +21,7 @@ Options: "; const DEFAULT_STR: &str = "b etal c size c size c size c size c size - [] [%] [%] [%] [%] [%] + [] [%] [%] [%] [%] [%] -+----+----+-+------+-+------+-+-----+-+----+-+---- 0 2 2.25 0 111.32 3 -8.05 1 -3.31 4 0.02 2 0.01 1 2.25 2.5 0 112.20 3 -8.85 1 -3.38 4 0.02 2 0.01 @@ -34,8 +34,8 @@ const DEFAULT_STR: &str = "b etal c size c size c size c size c size "; const ABSOLUTE_STR: &str = - "b etal c dsig/detal c dsig/detal c dsig/detal c dsig/detal c dsig/detal - [] [pb] [pb] [pb] [pb] [pb] + "b etal c dsig/detal c dsig/detal c dsig/detal c dsig/detal c dsig/detal + [] [pb] [pb] [pb] [pb] [pb] -+----+----+-+-----------+-+------------+-+------------+-+------------+-+------------ 0 2 2.25 0 8.4002759e2 3 -6.0727462e1 1 -2.4969360e1 4 1.7176328e-1 2 8.8565923e-2 1 2.25 2.5 0 7.7448295e2 3 -6.1109036e1 1 -2.3319483e1 4 1.4518685e-1 2 8.3802762e-2 @@ -48,8 +48,8 @@ const ABSOLUTE_STR: &str = "; const ABSOLUTE_INTEGRATED_STR: &str = - "b etal c integ c integ c integ c integ c integ - [] [] [] [] [] [] + "b etal c integ c integ c integ c integ c integ + [] [] [] [] [] [] -+----+----+-+-----------+-+------------+-+------------+-+------------+-+------------ 0 2 2.25 0 2.1000690e2 3 -1.5181865e1 1 -6.2423401e0 4 4.2940819e-2 2 2.2141481e-2 1 2.25 2.5 0 1.9362074e2 3 -1.5277259e1 1 -5.8298709e0 4 3.6296712e-2 2 2.0950691e-2 @@ -61,8 +61,8 @@ const ABSOLUTE_INTEGRATED_STR: &str = 7 4 4.5 0 1.5943129e1 3 -1.1843361e0 1 -1.0028343e0 4 1.7077102e-3 2 9.6673424e-4 "; -const LIMIT_3_STR: &str = "b etal c size c size c size - [] [%] [%] [%] +const LIMIT_3_STR: &str = "b etal c size c size c size + [] [%] [%] [%] -+----+----+-+------+-+------+-+----- 0 2 2.25 0 111.32 3 -8.05 1 -3.31 1 2.25 2.5 0 112.20 3 -8.85 1 -3.38 @@ -80,7 +80,7 @@ For more information, try '--help'. "; const LUMIS_0123_STR: &str = "b etal c size c size c size c size - [] [%] [%] [%] [%] + [] [%] [%] [%] [%] -+----+----+-+------+-+------+-+-----+-+---- 0 2 2.25 0 111.32 3 -8.05 1 -3.31 2 0.01 1 2.25 2.5 0 112.20 3 -8.85 1 -3.38 2 0.01 @@ -93,7 +93,7 @@ const LUMIS_0123_STR: &str = "b etal c size c size c size c size "; const ORDERS_A2_AS1A2_STR: &str = "b etal c size c size c size c size c size - [] [%] [%] [%] [%] [%] + [] [%] [%] [%] [%] [%] -+----+----+-+------+-+------+-+-----+-+----+-+---- 0 2 2.25 0 111.24 3 -7.96 1 -3.27 2 0.00 4 0.00 1 2.25 2.5 0 112.12 3 -8.77 1 -3.35 2 0.00 4 0.00 @@ -106,8 +106,8 @@ const ORDERS_A2_AS1A2_STR: &str = "b etal c size c size c size c size "; const DONT_SORT_ABSOLUTE_STR: &str = - "b etal c dsig/detal c dsig/detal c dsig/detal c dsig/detal c dsig/detal - [] [pb] [pb] [pb] [pb] [pb] + "b etal c dsig/detal c dsig/detal c dsig/detal c dsig/detal c dsig/detal + [] [pb] [pb] [pb] [pb] [pb] -+----+----+-+-----------+-+------------+-+------------+-+------------+-+------------ 0 2 2.25 0 8.4002759e2 1 -2.4969360e1 2 8.8565923e-2 3 -6.0727462e1 4 1.7176328e-1 1 2.25 2.5 0 7.7448295e2 1 -2.3319483e1 2 8.3802762e-2 3 -6.1109036e1 4 1.4518685e-1 @@ -120,7 +120,7 @@ const DONT_SORT_ABSOLUTE_STR: &str = "; const DONT_SORT_STR: &str = "b etal c size c size c size c size c size - [] [%] [%] [%] [%] [%] + [] [%] [%] [%] [%] [%] -+----+----+-+------+-+-----+-+----+-+------+-+---- 0 2 2.25 0 111.32 1 -3.31 2 0.01 3 -8.05 4 0.02 1 2.25 2.5 0 112.20 1 -3.38 2 0.01 3 -8.85 4 0.02 diff --git a/pineappl_cli/tests/convolve.rs b/pineappl_cli/tests/convolve.rs index 0adb3144a..dbf0d107b 100644 --- a/pineappl_cli/tests/convolve.rs +++ b/pineappl_cli/tests/convolve.rs @@ -18,8 +18,8 @@ Options: -h, --help Print help "; -const DEFAULT_STR: &str = "b etal dsig/detal - [] [pb] +const DEFAULT_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 7.5459110e2 1 2.25 2.5 6.9028342e2 @@ -37,8 +37,8 @@ const USE_ALPHAS_FROM_ERROR_STR: &str = "expected `use_alphas_from` to be `0` or const THREE_PDF_ERROR_STR: &str = "convolutions with 3 convolution functions is not supported "; -const FORCE_POSITIVE_STR: &str = "b etal dsig/detal - [] [pb] +const FORCE_POSITIVE_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 7.5461571e2 1 2.25 2.5 6.9032107e2 @@ -50,8 +50,8 @@ const FORCE_POSITIVE_STR: &str = "b etal dsig/detal 7 4 4.5 2.8422453e1 "; -const DEFAULT_MULTIPLE_PDFS_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed - [] [pb] [pb] [%] +const DEFAULT_MULTIPLE_PDFS_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed + [] [pb] [pb] [%] -+----+----+-----------+-------------+------------- 0 2 2.25 7.5459110e2 7.5459110e2 0.00 1 2.25 2.5 6.9028342e2 6.9028342e2 0.00 @@ -64,8 +64,8 @@ const DEFAULT_MULTIPLE_PDFS_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_ "; const MULTIPLE_PDFS_WITH_NEW_CONSTRUCTION_STR: &str = - "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed/1 - [] [pb] [pb] [%] + "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed/1 + [] [pb] [pb] [%] -+----+----+-----------+--------------+-------------- 0 2 2.25 7.5459110e2 7.5169067e2 -0.38 1 2.25 2.5 6.9028342e2 6.8612437e2 -0.60 @@ -77,8 +77,8 @@ const MULTIPLE_PDFS_WITH_NEW_CONSTRUCTION_STR: &str = 7 4 4.5 2.7517266e1 2.7259743e1 -0.94 "; -const MULTIPLE_PDFS_WITH_RELABELING_STR: &str = "b etal dsig/detal other mc=1.4 - [] [pb] [pb] [%] +const MULTIPLE_PDFS_WITH_RELABELING_STR: &str = "b etal dsig/detal other mc=1.4 + [] [pb] [pb] [%] -+----+----+-----------+-----------+------ 0 2 2.25 7.5459110e2 7.5169067e2 -0.38 1 2.25 2.5 6.9028342e2 6.8612437e2 -0.60 @@ -90,8 +90,8 @@ const MULTIPLE_PDFS_WITH_RELABELING_STR: &str = "b etal dsig/detal othe 7 4 4.5 2.7517266e1 2.7259743e1 -0.94 "; -const TWO_PDFS_WITH_ORDER_SUBSET_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed/1 - [] [pb] [pb] [%] +const TWO_PDFS_WITH_ORDER_SUBSET_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed/1 + [] [pb] [pb] [%] -+----+----+-----------+--------------+-------------- 0 2 2.25 6.5070305e2 6.4903968e2 -0.26 1 2.25 2.5 5.9601236e2 5.9329838e2 -0.46 @@ -104,8 +104,8 @@ const TWO_PDFS_WITH_ORDER_SUBSET_STR: &str = "b etal dsig/detal NNPDF31_nl "; const THREE_PDFS_STR: &str = - "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed/1 NNPDF31_nlo_as_0118_luxqed/2 - [] [pb] [pb] [%] [pb] [%] + "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed/1 NNPDF31_nlo_as_0118_luxqed/2 + [] [pb] [pb] [%] [pb] [%] -+----+----+-----------+--------------+--------------+--------------+-------------- 0 2 2.25 7.5459110e2 7.5169067e2 -0.38 7.5748758e2 0.38 1 2.25 2.5 6.9028342e2 6.8612437e2 -0.60 6.9177921e2 0.22 @@ -117,8 +117,8 @@ const THREE_PDFS_STR: &str = 7 4 4.5 2.7517266e1 2.7259743e1 -0.94 2.8446007e1 3.38 "; -const BINS_13567_STR: &str = "b etal dsig/detal - [] [pb] +const BINS_13567_STR: &str = "b etal dsig/detal + [] [pb] -+----+---+----------- 1 2.25 2.5 6.9028342e2 3 2.75 3 4.8552235e2 @@ -127,8 +127,8 @@ const BINS_13567_STR: &str = "b etal dsig/detal 7 4 4.5 2.7517266e1 "; -const INTEGRATED_STR: &str = "b etal integ - [] [] +const INTEGRATED_STR: &str = "b etal integ + [] [] -+----+----+----------- 0 2 2.25 1.8864777e2 1 2.25 2.5 1.7257086e2 @@ -140,8 +140,8 @@ const INTEGRATED_STR: &str = "b etal integ 7 4 4.5 1.3758633e1 "; -const INTEGRATED_MULTIPLE_PDFS_STR: &str = "b etal integ NNPDF31_nlo_as_0118_luxqed - [] [] [] [%] +const INTEGRATED_MULTIPLE_PDFS_STR: &str = "b etal integ NNPDF31_nlo_as_0118_luxqed + [] [] [] [%] -+----+----+-----------+-------------+------------- 0 2 2.25 1.8864777e2 1.8864777e2 0.00 1 2.25 2.5 1.7257086e2 1.7257086e2 0.00 @@ -153,8 +153,8 @@ const INTEGRATED_MULTIPLE_PDFS_STR: &str = "b etal integ NNPDF31_nlo_ 7 4 4.5 1.3758633e1 1.3758633e1 0.00 "; -const ORDERS_A2_A3_STR: &str = "b etal dsig/detal - [] [pb] +const ORDERS_A2_A3_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 6.4283381e2 1 2.25 2.5 5.8945001e2 diff --git a/pineappl_cli/tests/diff.rs b/pineappl_cli/tests/diff.rs index edba619bc..6b3c59abd 100644 --- a/pineappl_cli/tests/diff.rs +++ b/pineappl_cli/tests/diff.rs @@ -23,7 +23,7 @@ Options: -h, --help Print help "; -const ORDERS1_A2_ORDERS2_A2_STR: &str = "b x1 O(as^0 a^2) +const ORDERS1_A2_ORDERS2_A2_STR: &str = "b x1 O(as^0 a^2) -+----+----+-----------+-----------+------- 0 2 2.25 6.5070305e2 6.5070305e2 0.000e0 1 2.25 2.5 5.9601236e2 5.9601236e2 0.000e0 @@ -36,7 +36,7 @@ const ORDERS1_A2_ORDERS2_A2_STR: &str = "b x1 O(as^0 a^2) "; const ORDERS1_A2_A2AS1_ORDERS2_A2_A2AS1_STR: &str = - "b x1 O(as^0 a^2) O(as^1 a^2) + "b x1 O(as^0 a^2) O(as^1 a^2) -+----+----+-----------+-----------+-------+-----------+-----------+------- 0 2 2.25 6.5070305e2 6.5070305e2 0.000e0 1.1175729e2 1.1175729e2 0.000e0 1 2.25 2.5 5.9601236e2 5.9601236e2 0.000e0 1.0083341e2 1.0083341e2 0.000e0 @@ -48,7 +48,7 @@ const ORDERS1_A2_A2AS1_ORDERS2_A2_A2AS1_STR: &str = 7 4 4.5 2.2383492e1 2.2383492e1 0.000e0 5.3540011e0 5.3540011e0 0.000e0 "; -const ORDERS1_A2_A2AS1_IGNORE_ORDERS_STR: &str = "b x1 diff +const ORDERS1_A2_A2AS1_IGNORE_ORDERS_STR: &str = "b x1 diff -+----+----+-----------+-----------+--------- 0 2 2.25 7.6246034e2 7.5459110e2 -1.032e-2 1 2.25 2.5 6.9684577e2 6.9028342e2 -9.417e-3 @@ -60,7 +60,7 @@ const ORDERS1_A2_A2AS1_IGNORE_ORDERS_STR: &str = "b x1 diff 7 4 4.5 2.7737493e1 2.7517266e1 -7.940e-3 "; -const SCALE2_2_STR: &str = "b x1 O(as^0 a^2) O(as^0 a^3) O(as^1 a^2) +const SCALE2_2_STR: &str = "b x1 O(as^0 a^2) O(as^0 a^3) O(as^1 a^2) -+----+----+-----------+-----------+-------+-------------+-------------+-------+-----------+-----------+------- 0 2 2.25 6.5070305e2 1.3014061e3 1.000e0 -7.8692484e0 -1.5738497e1 1.000e0 1.1175729e2 2.2351458e2 1.000e0 1 2.25 2.5 5.9601236e2 1.1920247e3 1.000e0 -6.5623495e0 -1.3124699e1 1.000e0 1.0083341e2 2.0166682e2 1.000e0 diff --git a/pineappl_cli/tests/evolve.rs b/pineappl_cli/tests/evolve.rs index fa25760a0..c6e02d904 100644 --- a/pineappl_cli/tests/evolve.rs +++ b/pineappl_cli/tests/evolve.rs @@ -105,8 +105,8 @@ const LHCB_WP_7TEV_V2_XIF_2_STR: &str = const LHCB_WP_7TEV_V2_XIF_2_ERROR_STR: &str = "Error: failed to evolve grid: no operator for muf2 = 25825.775616000003 found in [6456.443904000001] "; -const LHCB_WP_7TEV_OPTIMIZED_STR: &str = "b etal dsig/detal - [] [pb] +const LHCB_WP_7TEV_OPTIMIZED_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 7.8731123e2 1 2.25 2.5 7.1853181e2 diff --git a/pineappl_cli/tests/import.rs b/pineappl_cli/tests/import.rs index ad24e8e85..fca7b9e10 100644 --- a/pineappl_cli/tests/import.rs +++ b/pineappl_cli/tests/import.rs @@ -203,8 +203,8 @@ const IMPORT_FLEX_GRID_15_STR: &str = "b PineAPPL fastNLO rel. diff "; #[cfg(feature = "fktable")] -const IMPORT_DIS_FKTABLE_STR: &str = "b x1 diff - [] [] +const IMPORT_DIS_FKTABLE_STR: &str = "b x1 diff + [] [] --+--+--+------------- 0 0 1 1.8900584e0 1 1 2 1.4830883e0 @@ -229,8 +229,8 @@ const IMPORT_DIS_FKTABLE_STR: &str = "b x1 diff "; #[cfg(feature = "fktable")] -const IMPORT_HADRONIC_FKTABLE_STR: &str = "b x1 diff - [] [] +const IMPORT_HADRONIC_FKTABLE_STR: &str = "b x1 diff + [] [] -+-+-+----------- 0 0 1 7.7624461e2 "; diff --git a/pineappl_cli/tests/merge.rs b/pineappl_cli/tests/merge.rs index fe06bed9e..ae57dc5aa 100644 --- a/pineappl_cli/tests/merge.rs +++ b/pineappl_cli/tests/merge.rs @@ -13,8 +13,8 @@ Options: -h, --help Print help "; -const DEFAULT_STR: &str = "b etal dsig/detal - [] [pb] +const DEFAULT_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 1.5769498e3 1 2.25 2.5 1.4412311e3 diff --git a/pineappl_cli/tests/orders.rs b/pineappl_cli/tests/orders.rs index 32691dcc4..f63210640 100644 --- a/pineappl_cli/tests/orders.rs +++ b/pineappl_cli/tests/orders.rs @@ -18,7 +18,7 @@ Options: "; const DEFAULT_STR: &str = "b etal dsig/detal O(as^0 a^2) O(as^1 a^2) O(as^0 a^3) - [] [pb] [%] [%] [%] + [] [pb] [%] [%] [%] -+----+----+-----------+-----------+-----------+----------- 0 2 2.25 7.5459110e2 100.00 17.17 -1.21 1 2.25 2.5 6.9028342e2 100.00 16.92 -1.10 @@ -30,8 +30,8 @@ const DEFAULT_STR: &str = "b etal dsig/detal O(as^0 a^2) O(as^1 a^2) O(as^ 7 4 4.5 2.7517266e1 100.00 23.92 -0.98 "; -const ABSOLUTE_STR: &str = "b etal dsig/detal O(as^0 a^2) O(as^1 a^2) O(as^0 a^3) - [] [pb] [pb] [pb] [pb] +const ABSOLUTE_STR: &str = "b etal dsig/detal O(as^0 a^2) O(as^1 a^2) O(as^0 a^3) + [] [pb] [pb] [pb] [pb] -+----+----+-----------+-----------+-----------+------------- 0 2 2.25 7.5459110e2 6.5070305e2 1.1175729e2 -7.8692484e0 1 2.25 2.5 6.9028342e2 5.9601236e2 1.0083341e2 -6.5623495e0 @@ -44,8 +44,8 @@ const ABSOLUTE_STR: &str = "b etal dsig/detal O(as^0 a^2) O(as^1 a^2) O(a "; const ABSOLUTE_INTEGRATED_STR: &str = - "b etal integ O(as^0 a^2) O(as^1 a^2) O(as^0 a^3) - [] [] [] [] [] + "b etal integ O(as^0 a^2) O(as^1 a^2) O(as^0 a^3) + [] [] [] [] [] -+----+----+-----------+-----------+-----------+------------- 0 2 2.25 1.8864777e2 1.6267576e2 2.7939322e1 -1.9673121e0 1 2.25 2.5 1.7257086e2 1.4900309e2 2.5208352e1 -1.6405874e0 @@ -58,7 +58,7 @@ const ABSOLUTE_INTEGRATED_STR: &str = "; const INTEGRATED_STR: &str = "b etal integ O(as^0 a^2) O(as^1 a^2) O(as^0 a^3) - [] [] [%] [%] [%] + [] [] [%] [%] [%] -+----+----+-----------+-----------+-----------+----------- 0 2 2.25 1.8864777e2 100.00 17.17 -1.21 1 2.25 2.5 1.7257086e2 100.00 16.92 -1.10 @@ -71,7 +71,7 @@ const INTEGRATED_STR: &str = "b etal integ O(as^0 a^2) O(as^1 a^2) O( "; const NORMALIZE_A2_AS1A2_STR: &str = "b etal dsig/detal O(as^0 a^2) O(as^1 a^2) O(as^0 a^3) - [] [pb] [%] [%] [%] + [] [pb] [%] [%] [%] -+----+----+-----------+-----------+-----------+----------- 0 2 2.25 7.5459110e2 85.34 14.66 -1.03 1 2.25 2.5 6.9028342e2 85.53 14.47 -0.94 diff --git a/pineappl_cli/tests/pull.rs b/pineappl_cli/tests/pull.rs index d2c0a4596..6b6f6e86e 100644 --- a/pineappl_cli/tests/pull.rs +++ b/pineappl_cli/tests/pull.rs @@ -22,8 +22,8 @@ Options: "; // last two columns are zero because the PDFs don't have a photon -const DEFAULT_STR: &str = "b etal total c pull c pull c pull c pull c pull - [] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] +const DEFAULT_STR: &str = "b etal total c pull c pull c pull c pull c pull + [] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] -+----+----+-----+-+-----+-+-----+-+------+-+-----+-+----- 0 2 2.25 0.636 0 0.525 3 0.062 1 0.049 2 0.000 4 0.000 1 2.25 2.5 0.695 0 0.571 3 0.069 1 0.054 2 0.000 4 0.000 @@ -36,8 +36,8 @@ const DEFAULT_STR: &str = "b etal total c pull c pull c pull c pull c "; // last two columns are zero because the PDFs don't have a photon -const CL_90_STR: &str = "b etal total c pull c pull c pull c pull c pull - [] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] +const CL_90_STR: &str = "b etal total c pull c pull c pull c pull c pull + [] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] -+----+----+-----+-+-----+-+------+-+------+-+-----+-+----- 0 2 2.25 0.203 0 0.191 1 0.036 3 -0.024 2 0.000 4 0.000 1 2.25 2.5 0.222 0 0.211 1 0.038 3 -0.027 2 0.000 4 0.000 @@ -49,8 +49,8 @@ const CL_90_STR: &str = "b etal total c pull c pull c pull c pull c p 7 4 4.5 0.603 0 0.698 1 -0.063 3 -0.032 2 0.000 4 0.000 "; -const LIMIT_STR: &str = "b etal total c pull - [] [\u{3c3}] [\u{3c3}] +const LIMIT_STR: &str = "b etal total c pull + [] [\u{3c3}] [\u{3c3}] -+----+----+------+-+------ 0 2 2.25 -0.504 0 -0.504 1 2.25 2.5 -0.535 0 -0.535 @@ -62,8 +62,8 @@ const LIMIT_STR: &str = "b etal total c pull 7 4 4.5 -0.270 0 -0.270 "; -const REPLICA0_STR: &str = "b etal total c pull c pull c pull c pull c pull - [] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] +const REPLICA0_STR: &str = "b etal total c pull c pull c pull c pull c pull + [] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] [\u{3c3}] -+----+----+---------+-+---------+-+----------+-+----------+-+----------+-+---------- 0 2 2.25 0.8254315 0 0.8205578 1 0.0381204 3 -0.0228547 4 -0.0068566 2 -0.0035354 1 2.25 2.5 0.9013633 0 0.8981709 1 0.0412455 3 -0.0280520 4 -0.0063410 2 -0.0036601 diff --git a/pineappl_cli/tests/read.rs b/pineappl_cli/tests/read.rs index 4ece989e7..1c4958a03 100644 --- a/pineappl_cli/tests/read.rs +++ b/pineappl_cli/tests/read.rs @@ -113,7 +113,7 @@ mg5amc_revno: 983 nnpdf_id: LHCBWZMU7TEV pineappl_gitversion: v0.4.1-114-gdce19e0 results: ---------------------------------------------------------------------- - PineAPPL MC sigma central min max + PineAPPL MC sigma central min max 1/100 sigma 1/1000 1/1000 1/1000 ---------------------------------------------------------------------- 3.772955e+02 3.772821e+02 0.165 0.022 0.0357 0.0392 0.0313 @@ -181,22 +181,22 @@ runcard: # update to_full * #*********************************************************************** # -#******************* +#******************* # Running parameters -#******************* +#******************* # #*********************************************************************** # Tag name for the run (one word) * #*********************************************************************** - tag_1 = run_tag ! name of the run + tag_1 = run_tag ! name of the run #*********************************************************************** # Number of LHE events (and their normalization) and the required * # (relative) accuracy on the Xsec. * # These values are ignored for fixed order runs * #*********************************************************************** - 10000 = nevents ! Number of unweighted events requested + 10000 = nevents ! Number of unweighted events requested -1.0 = req_acc ! Required accuracy (-1=auto determined from nevents) - -1 = nevt_job ! Max number of events per job in event generation. + -1 = nevt_job ! Max number of events per job in event generation. ! (-1= no split). #*********************************************************************** # Normalize the weights of LHE events such that they sum or average to * @@ -206,7 +206,7 @@ runcard: #*********************************************************************** # Number of points per itegration channel (ignored for aMC@NLO runs) * #*********************************************************************** - 0.0001 = req_acc_fo ! Required accuracy (-1=ignored, and use the + 0.0001 = req_acc_fo ! Required accuracy (-1=ignored, and use the ! number of points and iter. below) # These numbers are ignored except if req_acc_FO is equal to -1 5000 = npoints_fo_grid ! number of points to setup grids @@ -228,40 +228,40 @@ runcard: # PDF choice: this automatically fixes also alpha_s(MZ) and its evol. * #*********************************************************************** lhapdf = pdlabel ! PDF set - 324900 = lhaid ! If pdlabel=lhapdf, this is the lhapdf number. Only - ! numbers for central PDF sets are allowed. Can be a list; + 324900 = lhaid ! If pdlabel=lhapdf, this is the lhapdf number. Only + ! numbers for central PDF sets are allowed. Can be a list; ! PDF sets beyond the first are included via reweighting. #*********************************************************************** # Include the NLO Monte Carlo subtr. terms for the following parton * # shower (HERWIG6 | HERWIGPP | PYTHIA6Q | PYTHIA6PT | PYTHIA8) * # WARNING: PYTHIA6PT works only for processes without FSR!!!! * #*********************************************************************** - HERWIG6 = parton_shower + HERWIG6 = parton_shower 1.0 = shower_scale_factor ! multiply default shower starting ! scale by this factor #*********************************************************************** # Renormalization and factorization scales * # (Default functional form for the non-fixed scales is the sum of * -# the transverse masses divided by two of all final state particles * +# the transverse masses divided by two of all final state particles * # and partons. This can be changed in SubProcesses/set_scales.f or via * # dynamical_scale_choice option) * #*********************************************************************** True = fixed_ren_scale ! if .true. use fixed ren scale True = fixed_fac_scale ! if .true. use fixed fac scale - 80.352 = mur_ref_fixed ! fixed ren reference scale + 80.352 = mur_ref_fixed ! fixed ren reference scale 80.352 = muf_ref_fixed ! fixed fact reference scale -1 = dynamical_scale_choice ! Choose one (or more) of the predefined ! dynamical choices. Can be a list; scale choices beyond the ! first are included via reweighting 1.0 = mur_over_ref ! ratio of current muR over reference muR 1.0 = muf_over_ref ! ratio of current muF over reference muF -#*********************************************************************** +#*********************************************************************** # Reweight variables for scale dependence and PDF uncertainty * #*********************************************************************** 1.0, 2.0, 0.5 = rw_rscale ! muR factors to be included by reweighting 1.0, 2.0, 0.5 = rw_fscale ! muF factors to be included by reweighting - True = reweight_scale ! Reweight to get scale variation using the - ! rw_rscale and rw_fscale factors. Should be a list of + True = reweight_scale ! Reweight to get scale variation using the + ! rw_rscale and rw_fscale factors. Should be a list of ! booleans of equal length to dynamical_scale_choice to ! specify for which choice to include scale dependence. False = reweight_pdf ! Reweight to get PDF uncertainty. Should be a @@ -282,14 +282,14 @@ runcard: # MG5_aMC available, but available in Pythia8. * # -1: NNLL+NLO jet-veto computation. See arxiv:1412.8408 [hep-ph]. * #*********************************************************************** - 0 = ickkw + 0 = ickkw #*********************************************************************** # #*********************************************************************** # BW cutoff (M+/-bwcutoff*Gamma). Determines which resonances are * # written in the LHE event file * #*********************************************************************** - 15.0 = bwcutoff + 15.0 = bwcutoff #*********************************************************************** # Cuts on the jets. Jet clustering is performed by FastJet. * # - If gamma_is_j, photons are also clustered * @@ -345,9 +345,9 @@ runcard: # Use PineAPPL to generate PDF-independent fast-interpolation grid * # (https://zenodo.org/record/3992765#.X2EWy5MzbVo) * #*********************************************************************** - True = pineappl ! PineAPPL switch + True = pineappl ! PineAPPL switch #*********************************************************************** -#********************************************************************* +#********************************************************************* # Additional hidden parameters #********************************************************************* 5 = maxjetflavor # hidden_parameter @@ -360,7 +360,7 @@ runcard: ################################### ## INFORMATION FOR MASS ################################### -BLOCK MASS # +BLOCK MASS # 6 1.725000e+02 # mt 23 9.115350e+01 # mz 24 8.035200e+01 # mw @@ -386,7 +386,7 @@ BLOCK MASS # ################################### ## INFORMATION FOR SMINPUTS ################################### -BLOCK SMINPUTS # +BLOCK SMINPUTS # 2 1.166379e-05 # gf 3 1.180000e-01 # as (note that parameter not used if you use a pdf set) ################################### @@ -480,14 +480,14 @@ runshower = False /FixedOrderAnalysis/ ( is the name of the exported # process directory). See the # /FixedOrderAnalysis/analysis_*_template.f file for details # on how to write your own analysis. -# +# ####################################################################### # # Analysis format. @@ -501,7 +501,7 @@ FO_ANALYSIS_FORMAT = HwU # # # Needed extra-libraries (FastJet is already linked): -FO_EXTRALIBS = +FO_EXTRALIBS = # # (Absolute) path to the extra libraries. Directory names should be # separated by white spaces. @@ -509,7 +509,7 @@ FO_EXTRAPATHS = # # (Absolute) path to the dirs containing header files needed by the # libraries (e.g. C++ header files): -FO_INCLUDEPATHS = +FO_INCLUDEPATHS = # # User's analysis (to be put in the /FixedOrderAnalysis/ # directory). Please use .o as extension and white spaces to separate @@ -535,7 +535,7 @@ FO_ANALYSE = LHCB_WP_7TEV.o runcard_gitversion: 82de4ad x1_label: etal x1_label_tex: $\eta_{\bar{\ell}}$ -x1_unit: +x1_unit: y_label: dsig/detal y_label_tex: $\frac{\mathrm{d}\sigma}{\mathrm{d}\eta_{\bar{\ell}}}$ y_unit: pb diff --git a/pineappl_cli/tests/uncert.rs b/pineappl_cli/tests/uncert.rs index 438604fa1..2e44fff35 100644 --- a/pineappl_cli/tests/uncert.rs +++ b/pineappl_cli/tests/uncert.rs @@ -25,8 +25,8 @@ Options: "; const DEFAULT_STR: &str = - "b etal dsig/detal 324900 NNPDF40_nnlo_as_01180 - [] [pb] [pb] [%] [%] [pb] [%] [%] + "b etal dsig/detal 324900 NNPDF40_nnlo_as_01180 + [] [pb] [pb] [%] [%] [pb] [%] [%] -+----+----+-----------+-----------+--------+--------+-----------+--------+-------- 0 2 2.25 7.7302788e2 7.7302788e2 -0.67 0.67 7.7302788e2 -0.62 0.62 1 2.25 2.5 7.0634852e2 7.0634851e2 -0.72 0.72 7.0634851e2 -0.62 0.62 @@ -38,8 +38,8 @@ const DEFAULT_STR: &str = 7 4 4.5 2.9665790e1 2.9665790e1 -2.56 2.56 2.9665789e1 -3.51 3.51 "; -const CL_90_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed - [] [pb] [pb] [%] [%] +const CL_90_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed + [] [pb] [pb] [%] [%] -+----+----+-----------+-----------+---------+--------- 0 2 2.25 7.5459110e2 7.5461655e2 -1.87 1.87 1 2.25 2.5 6.9028342e2 6.9027941e2 -1.90 1.90 @@ -51,8 +51,8 @@ const CL_90_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed 7 4 4.5 2.7517266e1 2.7504644e1 -4.55 4.55 "; -const INTEGRATED_STR: &str = "b etal integ NNPDF31_nlo_as_0118_luxqed - [] [] [] [%] [%] +const INTEGRATED_STR: &str = "b etal integ NNPDF31_nlo_as_0118_luxqed + [] [] [] [%] [%] -+----+----+-----------+-----------+---------+--------- 0 2 2.25 1.8864777e2 1.8865414e2 -1.14 1.14 1 2.25 2.5 1.7257086e2 1.7256985e2 -1.16 1.16 @@ -64,8 +64,8 @@ const INTEGRATED_STR: &str = "b etal integ NNPDF31_nlo_as_0118_luxq 7 4 4.5 1.3758633e1 1.3752322e1 -2.77 2.77 "; -const ORDERS_A2_AS1A2_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed - [] [pb] [pb] [%] [%] +const ORDERS_A2_AS1A2_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118_luxqed + [] [pb] [pb] [%] [%] -+----+----+-----------+-----------+---------+--------- 0 2 2.25 7.6246034e2 7.6248591e2 -1.14 1.14 1 2.25 2.5 6.9684577e2 6.9684166e2 -1.16 1.16 @@ -79,7 +79,7 @@ const ORDERS_A2_AS1A2_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118 const SCALE_ABS_STR: &str = "b etal dsig/detal (r=1,f=1) (r=2,f=2) (r=0.5,f=0.5) (r=2,f=1) (r=1,f=2) (r=0.5,f=1) (r=1,f=0.5) - [] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] + [] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] -+----+----+-----------+-----------+-----------+-------------+-----------+-----------+-----------+----------- 0 2 2.25 7.5459110e2 7.5459110e2 7.6745431e2 7.4296019e2 7.4384068e2 7.7529764e2 7.6796494e2 7.2595107e2 1 2.25 2.5 6.9028342e2 6.9028342e2 7.0221920e2 6.7923774e2 6.8058382e2 7.0957480e2 7.0235002e2 6.6417441e2 @@ -92,7 +92,7 @@ const SCALE_ABS_STR: &str = "; const SCALE_COV_STR: &str = "b etal dsig/detal 7pt scale (cov) - [] [pb] [%] + [] [pb] [%] -+----+----+-----------+-------+------- 0 2 2.25 7.5459110e2 -3.29 3.29 1 2.25 2.5 6.9028342e2 -3.30 3.30 @@ -105,7 +105,7 @@ const SCALE_COV_STR: &str = "b etal dsig/detal 7pt scale (cov) "; const SCALE_COV_9_STR: &str = "b etal dsig/detal 9pt scale (cov) - [] [pb] [%] + [] [pb] [%] -+----+----+-----------+-------+------- 0 2 2.25 7.5459110e2 -4.48 4.48 1 2.25 2.5 6.9028342e2 -4.48 4.48 @@ -117,8 +117,8 @@ const SCALE_COV_9_STR: &str = "b etal dsig/detal 9pt scale (cov) 7 4 4.5 2.7517266e1 -4.67 4.67 "; -const SCALE_ENV_STR: &str = "b etal dsig/detal 7pt-svar (env) - [] [pb] [%] +const SCALE_ENV_STR: &str = "b etal dsig/detal 7pt-svar (env) + [] [pb] [%] -+----+----+-----------+-------+------- 0 2 2.25 7.5459110e2 -3.80 2.74 1 2.25 2.5 6.9028342e2 -3.78 2.79 @@ -130,8 +130,8 @@ const SCALE_ENV_STR: &str = "b etal dsig/detal 7pt-svar (env) 7 4 4.5 2.7517266e1 -3.47 2.87 "; -const SCALE_ENV_9_STR: &str = "b etal dsig/detal 9pt-svar (env) - [] [pb] [%] +const SCALE_ENV_9_STR: &str = "b etal dsig/detal 9pt-svar (env) + [] [pb] [%] -+----+----+-----------+-------+------- 0 2 2.25 7.5459110e2 -5.61 4.04 1 2.25 2.5 6.9028342e2 -5.54 4.12 diff --git a/pineappl_cli/tests/write.rs b/pineappl_cli/tests/write.rs index 62dc43b1f..ddf8c63d2 100644 --- a/pineappl_cli/tests/write.rs +++ b/pineappl_cli/tests/write.rs @@ -45,7 +45,7 @@ const CHANNEL_STR: &str = "c entry entry 4 1 × ( 2, 22) 1 × ( 4, 22) "; -const DEDUP_CHANNEL_DIFF_STR: &str = "b x1 O(as^0 a^2) O(as^0 a^3) O(as^1 a^2) +const DEDUP_CHANNEL_DIFF_STR: &str = "b x1 O(as^0 a^2) O(as^0 a^3) O(as^1 a^2) -+----+----+-----------+-----------+-------+-------------+-------------+-------+-----------+-----------+------- 0 2 2.25 6.5070305e2 6.5070305e2 0.000e0 -7.8692484e0 -7.8692484e0 0.000e0 1.1175729e2 1.1175729e2 0.000e0 1 2.25 2.5 5.9601236e2 5.9601236e2 0.000e0 -6.5623495e0 -6.5623495e0 0.000e0 1.0083341e2 1.0083341e2 0.000e0 @@ -57,8 +57,8 @@ const DEDUP_CHANNEL_DIFF_STR: &str = "b x1 O(as^0 a^2) 7 4 4.5 2.2383492e1 2.2383492e1 0.000e0 -2.2022770e-1 -2.2022770e-1 0.000e0 5.3540011e0 5.3540011e0 0.000e0 "; -const DEFAULT_STR: &str = "b etal dsig/detal - [] [pb] +const DEFAULT_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 7.5459110e2 1 2.25 2.5 6.9028342e2 @@ -70,15 +70,15 @@ const DEFAULT_STR: &str = "b etal dsig/detal 7 4 4.5 2.7517266e1 "; -const DELETE_BINS_02_57_STR: &str = "b etal dsig/detal - [] [pb] +const DELETE_BINS_02_57_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2.75 3 4.8552235e2 1 3 3.25 3.6195456e2 "; -const DELETE_BINS_25_STR: &str = "b etal dsig/detal - [] [pb] +const DELETE_BINS_25_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 7.5459110e2 1 2.25 2.5 6.9028342e2 @@ -108,7 +108,7 @@ four nnpdf_id: LHCBWZMU7TEV pineappl_gitversion: v0.4.1-114-gdce19e0 results: ---------------------------------------------------------------------- - PineAPPL MC sigma central min max + PineAPPL MC sigma central min max 1/100 sigma 1/1000 1/1000 1/1000 ---------------------------------------------------------------------- 3.772955e+02 3.772821e+02 0.165 0.022 0.0357 0.0392 0.0313 @@ -123,14 +123,14 @@ results: ---------------------------------------------------------------------- runcard_gitversion: 82de4ad x1_label: etal x1_label_tex: $\eta_{\bar{\ell}}$ -x1_unit: +x1_unit: y_label: dsig/detal y_label_tex: $\frac{\mathrm{d}\sigma}{\mathrm{d}\eta_{\bar{\ell}}}$ y_unit: pb "; -const MERGE_BINS_STR: &str = "b etal dsig/detal - [] [pb] +const MERGE_BINS_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 7.5459110e2 1 2.25 2.5 6.9028342e2 @@ -141,8 +141,8 @@ const MERGE_BINS_STR: &str = "b etal dsig/detal 6 3.5 4.5 7.1692887e1 "; -const REMAP_STR: &str = "b etal x2 x3 dsig/detal - [] [] [] [pb] +const REMAP_STR: &str = "b etal x2 x3 dsig/detal + [] [] [] [pb] -+--+--+-+-+-+-+----------- 0 0 1 0 2 1 2 3.7729555e1 1 0 1 0 2 2 3 3.4514171e1 @@ -157,8 +157,8 @@ const REMAP_STR: &str = "b etal x2 x3 dsig/detal const REMAP_NO_REMAPPER_STR: &str = "Error: grid does not have a remapper "; -const REWRITE_CHANNELS_CONVOLVE_STR: &str = "b etal dsig/detal - [] [pb] +const REWRITE_CHANNELS_CONVOLVE_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 7.5534392e2 1 2.25 2.5 6.9342538e2 @@ -173,14 +173,14 @@ const REWRITE_CHANNELS_CONVOLVE_STR: &str = "b etal dsig/detal const REWRITE_CHANNELS_STR: &str = "c entry entry entry entry entry entry -+--------------------------------+-------------------------------+-----------------------+--------------------------------+-----------------------+--------------------- 0 0.0000128881 × ( 2, -5) 0.050940490000000005 × ( 2, -3) 0.9490461561 × ( 2, -1) 0.0017222500000000003 × ( 4, -5) 0.9473907556 × ( 4, -3) 0.05089536 × ( 4, -1) -1 0.0017351381000000003 × (-5, 21) 0.9983312456 × (-3, 21) 0.9999415161 × (-1, 21) -2 1 × (22, -3) 1 × (22, -1) -3 0.9999995342 × ( 2, 21) 1.0000083656 × ( 4, 21) -4 1 × ( 2, 22) 1 × ( 4, 22) +1 0.0017351381000000003 × (-5, 21) 0.9983312456 × (-3, 21) 0.9999415161 × (-1, 21) +2 1 × (22, -3) 1 × (22, -1) +3 0.9999995342 × ( 2, 21) 1.0000083656 × ( 4, 21) +4 1 × ( 2, 22) 1 × ( 4, 22) "; -const SCALE_BY_BIN_STR: &str = "b etal dsig/detal - [] [pb] +const SCALE_BY_BIN_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 7.5459110e2 1 2.25 2.5 1.3805668e3 @@ -192,8 +192,8 @@ const SCALE_BY_BIN_STR: &str = "b etal dsig/detal 7 4 4.5 2.2013813e2 "; -const SCALE_BY_ORDER_STR: &str = "b etal dsig/detal - [] [pb] +const SCALE_BY_ORDER_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 4.3317419e2 1 2.25 2.5 3.9555841e2 @@ -219,8 +219,8 @@ const SPLIT_CHANNELS_STR: &str = "c entry 9 1 × ( 4, 22) "; -const MULTIPLE_ARGUMENTS_STR: &str = "b etal dsig/detal - [] [pb] +const MULTIPLE_ARGUMENTS_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.5 7.5454524e2 1 2.5 3 5.6456123e2 @@ -230,7 +230,7 @@ const MULTIPLE_ARGUMENTS_STR: &str = "b etal dsig/detal 5 4 4.5 2.9004607e1 "; -const ROTATE_PID_BASIS_NO_DIFF_STR: &str = "b x1 O(as^0 a^2) O(as^0 a^3) O(as^1 a^2) +const ROTATE_PID_BASIS_NO_DIFF_STR: &str = "b x1 O(as^0 a^2) O(as^0 a^3) O(as^1 a^2) -+----+----+-----------+-----------+-------+-------------+-------------+-------+-----------+-----------+------- 0 2 2.25 6.5070305e2 6.5070305e2 0.000e0 -7.8692484e0 -7.8692484e0 0.000e0 1.1175729e2 1.1175729e2 0.000e0 1 2.25 2.5 5.9601236e2 5.9601236e2 0.000e0 -6.5623495e0 -6.5623495e0 0.000e0 1.0083341e2 1.0083341e2 0.000e0 @@ -242,7 +242,7 @@ const ROTATE_PID_BASIS_NO_DIFF_STR: &str = "b x1 O(as^0 a^2) 7 4 4.5 2.2383492e1 2.2383492e1 0.000e0 -2.2022770e-1 -2.2022770e-1 0.000e0 5.3540011e0 5.3540011e0 0.000e0 "; -const ROTATE_PID_BASIS_DIFF_STR: &str = "b x1 O(as^0 a^2) O(as^0 a^3) O(as^1 a^2) +const ROTATE_PID_BASIS_DIFF_STR: &str = "b x1 O(as^0 a^2) O(as^0 a^3) O(as^1 a^2) -+----+----+-----------+-----------+----------+-------------+-------------+----------+-----------+-----------+---------- 0 2 2.25 6.5070305e2 6.5070305e2 -2.220e-16 -7.8692484e0 -7.8692484e0 -4.441e-16 1.1175729e2 1.1175729e2 -1.221e-15 1 2.25 2.5 5.9601236e2 5.9601236e2 -7.772e-16 -6.5623495e0 -6.5623495e0 -2.220e-16 1.0083341e2 1.0083341e2 -5.551e-16 @@ -416,8 +416,8 @@ const ROTATE_PID_BASIS_READ_CHANNELS_STR: &str = " c entry 157 0.03333333333333333 × (235, 22) "; -const REWRITE_ORDER_CONVOLVE_STR: &str = "b etal dsig/detal - [] [pb] +const REWRITE_ORDER_CONVOLVE_STR: &str = "b etal dsig/detal + [] [pb] -+----+----+----------- 0 2 2.25 1.8216658e2 1 2.25 2.5 1.6597039e2 From 5620f60a8bc017210e21e143df466470a864a38f Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Wed, 18 Sep 2024 18:47:13 +0200 Subject: [PATCH 04/16] add cargo check to hooks --- .pre-commit-config.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 616cdab34..40ae865b1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,13 +1,9 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks -ci: - autofix_prs: false - skip: [fmt] repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: - - id: trailing-whitespace - id: end-of-file-fixer - id: check-merge-conflict - repo: https://github.com/astral-sh/ruff-pre-commit @@ -25,8 +21,14 @@ repos: description: Format Rust files with cargo fmt. entry: cargo fmt -- language: system - files: ^crates/.*\.rs$ + files: ^pineappl\S*\/.*\.rs$ args: [] + - id: check + name: cargo check + description: Run cargo check. + entry: bash -c 'cargo check --features=evolve,fktable' + language: system + require_serial: true - repo: https://github.com/pre-commit/pre-commit rev: v3.8.0 hooks: From 228f35ad77f4385e361f2cdeb8511f4cc61acbd6 Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Wed, 18 Sep 2024 18:57:21 +0200 Subject: [PATCH 05/16] put back removal of trailing white space --- .pre-commit-config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 40ae865b1..be00f8a41 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,6 +4,8 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: + - id: trailing-whitespace + exclude: ^pineappl_cli/tests/ - id: end-of-file-fixer - id: check-merge-conflict - repo: https://github.com/astral-sh/ruff-pre-commit From d00ad69c7ab9aa2922a4a088f046d2b5ef6102f4 Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Wed, 18 Sep 2024 19:00:03 +0200 Subject: [PATCH 06/16] always run cargo check whenever rust files are modified --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index be00f8a41..d362ee5d6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,6 +31,7 @@ repos: entry: bash -c 'cargo check --features=evolve,fktable' language: system require_serial: true + types: [rust] - repo: https://github.com/pre-commit/pre-commit rev: v3.8.0 hooks: From f20d24677f4ca239219accb67d325b88192afdee Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Wed, 18 Sep 2024 20:32:04 +0200 Subject: [PATCH 07/16] actually remove the need for ruff.toml --- .pre-commit-config.yaml | 2 + pineappl_cli/src/subgrid-pull-plot.py | 56 +++++++++++++++------------ ruff.toml | 7 ---- 3 files changed, 33 insertions(+), 32 deletions(-) delete mode 100644 ruff.toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d362ee5d6..2c96882a1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,9 @@ repos: hooks: - id: ruff args: [--fix] + exclude: ^pineappl_cli/src/ - id: ruff-format + args: [--line-length=80] - repo: local hooks: - id: fmt diff --git a/pineappl_cli/src/subgrid-pull-plot.py b/pineappl_cli/src/subgrid-pull-plot.py index f961304dc..c62af8db6 100644 --- a/pineappl_cli/src/subgrid-pull-plot.py +++ b/pineappl_cli/src/subgrid-pull-plot.py @@ -15,23 +15,25 @@ nmass = 50 sym_min = -max(fabs(np.min(x)), fabs(np.max(x))) -sym_max = max(fabs(np.min(x)), fabs(np.max(x))) +sym_max = max(fabs(np.min(x)), fabs(np.max(x))) xi = np.linspace(sym_min, sym_max, (nrap // 2) * 2 + 1) yi = np.logspace(log10(np.min(y)), log10(np.max(y)), nmass) -zi = griddata((x, y), z, (xi[None, :], yi[:, None]), method='linear', rescale=True) +zi = griddata( + (x, y), z, (xi[None, :], yi[:, None]), method="linear", rescale=True +) -#print(xi.shape) -#print(yi.shape) -#print(zi.shape) +# print(xi.shape) +# print(yi.shape) +# print(zi.shape) # mask impossible kinematic values for iy, ix in np.ndindex(zi.shape): - #print(ix, iy) + # print(ix, iy) x1v = yi[iy] * np.exp(xi[ix]) x2v = yi[iy] / np.exp(xi[ix]) - #print('y = {{}} m/s = {{}} -> x1 = {{}} x2 = {{}}'.format(xi[ix], yi[iy], x1v, x2v)) + # print('y = {{}} m/s = {{}} -> x1 = {{}} x2 = {{}}'.format(xi[ix], yi[iy], x1v, x2v)) if x1v > 1.0 or x2v > 1.0: zi[iy, ix] = np.nan @@ -39,24 +41,28 @@ figure, axes = plt.subplots(1, 2, constrained_layout=True) figure.set_size_inches(10, 5) -mesh = axes[0].pcolormesh(xi, yi, zi, shading='nearest', linewidth=0, snap=True) -axes[0].scatter(x, y, marker='*', s=5) -axes[0].set_yscale('log') -axes[0].set_xlabel(r'$y = 1/2 \log (x_1/x_2)$') -axes[0].set_ylabel(r'$M/\sqrt{{s}} = \sqrt{{x_1 x_2}}$') -#axes[0].set_aspect('equal', share=True) +mesh = axes[0].pcolormesh(xi, yi, zi, shading="nearest", linewidth=0, snap=True) +axes[0].scatter(x, y, marker="*", s=5) +axes[0].set_yscale("log") +axes[0].set_xlabel(r"$y = 1/2 \log (x_1/x_2)$") +axes[0].set_ylabel(r"$M/\sqrt{{s}} = \sqrt{{x_1 x_2}}$") +# axes[0].set_aspect('equal', share=True) x1i = np.logspace(log10(np.min(x1)), log10(np.max(x1)), 50) x2i = np.logspace(log10(np.min(x2)), log10(np.max(x2)), 50) -z12i = griddata((x1, x2), z, (x1i[None, :], x2i[:, None]), method='linear', rescale=True) - -mesh = axes[1].pcolormesh(x1i, x2i, z12i, shading='nearest', linewidth=0, snap=True) -axes[1].set_xscale('log') -axes[1].set_yscale('log') -axes[1].scatter(x1, x2, marker='*', s=5) -axes[1].set_aspect('equal', share=True) -axes[1].set_xlabel(r'$x_1$') -axes[1].set_ylabel(r'$x_2$') - -figure.colorbar(mesh, ax=axes, extend='min') -figure.savefig('plot.pdf') +z12i = griddata( + (x1, x2), z, (x1i[None, :], x2i[:, None]), method="linear", rescale=True +) + +mesh = axes[1].pcolormesh( + x1i, x2i, z12i, shading="nearest", linewidth=0, snap=True +) +axes[1].set_xscale("log") +axes[1].set_yscale("log") +axes[1].scatter(x1, x2, marker="*", s=5) +axes[1].set_aspect("equal", share=True) +axes[1].set_xlabel(r"$x_1$") +axes[1].set_ylabel(r"$x_2$") + +figure.colorbar(mesh, ax=axes, extend="min") +figure.savefig("plot.pdf") diff --git a/ruff.toml b/ruff.toml deleted file mode 100644 index 0f2193385..000000000 --- a/ruff.toml +++ /dev/null @@ -1,7 +0,0 @@ -# Do not check specific files or directories -extend-exclude = [ - "pineappl_cli/src/plot.py", - "pineappl_cli/src/subgrid-pull-plot.py", -] - -line-length = 80 From b992591ad00f89c06a314e3cd54b983fd469011e Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Wed, 18 Sep 2024 21:40:37 +0200 Subject: [PATCH 08/16] fix literal strings in test --- pineappl_cli/tests/plot.rs | 60 +++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/pineappl_cli/tests/plot.rs b/pineappl_cli/tests/plot.rs index 7309ec2fc..554d1974b 100644 --- a/pineappl_cli/tests/plot.rs +++ b/pineappl_cli/tests/plot.rs @@ -422,7 +422,7 @@ if __name__ == "__main__": main() "#; -const SUBGRID_PULL_STR: &str = r"#!/usr/bin/env python3 +const SUBGRID_PULL_STR: &str = r#"#!/usr/bin/env python3 import matplotlib.pyplot as plt import numpy as np @@ -439,23 +439,25 @@ nrap = 50 nmass = 50 sym_min = -max(fabs(np.min(x)), fabs(np.max(x))) -sym_max = max(fabs(np.min(x)), fabs(np.max(x))) +sym_max = max(fabs(np.min(x)), fabs(np.max(x))) xi = np.linspace(sym_min, sym_max, (nrap // 2) * 2 + 1) yi = np.logspace(log10(np.min(y)), log10(np.max(y)), nmass) -zi = griddata((x, y), z, (xi[None, :], yi[:, None]), method='linear', rescale=True) +zi = griddata( + (x, y), z, (xi[None, :], yi[:, None]), method="linear", rescale=True +) -#print(xi.shape) -#print(yi.shape) -#print(zi.shape) +# print(xi.shape) +# print(yi.shape) +# print(zi.shape) # mask impossible kinematic values for iy, ix in np.ndindex(zi.shape): - #print(ix, iy) + # print(ix, iy) x1v = yi[iy] * np.exp(xi[ix]) x2v = yi[iy] / np.exp(xi[ix]) - #print('y = {} m/s = {} -> x1 = {} x2 = {}'.format(xi[ix], yi[iy], x1v, x2v)) + # print('y = {} m/s = {} -> x1 = {} x2 = {}'.format(xi[ix], yi[iy], x1v, x2v)) if x1v > 1.0 or x2v > 1.0: zi[iy, ix] = np.nan @@ -463,28 +465,32 @@ for iy, ix in np.ndindex(zi.shape): figure, axes = plt.subplots(1, 2, constrained_layout=True) figure.set_size_inches(10, 5) -mesh = axes[0].pcolormesh(xi, yi, zi, shading='nearest', linewidth=0, snap=True) -axes[0].scatter(x, y, marker='*', s=5) -axes[0].set_yscale('log') -axes[0].set_xlabel(r'$y = 1/2 \log (x_1/x_2)$') -axes[0].set_ylabel(r'$M/\sqrt{s} = \sqrt{x_1 x_2}$') -#axes[0].set_aspect('equal', share=True) +mesh = axes[0].pcolormesh(xi, yi, zi, shading="nearest", linewidth=0, snap=True) +axes[0].scatter(x, y, marker="*", s=5) +axes[0].set_yscale("log") +axes[0].set_xlabel(r"$y = 1/2 \log (x_1/x_2)$") +axes[0].set_ylabel(r"$M/\sqrt{s} = \sqrt{x_1 x_2}$") +# axes[0].set_aspect('equal', share=True) x1i = np.logspace(log10(np.min(x1)), log10(np.max(x1)), 50) x2i = np.logspace(log10(np.min(x2)), log10(np.max(x2)), 50) -z12i = griddata((x1, x2), z, (x1i[None, :], x2i[:, None]), method='linear', rescale=True) - -mesh = axes[1].pcolormesh(x1i, x2i, z12i, shading='nearest', linewidth=0, snap=True) -axes[1].set_xscale('log') -axes[1].set_yscale('log') -axes[1].scatter(x1, x2, marker='*', s=5) -axes[1].set_aspect('equal', share=True) -axes[1].set_xlabel(r'$x_1$') -axes[1].set_ylabel(r'$x_2$') - -figure.colorbar(mesh, ax=axes, extend='min') -figure.savefig('plot.pdf') -"; +z12i = griddata( + (x1, x2), z, (x1i[None, :], x2i[:, None]), method="linear", rescale=True +) + +mesh = axes[1].pcolormesh( + x1i, x2i, z12i, shading="nearest", linewidth=0, snap=True +) +axes[1].set_xscale("log") +axes[1].set_yscale("log") +axes[1].scatter(x1, x2, marker="*", s=5) +axes[1].set_aspect("equal", share=True) +axes[1].set_xlabel(r"$x_1$") +axes[1].set_ylabel(r"$x_2$") + +figure.colorbar(mesh, ax=axes, extend="min") +figure.savefig("plot.pdf") +"#; const DRELL_YAN_AFB_STR: &str = r#"#!/usr/bin/env python3 From 77c9d8292cee7d9fe0861eda02a4743d141a926e Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Wed, 18 Sep 2024 22:00:32 +0200 Subject: [PATCH 09/16] modify the guideline to refer to pre-commit hooks --- CONTRIBUTING.md | 8 ++++---- docs/maintainers-guide.md | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f24254d59..f7ca6ce32 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,10 +2,10 @@ ## Rust -- Before you commit, make sure that your code compiles with `cargo check` and - that it has been formatted properly; `cargo fmt` does that for you. Also - check if your changes introduce any new linter warnings by running `cargo - clippy` +- Before you commit, make sure that you have [pre-commit](https://pre-commit.com/) + installed. This will ensure that the code is formatted correctly and that + it compiles properly. Also, check if your changes introduce any new linter + warnings by running `cargo clippy`. - Make sure to keep `CHANGELOG.md` up-to-date. - Make sure not to use Rust features newer than the specified minimum supported Rust Version (MSRV), which is documented in the [README](README.md). You can diff --git a/docs/maintainers-guide.md b/docs/maintainers-guide.md index 00d857baa..78c650b16 100644 --- a/docs/maintainers-guide.md +++ b/docs/maintainers-guide.md @@ -48,6 +48,7 @@ - `_config.yml`: configuration file for PineAPPL's Github-pages website - `install-capi.sh`: POSIX-compliant shell script to download and install PineAPPL's pre-built CAPI +- `.pre-commit-config.yaml`: pre-commit hooks configuration [cargo-xtask]: https://github.com/matklad/cargo-xtask [release page]: https://github.com/NNPDF/pineappl/releases From 00615b0a67ba80a6056d1b1982e322049ae1fb38 Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Thu, 19 Sep 2024 00:21:07 +0200 Subject: [PATCH 10/16] including more excluded files into ruff --- .pre-commit-config.yaml | 2 +- pineappl_cli/src/subgrid-pull-plot.py | 6 +++--- pineappl_cli/tests/plot.rs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2c96882a1..02acb6067 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: hooks: - id: ruff args: [--fix] - exclude: ^pineappl_cli/src/ + exclude: ^pineappl_cli/src/plot.py - id: ruff-format args: [--line-length=80] - repo: local diff --git a/pineappl_cli/src/subgrid-pull-plot.py b/pineappl_cli/src/subgrid-pull-plot.py index c62af8db6..875c74adb 100644 --- a/pineappl_cli/src/subgrid-pull-plot.py +++ b/pineappl_cli/src/subgrid-pull-plot.py @@ -5,9 +5,9 @@ from math import fabs, log10 from scipy.interpolate import griddata -x1 = np.array([{x1}]) -x2 = np.array([{x2}]) -z = np.array([{z}]) +x1 = np.array([{x1}]) # noqa: F821 +x2 = np.array([{x2}]) # noqa: F821 +z = np.array([{z}]) # noqa: F821 x = 0.5 * np.log(x1 / x2) y = np.sqrt(x1 * x2) diff --git a/pineappl_cli/tests/plot.rs b/pineappl_cli/tests/plot.rs index 554d1974b..a0405f4f8 100644 --- a/pineappl_cli/tests/plot.rs +++ b/pineappl_cli/tests/plot.rs @@ -429,9 +429,9 @@ import numpy as np from math import fabs, log10 from scipy.interpolate import griddata -x1 = np.array([1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4]) -x2 = np.array([1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1]) -z = np.array([2.2636404e-50, -6.6271991e-35, -7.2634072e-33, -4.6363414e-32, -1.4035336e-32, -2.8615101e-34, -5.7171596e-33, 2.0242914e-32, 1.3011318e-31, 4.1943851e-32, -2.3943194e-31, -4.0822874e-31, 7.4269835e-32, 3.3102466e-30, -6.7406134e-29, 8.6405882e-29, 1.0251798e-29, 1.3337201e-29, -2.9594797e-28, -1.1280018e-27, -3.8272760e-27, -1.7111422e-26, -4.9137747e-26, -1.5452493e-25, -3.4803850e-25, -5.7661139e-25, -1.0950002e-24, -1.8561449e-24, -2.8635779e-24, -4.4710254e-24, -8.4639636e-24, -7.2626942e-24, 1.0952234e-25, 3.9359005e-26, 3.3405328e-33, -1.3346395e-17, -4.8781727e-16, -5.9094970e-15, -2.1377644e-15, -2.3693874e-16, 5.2750171e-15, -3.1676335e-14, -2.6638469e-14, -3.5876241e-14, 1.0792360e-13, 2.2024053e-13, 2.9625766e-13, 1.5190447e-12, -7.8923279e-12, -6.3136866e-12, 1.3367405e-13, 6.5117263e-12, -2.6263564e-11, -1.3253278e-10, -5.2854102e-10, -1.7998723e-9, -4.5718855e-9, -1.1353889e-8, -2.5220820e-8, -4.0480265e-8, -7.4559439e-8, -1.2669793e-7, -1.7344949e-7, -2.6003615e-7, -4.9586261e-7, -4.0712760e-7, 8.0035743e-9, 2.0992949e-9, -8.3501575e-32, 1.0473548e-15, 6.9232022e-16, 1.6377031e-15, 6.2674631e-16, 2.4746937e-16, 5.6180959e-14, -5.2477389e-13, -3.7459172e-13, -5.1222694e-14, -1.1538769e-12, -1.9473236e-12, -1.3518003e-12, -2.0176182e-11, -1.4973123e-11, -1.2672978e-12, -4.6166958e-12, -2.7338840e-11, -2.2945925e-10, -5.8204425e-10, -1.4007845e-9, -9.3035517e-9, -2.3111487e-8, -6.9037312e-8, -1.8369617e-7, -3.5810204e-7, -6.2948300e-7, -1.0157924e-6, -1.5465761e-6, -2.5107433e-6, -3.8492327e-6, -3.4443504e-6, 2.7139652e-8, 2.1584204e-8, 8.7148255e-31, -1.0572343e-14, -5.4812750e-15, 3.1510860e-16, -1.2314582e-16, 1.5637972e-16, 1.5458272e-15, -5.3208888e-15, -9.5196838e-14, 1.3914144e-13, -1.9411887e-12, -1.6244368e-12, -1.3413328e-11, -3.2330354e-11, -9.7224500e-13, -1.6788048e-11, -2.6265706e-11, -1.1033576e-10, -3.2067523e-10, -1.5270926e-9, -5.3956276e-9, -2.4549726e-8, -5.8448748e-8, -1.7714857e-7, -4.1296658e-7, -8.1429510e-7, -1.5921714e-6, -2.6826893e-6, -4.1357465e-6, -6.3455187e-6, -1.2577322e-5, -1.2077464e-5, 9.7407087e-8, 7.3316252e-8, 7.4142163e-31, -8.7388370e-15, -4.5226812e-15, 5.3694145e-16, -2.0528870e-17, -2.4773048e-16, 2.1394891e-15, 5.3368846e-15, 1.1078804e-13, -4.9163353e-13, -6.6219964e-13, 7.2657410e-12, -2.4994527e-11, 4.2764747e-12, 1.3607993e-12, -1.6352811e-10, -2.0123420e-10, -1.3666115e-9, -2.3294077e-9, -8.2291178e-9, -3.2611080e-8, -1.0239661e-7, -2.8839084e-7, -6.7443540e-7, -1.4483487e-6, -2.7176548e-6, -4.7074741e-6, -7.7746412e-6, -1.3372776e-5, -2.6176755e-5, -2.4936503e-5, 4.1879425e-7, 1.2361343e-7, -1.0157926e-31, -4.7195075e-14, 3.6831404e-13, 1.3966716e-12, -6.0055557e-14, 9.8701055e-16, -4.9875972e-15, -1.4020565e-14, 1.6808289e-13, 1.0087753e-16, -4.6117377e-11, -5.7268164e-11, -1.3893656e-10, -5.0318622e-10, -1.9376616e-10, -1.0433486e-10, -9.9305561e-10, -3.2623833e-9, -9.7225187e-9, -4.3156215e-8, -1.4362935e-7, -3.8556540e-7, -1.0130496e-6, -2.2814062e-6, -4.1643540e-6, -7.5662202e-6, -1.2759819e-5, -2.3031613e-5, -4.7605387e-5, -4.7765874e-5, 6.2168558e-7, 2.4951050e-7, -1.1857032e-29, 5.2726612e-13, -2.6066534e-12, -1.5108634e-11, 3.0534448e-12, 9.0744037e-13, -4.6561174e-14, -1.1069503e-16, -1.6682160e-16, 5.2718882e-15, 1.1429880e-15, -2.0141882e-12, 9.6165819e-12, -4.0404360e-12, -1.9303445e-10, -4.0172847e-10, -5.9895228e-10, -3.6554058e-10, -1.1240702e-9, -3.9841549e-9, -1.2121262e-8, -4.0381843e-8, -1.3055458e-7, -3.6134334e-7, -9.9898608e-7, -2.2534804e-6, -4.6128655e-6, -8.5615406e-6, -1.5297525e-5, -2.6421520e-5, -6.1916690e-5, -6.6211291e-5, 8.0256629e-7, 3.5591929e-7, 2.5499586e-28, -6.4244294e-13, -1.7712820e-11, -1.2219208e-11, -7.7871479e-12, -1.6403480e-13, 6.7881434e-14, -3.4987745e-12, 4.7645970e-11, 3.8961481e-12, 1.0566797e-13, 2.6233284e-13, -5.8071031e-12, 1.1584537e-14, 1.5753439e-11, -1.4384561e-10, -6.6544935e-10, -2.2862146e-10, -8.1018147e-10, -2.2625611e-9, -7.5062513e-9, -2.4956816e-8, -9.1244024e-8, -2.4598505e-7, -6.2416442e-7, -1.4275727e-6, -3.1337900e-6, -6.3233371e-6, -1.2140342e-5, -2.2411096e-5, -6.1316829e-5, -7.2668009e-5, 1.1649743e-6, 3.6614665e-7, 5.5380719e-29, -1.7129600e-13, -6.5365517e-12, -1.2541490e-11, -1.1048914e-10, -5.0637548e-11, 4.5577381e-11, 3.9601891e-11, -2.9194852e-10, -2.2420871e-11, -1.2854167e-12, 1.2184872e-11, -8.6648158e-11, -5.5867810e-11, -7.9539499e-12, -3.4412185e-11, -2.0137035e-10, -1.0521022e-10, -7.1000682e-11, 9.7467594e-11, 1.3371991e-9, 5.2972353e-9, 3.2062445e-8, 1.7663752e-7, 5.9979324e-7, 1.7506638e-6, 3.8633109e-6, 7.0091538e-6, 1.1794264e-5, 2.0361526e-5, 5.8035894e-5, 1.7009881e-5, -4.8184902e-6, 2.7100184e-7, -8.4621327e-30, 9.8522382e-12, -1.0413355e-10, -9.0831059e-11, -5.8284036e-10, -5.2920422e-10, -4.3721904e-10, 1.3948737e-11, -1.9796035e-9, -1.4723867e-10, -4.5311348e-12, -4.4681974e-10, 1.7717271e-9, 1.2925705e-9, -3.9816635e-11, 9.9414626e-13, 6.2239563e-11, 8.4730221e-10, 9.6355500e-10, 3.7343835e-9, 9.1149296e-9, 3.4591411e-8, 1.5702457e-7, 6.6410544e-7, 2.2296681e-6, 6.3998664e-6, 1.4905801e-5, 3.0065469e-5, 5.7201076e-5, 1.5131209e-4, 9.1602346e-5, 1.5424775e-3, 2.6122474e-4, -3.3185780e-5, 3.8251634e-11, -4.3320050e-10, -2.1665666e-10, -5.6185677e-10, -8.7283449e-10, -5.5458353e-10, -1.7400499e-10, 2.8592402e-10, 9.7539938e-12, -9.6979679e-11, 3.0126869e-9, 1.7913247e-9, 7.4537886e-11, -7.1603455e-11, -4.7380184e-11, 3.7939388e-10, 6.9896558e-10, 5.9278332e-11, 6.7169086e-9, 2.5397745e-8, 5.8042891e-8, 2.6460096e-7, 1.1776365e-6, 4.1512789e-6, 1.2464109e-5, 3.1212321e-5, 6.9130705e-5, 1.4365826e-4, -1.3656938e-4, 3.4073221e-3, 2.6151684e-2, -1.4059245e-4, -7.7021394e-5, -1.3616365e-28, 4.3305760e-13, 6.1110843e-11, -1.6545214e-10, -1.8728217e-9, -1.6514651e-9, -4.0542730e-10, -2.1592334e-10, -2.8390564e-9, -2.9053010e-11, -3.7684031e-11, 1.0312057e-9, 2.4142060e-10, 1.0668585e-9, 4.5356512e-10, 6.4720843e-10, 7.6446766e-10, 1.4282449e-9, 1.8143415e-9, 2.3536707e-8, 2.7608213e-8, 8.3382167e-8, 4.1160758e-7, 1.8471389e-6, 6.9601138e-6, 2.2424409e-5, 6.1131423e-5, 1.4815249e-4, 4.0691039e-4, -5.6830910e-3, 5.0433912e-2, 7.0915551e-2, -5.4919601e-3, -4.5095266e-6, 6.1182589e-27, -8.2042288e-11, 6.7407045e-11, -3.9439127e-10, -4.3078510e-9, -1.3977467e-9, -2.9974857e-10, -7.9598119e-10, -1.1736519e-9, 3.1194329e-11, -5.2523563e-11, -1.3757889e-10, -1.1556921e-9, 8.4383247e-9, 3.6708831e-9, 1.3802659e-9, 7.9283249e-9, 1.5651727e-8, 5.1950108e-8, 4.4172168e-8, 9.3859427e-8, 1.0801898e-7, 5.2033821e-7, 2.4734611e-6, 9.8164773e-6, 3.4478637e-5, 1.0259666e-4, 2.7371541e-4, 7.4464872e-4, -8.0538931e-3, 1.7501488e-1, 4.8828131e-2, -5.7257730e-3, -1.1749209e-6, -3.7817763e-28, 2.5199969e-11, -1.3021638e-10, -2.5207269e-10, -1.9548951e-9, -2.5600136e-9, -5.5083926e-10, -1.1913260e-9, -2.5623040e-9, -1.6098474e-9, 2.4977952e-10, -3.2955955e-10, 2.7481117e-9, 1.9916195e-9, 1.3607153e-8, 3.3547926e-9, -9.1645850e-10, 5.9619817e-9, 2.7857894e-8, 1.1491626e-8, 1.4020078e-7, 9.8292687e-8, 5.6306460e-7, 2.6408253e-6, 1.2032412e-5, 4.5324050e-5, 1.4795309e-4, 6.1028262e-4, -1.1559854e-2, 8.6605680e-2, 2.3825572e-1, -5.8490463e-3, -7.2151526e-4, -3.1919268e-7, 1.2103619e-26, -1.7652687e-10, -1.4696110e-10, -3.3161298e-10, 6.6081108e-10, -3.9684117e-9, -2.5733292e-9, -3.5457870e-9, -2.6236093e-9, -1.3142445e-9, 2.7751644e-9, 5.9231233e-9, 1.7955457e-9, 5.4984005e-9, 2.4810842e-9, 6.6080469e-9, -6.8122289e-10, 2.1242503e-8, 9.7166133e-8, 6.3345445e-8, 9.6875353e-8, 1.0054617e-7, 4.2988074e-7, 2.4623472e-6, 1.1607888e-5, 5.0940086e-5, 1.9203753e-4, 2.1659366e-4, -1.3909222e-2, 2.8615908e-1, 1.0736927e-1, -9.9254177e-3, -1.2999074e-4, -1.2934666e-8, 2.3824383e-26, -3.3837361e-10, -3.5775202e-10, 5.5893096e-10, -1.4575537e-8, -9.7086292e-9, -4.5414395e-9, -2.2833459e-9, -4.3059266e-9, -3.3765916e-9, 4.1669710e-9, 4.5490341e-9, 1.1205338e-8, 2.0362731e-8, 4.4990899e-9, 9.7753398e-9, 1.2529509e-8, 1.7556548e-8, 6.3123721e-8, 1.2414029e-7, 1.9792560e-7, 1.0930233e-7, 2.8685927e-7, 2.1875524e-6, 1.0619072e-5, 5.2340619e-5, 5.7251358e-4, -1.6615201e-2, 1.2797337e-1, 2.6652428e-1, -4.9442294e-3, -1.0013963e-4, -8.1276624e-5, 2.9681751e-9, 3.0665398e-26, -2.9626867e-10, -1.5187439e-9, -5.1405406e-9, -2.6596237e-8, -1.9106404e-8, -8.8489479e-9, -7.3902438e-9, -8.8083090e-9, -4.8294372e-9, 7.1102768e-9, 1.8945445e-8, 4.2145705e-8, 3.5604958e-8, 1.1841401e-8, 1.4705496e-8, 3.9302566e-8, 7.8377105e-8, 7.5023652e-8, 1.6196125e-7, 8.8264582e-8, 1.4561937e-7, 2.0528454e-7, 1.8008604e-6, 9.4770709e-6, 8.2346718e-5, -3.1833496e-3, 1.2063802e-2, 2.4399965e-1, 5.4725441e-2, -4.0420319e-3, 2.1452002e-4, -3.6650475e-5, 1.3752416e-11, 5.4224794e-26, -4.6988997e-10, -4.1394666e-9, -1.1151876e-8, -1.7856409e-8, -2.6954241e-8, -1.2999242e-8, -9.2769434e-9, -1.0992302e-8, -6.0130147e-9, 1.5594113e-8, 4.5614526e-8, 4.4066174e-8, 1.0023977e-7, 1.4988755e-8, 1.5080244e-8, 1.8602642e-8, 1.6148147e-7, 2.1737981e-7, 3.0432120e-7, 4.4400244e-7, 2.1081129e-7, 1.4578949e-7, 1.2197268e-6, 8.6115413e-6, -1.5109930e-4, -7.0135191e-3, 1.0207992e-1, 9.0038993e-2, -6.0127708e-3, 1.4932610e-3, -3.8792640e-6, -9.4708613e-6, 4.1946496e-26, -5.4851065e-10, -3.7589908e-9, -1.3632299e-8, -2.4066947e-8, -2.2793775e-8, -2.0458835e-8, -2.4927983e-8, -1.5418935e-8, -7.8124949e-9, 2.9926370e-8, 8.1840850e-8, 7.8543424e-8, 1.0423817e-7, 6.9682368e-8, 2.2419414e-8, 5.9255221e-8, 1.3521721e-7, 4.7744711e-7, 9.7322354e-7, 1.6424482e-6, 4.5282143e-7, 3.8731155e-8, 8.0318796e-7, 9.6464191e-6, -2.1834195e-3, 2.0132306e-2, 5.2859799e-2, -7.4579046e-4, 8.8911803e-4, 3.8281978e-4, -3.3225927e-5, -3.0002638e-8, 9.7102919e-26, -6.4799183e-10, -4.3912804e-9, -2.7683127e-8, -3.2660159e-8, -5.3747335e-8, -3.8016573e-8, -3.1822105e-8, -2.0693761e-8, -9.5240151e-10, 6.3960660e-8, 1.4269118e-7, 1.8203660e-7, 1.7536315e-7, 1.2679026e-7, 6.3706732e-8, 1.5402191e-7, 6.8743789e-7, 1.1887688e-6, 3.2929844e-6, 3.2412913e-6, 3.9913926e-7, 8.7186269e-9, 1.2417225e-6, -2.8484192e-4, 2.0098683e-3, 1.5676175e-2, 1.3756861e-3, -2.1557175e-4, 3.7798369e-4, 6.7517563e-6, -4.3492566e-6, 6.7547150e-8, 2.2948461e-25, -1.1104415e-9, -1.4407023e-8, -3.5610260e-8, -9.2900436e-8, -8.4121351e-8, -6.2831646e-8, -2.8903659e-8, -4.7224052e-9, 3.0440576e-8, 1.5742112e-7, 3.0651927e-7, 3.8890190e-7, 4.0744651e-7, 2.7635083e-7, 2.1873077e-7, 4.4929003e-7, 1.5147634e-6, 3.8179131e-6, 8.2886400e-6, 1.0835385e-5, 3.2492322e-6, -3.8310965e-7, -2.0411685e-5, 3.0401333e-5, 2.7925594e-3, 6.7772792e-4, -3.9208815e-4, 1.0243541e-4, -7.3603602e-6, -5.8013848e-6, 5.1172353e-7, 2.7743638e-25, -1.4862900e-9, -1.7066125e-8, -4.5230156e-8, -1.3763054e-7, -1.5773990e-7, -8.8947525e-8, -3.0545943e-8, 5.1686702e-8, 1.2029683e-7, 3.4679600e-7, 6.2208724e-7, 7.5986652e-7, 7.7075029e-7, 5.4767109e-7, 5.9263475e-7, 1.7234493e-6, 5.1260954e-6, 1.0531513e-5, 1.7234861e-5, 2.8150595e-5, 1.0408577e-5, -1.1674625e-6, -9.0883886e-6, 1.0064140e-4, 3.1936185e-5, -1.5860686e-4, 1.6594031e-7, -9.6381669e-6, -2.3932130e-6, 2.2786737e-7, 9.8620700e-10, 2.3008841e-25, -7.1375780e-10, -1.9262703e-8, -5.7275935e-8, -1.2676277e-7, -2.1447209e-7, -1.0645276e-7, 8.9982719e-9, 1.7309202e-7, 2.9508036e-7, 6.6653377e-7, 1.0878744e-6, 1.3840829e-6, 1.4640060e-6, 1.0720661e-6, 1.3467379e-6, 4.3657959e-6, 1.3085144e-5, 3.1580565e-5, 5.2539315e-5, 7.7665162e-5, 1.8673342e-5, -2.2448579e-6, 1.0299361e-6, -9.4295366e-6, -2.2857899e-5, -4.1528741e-7, -4.0662746e-7, -2.2689066e-8, 5.6763893e-9, 2.6186366e-25, -2.9170507e-10, -1.6790959e-8, -7.9625353e-8, -1.9350211e-7, -2.8796194e-7, -1.1189228e-7, 8.8689426e-8, 4.0182556e-7, 6.0869589e-7, 1.1839759e-6, 1.9490359e-6, 2.5191211e-6, 2.6590562e-6, 2.1935256e-6, 3.2954453e-6, 1.1376313e-5, 3.5315649e-5, 8.9569003e-5, 2.8997448e-4, -1.9426200e-3, -1.0891489e-3, 1.2585829e-4, 2.5723850e-25, -2.6380207e-10, -1.1179034e-8, -8.6168819e-8, -2.0598709e-7, -2.5567363e-7, -7.7226908e-8, 1.6701914e-7, 7.0488446e-7, 1.0443168e-6, 1.8643972e-6, 3.2428547e-6, 4.0692877e-6, 4.5815792e-6, 4.1309336e-6, 7.3321815e-6, 2.8892808e-5, 1.0617479e-4, 5.4887042e-4, -7.3064022e-3, 1.4855827e-2, 1.2365740e-2, -1.3137301e-3, 2.2742282e-25, 1.6918091e-11, -8.6813222e-9, -6.7599673e-8, -1.8543044e-7, -2.3771148e-7, -4.8784064e-8, 2.7669000e-7, 8.7710299e-7, 1.4609388e-6, 2.6046369e-6, 4.1943659e-6, 5.6982410e-6, 7.0761406e-6, 7.3852139e-6, 1.5795644e-5, 9.6844100e-5, 1.1308952e-4, -1.1895358e-2, 6.4758108e-2, 1.6206131e-1, 1.3740112e-2, -2.5412250e-3, 1.6512735e-25, 1.2025223e-10, -7.2282832e-9, -6.1373353e-8, -1.5099245e-7, -1.9741423e-7, -1.8280752e-8, 3.2352956e-7, 8.7452187e-7, 1.5625673e-6, 3.0121698e-6, 5.0119923e-6, 7.4446267e-6, 1.0245328e-5, 1.2613665e-5, 6.1402479e-5, -5.4990910e-4, -5.9252908e-3, 1.0046756e-1, 2.2088899e-1, 4.2065114e-2, -5.9131971e-3, 8.0138290e-5, 1.6578514e-25, 1.9649112e-10, -4.3026053e-9, -4.2952838e-8, -8.8210692e-8, -1.4535548e-7, 1.3170235e-9, 2.5248454e-7, 9.2598360e-7, 1.4621636e-6, 3.0345345e-6, 5.5322386e-6, 8.9270276e-6, 1.6221649e-5, 2.3761706e-5, -4.4621170e-4, 1.7791054e-3, 7.9297078e-2, 1.5808405e-1, 2.0283426e-2, -6.1894603e-3, 2.8513205e-4, -2.3938247e-6, 8.3458783e-26, 1.4797754e-10, -2.6972327e-9, -1.9409432e-8, -6.5940114e-8, -9.8199999e-8, 8.3723992e-9, 2.3520159e-7, 7.9645143e-7, 1.3949807e-6, 3.0033922e-6, 6.4262675e-6, 1.3920928e-5, -4.4487993e-5, -1.4043411e-4, 2.2264251e-3, 2.7205775e-2, 4.6187615e-2, -2.2650774e-3, -2.2534118e-3, 7.1210703e-4, -4.6216289e-5, 3.1946896e-7, 4.6145762e-26, 1.0838804e-10, -1.7911423e-9, -1.3949767e-8, -4.7492022e-8, -5.4909604e-8, 1.4597901e-8, 2.1173753e-7, 6.1415498e-7, 1.6344247e-6, 2.6592239e-6, -1.1236355e-5, -4.2815379e-5, 2.5480945e-4, 1.2358994e-3, 3.6289320e-3, 3.6265611e-3, -3.4830672e-3, 2.7063439e-5, 5.6457918e-4, -3.8247895e-6, -4.8299507e-6, 4.6496118e-8, 5.6326972e-26, 1.4141424e-10, -1.5331451e-9, -1.2866923e-8, -3.9146376e-8, -6.4515371e-8, 1.8264919e-8, 2.3120630e-7, 8.7472407e-7, 1.1071635e-7, 4.5626120e-6, 1.0557267e-4, 4.4686737e-4, 7.1310092e-4, 3.3277622e-4, -1.6067416e-4, -4.1602217e-4, 1.2018187e-4, 1.1339273e-4, -6.8148408e-6, -8.5193388e-6, 7.4974305e-7, 2.6756500e-26, 6.5646229e-11, -6.6713562e-10, -6.6920930e-9, -1.8938415e-8, -3.8361839e-8, 1.3944163e-8, 1.3740334e-7, -2.0724964e-7, 3.4016518e-6, 6.9656523e-5, 1.6236569e-4, 1.0456041e-4, -3.0321707e-5, -3.3108491e-5, -5.0377425e-6, 7.7321367e-7, -4.8441446e-6, -1.3836940e-5, -4.3280496e-6, 4.5264510e-7, 1.3206784e-9, 9.0789578e-28, 6.2126304e-12, 1.5798654e-11, 2.3170290e-10, 3.5435462e-10, 1.7267708e-9, -4.3101794e-10, -5.7085448e-9, -9.3355721e-8, 1.1083124e-6, -3.2317539e-7, -1.3572595e-5, -1.2485768e-5, -1.4067410e-6, -2.1245218e-7, -2.9071409e-7, -6.8490342e-7, -7.4999602e-7, -7.8875047e-8, 1.8591121e-8, -3.0724506e-28, -1.3992807e-12, 3.1558144e-12, 3.0973499e-11, 8.3814135e-11, 9.4465101e-11, -7.9526084e-11, -4.4493691e-10, 8.7757349e-9, -1.3457356e-7, -2.0511661e-7, -1.1824214e-8, -2.0322501e-9, -6.7921281e-10, -3.9270519e-11, 6.1648977e-12, 3.4897604e-14]) +x1 = np.array([1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 1.0000000e0, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 9.3094408e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 8.6278393e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.9562425e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 7.2958684e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.6481395e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 6.0147220e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 5.3975723e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.7989890e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 4.2216678e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.6687532e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 3.1438740e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.6511370e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 2.1950413e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.7802566e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.4112081e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 1.0914376e-1, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 8.2281221e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 6.0480029e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 4.3414917e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 3.0521584e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 2.1089187e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 1.4375069e-2, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 9.6991596e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 6.4962062e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 4.3285006e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 2.8738676e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.9034634e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 1.2586797e-3, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 8.3140688e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 5.4877953e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 3.6205450e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 2.3878783e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4, 1.5745606e-4]) # noqa: F821 +x2 = np.array([1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.5745606e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 2.3878783e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 5.4877953e-4, 3.6205450e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 9.6991596e-3, 6.4962062e-3, 4.3285006e-3, 2.8738676e-3, 1.9034634e-3, 1.2586797e-3, 8.3140688e-4, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.4375069e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 3.0521584e-2, 2.1089187e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1, 8.2281221e-2, 6.0480029e-2, 4.3414917e-2, 1.0000000e0, 9.3094408e-1, 8.6278393e-1, 7.9562425e-1, 7.2958684e-1, 6.6481395e-1, 6.0147220e-1, 5.3975723e-1, 4.7989890e-1, 4.2216678e-1, 3.6687532e-1, 3.1438740e-1, 2.6511370e-1, 2.1950413e-1, 1.7802566e-1, 1.4112081e-1, 1.0914376e-1]) # noqa: F821 +z = np.array([2.2636404e-50, -6.6271991e-35, -7.2634072e-33, -4.6363414e-32, -1.4035336e-32, -2.8615101e-34, -5.7171596e-33, 2.0242914e-32, 1.3011318e-31, 4.1943851e-32, -2.3943194e-31, -4.0822874e-31, 7.4269835e-32, 3.3102466e-30, -6.7406134e-29, 8.6405882e-29, 1.0251798e-29, 1.3337201e-29, -2.9594797e-28, -1.1280018e-27, -3.8272760e-27, -1.7111422e-26, -4.9137747e-26, -1.5452493e-25, -3.4803850e-25, -5.7661139e-25, -1.0950002e-24, -1.8561449e-24, -2.8635779e-24, -4.4710254e-24, -8.4639636e-24, -7.2626942e-24, 1.0952234e-25, 3.9359005e-26, 3.3405328e-33, -1.3346395e-17, -4.8781727e-16, -5.9094970e-15, -2.1377644e-15, -2.3693874e-16, 5.2750171e-15, -3.1676335e-14, -2.6638469e-14, -3.5876241e-14, 1.0792360e-13, 2.2024053e-13, 2.9625766e-13, 1.5190447e-12, -7.8923279e-12, -6.3136866e-12, 1.3367405e-13, 6.5117263e-12, -2.6263564e-11, -1.3253278e-10, -5.2854102e-10, -1.7998723e-9, -4.5718855e-9, -1.1353889e-8, -2.5220820e-8, -4.0480265e-8, -7.4559439e-8, -1.2669793e-7, -1.7344949e-7, -2.6003615e-7, -4.9586261e-7, -4.0712760e-7, 8.0035743e-9, 2.0992949e-9, -8.3501575e-32, 1.0473548e-15, 6.9232022e-16, 1.6377031e-15, 6.2674631e-16, 2.4746937e-16, 5.6180959e-14, -5.2477389e-13, -3.7459172e-13, -5.1222694e-14, -1.1538769e-12, -1.9473236e-12, -1.3518003e-12, -2.0176182e-11, -1.4973123e-11, -1.2672978e-12, -4.6166958e-12, -2.7338840e-11, -2.2945925e-10, -5.8204425e-10, -1.4007845e-9, -9.3035517e-9, -2.3111487e-8, -6.9037312e-8, -1.8369617e-7, -3.5810204e-7, -6.2948300e-7, -1.0157924e-6, -1.5465761e-6, -2.5107433e-6, -3.8492327e-6, -3.4443504e-6, 2.7139652e-8, 2.1584204e-8, 8.7148255e-31, -1.0572343e-14, -5.4812750e-15, 3.1510860e-16, -1.2314582e-16, 1.5637972e-16, 1.5458272e-15, -5.3208888e-15, -9.5196838e-14, 1.3914144e-13, -1.9411887e-12, -1.6244368e-12, -1.3413328e-11, -3.2330354e-11, -9.7224500e-13, -1.6788048e-11, -2.6265706e-11, -1.1033576e-10, -3.2067523e-10, -1.5270926e-9, -5.3956276e-9, -2.4549726e-8, -5.8448748e-8, -1.7714857e-7, -4.1296658e-7, -8.1429510e-7, -1.5921714e-6, -2.6826893e-6, -4.1357465e-6, -6.3455187e-6, -1.2577322e-5, -1.2077464e-5, 9.7407087e-8, 7.3316252e-8, 7.4142163e-31, -8.7388370e-15, -4.5226812e-15, 5.3694145e-16, -2.0528870e-17, -2.4773048e-16, 2.1394891e-15, 5.3368846e-15, 1.1078804e-13, -4.9163353e-13, -6.6219964e-13, 7.2657410e-12, -2.4994527e-11, 4.2764747e-12, 1.3607993e-12, -1.6352811e-10, -2.0123420e-10, -1.3666115e-9, -2.3294077e-9, -8.2291178e-9, -3.2611080e-8, -1.0239661e-7, -2.8839084e-7, -6.7443540e-7, -1.4483487e-6, -2.7176548e-6, -4.7074741e-6, -7.7746412e-6, -1.3372776e-5, -2.6176755e-5, -2.4936503e-5, 4.1879425e-7, 1.2361343e-7, -1.0157926e-31, -4.7195075e-14, 3.6831404e-13, 1.3966716e-12, -6.0055557e-14, 9.8701055e-16, -4.9875972e-15, -1.4020565e-14, 1.6808289e-13, 1.0087753e-16, -4.6117377e-11, -5.7268164e-11, -1.3893656e-10, -5.0318622e-10, -1.9376616e-10, -1.0433486e-10, -9.9305561e-10, -3.2623833e-9, -9.7225187e-9, -4.3156215e-8, -1.4362935e-7, -3.8556540e-7, -1.0130496e-6, -2.2814062e-6, -4.1643540e-6, -7.5662202e-6, -1.2759819e-5, -2.3031613e-5, -4.7605387e-5, -4.7765874e-5, 6.2168558e-7, 2.4951050e-7, -1.1857032e-29, 5.2726612e-13, -2.6066534e-12, -1.5108634e-11, 3.0534448e-12, 9.0744037e-13, -4.6561174e-14, -1.1069503e-16, -1.6682160e-16, 5.2718882e-15, 1.1429880e-15, -2.0141882e-12, 9.6165819e-12, -4.0404360e-12, -1.9303445e-10, -4.0172847e-10, -5.9895228e-10, -3.6554058e-10, -1.1240702e-9, -3.9841549e-9, -1.2121262e-8, -4.0381843e-8, -1.3055458e-7, -3.6134334e-7, -9.9898608e-7, -2.2534804e-6, -4.6128655e-6, -8.5615406e-6, -1.5297525e-5, -2.6421520e-5, -6.1916690e-5, -6.6211291e-5, 8.0256629e-7, 3.5591929e-7, 2.5499586e-28, -6.4244294e-13, -1.7712820e-11, -1.2219208e-11, -7.7871479e-12, -1.6403480e-13, 6.7881434e-14, -3.4987745e-12, 4.7645970e-11, 3.8961481e-12, 1.0566797e-13, 2.6233284e-13, -5.8071031e-12, 1.1584537e-14, 1.5753439e-11, -1.4384561e-10, -6.6544935e-10, -2.2862146e-10, -8.1018147e-10, -2.2625611e-9, -7.5062513e-9, -2.4956816e-8, -9.1244024e-8, -2.4598505e-7, -6.2416442e-7, -1.4275727e-6, -3.1337900e-6, -6.3233371e-6, -1.2140342e-5, -2.2411096e-5, -6.1316829e-5, -7.2668009e-5, 1.1649743e-6, 3.6614665e-7, 5.5380719e-29, -1.7129600e-13, -6.5365517e-12, -1.2541490e-11, -1.1048914e-10, -5.0637548e-11, 4.5577381e-11, 3.9601891e-11, -2.9194852e-10, -2.2420871e-11, -1.2854167e-12, 1.2184872e-11, -8.6648158e-11, -5.5867810e-11, -7.9539499e-12, -3.4412185e-11, -2.0137035e-10, -1.0521022e-10, -7.1000682e-11, 9.7467594e-11, 1.3371991e-9, 5.2972353e-9, 3.2062445e-8, 1.7663752e-7, 5.9979324e-7, 1.7506638e-6, 3.8633109e-6, 7.0091538e-6, 1.1794264e-5, 2.0361526e-5, 5.8035894e-5, 1.7009881e-5, -4.8184902e-6, 2.7100184e-7, -8.4621327e-30, 9.8522382e-12, -1.0413355e-10, -9.0831059e-11, -5.8284036e-10, -5.2920422e-10, -4.3721904e-10, 1.3948737e-11, -1.9796035e-9, -1.4723867e-10, -4.5311348e-12, -4.4681974e-10, 1.7717271e-9, 1.2925705e-9, -3.9816635e-11, 9.9414626e-13, 6.2239563e-11, 8.4730221e-10, 9.6355500e-10, 3.7343835e-9, 9.1149296e-9, 3.4591411e-8, 1.5702457e-7, 6.6410544e-7, 2.2296681e-6, 6.3998664e-6, 1.4905801e-5, 3.0065469e-5, 5.7201076e-5, 1.5131209e-4, 9.1602346e-5, 1.5424775e-3, 2.6122474e-4, -3.3185780e-5, 3.8251634e-11, -4.3320050e-10, -2.1665666e-10, -5.6185677e-10, -8.7283449e-10, -5.5458353e-10, -1.7400499e-10, 2.8592402e-10, 9.7539938e-12, -9.6979679e-11, 3.0126869e-9, 1.7913247e-9, 7.4537886e-11, -7.1603455e-11, -4.7380184e-11, 3.7939388e-10, 6.9896558e-10, 5.9278332e-11, 6.7169086e-9, 2.5397745e-8, 5.8042891e-8, 2.6460096e-7, 1.1776365e-6, 4.1512789e-6, 1.2464109e-5, 3.1212321e-5, 6.9130705e-5, 1.4365826e-4, -1.3656938e-4, 3.4073221e-3, 2.6151684e-2, -1.4059245e-4, -7.7021394e-5, -1.3616365e-28, 4.3305760e-13, 6.1110843e-11, -1.6545214e-10, -1.8728217e-9, -1.6514651e-9, -4.0542730e-10, -2.1592334e-10, -2.8390564e-9, -2.9053010e-11, -3.7684031e-11, 1.0312057e-9, 2.4142060e-10, 1.0668585e-9, 4.5356512e-10, 6.4720843e-10, 7.6446766e-10, 1.4282449e-9, 1.8143415e-9, 2.3536707e-8, 2.7608213e-8, 8.3382167e-8, 4.1160758e-7, 1.8471389e-6, 6.9601138e-6, 2.2424409e-5, 6.1131423e-5, 1.4815249e-4, 4.0691039e-4, -5.6830910e-3, 5.0433912e-2, 7.0915551e-2, -5.4919601e-3, -4.5095266e-6, 6.1182589e-27, -8.2042288e-11, 6.7407045e-11, -3.9439127e-10, -4.3078510e-9, -1.3977467e-9, -2.9974857e-10, -7.9598119e-10, -1.1736519e-9, 3.1194329e-11, -5.2523563e-11, -1.3757889e-10, -1.1556921e-9, 8.4383247e-9, 3.6708831e-9, 1.3802659e-9, 7.9283249e-9, 1.5651727e-8, 5.1950108e-8, 4.4172168e-8, 9.3859427e-8, 1.0801898e-7, 5.2033821e-7, 2.4734611e-6, 9.8164773e-6, 3.4478637e-5, 1.0259666e-4, 2.7371541e-4, 7.4464872e-4, -8.0538931e-3, 1.7501488e-1, 4.8828131e-2, -5.7257730e-3, -1.1749209e-6, -3.7817763e-28, 2.5199969e-11, -1.3021638e-10, -2.5207269e-10, -1.9548951e-9, -2.5600136e-9, -5.5083926e-10, -1.1913260e-9, -2.5623040e-9, -1.6098474e-9, 2.4977952e-10, -3.2955955e-10, 2.7481117e-9, 1.9916195e-9, 1.3607153e-8, 3.3547926e-9, -9.1645850e-10, 5.9619817e-9, 2.7857894e-8, 1.1491626e-8, 1.4020078e-7, 9.8292687e-8, 5.6306460e-7, 2.6408253e-6, 1.2032412e-5, 4.5324050e-5, 1.4795309e-4, 6.1028262e-4, -1.1559854e-2, 8.6605680e-2, 2.3825572e-1, -5.8490463e-3, -7.2151526e-4, -3.1919268e-7, 1.2103619e-26, -1.7652687e-10, -1.4696110e-10, -3.3161298e-10, 6.6081108e-10, -3.9684117e-9, -2.5733292e-9, -3.5457870e-9, -2.6236093e-9, -1.3142445e-9, 2.7751644e-9, 5.9231233e-9, 1.7955457e-9, 5.4984005e-9, 2.4810842e-9, 6.6080469e-9, -6.8122289e-10, 2.1242503e-8, 9.7166133e-8, 6.3345445e-8, 9.6875353e-8, 1.0054617e-7, 4.2988074e-7, 2.4623472e-6, 1.1607888e-5, 5.0940086e-5, 1.9203753e-4, 2.1659366e-4, -1.3909222e-2, 2.8615908e-1, 1.0736927e-1, -9.9254177e-3, -1.2999074e-4, -1.2934666e-8, 2.3824383e-26, -3.3837361e-10, -3.5775202e-10, 5.5893096e-10, -1.4575537e-8, -9.7086292e-9, -4.5414395e-9, -2.2833459e-9, -4.3059266e-9, -3.3765916e-9, 4.1669710e-9, 4.5490341e-9, 1.1205338e-8, 2.0362731e-8, 4.4990899e-9, 9.7753398e-9, 1.2529509e-8, 1.7556548e-8, 6.3123721e-8, 1.2414029e-7, 1.9792560e-7, 1.0930233e-7, 2.8685927e-7, 2.1875524e-6, 1.0619072e-5, 5.2340619e-5, 5.7251358e-4, -1.6615201e-2, 1.2797337e-1, 2.6652428e-1, -4.9442294e-3, -1.0013963e-4, -8.1276624e-5, 2.9681751e-9, 3.0665398e-26, -2.9626867e-10, -1.5187439e-9, -5.1405406e-9, -2.6596237e-8, -1.9106404e-8, -8.8489479e-9, -7.3902438e-9, -8.8083090e-9, -4.8294372e-9, 7.1102768e-9, 1.8945445e-8, 4.2145705e-8, 3.5604958e-8, 1.1841401e-8, 1.4705496e-8, 3.9302566e-8, 7.8377105e-8, 7.5023652e-8, 1.6196125e-7, 8.8264582e-8, 1.4561937e-7, 2.0528454e-7, 1.8008604e-6, 9.4770709e-6, 8.2346718e-5, -3.1833496e-3, 1.2063802e-2, 2.4399965e-1, 5.4725441e-2, -4.0420319e-3, 2.1452002e-4, -3.6650475e-5, 1.3752416e-11, 5.4224794e-26, -4.6988997e-10, -4.1394666e-9, -1.1151876e-8, -1.7856409e-8, -2.6954241e-8, -1.2999242e-8, -9.2769434e-9, -1.0992302e-8, -6.0130147e-9, 1.5594113e-8, 4.5614526e-8, 4.4066174e-8, 1.0023977e-7, 1.4988755e-8, 1.5080244e-8, 1.8602642e-8, 1.6148147e-7, 2.1737981e-7, 3.0432120e-7, 4.4400244e-7, 2.1081129e-7, 1.4578949e-7, 1.2197268e-6, 8.6115413e-6, -1.5109930e-4, -7.0135191e-3, 1.0207992e-1, 9.0038993e-2, -6.0127708e-3, 1.4932610e-3, -3.8792640e-6, -9.4708613e-6, 4.1946496e-26, -5.4851065e-10, -3.7589908e-9, -1.3632299e-8, -2.4066947e-8, -2.2793775e-8, -2.0458835e-8, -2.4927983e-8, -1.5418935e-8, -7.8124949e-9, 2.9926370e-8, 8.1840850e-8, 7.8543424e-8, 1.0423817e-7, 6.9682368e-8, 2.2419414e-8, 5.9255221e-8, 1.3521721e-7, 4.7744711e-7, 9.7322354e-7, 1.6424482e-6, 4.5282143e-7, 3.8731155e-8, 8.0318796e-7, 9.6464191e-6, -2.1834195e-3, 2.0132306e-2, 5.2859799e-2, -7.4579046e-4, 8.8911803e-4, 3.8281978e-4, -3.3225927e-5, -3.0002638e-8, 9.7102919e-26, -6.4799183e-10, -4.3912804e-9, -2.7683127e-8, -3.2660159e-8, -5.3747335e-8, -3.8016573e-8, -3.1822105e-8, -2.0693761e-8, -9.5240151e-10, 6.3960660e-8, 1.4269118e-7, 1.8203660e-7, 1.7536315e-7, 1.2679026e-7, 6.3706732e-8, 1.5402191e-7, 6.8743789e-7, 1.1887688e-6, 3.2929844e-6, 3.2412913e-6, 3.9913926e-7, 8.7186269e-9, 1.2417225e-6, -2.8484192e-4, 2.0098683e-3, 1.5676175e-2, 1.3756861e-3, -2.1557175e-4, 3.7798369e-4, 6.7517563e-6, -4.3492566e-6, 6.7547150e-8, 2.2948461e-25, -1.1104415e-9, -1.4407023e-8, -3.5610260e-8, -9.2900436e-8, -8.4121351e-8, -6.2831646e-8, -2.8903659e-8, -4.7224052e-9, 3.0440576e-8, 1.5742112e-7, 3.0651927e-7, 3.8890190e-7, 4.0744651e-7, 2.7635083e-7, 2.1873077e-7, 4.4929003e-7, 1.5147634e-6, 3.8179131e-6, 8.2886400e-6, 1.0835385e-5, 3.2492322e-6, -3.8310965e-7, -2.0411685e-5, 3.0401333e-5, 2.7925594e-3, 6.7772792e-4, -3.9208815e-4, 1.0243541e-4, -7.3603602e-6, -5.8013848e-6, 5.1172353e-7, 2.7743638e-25, -1.4862900e-9, -1.7066125e-8, -4.5230156e-8, -1.3763054e-7, -1.5773990e-7, -8.8947525e-8, -3.0545943e-8, 5.1686702e-8, 1.2029683e-7, 3.4679600e-7, 6.2208724e-7, 7.5986652e-7, 7.7075029e-7, 5.4767109e-7, 5.9263475e-7, 1.7234493e-6, 5.1260954e-6, 1.0531513e-5, 1.7234861e-5, 2.8150595e-5, 1.0408577e-5, -1.1674625e-6, -9.0883886e-6, 1.0064140e-4, 3.1936185e-5, -1.5860686e-4, 1.6594031e-7, -9.6381669e-6, -2.3932130e-6, 2.2786737e-7, 9.8620700e-10, 2.3008841e-25, -7.1375780e-10, -1.9262703e-8, -5.7275935e-8, -1.2676277e-7, -2.1447209e-7, -1.0645276e-7, 8.9982719e-9, 1.7309202e-7, 2.9508036e-7, 6.6653377e-7, 1.0878744e-6, 1.3840829e-6, 1.4640060e-6, 1.0720661e-6, 1.3467379e-6, 4.3657959e-6, 1.3085144e-5, 3.1580565e-5, 5.2539315e-5, 7.7665162e-5, 1.8673342e-5, -2.2448579e-6, 1.0299361e-6, -9.4295366e-6, -2.2857899e-5, -4.1528741e-7, -4.0662746e-7, -2.2689066e-8, 5.6763893e-9, 2.6186366e-25, -2.9170507e-10, -1.6790959e-8, -7.9625353e-8, -1.9350211e-7, -2.8796194e-7, -1.1189228e-7, 8.8689426e-8, 4.0182556e-7, 6.0869589e-7, 1.1839759e-6, 1.9490359e-6, 2.5191211e-6, 2.6590562e-6, 2.1935256e-6, 3.2954453e-6, 1.1376313e-5, 3.5315649e-5, 8.9569003e-5, 2.8997448e-4, -1.9426200e-3, -1.0891489e-3, 1.2585829e-4, 2.5723850e-25, -2.6380207e-10, -1.1179034e-8, -8.6168819e-8, -2.0598709e-7, -2.5567363e-7, -7.7226908e-8, 1.6701914e-7, 7.0488446e-7, 1.0443168e-6, 1.8643972e-6, 3.2428547e-6, 4.0692877e-6, 4.5815792e-6, 4.1309336e-6, 7.3321815e-6, 2.8892808e-5, 1.0617479e-4, 5.4887042e-4, -7.3064022e-3, 1.4855827e-2, 1.2365740e-2, -1.3137301e-3, 2.2742282e-25, 1.6918091e-11, -8.6813222e-9, -6.7599673e-8, -1.8543044e-7, -2.3771148e-7, -4.8784064e-8, 2.7669000e-7, 8.7710299e-7, 1.4609388e-6, 2.6046369e-6, 4.1943659e-6, 5.6982410e-6, 7.0761406e-6, 7.3852139e-6, 1.5795644e-5, 9.6844100e-5, 1.1308952e-4, -1.1895358e-2, 6.4758108e-2, 1.6206131e-1, 1.3740112e-2, -2.5412250e-3, 1.6512735e-25, 1.2025223e-10, -7.2282832e-9, -6.1373353e-8, -1.5099245e-7, -1.9741423e-7, -1.8280752e-8, 3.2352956e-7, 8.7452187e-7, 1.5625673e-6, 3.0121698e-6, 5.0119923e-6, 7.4446267e-6, 1.0245328e-5, 1.2613665e-5, 6.1402479e-5, -5.4990910e-4, -5.9252908e-3, 1.0046756e-1, 2.2088899e-1, 4.2065114e-2, -5.9131971e-3, 8.0138290e-5, 1.6578514e-25, 1.9649112e-10, -4.3026053e-9, -4.2952838e-8, -8.8210692e-8, -1.4535548e-7, 1.3170235e-9, 2.5248454e-7, 9.2598360e-7, 1.4621636e-6, 3.0345345e-6, 5.5322386e-6, 8.9270276e-6, 1.6221649e-5, 2.3761706e-5, -4.4621170e-4, 1.7791054e-3, 7.9297078e-2, 1.5808405e-1, 2.0283426e-2, -6.1894603e-3, 2.8513205e-4, -2.3938247e-6, 8.3458783e-26, 1.4797754e-10, -2.6972327e-9, -1.9409432e-8, -6.5940114e-8, -9.8199999e-8, 8.3723992e-9, 2.3520159e-7, 7.9645143e-7, 1.3949807e-6, 3.0033922e-6, 6.4262675e-6, 1.3920928e-5, -4.4487993e-5, -1.4043411e-4, 2.2264251e-3, 2.7205775e-2, 4.6187615e-2, -2.2650774e-3, -2.2534118e-3, 7.1210703e-4, -4.6216289e-5, 3.1946896e-7, 4.6145762e-26, 1.0838804e-10, -1.7911423e-9, -1.3949767e-8, -4.7492022e-8, -5.4909604e-8, 1.4597901e-8, 2.1173753e-7, 6.1415498e-7, 1.6344247e-6, 2.6592239e-6, -1.1236355e-5, -4.2815379e-5, 2.5480945e-4, 1.2358994e-3, 3.6289320e-3, 3.6265611e-3, -3.4830672e-3, 2.7063439e-5, 5.6457918e-4, -3.8247895e-6, -4.8299507e-6, 4.6496118e-8, 5.6326972e-26, 1.4141424e-10, -1.5331451e-9, -1.2866923e-8, -3.9146376e-8, -6.4515371e-8, 1.8264919e-8, 2.3120630e-7, 8.7472407e-7, 1.1071635e-7, 4.5626120e-6, 1.0557267e-4, 4.4686737e-4, 7.1310092e-4, 3.3277622e-4, -1.6067416e-4, -4.1602217e-4, 1.2018187e-4, 1.1339273e-4, -6.8148408e-6, -8.5193388e-6, 7.4974305e-7, 2.6756500e-26, 6.5646229e-11, -6.6713562e-10, -6.6920930e-9, -1.8938415e-8, -3.8361839e-8, 1.3944163e-8, 1.3740334e-7, -2.0724964e-7, 3.4016518e-6, 6.9656523e-5, 1.6236569e-4, 1.0456041e-4, -3.0321707e-5, -3.3108491e-5, -5.0377425e-6, 7.7321367e-7, -4.8441446e-6, -1.3836940e-5, -4.3280496e-6, 4.5264510e-7, 1.3206784e-9, 9.0789578e-28, 6.2126304e-12, 1.5798654e-11, 2.3170290e-10, 3.5435462e-10, 1.7267708e-9, -4.3101794e-10, -5.7085448e-9, -9.3355721e-8, 1.1083124e-6, -3.2317539e-7, -1.3572595e-5, -1.2485768e-5, -1.4067410e-6, -2.1245218e-7, -2.9071409e-7, -6.8490342e-7, -7.4999602e-7, -7.8875047e-8, 1.8591121e-8, -3.0724506e-28, -1.3992807e-12, 3.1558144e-12, 3.0973499e-11, 8.3814135e-11, 9.4465101e-11, -7.9526084e-11, -4.4493691e-10, 8.7757349e-9, -1.3457356e-7, -2.0511661e-7, -1.1824214e-8, -2.0322501e-9, -6.7921281e-10, -3.9270519e-11, 6.1648977e-12, 3.4897604e-14]) # noqa: F821 x = 0.5 * np.log(x1 / x2) y = np.sqrt(x1 * x2) From 79b7b1f1137143f2212bf5fcad555362b7caf059 Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Thu, 19 Sep 2024 11:18:44 +0200 Subject: [PATCH 11/16] ingore ruff-format on for the time being --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 02acb6067..e56e96a64 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,6 +18,7 @@ repos: exclude: ^pineappl_cli/src/plot.py - id: ruff-format args: [--line-length=80] + exclude: ^pineappl_cli/src/plot.py - repo: local hooks: - id: fmt From 6d11bd1f122dd70e4bad9f5d454904313c18bdbb Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Thu, 19 Sep 2024 11:40:54 +0200 Subject: [PATCH 12/16] include clippy in hooks but ignore warnings --- .pre-commit-config.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e56e96a64..77572bd82 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,10 +31,18 @@ repos: - id: check name: cargo check description: Run cargo check. - entry: bash -c 'cargo check --features=evolve,fktable' + entry: bash -c 'cargo check --all-targets --features=evolve,fktable' language: system require_serial: true types: [rust] + - id: clippy + name: cargo clippy + description: Check Rust files with cargo clippy. + # Show only errors and ignore warnings + entry: cargo clippy --all-targets --features=evolve,fktable -- -Awarnings + pass_filenames: false + types: [file, rust] + language: system - repo: https://github.com/pre-commit/pre-commit rev: v3.8.0 hooks: From 9fbb2464f0f9540e05e1420d631c602848e2091d Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Mon, 30 Sep 2024 23:54:23 +0200 Subject: [PATCH 13/16] start addressing warnings from clippy --- pineappl/src/bin.rs | 12 ++++++------ pineappl/src/convolutions.rs | 8 ++++---- pineappl/src/empty_subgrid.rs | 2 +- pineappl/src/fk_table.rs | 4 ++-- pineappl/src/grid.rs | 18 +++++++++++++++++- pineappl/src/import_only_subgrid.rs | 10 +++++----- pineappl/src/lagrange_subgrid.rs | 20 ++++++++++++-------- pineappl/src/pids.rs | 2 +- pineappl/src/sparse_array3.rs | 1 + pineappl/tests/drell_yan_lo.rs | 1 + 10 files changed, 50 insertions(+), 28 deletions(-) diff --git a/pineappl/src/bin.rs b/pineappl/src/bin.rs index 3d45a597e..0926b74d4 100644 --- a/pineappl/src/bin.rs +++ b/pineappl/src/bin.rs @@ -806,16 +806,16 @@ mod test { ])) .unwrap(); - assert_eq!(limits.left(), 0.0); - assert_eq!(limits.right(), 2.0); + assert!((limits.left() - 0.0).abs() < f64::EPSILON); + assert!((limits.right() - 2.0).abs() < f64::EPSILON); assert_eq!(limits.bins(), 6); let non_consecutive_bins = BinLimits::new(vec![3.0, 4.0]); assert!(limits.merge(&non_consecutive_bins).is_err()); - assert_eq!(limits.left(), 0.0); - assert_eq!(limits.right(), 2.0); + assert!((limits.left() - 0.0).abs() < f64::EPSILON); + assert!((limits.right() - 2.0).abs() < f64::EPSILON); assert_eq!(limits.bins(), 6); // left merge @@ -828,8 +828,8 @@ mod test { ])) .is_err()); - assert_eq!(limits.left(), 0.0); - assert_eq!(limits.right(), 2.0); + assert!((limits.left() - 0.0).abs() < f64::EPSILON); + assert!((limits.right() - 2.0).abs() < f64::EPSILON); assert_eq!(limits.bins(), 6); } diff --git a/pineappl/src/convolutions.rs b/pineappl/src/convolutions.rs index ea726c440..576868281 100644 --- a/pineappl/src/convolutions.rs +++ b/pineappl/src/convolutions.rs @@ -307,7 +307,7 @@ impl<'a> LumiCache<'a> { .map(|Mu2 { ren, .. }| { self.mur2_grid .iter() - .position(|&mur2| mur2 == xir * xir * ren) + .position(|&mur2| (mur2 - xir * xir * ren).abs() < f64::EPSILON) .unwrap_or_else(|| unreachable!()) }) .collect(); @@ -316,7 +316,7 @@ impl<'a> LumiCache<'a> { .map(|Mu2 { fac, .. }| { self.muf2_grid .iter() - .position(|&muf2| muf2 == xif * xif * fac) + .position(|&muf2| (muf2 - xif * xif * fac).abs() < f64::EPSILON) .unwrap_or_else(|| unreachable!()) }) .collect(); @@ -325,7 +325,7 @@ impl<'a> LumiCache<'a> { .map(|x1| { self.x_grid .iter() - .position(|x| x1 == x) + .position(|x| (x1 - x).abs() < f64::EPSILON) .unwrap_or_else(|| unreachable!()) }) .collect(); @@ -335,7 +335,7 @@ impl<'a> LumiCache<'a> { .map(|x2| { self.x_grid .iter() - .position(|x| x2 == x) + .position(|x| (x2 - x).abs() < f64::EPSILON) .unwrap_or_else(|| unreachable!()) }) .collect(); diff --git a/pineappl/src/empty_subgrid.rs b/pineappl/src/empty_subgrid.rs index 79640e655..9a792fbdf 100644 --- a/pineappl/src/empty_subgrid.rs +++ b/pineappl/src/empty_subgrid.rs @@ -82,7 +82,7 @@ mod tests { #[test] fn create_empty() { let mut subgrid = EmptySubgridV1; - assert_eq!(subgrid.convolve(&[], &[], &[], &mut |_, _, _| 0.0), 0.0,); + assert!((subgrid.convolve(&[], &[], &[], &mut |_, _, _| 0.0) - 0.0).abs() < f64::EPSILON); assert!(subgrid.is_empty()); subgrid.merge(&mut EmptySubgridV1.into(), false); subgrid.scale(2.0); diff --git a/pineappl/src/fk_table.rs b/pineappl/src/fk_table.rs index bf040da46..4c6991040 100644 --- a/pineappl/src/fk_table.rs +++ b/pineappl/src/fk_table.rs @@ -326,7 +326,7 @@ impl TryFrom for FkTable { if muf2 < 0.0 { muf2 = mu2_grid[0].fac; - } else if muf2 != mu2_grid[0].fac { + } else if (muf2 - mu2_grid[0].fac).abs() > f64::EPSILON { return Err(TryFromGridError::MultipleScales); } } @@ -334,7 +334,7 @@ impl TryFrom for FkTable { for channel in grid.channels() { let entry = channel.entry(); - if entry.len() != 1 || entry[0].2 != 1.0 { + if entry.len() != 1 || (entry[0].2 - 1.0).abs() > f64::EPSILON { return Err(TryFromGridError::InvalidChannel); } } diff --git a/pineappl/src/grid.rs b/pineappl/src/grid.rs index 19698d228..39d5250ae 100644 --- a/pineappl/src/grid.rs +++ b/pineappl/src/grid.rs @@ -213,6 +213,7 @@ bitflags! { /// Main data structure of `PineAPPL`. This structure contains a `Subgrid` for each `LumiEntry`, /// bin, and coupling order it was created with. +#[allow(clippy::unsafe_derive_deserialize)] #[derive(Clone, Deserialize, Serialize)] pub struct Grid { subgrids: Array3, @@ -257,6 +258,7 @@ impl Grid { /// # Errors /// /// If `subgrid_type` is none of the values listed above, an error is returned. + #[allow(clippy::needless_pass_by_value)] pub fn with_subgrid_type( channels: Vec, orders: Vec, @@ -356,7 +358,9 @@ impl Grid { for ((ord, bin, chan), subgrid) in self.subgrids.indexed_iter() { let order = &self.orders[ord]; - if ((order.logxir > 0) && (xir == 1.0)) || ((order.logxif > 0) && (xif == 1.0)) { + if ((order.logxir > 0) && (xir - 1.0).abs() < f64::EPSILON) + || ((order.logxif > 0) && (xif - 1.0).abs() < f64::EPSILON) + { continue; } @@ -841,6 +845,7 @@ impl Grid { } /// Set the convolution type for this grid for the corresponding `index`. + #[allow(clippy::needless_pass_by_value)] pub fn set_convolution(&mut self, index: usize, convolution: Convolution) { // remove outdated metadata self.key_values_mut() @@ -1391,6 +1396,11 @@ impl Grid { /// Returns a [`GridError::EvolutionFailure`] if either the `operator` or its `info` is /// incompatible with this `Grid`. Returns a [`GridError::Other`] if the iterator from `slices` /// return an error. + /// + /// # Panics + /// + /// This function will panic if the dimension of the operators do not match the operator + /// information. pub fn evolve_with_slice_iter<'a, E: Into>( &self, slices: impl IntoIterator), E>>, @@ -1513,6 +1523,11 @@ impl Grid { /// Returns a [`GridError::EvolutionFailure`] if either the `operator` or its `info` is /// incompatible with this `Grid`. Returns a [`GridError::Other`] if the iterator from `slices` /// return an error. + /// + /// # Panics + /// + /// This function will panic if the dimension of the operators do not match the operator + /// information. pub fn evolve_with_slice_iter2<'a, E: Into>( &self, slices_a: impl IntoIterator), E>>, @@ -1661,6 +1676,7 @@ impl Grid { /// Deletes bins with the corresponding `bin_indices`. Repeated indices and indices larger or /// equal the bin length are ignored. + #[allow(clippy::range_plus_one)] pub fn delete_bins(&mut self, bin_indices: &[usize]) { let mut bin_indices: Vec<_> = bin_indices .iter() diff --git a/pineappl/src/import_only_subgrid.rs b/pineappl/src/import_only_subgrid.rs index 04624c09a..02a3ac877 100644 --- a/pineappl/src/import_only_subgrid.rs +++ b/pineappl/src/import_only_subgrid.rs @@ -88,7 +88,7 @@ impl Subgrid for ImportOnlySubgridV1 { for (other_index, mu2) in other_grid.mu2_grid().iter().enumerate() { // the following should always be the case - assert_eq!(mu2.ren, mu2.fac); + assert!((mu2.ren - mu2.fac).abs() < f64::EPSILON); let q2 = &mu2.ren; let index = match self @@ -276,11 +276,11 @@ impl Subgrid for ImportOnlySubgridV2 { for ((i, j, k), value) in self.array.indexed_iter() { let target_j = x1_grid .iter() - .position(|&x| x == self.x1_grid[j]) + .position(|&x| (x - self.x1_grid[j]).abs() < f64::EPSILON) .unwrap_or_else(|| unreachable!()); let target_k = x2_grid .iter() - .position(|&x| x == self.x2_grid[k]) + .position(|&x| (x - self.x2_grid[k]).abs() < f64::EPSILON) .unwrap_or_else(|| unreachable!()); array[[i, target_j, target_k]] = value; @@ -313,12 +313,12 @@ impl Subgrid for ImportOnlySubgridV2 { let target_j = self .x1_grid .iter() - .position(|&x| x == rhs_x1[j]) + .position(|&x| (x - rhs_x1[j]).abs() < f64::EPSILON) .unwrap_or_else(|| unreachable!()); let target_k = self .x2_grid .iter() - .position(|&x| x == rhs_x2[k]) + .position(|&x| (x - rhs_x2[k]).abs() < f64::EPSILON) .unwrap_or_else(|| unreachable!()); self.array[[index, target_j, target_k]] += value; diff --git a/pineappl/src/lagrange_subgrid.rs b/pineappl/src/lagrange_subgrid.rs index 8888d394c..eefc13f09 100644 --- a/pineappl/src/lagrange_subgrid.rs +++ b/pineappl/src/lagrange_subgrid.rs @@ -14,7 +14,7 @@ use std::iter; use std::mem; fn weightfun(x: f64) -> f64 { - (x.sqrt() / (1.0 - 0.99 * x)).powi(3) + (x.sqrt() / 0.99f64.mul_add(-x, 1.0)).powi(3) } fn fx(y: f64) -> f64 { @@ -22,11 +22,11 @@ fn fx(y: f64) -> f64 { for _ in 0..100 { let x = (-yp).exp(); - let delta = y - yp - 5.0 * (1.0 - x); + let delta = 5.0f64.mul_add(-(1.0 - x), y - yp); if (delta).abs() < 1e-12 { return x; } - let deriv = -1.0 - 5.0 * x; + let deriv = 5.0f64.mul_add(-x, -1.0); yp -= delta / deriv; } @@ -451,7 +451,7 @@ impl LagrangeSubgridV2 { } fn gety1(&self, iy: usize) -> f64 { - if self.y1min == self.y1max { + if (self.y1min - self.y1max).abs() < f64::EPSILON { debug_assert_eq!(iy, 0); self.y1min } else { @@ -460,7 +460,7 @@ impl LagrangeSubgridV2 { } fn gety2(&self, iy: usize) -> f64 { - if self.y2min == self.y2max { + if (self.y2min - self.y2max).abs() < f64::EPSILON { debug_assert_eq!(iy, 0); self.y2min } else { @@ -469,7 +469,7 @@ impl LagrangeSubgridV2 { } fn gettau(&self, iy: usize) -> f64 { - if self.taumin == self.taumax { + if (self.taumin - self.taumax).abs() < f64::EPSILON { debug_assert_eq!(iy, 0); self.taumin } else { @@ -532,7 +532,9 @@ impl Subgrid for LagrangeSubgridV2 { if self.static_q2 == 0.0 { self.static_q2 = ntuple.q2; - } else if (self.static_q2 != -1.0) && (self.static_q2 != ntuple.q2) { + } else if ((self.static_q2 + 1.0).abs() > f64::EPSILON) + && ((self.static_q2 - ntuple.q2).abs() > f64::EPSILON) + { self.static_q2 = -1.0; } @@ -651,7 +653,9 @@ impl Subgrid for LagrangeSubgridV2 { self.increase_tau(new_itaumin, new_itaumax); } - if (other_grid.static_q2 == -1.0) || (self.static_q2 != other_grid.static_q2) { + if ((other_grid.static_q2 + 1.0).abs() > f64::EPSILON) + || ((self.static_q2 - other_grid.static_q2).abs() > f64::EPSILON) + { self.static_q2 = -1.0; } diff --git a/pineappl/src/pids.rs b/pineappl/src/pids.rs index 5d130d06b..9ef3ee63b 100644 --- a/pineappl/src/pids.rs +++ b/pineappl/src/pids.rs @@ -406,7 +406,7 @@ pub fn pdg_mc_ids_to_evol(tuples: &[(i32, f64)]) -> Option { .collect(); if let &[(pid, factor)] = non_zero.as_slice() { - if factor == 1.0 { + if (factor - 1.0).abs() < f64::EPSILON { return Some(pid); } } diff --git a/pineappl/src/sparse_array3.rs b/pineappl/src/sparse_array3.rs index 1debae7e8..db408cc51 100644 --- a/pineappl/src/sparse_array3.rs +++ b/pineappl/src/sparse_array3.rs @@ -349,6 +349,7 @@ impl SparseArray3 { } /// Return an iterator over the elements, including zero elements. + #[allow(clippy::iter_without_into_iter)] pub fn iter_mut(&mut self) -> IterMut<'_, T> { self.entries.iter_mut() } diff --git a/pineappl/tests/drell_yan_lo.rs b/pineappl/tests/drell_yan_lo.rs index 21dad5710..33b2d58b1 100644 --- a/pineappl/tests/drell_yan_lo.rs +++ b/pineappl/tests/drell_yan_lo.rs @@ -25,6 +25,7 @@ fn int_photo(s: f64, t: f64, u: f64) -> f64 { } // Eq. (2.12) - quark-antiquark contribution to DY lepton pair production +#[allow(clippy::suboptimal_flops)] fn int_quark(s: f64, t: f64, u: f64, qq: f64, i3_wq: f64) -> f64 { let alphagf: f64 = 1.0 / 132.30818655547878; let mw = 80.35198454966643; From d848bd479be22c89c89d5ffb6076eeecaff4d729 Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Tue, 1 Oct 2024 08:35:47 +0200 Subject: [PATCH 14/16] Revert "start addressing warnings from clippy" This reverts commit 9fbb2464f0f9540e05e1420d631c602848e2091d. --- pineappl/src/bin.rs | 12 ++++++------ pineappl/src/convolutions.rs | 8 ++++---- pineappl/src/empty_subgrid.rs | 2 +- pineappl/src/fk_table.rs | 4 ++-- pineappl/src/grid.rs | 18 +----------------- pineappl/src/import_only_subgrid.rs | 10 +++++----- pineappl/src/lagrange_subgrid.rs | 20 ++++++++------------ pineappl/src/pids.rs | 2 +- pineappl/src/sparse_array3.rs | 1 - pineappl/tests/drell_yan_lo.rs | 1 - 10 files changed, 28 insertions(+), 50 deletions(-) diff --git a/pineappl/src/bin.rs b/pineappl/src/bin.rs index 0926b74d4..3d45a597e 100644 --- a/pineappl/src/bin.rs +++ b/pineappl/src/bin.rs @@ -806,16 +806,16 @@ mod test { ])) .unwrap(); - assert!((limits.left() - 0.0).abs() < f64::EPSILON); - assert!((limits.right() - 2.0).abs() < f64::EPSILON); + assert_eq!(limits.left(), 0.0); + assert_eq!(limits.right(), 2.0); assert_eq!(limits.bins(), 6); let non_consecutive_bins = BinLimits::new(vec![3.0, 4.0]); assert!(limits.merge(&non_consecutive_bins).is_err()); - assert!((limits.left() - 0.0).abs() < f64::EPSILON); - assert!((limits.right() - 2.0).abs() < f64::EPSILON); + assert_eq!(limits.left(), 0.0); + assert_eq!(limits.right(), 2.0); assert_eq!(limits.bins(), 6); // left merge @@ -828,8 +828,8 @@ mod test { ])) .is_err()); - assert!((limits.left() - 0.0).abs() < f64::EPSILON); - assert!((limits.right() - 2.0).abs() < f64::EPSILON); + assert_eq!(limits.left(), 0.0); + assert_eq!(limits.right(), 2.0); assert_eq!(limits.bins(), 6); } diff --git a/pineappl/src/convolutions.rs b/pineappl/src/convolutions.rs index 576868281..ea726c440 100644 --- a/pineappl/src/convolutions.rs +++ b/pineappl/src/convolutions.rs @@ -307,7 +307,7 @@ impl<'a> LumiCache<'a> { .map(|Mu2 { ren, .. }| { self.mur2_grid .iter() - .position(|&mur2| (mur2 - xir * xir * ren).abs() < f64::EPSILON) + .position(|&mur2| mur2 == xir * xir * ren) .unwrap_or_else(|| unreachable!()) }) .collect(); @@ -316,7 +316,7 @@ impl<'a> LumiCache<'a> { .map(|Mu2 { fac, .. }| { self.muf2_grid .iter() - .position(|&muf2| (muf2 - xif * xif * fac).abs() < f64::EPSILON) + .position(|&muf2| muf2 == xif * xif * fac) .unwrap_or_else(|| unreachable!()) }) .collect(); @@ -325,7 +325,7 @@ impl<'a> LumiCache<'a> { .map(|x1| { self.x_grid .iter() - .position(|x| (x1 - x).abs() < f64::EPSILON) + .position(|x| x1 == x) .unwrap_or_else(|| unreachable!()) }) .collect(); @@ -335,7 +335,7 @@ impl<'a> LumiCache<'a> { .map(|x2| { self.x_grid .iter() - .position(|x| (x2 - x).abs() < f64::EPSILON) + .position(|x| x2 == x) .unwrap_or_else(|| unreachable!()) }) .collect(); diff --git a/pineappl/src/empty_subgrid.rs b/pineappl/src/empty_subgrid.rs index 9a792fbdf..79640e655 100644 --- a/pineappl/src/empty_subgrid.rs +++ b/pineappl/src/empty_subgrid.rs @@ -82,7 +82,7 @@ mod tests { #[test] fn create_empty() { let mut subgrid = EmptySubgridV1; - assert!((subgrid.convolve(&[], &[], &[], &mut |_, _, _| 0.0) - 0.0).abs() < f64::EPSILON); + assert_eq!(subgrid.convolve(&[], &[], &[], &mut |_, _, _| 0.0), 0.0,); assert!(subgrid.is_empty()); subgrid.merge(&mut EmptySubgridV1.into(), false); subgrid.scale(2.0); diff --git a/pineappl/src/fk_table.rs b/pineappl/src/fk_table.rs index 4c6991040..bf040da46 100644 --- a/pineappl/src/fk_table.rs +++ b/pineappl/src/fk_table.rs @@ -326,7 +326,7 @@ impl TryFrom for FkTable { if muf2 < 0.0 { muf2 = mu2_grid[0].fac; - } else if (muf2 - mu2_grid[0].fac).abs() > f64::EPSILON { + } else if muf2 != mu2_grid[0].fac { return Err(TryFromGridError::MultipleScales); } } @@ -334,7 +334,7 @@ impl TryFrom for FkTable { for channel in grid.channels() { let entry = channel.entry(); - if entry.len() != 1 || (entry[0].2 - 1.0).abs() > f64::EPSILON { + if entry.len() != 1 || entry[0].2 != 1.0 { return Err(TryFromGridError::InvalidChannel); } } diff --git a/pineappl/src/grid.rs b/pineappl/src/grid.rs index 39d5250ae..19698d228 100644 --- a/pineappl/src/grid.rs +++ b/pineappl/src/grid.rs @@ -213,7 +213,6 @@ bitflags! { /// Main data structure of `PineAPPL`. This structure contains a `Subgrid` for each `LumiEntry`, /// bin, and coupling order it was created with. -#[allow(clippy::unsafe_derive_deserialize)] #[derive(Clone, Deserialize, Serialize)] pub struct Grid { subgrids: Array3, @@ -258,7 +257,6 @@ impl Grid { /// # Errors /// /// If `subgrid_type` is none of the values listed above, an error is returned. - #[allow(clippy::needless_pass_by_value)] pub fn with_subgrid_type( channels: Vec, orders: Vec, @@ -358,9 +356,7 @@ impl Grid { for ((ord, bin, chan), subgrid) in self.subgrids.indexed_iter() { let order = &self.orders[ord]; - if ((order.logxir > 0) && (xir - 1.0).abs() < f64::EPSILON) - || ((order.logxif > 0) && (xif - 1.0).abs() < f64::EPSILON) - { + if ((order.logxir > 0) && (xir == 1.0)) || ((order.logxif > 0) && (xif == 1.0)) { continue; } @@ -845,7 +841,6 @@ impl Grid { } /// Set the convolution type for this grid for the corresponding `index`. - #[allow(clippy::needless_pass_by_value)] pub fn set_convolution(&mut self, index: usize, convolution: Convolution) { // remove outdated metadata self.key_values_mut() @@ -1396,11 +1391,6 @@ impl Grid { /// Returns a [`GridError::EvolutionFailure`] if either the `operator` or its `info` is /// incompatible with this `Grid`. Returns a [`GridError::Other`] if the iterator from `slices` /// return an error. - /// - /// # Panics - /// - /// This function will panic if the dimension of the operators do not match the operator - /// information. pub fn evolve_with_slice_iter<'a, E: Into>( &self, slices: impl IntoIterator), E>>, @@ -1523,11 +1513,6 @@ impl Grid { /// Returns a [`GridError::EvolutionFailure`] if either the `operator` or its `info` is /// incompatible with this `Grid`. Returns a [`GridError::Other`] if the iterator from `slices` /// return an error. - /// - /// # Panics - /// - /// This function will panic if the dimension of the operators do not match the operator - /// information. pub fn evolve_with_slice_iter2<'a, E: Into>( &self, slices_a: impl IntoIterator), E>>, @@ -1676,7 +1661,6 @@ impl Grid { /// Deletes bins with the corresponding `bin_indices`. Repeated indices and indices larger or /// equal the bin length are ignored. - #[allow(clippy::range_plus_one)] pub fn delete_bins(&mut self, bin_indices: &[usize]) { let mut bin_indices: Vec<_> = bin_indices .iter() diff --git a/pineappl/src/import_only_subgrid.rs b/pineappl/src/import_only_subgrid.rs index 02a3ac877..04624c09a 100644 --- a/pineappl/src/import_only_subgrid.rs +++ b/pineappl/src/import_only_subgrid.rs @@ -88,7 +88,7 @@ impl Subgrid for ImportOnlySubgridV1 { for (other_index, mu2) in other_grid.mu2_grid().iter().enumerate() { // the following should always be the case - assert!((mu2.ren - mu2.fac).abs() < f64::EPSILON); + assert_eq!(mu2.ren, mu2.fac); let q2 = &mu2.ren; let index = match self @@ -276,11 +276,11 @@ impl Subgrid for ImportOnlySubgridV2 { for ((i, j, k), value) in self.array.indexed_iter() { let target_j = x1_grid .iter() - .position(|&x| (x - self.x1_grid[j]).abs() < f64::EPSILON) + .position(|&x| x == self.x1_grid[j]) .unwrap_or_else(|| unreachable!()); let target_k = x2_grid .iter() - .position(|&x| (x - self.x2_grid[k]).abs() < f64::EPSILON) + .position(|&x| x == self.x2_grid[k]) .unwrap_or_else(|| unreachable!()); array[[i, target_j, target_k]] = value; @@ -313,12 +313,12 @@ impl Subgrid for ImportOnlySubgridV2 { let target_j = self .x1_grid .iter() - .position(|&x| (x - rhs_x1[j]).abs() < f64::EPSILON) + .position(|&x| x == rhs_x1[j]) .unwrap_or_else(|| unreachable!()); let target_k = self .x2_grid .iter() - .position(|&x| (x - rhs_x2[k]).abs() < f64::EPSILON) + .position(|&x| x == rhs_x2[k]) .unwrap_or_else(|| unreachable!()); self.array[[index, target_j, target_k]] += value; diff --git a/pineappl/src/lagrange_subgrid.rs b/pineappl/src/lagrange_subgrid.rs index eefc13f09..8888d394c 100644 --- a/pineappl/src/lagrange_subgrid.rs +++ b/pineappl/src/lagrange_subgrid.rs @@ -14,7 +14,7 @@ use std::iter; use std::mem; fn weightfun(x: f64) -> f64 { - (x.sqrt() / 0.99f64.mul_add(-x, 1.0)).powi(3) + (x.sqrt() / (1.0 - 0.99 * x)).powi(3) } fn fx(y: f64) -> f64 { @@ -22,11 +22,11 @@ fn fx(y: f64) -> f64 { for _ in 0..100 { let x = (-yp).exp(); - let delta = 5.0f64.mul_add(-(1.0 - x), y - yp); + let delta = y - yp - 5.0 * (1.0 - x); if (delta).abs() < 1e-12 { return x; } - let deriv = 5.0f64.mul_add(-x, -1.0); + let deriv = -1.0 - 5.0 * x; yp -= delta / deriv; } @@ -451,7 +451,7 @@ impl LagrangeSubgridV2 { } fn gety1(&self, iy: usize) -> f64 { - if (self.y1min - self.y1max).abs() < f64::EPSILON { + if self.y1min == self.y1max { debug_assert_eq!(iy, 0); self.y1min } else { @@ -460,7 +460,7 @@ impl LagrangeSubgridV2 { } fn gety2(&self, iy: usize) -> f64 { - if (self.y2min - self.y2max).abs() < f64::EPSILON { + if self.y2min == self.y2max { debug_assert_eq!(iy, 0); self.y2min } else { @@ -469,7 +469,7 @@ impl LagrangeSubgridV2 { } fn gettau(&self, iy: usize) -> f64 { - if (self.taumin - self.taumax).abs() < f64::EPSILON { + if self.taumin == self.taumax { debug_assert_eq!(iy, 0); self.taumin } else { @@ -532,9 +532,7 @@ impl Subgrid for LagrangeSubgridV2 { if self.static_q2 == 0.0 { self.static_q2 = ntuple.q2; - } else if ((self.static_q2 + 1.0).abs() > f64::EPSILON) - && ((self.static_q2 - ntuple.q2).abs() > f64::EPSILON) - { + } else if (self.static_q2 != -1.0) && (self.static_q2 != ntuple.q2) { self.static_q2 = -1.0; } @@ -653,9 +651,7 @@ impl Subgrid for LagrangeSubgridV2 { self.increase_tau(new_itaumin, new_itaumax); } - if ((other_grid.static_q2 + 1.0).abs() > f64::EPSILON) - || ((self.static_q2 - other_grid.static_q2).abs() > f64::EPSILON) - { + if (other_grid.static_q2 == -1.0) || (self.static_q2 != other_grid.static_q2) { self.static_q2 = -1.0; } diff --git a/pineappl/src/pids.rs b/pineappl/src/pids.rs index 9ef3ee63b..5d130d06b 100644 --- a/pineappl/src/pids.rs +++ b/pineappl/src/pids.rs @@ -406,7 +406,7 @@ pub fn pdg_mc_ids_to_evol(tuples: &[(i32, f64)]) -> Option { .collect(); if let &[(pid, factor)] = non_zero.as_slice() { - if (factor - 1.0).abs() < f64::EPSILON { + if factor == 1.0 { return Some(pid); } } diff --git a/pineappl/src/sparse_array3.rs b/pineappl/src/sparse_array3.rs index db408cc51..1debae7e8 100644 --- a/pineappl/src/sparse_array3.rs +++ b/pineappl/src/sparse_array3.rs @@ -349,7 +349,6 @@ impl SparseArray3 { } /// Return an iterator over the elements, including zero elements. - #[allow(clippy::iter_without_into_iter)] pub fn iter_mut(&mut self) -> IterMut<'_, T> { self.entries.iter_mut() } diff --git a/pineappl/tests/drell_yan_lo.rs b/pineappl/tests/drell_yan_lo.rs index 33b2d58b1..21dad5710 100644 --- a/pineappl/tests/drell_yan_lo.rs +++ b/pineappl/tests/drell_yan_lo.rs @@ -25,7 +25,6 @@ fn int_photo(s: f64, t: f64, u: f64) -> f64 { } // Eq. (2.12) - quark-antiquark contribution to DY lepton pair production -#[allow(clippy::suboptimal_flops)] fn int_quark(s: f64, t: f64, u: f64, qq: f64, i3_wq: f64) -> f64 { let alphagf: f64 = 1.0 / 132.30818655547878; let mw = 80.35198454966643; From ced2f8e8b4c45f92a498d9656a28a8e8d4e20cd1 Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Tue, 1 Oct 2024 11:30:20 +0200 Subject: [PATCH 15/16] fix all warnings from clippy (non-deps related) --- docs/cli-tutorial.md | 2 +- pineappl/src/bin.rs | 2 ++ pineappl/src/convolutions.rs | 1 + pineappl/src/empty_subgrid.rs | 1 + pineappl/src/fk_table.rs | 1 + pineappl/src/grid.rs | 17 ++++++++++++++++- pineappl/src/import_only_subgrid.rs | 3 +++ pineappl/src/lagrange_subgrid.rs | 5 +++++ pineappl/src/pids.rs | 1 + pineappl/src/sparse_array3.rs | 2 ++ pineappl/tests/drell_yan_lo.rs | 2 ++ pineappl_capi/src/lib.rs | 8 ++++++++ pineappl_cli/src/convolve.rs | 3 ++- pineappl_cli/src/diff.rs | 1 + pineappl_cli/src/evolve.rs | 1 + pineappl_cli/src/export.rs | 2 ++ pineappl_cli/src/import.rs | 2 ++ pineappl_cli/src/merge.rs | 3 ++- pineappl_cli/src/plot.rs | 1 + pineappl_cli/src/write.rs | 2 ++ pineappl_cli/tests/convolve.rs | 2 +- pineappl_cli/tests/import.rs | 2 ++ pineappl_cli/tests/main.rs | 2 +- pineappl_cli/tests/merge.rs | 2 +- 24 files changed, 61 insertions(+), 7 deletions(-) diff --git a/docs/cli-tutorial.md b/docs/cli-tutorial.md index f148248e8..7797180e5 100644 --- a/docs/cli-tutorial.md +++ b/docs/cli-tutorial.md @@ -82,7 +82,7 @@ used already, run Depending on the version of PineAPPL this will show output similar to the following: - Convolutes a PineAPPL grid with a PDF set + Convolves a PineAPPL grid with a PDF set Usage: pineappl convolve [OPTIONS] ... diff --git a/pineappl/src/bin.rs b/pineappl/src/bin.rs index 3d45a597e..8803ec4d3 100644 --- a/pineappl/src/bin.rs +++ b/pineappl/src/bin.rs @@ -108,6 +108,7 @@ pub enum ParseBinRemapperError { }, } +#[allow(clippy::assigning_clones)] impl FromStr for BinRemapper { type Err = ParseBinRemapperError; @@ -787,6 +788,7 @@ impl BinLimits { } } +#[allow(clippy::float_cmp)] #[cfg(test)] mod test { use super::*; diff --git a/pineappl/src/convolutions.rs b/pineappl/src/convolutions.rs index ea726c440..7dc8c06f8 100644 --- a/pineappl/src/convolutions.rs +++ b/pineappl/src/convolutions.rs @@ -294,6 +294,7 @@ impl<'a> LumiCache<'a> { } /// Set the grids. + #[allow(clippy::float_cmp)] pub fn set_grids( &mut self, mu2_grid: &[Mu2], diff --git a/pineappl/src/empty_subgrid.rs b/pineappl/src/empty_subgrid.rs index 79640e655..d52df04d6 100644 --- a/pineappl/src/empty_subgrid.rs +++ b/pineappl/src/empty_subgrid.rs @@ -75,6 +75,7 @@ impl Subgrid for EmptySubgridV1 { } } +#[allow(clippy::float_cmp)] #[cfg(test)] mod tests { use super::*; diff --git a/pineappl/src/fk_table.rs b/pineappl/src/fk_table.rs index bf040da46..9f9152e40 100644 --- a/pineappl/src/fk_table.rs +++ b/pineappl/src/fk_table.rs @@ -296,6 +296,7 @@ impl FkTable { } } +#[allow(clippy::float_cmp)] impl TryFrom for FkTable { type Error = TryFromGridError; diff --git a/pineappl/src/grid.rs b/pineappl/src/grid.rs index 19698d228..78dc22c04 100644 --- a/pineappl/src/grid.rs +++ b/pineappl/src/grid.rs @@ -213,6 +213,7 @@ bitflags! { /// Main data structure of `PineAPPL`. This structure contains a `Subgrid` for each `LumiEntry`, /// bin, and coupling order it was created with. +#[allow(clippy::unsafe_derive_deserialize)] #[derive(Clone, Deserialize, Serialize)] pub struct Grid { subgrids: Array3, @@ -257,6 +258,7 @@ impl Grid { /// # Errors /// /// If `subgrid_type` is none of the values listed above, an error is returned. + #[allow(clippy::needless_pass_by_value)] pub fn with_subgrid_type( channels: Vec, orders: Vec, @@ -333,6 +335,7 @@ impl Grid { /// # Panics /// /// TODO + #[allow(clippy::float_cmp)] pub fn convolve( &self, lumi_cache: &mut LumiCache, @@ -414,7 +417,7 @@ impl Grid { bins } - /// Convolutes a single subgrid `(order, bin, channel)` with the PDFs strong coupling given by + /// Convolves a single subgrid `(order, bin, channel)` with the PDFs strong coupling given by /// `xfx1`, `xfx2` and `alphas`. The convolution result is fully differentially, such that the /// axes of the result correspond to the values given by the subgrid `q2`, `x1` and `x2` grid /// values. @@ -841,6 +844,7 @@ impl Grid { } /// Set the convolution type for this grid for the corresponding `index`. + #[allow(clippy::needless_pass_by_value)] pub fn set_convolution(&mut self, index: usize, convolution: Convolution) { // remove outdated metadata self.key_values_mut() @@ -1391,6 +1395,11 @@ impl Grid { /// Returns a [`GridError::EvolutionFailure`] if either the `operator` or its `info` is /// incompatible with this `Grid`. Returns a [`GridError::Other`] if the iterator from `slices` /// return an error. + /// + /// # Panics + /// + /// This function will panic if the dimension of the operators do not match the operator + /// information. pub fn evolve_with_slice_iter<'a, E: Into>( &self, slices: impl IntoIterator), E>>, @@ -1513,6 +1522,11 @@ impl Grid { /// Returns a [`GridError::EvolutionFailure`] if either the `operator` or its `info` is /// incompatible with this `Grid`. Returns a [`GridError::Other`] if the iterator from `slices` /// return an error. + /// + /// # Panics + /// + /// This function will panic if the dimension of the operators do not match the operator + /// information. pub fn evolve_with_slice_iter2<'a, E: Into>( &self, slices_a: impl IntoIterator), E>>, @@ -1661,6 +1675,7 @@ impl Grid { /// Deletes bins with the corresponding `bin_indices`. Repeated indices and indices larger or /// equal the bin length are ignored. + #[allow(clippy::range_plus_one)] pub fn delete_bins(&mut self, bin_indices: &[usize]) { let mut bin_indices: Vec<_> = bin_indices .iter() diff --git a/pineappl/src/import_only_subgrid.rs b/pineappl/src/import_only_subgrid.rs index 04624c09a..180d5512a 100644 --- a/pineappl/src/import_only_subgrid.rs +++ b/pineappl/src/import_only_subgrid.rs @@ -77,6 +77,7 @@ impl Subgrid for ImportOnlySubgridV1 { self.array.is_empty() } + #[allow(clippy::float_cmp)] fn merge(&mut self, other: &mut SubgridEnum, transpose: bool) { if let SubgridEnum::ImportOnlySubgridV1(other_grid) = other { if self.array.is_empty() && !transpose { @@ -243,6 +244,7 @@ impl Subgrid for ImportOnlySubgridV2 { self.array.is_empty() } + #[allow(clippy::float_cmp)] fn merge(&mut self, other: &mut SubgridEnum, transpose: bool) { if let SubgridEnum::ImportOnlySubgridV2(other_grid) = other { if self.array.is_empty() && !transpose { @@ -433,6 +435,7 @@ impl From<&SubgridEnum> for ImportOnlySubgridV2 { } } +#[allow(clippy::float_cmp)] #[cfg(test)] mod tests { use super::*; diff --git a/pineappl/src/lagrange_subgrid.rs b/pineappl/src/lagrange_subgrid.rs index 8888d394c..04674d84c 100644 --- a/pineappl/src/lagrange_subgrid.rs +++ b/pineappl/src/lagrange_subgrid.rs @@ -13,10 +13,12 @@ use std::borrow::Cow; use std::iter; use std::mem; +#[allow(clippy::suboptimal_flops)] fn weightfun(x: f64) -> f64 { (x.sqrt() / (1.0 - 0.99 * x)).powi(3) } +#[allow(clippy::suboptimal_flops)] fn fx(y: f64) -> f64 { let mut yp = y; @@ -412,6 +414,7 @@ pub struct LagrangeSubgridV2 { pub(crate) static_q2: f64, } +#[allow(clippy::float_cmp)] impl LagrangeSubgridV2 { /// Constructor. #[must_use] @@ -493,6 +496,7 @@ impl LagrangeSubgridV2 { } } +#[allow(clippy::float_cmp)] impl Subgrid for LagrangeSubgridV2 { fn convolve( &self, @@ -1055,6 +1059,7 @@ impl From<&LagrangeSubgridV1> for LagrangeSparseSubgridV1 { } } +#[allow(clippy::float_cmp)] #[cfg(test)] mod tests { use super::*; diff --git a/pineappl/src/pids.rs b/pineappl/src/pids.rs index 5d130d06b..1fb3d982f 100644 --- a/pineappl/src/pids.rs +++ b/pineappl/src/pids.rs @@ -383,6 +383,7 @@ pub const fn charge_conjugate_pdg_pid(pid: i32) -> i32 { /// Given `tuples` represting a linear combination of PDG MC IDs, return a PID for the `evol` /// basis. The order of each tuple in `tuples` is not relevant. This function inverts /// [`evol_to_pdg_mc_ids`]. If the inversion is not possible, `None` is returned. +#[allow(clippy::float_cmp)] #[must_use] pub fn pdg_mc_ids_to_evol(tuples: &[(i32, f64)]) -> Option { let mut tuples = tuples.to_vec(); diff --git a/pineappl/src/sparse_array3.rs b/pineappl/src/sparse_array3.rs index 1debae7e8..ff57e6016 100644 --- a/pineappl/src/sparse_array3.rs +++ b/pineappl/src/sparse_array3.rs @@ -349,6 +349,7 @@ impl SparseArray3 { } /// Return an iterator over the elements, including zero elements. + #[allow(clippy::iter_without_into_iter)] pub fn iter_mut(&mut self) -> IterMut<'_, T> { self.entries.iter_mut() } @@ -420,6 +421,7 @@ impl SparseArray3 { } } +#[allow(clippy::float_cmp)] #[cfg(test)] mod tests { use super::*; diff --git a/pineappl/tests/drell_yan_lo.rs b/pineappl/tests/drell_yan_lo.rs index 21dad5710..76b318d32 100644 --- a/pineappl/tests/drell_yan_lo.rs +++ b/pineappl/tests/drell_yan_lo.rs @@ -25,6 +25,7 @@ fn int_photo(s: f64, t: f64, u: f64) -> f64 { } // Eq. (2.12) - quark-antiquark contribution to DY lepton pair production +#[allow(clippy::suboptimal_flops)] fn int_quark(s: f64, t: f64, u: f64, qq: f64, i3_wq: f64) -> f64 { let alphagf: f64 = 1.0 / 132.30818655547878; let mw = 80.35198454966643; @@ -77,6 +78,7 @@ struct Psp2to2 { jacobian: f64, } +#[allow(clippy::suboptimal_flops)] fn hadronic_pspgen(rng: &mut impl Rng, mmin: f64, mmax: f64) -> Psp2to2 { let smin = mmin * mmin; let smax = mmax * mmax; diff --git a/pineappl_capi/src/lib.rs b/pineappl_capi/src/lib.rs index 38c45d2d7..09569e6db 100644 --- a/pineappl_capi/src/lib.rs +++ b/pineappl_capi/src/lib.rs @@ -292,6 +292,10 @@ pub unsafe extern "C" fn pineappl_grid_clone(grid: *const Grid) -> Box { } /// Wrapper for [`pineappl_grid_convolve_with_one`]. +/// +/// # Safety +/// +/// This function should not be used anymore. Use `pineappl_grid_convolve_with_one` instead. #[deprecated( since = "0.8.0", note = "please use `pineappl_grid_convolve_with_one` instead" @@ -326,6 +330,10 @@ pub unsafe extern "C" fn pineappl_grid_convolute_with_one( } /// Wrapper for [`pineappl_grid_convolve_with_two`]. +/// +/// # Safety +/// +/// This function should not be used anymore. Use `pineappl_grid_convolve_with_two` instead. #[deprecated( since = "0.8.0", note = "please use `pineappl_grid_convolve_with_two` instead" diff --git a/pineappl_cli/src/convolve.rs b/pineappl_cli/src/convolve.rs index 5377abc54..559620f1f 100644 --- a/pineappl_cli/src/convolve.rs +++ b/pineappl_cli/src/convolve.rs @@ -7,7 +7,8 @@ use std::ops::RangeInclusive; use std::path::PathBuf; use std::process::ExitCode; -/// Convolutes a PineAPPL grid with a PDF set. +/// Convolves a PineAPPL grid with a PDF set. +#[allow(clippy::doc_markdown)] #[derive(Parser)] #[command(alias = "convolute")] pub struct Opts { diff --git a/pineappl_cli/src/diff.rs b/pineappl_cli/src/diff.rs index 4e6e48585..b7da462ca 100644 --- a/pineappl_cli/src/diff.rs +++ b/pineappl_cli/src/diff.rs @@ -57,6 +57,7 @@ pub struct Opts { digits_rel: usize, } +#[allow(clippy::float_cmp)] impl Subcommand for Opts { fn run(&self, cfg: &GlobalConfiguration) -> Result { let grid1 = helpers::read_grid(&self.input1)?; diff --git a/pineappl_cli/src/evolve.rs b/pineappl_cli/src/evolve.rs index 23c476378..850af51ef 100644 --- a/pineappl_cli/src/evolve.rs +++ b/pineappl_cli/src/evolve.rs @@ -560,6 +560,7 @@ pub struct Opts { use_old_evolve: bool, } +#[allow(clippy::float_cmp)] impl Subcommand for Opts { fn run(&self, cfg: &GlobalConfiguration) -> Result { use prettytable::row; diff --git a/pineappl_cli/src/export.rs b/pineappl_cli/src/export.rs index e4ee819d5..316d54906 100644 --- a/pineappl_cli/src/export.rs +++ b/pineappl_cli/src/export.rs @@ -65,6 +65,7 @@ fn convert_into_grid( } /// Converts PineAPPL grids to APPLgrid files. +#[allow(clippy::doc_markdown)] #[derive(Parser)] pub struct Opts { /// Path to the input grid. @@ -97,6 +98,7 @@ pub struct Opts { digits_rel: usize, } +#[allow(clippy::float_cmp)] impl Subcommand for Opts { fn run(&self, cfg: &GlobalConfiguration) -> Result { use prettytable::{cell, row}; diff --git a/pineappl_cli/src/import.rs b/pineappl_cli/src/import.rs index e349640bf..7eb1d534a 100644 --- a/pineappl_cli/src/import.rs +++ b/pineappl_cli/src/import.rs @@ -205,6 +205,7 @@ const fn fnlo_mu_possible_values() -> Vec<&'static str> { } /// Converts APPLgrid/fastNLO/FastKernel files to PineAPPL grids. +#[allow(clippy::doc_markdown)] #[derive(Parser)] pub struct Opts { /// Path to the input grid. @@ -251,6 +252,7 @@ pub struct Opts { dis_pid: i32, } +#[allow(clippy::float_cmp)] impl Subcommand for Opts { fn run(&self, cfg: &GlobalConfiguration) -> Result { use prettytable::{cell, row}; diff --git a/pineappl_cli/src/merge.rs b/pineappl_cli/src/merge.rs index 30d5bd69a..58cd16201 100644 --- a/pineappl_cli/src/merge.rs +++ b/pineappl_cli/src/merge.rs @@ -6,9 +6,10 @@ use std::path::PathBuf; use std::process::ExitCode; /// Merges one or more PineAPPL grids together. +#[allow(clippy::doc_markdown)] #[derive(Parser)] pub struct Opts { - /// Path of the merged PineAPPL file. + /// Path of the merged `PineAPPL` file. #[arg(value_hint = ValueHint::FilePath)] output: PathBuf, /// Path(s) of the files that should be merged. diff --git a/pineappl_cli/src/plot.rs b/pineappl_cli/src/plot.rs index d7b27ff9e..cf42efbfe 100644 --- a/pineappl_cli/src/plot.rs +++ b/pineappl_cli/src/plot.rs @@ -160,6 +160,7 @@ fn format_metadata(metadata: &[(&String, &String)]) -> String { .join("\n") } +#[allow(clippy::float_cmp)] impl Subcommand for Opts { fn run(&self, cfg: &GlobalConfiguration) -> Result { ThreadPoolBuilder::new() diff --git a/pineappl_cli/src/write.rs b/pineappl_cli/src/write.rs index f01358d6c..74267881a 100644 --- a/pineappl_cli/src/write.rs +++ b/pineappl_cli/src/write.rs @@ -16,6 +16,7 @@ use std::path::PathBuf; use std::process::ExitCode; /// Write a grid modified by various operations. +#[allow(clippy::doc_markdown)] #[derive(Parser)] pub struct Opts { /// Path to the input grid. @@ -494,6 +495,7 @@ impl Args for MoreArgs { } } +#[allow(clippy::range_plus_one)] impl Subcommand for Opts { fn run(&self, _: &GlobalConfiguration) -> Result { let mut grid = helpers::read_grid(&self.input)?; diff --git a/pineappl_cli/tests/convolve.rs b/pineappl_cli/tests/convolve.rs index dbf0d107b..1d52984ad 100644 --- a/pineappl_cli/tests/convolve.rs +++ b/pineappl_cli/tests/convolve.rs @@ -1,7 +1,7 @@ use assert_cmd::Command; use predicates::str; -const HELP_STR: &str = "Convolutes a PineAPPL grid with a PDF set +const HELP_STR: &str = "Convolves a PineAPPL grid with a PDF set Usage: pineappl convolve [OPTIONS] ... diff --git a/pineappl_cli/tests/import.rs b/pineappl_cli/tests/import.rs index fca7b9e10..bd2f6da66 100644 --- a/pineappl_cli/tests/import.rs +++ b/pineappl_cli/tests/import.rs @@ -656,6 +656,7 @@ fn import_flex_grid_15() { .stdout(predicates::str::ends_with(IMPORT_FLEX_GRID_15_STR)); } +#[allow(clippy::float_cmp)] #[test] #[cfg(feature = "fktable")] fn import_dis_fktable() { @@ -831,6 +832,7 @@ fn import_dis_fktable() { ); } +#[allow(clippy::float_cmp)] #[test] #[cfg(feature = "fktable")] fn import_hadronic_fktable() { diff --git a/pineappl_cli/tests/main.rs b/pineappl_cli/tests/main.rs index 0ba04dce5..01b01972e 100644 --- a/pineappl_cli/tests/main.rs +++ b/pineappl_cli/tests/main.rs @@ -7,7 +7,7 @@ Usage: pineappl [OPTIONS] Commands: analyze Perform various analyses with grids channels Shows the contribution for each partonic channel - convolve Convolutes a PineAPPL grid with a PDF set + convolve Convolves a PineAPPL grid with a PDF set diff Compares the numerical content of two grids with each other evolve Evolve a grid with an evolution kernel operator to an FK table export Converts PineAPPL grids to APPLgrid files diff --git a/pineappl_cli/tests/merge.rs b/pineappl_cli/tests/merge.rs index ae57dc5aa..370a3db39 100644 --- a/pineappl_cli/tests/merge.rs +++ b/pineappl_cli/tests/merge.rs @@ -6,7 +6,7 @@ const HELP_STR: &str = "Merges one or more PineAPPL grids together Usage: pineappl merge ... Arguments: - Path of the merged PineAPPL file + Path of the merged `PineAPPL` file ... Path(s) of the files that should be merged Options: From ead8262c71a97d35d85511d015227689b60fdf5a Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Tue, 1 Oct 2024 13:12:19 +0200 Subject: [PATCH 16/16] Revert "fix all warnings from clippy (non-deps related)" This reverts commit ced2f8e8b4c45f92a498d9656a28a8e8d4e20cd1. --- docs/cli-tutorial.md | 2 +- pineappl/src/bin.rs | 2 -- pineappl/src/convolutions.rs | 1 - pineappl/src/empty_subgrid.rs | 1 - pineappl/src/fk_table.rs | 1 - pineappl/src/grid.rs | 17 +---------------- pineappl/src/import_only_subgrid.rs | 3 --- pineappl/src/lagrange_subgrid.rs | 5 ----- pineappl/src/pids.rs | 1 - pineappl/src/sparse_array3.rs | 2 -- pineappl/tests/drell_yan_lo.rs | 2 -- pineappl_capi/src/lib.rs | 8 -------- pineappl_cli/src/convolve.rs | 3 +-- pineappl_cli/src/diff.rs | 1 - pineappl_cli/src/evolve.rs | 1 - pineappl_cli/src/export.rs | 2 -- pineappl_cli/src/import.rs | 2 -- pineappl_cli/src/merge.rs | 3 +-- pineappl_cli/src/plot.rs | 1 - pineappl_cli/src/write.rs | 2 -- pineappl_cli/tests/convolve.rs | 2 +- pineappl_cli/tests/import.rs | 2 -- pineappl_cli/tests/main.rs | 2 +- pineappl_cli/tests/merge.rs | 2 +- 24 files changed, 7 insertions(+), 61 deletions(-) diff --git a/docs/cli-tutorial.md b/docs/cli-tutorial.md index 7797180e5..f148248e8 100644 --- a/docs/cli-tutorial.md +++ b/docs/cli-tutorial.md @@ -82,7 +82,7 @@ used already, run Depending on the version of PineAPPL this will show output similar to the following: - Convolves a PineAPPL grid with a PDF set + Convolutes a PineAPPL grid with a PDF set Usage: pineappl convolve [OPTIONS] ... diff --git a/pineappl/src/bin.rs b/pineappl/src/bin.rs index 8803ec4d3..3d45a597e 100644 --- a/pineappl/src/bin.rs +++ b/pineappl/src/bin.rs @@ -108,7 +108,6 @@ pub enum ParseBinRemapperError { }, } -#[allow(clippy::assigning_clones)] impl FromStr for BinRemapper { type Err = ParseBinRemapperError; @@ -788,7 +787,6 @@ impl BinLimits { } } -#[allow(clippy::float_cmp)] #[cfg(test)] mod test { use super::*; diff --git a/pineappl/src/convolutions.rs b/pineappl/src/convolutions.rs index 7dc8c06f8..ea726c440 100644 --- a/pineappl/src/convolutions.rs +++ b/pineappl/src/convolutions.rs @@ -294,7 +294,6 @@ impl<'a> LumiCache<'a> { } /// Set the grids. - #[allow(clippy::float_cmp)] pub fn set_grids( &mut self, mu2_grid: &[Mu2], diff --git a/pineappl/src/empty_subgrid.rs b/pineappl/src/empty_subgrid.rs index d52df04d6..79640e655 100644 --- a/pineappl/src/empty_subgrid.rs +++ b/pineappl/src/empty_subgrid.rs @@ -75,7 +75,6 @@ impl Subgrid for EmptySubgridV1 { } } -#[allow(clippy::float_cmp)] #[cfg(test)] mod tests { use super::*; diff --git a/pineappl/src/fk_table.rs b/pineappl/src/fk_table.rs index 9f9152e40..bf040da46 100644 --- a/pineappl/src/fk_table.rs +++ b/pineappl/src/fk_table.rs @@ -296,7 +296,6 @@ impl FkTable { } } -#[allow(clippy::float_cmp)] impl TryFrom for FkTable { type Error = TryFromGridError; diff --git a/pineappl/src/grid.rs b/pineappl/src/grid.rs index 78dc22c04..19698d228 100644 --- a/pineappl/src/grid.rs +++ b/pineappl/src/grid.rs @@ -213,7 +213,6 @@ bitflags! { /// Main data structure of `PineAPPL`. This structure contains a `Subgrid` for each `LumiEntry`, /// bin, and coupling order it was created with. -#[allow(clippy::unsafe_derive_deserialize)] #[derive(Clone, Deserialize, Serialize)] pub struct Grid { subgrids: Array3, @@ -258,7 +257,6 @@ impl Grid { /// # Errors /// /// If `subgrid_type` is none of the values listed above, an error is returned. - #[allow(clippy::needless_pass_by_value)] pub fn with_subgrid_type( channels: Vec, orders: Vec, @@ -335,7 +333,6 @@ impl Grid { /// # Panics /// /// TODO - #[allow(clippy::float_cmp)] pub fn convolve( &self, lumi_cache: &mut LumiCache, @@ -417,7 +414,7 @@ impl Grid { bins } - /// Convolves a single subgrid `(order, bin, channel)` with the PDFs strong coupling given by + /// Convolutes a single subgrid `(order, bin, channel)` with the PDFs strong coupling given by /// `xfx1`, `xfx2` and `alphas`. The convolution result is fully differentially, such that the /// axes of the result correspond to the values given by the subgrid `q2`, `x1` and `x2` grid /// values. @@ -844,7 +841,6 @@ impl Grid { } /// Set the convolution type for this grid for the corresponding `index`. - #[allow(clippy::needless_pass_by_value)] pub fn set_convolution(&mut self, index: usize, convolution: Convolution) { // remove outdated metadata self.key_values_mut() @@ -1395,11 +1391,6 @@ impl Grid { /// Returns a [`GridError::EvolutionFailure`] if either the `operator` or its `info` is /// incompatible with this `Grid`. Returns a [`GridError::Other`] if the iterator from `slices` /// return an error. - /// - /// # Panics - /// - /// This function will panic if the dimension of the operators do not match the operator - /// information. pub fn evolve_with_slice_iter<'a, E: Into>( &self, slices: impl IntoIterator), E>>, @@ -1522,11 +1513,6 @@ impl Grid { /// Returns a [`GridError::EvolutionFailure`] if either the `operator` or its `info` is /// incompatible with this `Grid`. Returns a [`GridError::Other`] if the iterator from `slices` /// return an error. - /// - /// # Panics - /// - /// This function will panic if the dimension of the operators do not match the operator - /// information. pub fn evolve_with_slice_iter2<'a, E: Into>( &self, slices_a: impl IntoIterator), E>>, @@ -1675,7 +1661,6 @@ impl Grid { /// Deletes bins with the corresponding `bin_indices`. Repeated indices and indices larger or /// equal the bin length are ignored. - #[allow(clippy::range_plus_one)] pub fn delete_bins(&mut self, bin_indices: &[usize]) { let mut bin_indices: Vec<_> = bin_indices .iter() diff --git a/pineappl/src/import_only_subgrid.rs b/pineappl/src/import_only_subgrid.rs index 180d5512a..04624c09a 100644 --- a/pineappl/src/import_only_subgrid.rs +++ b/pineappl/src/import_only_subgrid.rs @@ -77,7 +77,6 @@ impl Subgrid for ImportOnlySubgridV1 { self.array.is_empty() } - #[allow(clippy::float_cmp)] fn merge(&mut self, other: &mut SubgridEnum, transpose: bool) { if let SubgridEnum::ImportOnlySubgridV1(other_grid) = other { if self.array.is_empty() && !transpose { @@ -244,7 +243,6 @@ impl Subgrid for ImportOnlySubgridV2 { self.array.is_empty() } - #[allow(clippy::float_cmp)] fn merge(&mut self, other: &mut SubgridEnum, transpose: bool) { if let SubgridEnum::ImportOnlySubgridV2(other_grid) = other { if self.array.is_empty() && !transpose { @@ -435,7 +433,6 @@ impl From<&SubgridEnum> for ImportOnlySubgridV2 { } } -#[allow(clippy::float_cmp)] #[cfg(test)] mod tests { use super::*; diff --git a/pineappl/src/lagrange_subgrid.rs b/pineappl/src/lagrange_subgrid.rs index 04674d84c..8888d394c 100644 --- a/pineappl/src/lagrange_subgrid.rs +++ b/pineappl/src/lagrange_subgrid.rs @@ -13,12 +13,10 @@ use std::borrow::Cow; use std::iter; use std::mem; -#[allow(clippy::suboptimal_flops)] fn weightfun(x: f64) -> f64 { (x.sqrt() / (1.0 - 0.99 * x)).powi(3) } -#[allow(clippy::suboptimal_flops)] fn fx(y: f64) -> f64 { let mut yp = y; @@ -414,7 +412,6 @@ pub struct LagrangeSubgridV2 { pub(crate) static_q2: f64, } -#[allow(clippy::float_cmp)] impl LagrangeSubgridV2 { /// Constructor. #[must_use] @@ -496,7 +493,6 @@ impl LagrangeSubgridV2 { } } -#[allow(clippy::float_cmp)] impl Subgrid for LagrangeSubgridV2 { fn convolve( &self, @@ -1059,7 +1055,6 @@ impl From<&LagrangeSubgridV1> for LagrangeSparseSubgridV1 { } } -#[allow(clippy::float_cmp)] #[cfg(test)] mod tests { use super::*; diff --git a/pineappl/src/pids.rs b/pineappl/src/pids.rs index 1fb3d982f..5d130d06b 100644 --- a/pineappl/src/pids.rs +++ b/pineappl/src/pids.rs @@ -383,7 +383,6 @@ pub const fn charge_conjugate_pdg_pid(pid: i32) -> i32 { /// Given `tuples` represting a linear combination of PDG MC IDs, return a PID for the `evol` /// basis. The order of each tuple in `tuples` is not relevant. This function inverts /// [`evol_to_pdg_mc_ids`]. If the inversion is not possible, `None` is returned. -#[allow(clippy::float_cmp)] #[must_use] pub fn pdg_mc_ids_to_evol(tuples: &[(i32, f64)]) -> Option { let mut tuples = tuples.to_vec(); diff --git a/pineappl/src/sparse_array3.rs b/pineappl/src/sparse_array3.rs index ff57e6016..1debae7e8 100644 --- a/pineappl/src/sparse_array3.rs +++ b/pineappl/src/sparse_array3.rs @@ -349,7 +349,6 @@ impl SparseArray3 { } /// Return an iterator over the elements, including zero elements. - #[allow(clippy::iter_without_into_iter)] pub fn iter_mut(&mut self) -> IterMut<'_, T> { self.entries.iter_mut() } @@ -421,7 +420,6 @@ impl SparseArray3 { } } -#[allow(clippy::float_cmp)] #[cfg(test)] mod tests { use super::*; diff --git a/pineappl/tests/drell_yan_lo.rs b/pineappl/tests/drell_yan_lo.rs index 76b318d32..21dad5710 100644 --- a/pineappl/tests/drell_yan_lo.rs +++ b/pineappl/tests/drell_yan_lo.rs @@ -25,7 +25,6 @@ fn int_photo(s: f64, t: f64, u: f64) -> f64 { } // Eq. (2.12) - quark-antiquark contribution to DY lepton pair production -#[allow(clippy::suboptimal_flops)] fn int_quark(s: f64, t: f64, u: f64, qq: f64, i3_wq: f64) -> f64 { let alphagf: f64 = 1.0 / 132.30818655547878; let mw = 80.35198454966643; @@ -78,7 +77,6 @@ struct Psp2to2 { jacobian: f64, } -#[allow(clippy::suboptimal_flops)] fn hadronic_pspgen(rng: &mut impl Rng, mmin: f64, mmax: f64) -> Psp2to2 { let smin = mmin * mmin; let smax = mmax * mmax; diff --git a/pineappl_capi/src/lib.rs b/pineappl_capi/src/lib.rs index 09569e6db..38c45d2d7 100644 --- a/pineappl_capi/src/lib.rs +++ b/pineappl_capi/src/lib.rs @@ -292,10 +292,6 @@ pub unsafe extern "C" fn pineappl_grid_clone(grid: *const Grid) -> Box { } /// Wrapper for [`pineappl_grid_convolve_with_one`]. -/// -/// # Safety -/// -/// This function should not be used anymore. Use `pineappl_grid_convolve_with_one` instead. #[deprecated( since = "0.8.0", note = "please use `pineappl_grid_convolve_with_one` instead" @@ -330,10 +326,6 @@ pub unsafe extern "C" fn pineappl_grid_convolute_with_one( } /// Wrapper for [`pineappl_grid_convolve_with_two`]. -/// -/// # Safety -/// -/// This function should not be used anymore. Use `pineappl_grid_convolve_with_two` instead. #[deprecated( since = "0.8.0", note = "please use `pineappl_grid_convolve_with_two` instead" diff --git a/pineappl_cli/src/convolve.rs b/pineappl_cli/src/convolve.rs index 559620f1f..5377abc54 100644 --- a/pineappl_cli/src/convolve.rs +++ b/pineappl_cli/src/convolve.rs @@ -7,8 +7,7 @@ use std::ops::RangeInclusive; use std::path::PathBuf; use std::process::ExitCode; -/// Convolves a PineAPPL grid with a PDF set. -#[allow(clippy::doc_markdown)] +/// Convolutes a PineAPPL grid with a PDF set. #[derive(Parser)] #[command(alias = "convolute")] pub struct Opts { diff --git a/pineappl_cli/src/diff.rs b/pineappl_cli/src/diff.rs index b7da462ca..4e6e48585 100644 --- a/pineappl_cli/src/diff.rs +++ b/pineappl_cli/src/diff.rs @@ -57,7 +57,6 @@ pub struct Opts { digits_rel: usize, } -#[allow(clippy::float_cmp)] impl Subcommand for Opts { fn run(&self, cfg: &GlobalConfiguration) -> Result { let grid1 = helpers::read_grid(&self.input1)?; diff --git a/pineappl_cli/src/evolve.rs b/pineappl_cli/src/evolve.rs index 850af51ef..23c476378 100644 --- a/pineappl_cli/src/evolve.rs +++ b/pineappl_cli/src/evolve.rs @@ -560,7 +560,6 @@ pub struct Opts { use_old_evolve: bool, } -#[allow(clippy::float_cmp)] impl Subcommand for Opts { fn run(&self, cfg: &GlobalConfiguration) -> Result { use prettytable::row; diff --git a/pineappl_cli/src/export.rs b/pineappl_cli/src/export.rs index 316d54906..e4ee819d5 100644 --- a/pineappl_cli/src/export.rs +++ b/pineappl_cli/src/export.rs @@ -65,7 +65,6 @@ fn convert_into_grid( } /// Converts PineAPPL grids to APPLgrid files. -#[allow(clippy::doc_markdown)] #[derive(Parser)] pub struct Opts { /// Path to the input grid. @@ -98,7 +97,6 @@ pub struct Opts { digits_rel: usize, } -#[allow(clippy::float_cmp)] impl Subcommand for Opts { fn run(&self, cfg: &GlobalConfiguration) -> Result { use prettytable::{cell, row}; diff --git a/pineappl_cli/src/import.rs b/pineappl_cli/src/import.rs index 7eb1d534a..e349640bf 100644 --- a/pineappl_cli/src/import.rs +++ b/pineappl_cli/src/import.rs @@ -205,7 +205,6 @@ const fn fnlo_mu_possible_values() -> Vec<&'static str> { } /// Converts APPLgrid/fastNLO/FastKernel files to PineAPPL grids. -#[allow(clippy::doc_markdown)] #[derive(Parser)] pub struct Opts { /// Path to the input grid. @@ -252,7 +251,6 @@ pub struct Opts { dis_pid: i32, } -#[allow(clippy::float_cmp)] impl Subcommand for Opts { fn run(&self, cfg: &GlobalConfiguration) -> Result { use prettytable::{cell, row}; diff --git a/pineappl_cli/src/merge.rs b/pineappl_cli/src/merge.rs index 58cd16201..30d5bd69a 100644 --- a/pineappl_cli/src/merge.rs +++ b/pineappl_cli/src/merge.rs @@ -6,10 +6,9 @@ use std::path::PathBuf; use std::process::ExitCode; /// Merges one or more PineAPPL grids together. -#[allow(clippy::doc_markdown)] #[derive(Parser)] pub struct Opts { - /// Path of the merged `PineAPPL` file. + /// Path of the merged PineAPPL file. #[arg(value_hint = ValueHint::FilePath)] output: PathBuf, /// Path(s) of the files that should be merged. diff --git a/pineappl_cli/src/plot.rs b/pineappl_cli/src/plot.rs index cf42efbfe..d7b27ff9e 100644 --- a/pineappl_cli/src/plot.rs +++ b/pineappl_cli/src/plot.rs @@ -160,7 +160,6 @@ fn format_metadata(metadata: &[(&String, &String)]) -> String { .join("\n") } -#[allow(clippy::float_cmp)] impl Subcommand for Opts { fn run(&self, cfg: &GlobalConfiguration) -> Result { ThreadPoolBuilder::new() diff --git a/pineappl_cli/src/write.rs b/pineappl_cli/src/write.rs index 74267881a..f01358d6c 100644 --- a/pineappl_cli/src/write.rs +++ b/pineappl_cli/src/write.rs @@ -16,7 +16,6 @@ use std::path::PathBuf; use std::process::ExitCode; /// Write a grid modified by various operations. -#[allow(clippy::doc_markdown)] #[derive(Parser)] pub struct Opts { /// Path to the input grid. @@ -495,7 +494,6 @@ impl Args for MoreArgs { } } -#[allow(clippy::range_plus_one)] impl Subcommand for Opts { fn run(&self, _: &GlobalConfiguration) -> Result { let mut grid = helpers::read_grid(&self.input)?; diff --git a/pineappl_cli/tests/convolve.rs b/pineappl_cli/tests/convolve.rs index 1d52984ad..dbf0d107b 100644 --- a/pineappl_cli/tests/convolve.rs +++ b/pineappl_cli/tests/convolve.rs @@ -1,7 +1,7 @@ use assert_cmd::Command; use predicates::str; -const HELP_STR: &str = "Convolves a PineAPPL grid with a PDF set +const HELP_STR: &str = "Convolutes a PineAPPL grid with a PDF set Usage: pineappl convolve [OPTIONS] ... diff --git a/pineappl_cli/tests/import.rs b/pineappl_cli/tests/import.rs index bd2f6da66..fca7b9e10 100644 --- a/pineappl_cli/tests/import.rs +++ b/pineappl_cli/tests/import.rs @@ -656,7 +656,6 @@ fn import_flex_grid_15() { .stdout(predicates::str::ends_with(IMPORT_FLEX_GRID_15_STR)); } -#[allow(clippy::float_cmp)] #[test] #[cfg(feature = "fktable")] fn import_dis_fktable() { @@ -832,7 +831,6 @@ fn import_dis_fktable() { ); } -#[allow(clippy::float_cmp)] #[test] #[cfg(feature = "fktable")] fn import_hadronic_fktable() { diff --git a/pineappl_cli/tests/main.rs b/pineappl_cli/tests/main.rs index 01b01972e..0ba04dce5 100644 --- a/pineappl_cli/tests/main.rs +++ b/pineappl_cli/tests/main.rs @@ -7,7 +7,7 @@ Usage: pineappl [OPTIONS] Commands: analyze Perform various analyses with grids channels Shows the contribution for each partonic channel - convolve Convolves a PineAPPL grid with a PDF set + convolve Convolutes a PineAPPL grid with a PDF set diff Compares the numerical content of two grids with each other evolve Evolve a grid with an evolution kernel operator to an FK table export Converts PineAPPL grids to APPLgrid files diff --git a/pineappl_cli/tests/merge.rs b/pineappl_cli/tests/merge.rs index 370a3db39..ae57dc5aa 100644 --- a/pineappl_cli/tests/merge.rs +++ b/pineappl_cli/tests/merge.rs @@ -6,7 +6,7 @@ const HELP_STR: &str = "Merges one or more PineAPPL grids together Usage: pineappl merge ... Arguments: - Path of the merged `PineAPPL` file + Path of the merged PineAPPL file ... Path(s) of the files that should be merged Options: