Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion src/pineko/cli/convolute.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
"""CLI entry point to convolution."""
import click
import eko
import pineappl
import rich

Expand Down Expand Up @@ -41,6 +42,7 @@ def subcommand(grid_path, op_path, fktable, max_as, max_al, xir, xif, pdf, assum
PDF is an optional PDF set compatible with the EKO to compare grid and FK table.
"""
grid = pineappl.grid.Grid.read(grid_path)
operators = eko.output.Output.load_tar(op_path)
rich.print(
rich.panel.Panel.fit("Computing ...", style="magenta", box=rich.box.SQUARE),
f" {grid_path}\n",
Expand All @@ -50,7 +52,7 @@ def subcommand(grid_path, op_path, fktable, max_as, max_al, xir, xif, pdf, assum
)
_grid, _fk, comp = evolve.evolve_grid(
grid,
op_path,
operators,
fktable,
max_as,
max_al,
Expand Down
5 changes: 2 additions & 3 deletions src/pineko/evolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def write_operator_card(pineappl_grid, default_card, card_path, xif):

def evolve_grid(
grid,
eko_path,
operators,
fktable_path,
max_as,
max_al,
Expand All @@ -94,7 +94,7 @@ def evolve_grid(
----------
grid : pineappl.grid.Grid
unconvoluted grid
eko_path : str
operators : eko.output.Output
evolution operator
fktable_path : str
target path for convoluted grid
Expand All @@ -114,7 +114,6 @@ def evolve_grid(
if given, a comparison table (with / without evolution) will be printed
"""
_x_grid, _pids, mur2_grid, _muf2_grid = grid.axes()
operators = eko.output.Output.load_tar(eko_path)
check.check_grid_and_eko_compatible(grid, operators, xif)
# rotate to evolution (if doable and necessary)
if np.allclose(operators["inputpids"], br.flavor_basis_pids):
Expand Down
5 changes: 4 additions & 1 deletion src/pineko/theory.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ def fk(self, name, grid_path, tcard, pdf):
xir = tcard["XIR"]
xif = tcard["XIF"]
ftr = tcard["fact_to_ren_scale_ratio"]
# loading grid
grid = pineappl.grid.Grid.read(grid_path)
if not np.isclose(xir, 1.0):
check.contains_ren(grid)
Expand All @@ -376,6 +377,8 @@ def fk(self, name, grid_path, tcard, pdf):
astrong = sc.StrongCoupling.from_dict(tcard)
# ocard = self.load_operator_card(name)
# q2_grid = ocard["Q2grid"]

# loading ekos
operators = eko.output.Output.load_tar(eko_filename)
q2_grid = operators["Q2grid"].keys()
# PineAPPL wants alpha_s = 4*pi*a_s
Expand All @@ -398,7 +401,7 @@ def fk(self, name, grid_path, tcard, pdf):
)
_grid, _fk, comparison = evolve.evolve_grid(
grid,
eko_filename,
operators,
fk_filename,
max_as,
max_al,
Expand Down