From 916bf030e9101f18bb104ce73e3fad4e3b4ddeb2 Mon Sep 17 00:00:00 2001 From: Felix Hekhorn Date: Tue, 30 Jan 2024 13:03:46 +0200 Subject: [PATCH] Use eko.runner.managed.solve --- src/pineko/theory.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pineko/theory.py b/src/pineko/theory.py index 06411a99..bd76c3cd 100644 --- a/src/pineko/theory.py +++ b/src/pineko/theory.py @@ -15,6 +15,7 @@ import pineappl import rich import yaml +from eko.runner.managed import solve from . import check, configs, evolve, parser, scale_variations, theory_card @@ -331,7 +332,7 @@ def eko(self, name, _grid, tcard): logger.info("Start computation of %s", name) start_time = time.perf_counter() # Actual computation of the EKO - eko.runner.solve(new_theory, new_op, eko_filename) + solve(new_theory, new_op, eko_filename) logger.info( "Finished computation of %s - took %f s", name, @@ -408,7 +409,7 @@ def fk(self, name, grid_path, tcard, pdf): ).size == 0 ): - rich.print(f"[green] Skipping empty grid.") + rich.print("[green] Skipping empty grid.") return # check for sv @@ -421,7 +422,7 @@ def fk(self, name, grid_path, tcard, pdf): with eko.EKO.read(eko_filename) as operators: # Skip the computation of the fktable if the eko is empty if len(operators.mu2grid) == 0 and check.is_num_fonll(tcard["FNS"]): - rich.print(f"[green] Skipping empty eko for nFONLL.") + rich.print("[green] Skipping empty eko for nFONLL.") return eko_tmp_path = ( operators.paths.root.parent / f"eko-tmp-{name}-{np.random.rand()}.tar"