Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/pineko/evolve.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Tools related to evolution/eko."""
import copy
import logging
import os
import pathlib

Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down