Skip to content

Commit

Permalink
Upgrade pineappl, optimize FkTables
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Mar 1, 2022
1 parent 31b0beb commit 89c1473
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
37 changes: 18 additions & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ authors = [
[tool.poetry.dependencies]
python = ">=3.8,<3.11"
eko = "^0.8.5"
pineappl = "^0.5.0"
pineappl = "^0.5.1"
PyYAML = "^6.0"
numpy = "^1.21.0"
pandas = "^1.4.1"
Expand Down
5 changes: 4 additions & 1 deletion src/pineko/evolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@

from . import check, comparator


def write_operator_card(pineappl_grid, default_card, card_path):
"""Generate operator card for this grid.
Parameters
----------
pineappl_grid : pineappl.grid.Grid
Expand All @@ -33,6 +34,7 @@ def write_operator_card(pineappl_grid, default_card, card_path):
yaml.safe_dump(operators_card, f)
return x_grid, q2_grid


def evolve_grid(
pineappl_path, eko_path, fktable_path, max_as, max_al, comparison_pdf=None
):
Expand Down Expand Up @@ -72,6 +74,7 @@ def evolve_grid(
# do it
order_mask = pineappl.grid.Order.create_mask(pineappl_grid.orders(), max_as, max_al)
fktable = pineappl_grid.convolute_eko(operators, "evol", order_mask=order_mask)
fktable.optimize()
# write
fktable.write_lz4(str(fktable_path))
# compare before after
Expand Down

0 comments on commit 89c1473

Please sign in to comment.