Skip to content

Fix no central orders and completely empty grids in scale variations#248

Open
Radonirinaunimi wants to merge 13 commits into
mainfrom
allow-no-central-order
Open

Fix no central orders and completely empty grids in scale variations#248
Radonirinaunimi wants to merge 13 commits into
mainfrom
allow-no-central-order

Conversation

@Radonirinaunimi
Copy link
Copy Markdown
Member

@Radonirinaunimi Radonirinaunimi commented Apr 29, 2026

This PR fixes two issues arising from specific grids during scale variations, namely:

  • grids with no central orders but the corresponding scale varied orders are available
  • completely empty grids that do not contain orders

PS: It also bumps the version of pineappl to v1.4.0a1 for the tests.

@Radonirinaunimi
Copy link
Copy Markdown
Member Author

@kamillaurent Could you please check with this branch (say for one of the datasets and sub-theories that failed before) that it is no longer an issue?

@kamillaurent
Copy link
Copy Markdown

@Radonirinaunimi I checked and seems the problem

ValueError: Central order is not available but sv order is.

is no longer there.

However, for these datasets:

HERA_NC_318GEV_EAVG_BOTTOM-SIGMARED
HERA_NC_318GEV_EAVG_CHARM-SIGMARED
BCDMS_NC_NOTFIXED_P_EM-F2
BCDMS_NC_NOTFIXED_D_EM-F2
NUTEV_CC_NOTFIXED_FE_NB-SIGMARED
NUTEV_CC_NOTFIXED_FE_NU-SIGMARED
CHORUS_CC_NOTFIXED_PB_NU-SIGMARED

I still encounter the second error:

ValueError: min() iterable argument is empty

@Radonirinaunimi Radonirinaunimi changed the title Allow for missing central order in scale variations Fix no central orders and completely empty grids in scale variations Apr 29, 2026
@Radonirinaunimi
Copy link
Copy Markdown
Member Author

Could you please try now @kamillaurent ? (Fingers crossed 🤞🏼 it won't break the nFONLL combinations)

@kamillaurent
Copy link
Copy Markdown

@Radonirinaunimi the fix worked and I could compute the remaining ekos and FK Tables.

Comment thread src/pineko/evolve.py Outdated
fktable.set_metadata("pineko_version", version.__version__)
fktable.set_metadata("theory_card", json.dumps(theory_meta))
fktable.write_lz4(str(fktable_path))
return fktable
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this an internal function? I'd say this should be useful enough to be outside and called taking a grid as an input. Something like construct_empty_fktable_like(grid, **otherinfo), similar to zeros_like from numpy.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply promoted as a global function in 50e9b68.

Comment thread src/pineko/evolve.py Outdated
Comment thread pyproject.toml Outdated
@Radonirinaunimi
Copy link
Copy Markdown
Member Author

AFAIC, this is ready to go.

Copy link
Copy Markdown
Member

@scarlehoff scarlehoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this. I mostly get the gist of it now that I have the issue in mind but I think I will have no idea why we are returning empty/none things in a year 😅

Comment thread src/pineko/check.py
@@ -174,7 +176,14 @@ def contains_sv(
) -> Tuple[AvailableAtMax, int]:
"""Check whether renormalization scale-variations are available in the pineappl grid."""
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain in the docstr of this function what are we exactly returning and why it makes sense to do return AvailableAtMax.BOTH, 0 if the grid doesn't contain anything?

Comment thread src/pineko/evolve.py
min_as: None or int
minimum power of strong coupling
"""
# A grid with no orders is a valid input for some workflows. In that case we
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as before, could you add here the what are we returning and why does it make sense to return the grid, and empty fktable and None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants