diff --git a/src/pineko/evolve.py b/src/pineko/evolve.py index 978b2702..f2b884c1 100644 --- a/src/pineko/evolve.py +++ b/src/pineko/evolve.py @@ -1,5 +1,6 @@ """Tools related to evolution/eko.""" import copy +import logging import os import pathlib @@ -17,6 +18,8 @@ from . import check, comparator, ekompatibility, version +logger = logging.getLogger(__name__) + def sv_scheme(tcard): """Infere the factorization scale_variation scheme to be used from the theory card. @@ -133,6 +136,15 @@ def write_operator_card(pineappl_grid, default_card, card_path, tcard): operators_card["configs"]["interpolation_polynomial_degree"] = 1 operators_card["xgrid"] = x_grid.tolist() + # Some safety checks + if ( + operators_card["configs"]["evolution_method"] == "truncated" + and operators_card["configs"]["ev_op_iterations"] > 1 + ): + logger.warning( + "Warning! You are setting evolution_method=truncated with ev_op_iterations>1, are you sure that's what you want? " + ) + with open(card_path, "w", encoding="UTF-8") as f: yaml.safe_dump(operators_card, f) return operators_card["xgrid"], q2_grid