diff --git a/src/ekobox/cli/inspect.py b/src/ekobox/cli/inspect.py index f37f09cce..06f6588ed 100644 --- a/src/ekobox/cli/inspect.py +++ b/src/ekobox/cli/inspect.py @@ -27,7 +27,7 @@ def subcommand(ctx, path: pathlib.Path): @click.pass_obj def sub_mu2(operator: EKO): """Check operator's mu2grid.""" - rich.print_json(data=operator.mu2grid.tolist()) + rich.print_json(data=operator.mu2grid) @subcommand.command("cards") diff --git a/src/ekobox/cli/run.py b/src/ekobox/cli/run.py index 16e11c5fd..db88167e4 100644 --- a/src/ekobox/cli/run.py +++ b/src/ekobox/cli/run.py @@ -52,11 +52,11 @@ def subcommand(paths: Sequence[pathlib.Path]): else: output = operator.parent / OUTPUT - theory = yaml.safe_load(theory.read_text(encoding="utf-8")) - if "order" in theory: - theory = TheoryCard.from_dict(theory) - operator = yaml.safe_load(operator.read_text(encoding="utf-8")) - if "configs" in operator: - operator = OperatorCard.from_dict(operator) - - eko.solve(theory, operator, path=output) + tc = yaml.safe_load(theory.read_text(encoding="utf-8")) + if "order" in tc: + tc = TheoryCard.from_dict(tc) + oc = yaml.safe_load(operator.read_text(encoding="utf-8")) + if "configs" in oc: + oc = OperatorCard.from_dict(oc) + + eko.solve(tc, oc, path=output) diff --git a/src/ekobox/cli/runcards.py b/src/ekobox/cli/runcards.py index 1ad7d91d4..7fc46f1ef 100644 --- a/src/ekobox/cli/runcards.py +++ b/src/ekobox/cli/runcards.py @@ -2,6 +2,8 @@ import logging import pathlib +import numpy as np + from .. import cards from . import library as lib from .base import command @@ -34,6 +36,6 @@ def sub_example(destination: pathlib.Path): cards.dump(theory.raw, path=destination / "theory.yaml") operator = cards.example.operator() operator.mu0 = 1.65 - operator.mu2grid = [1e5] + operator.mugrid = [(np.sqrt(1e5), 5)] cards.dump(operator.raw, path=destination / "operator.yaml") _logger.info(f"Runcards generated to '{destination}'")