Repository navigation
Add check for the presence of lr in the sv grids - #271
kamillaurent wants to merge 3 commits into
Conversation
felixhekhorn
left a comment
There was a problem hiding this comment.
This is a heavy change (potentially fixing a previous bug), so we need more tests
| pineko.check.Scale.REN, | ||
| ) | ||
| with pytest.raises(ValueError, match="CENTRAL only"): | ||
| pineko.theory.check_scvar_evolve( |
There was a problem hiding this comment.
This would imply that we never call pineko.theory.check_scvar_evolve on central predictions - is this true?
There was a problem hiding this comment.
Yes, this should be the case, as if I run pineko theory opcards with any theory for which we do not vary the ren scale it does not raise the error.
| max_al, | ||
| pineko.check.Scale.REN, | ||
| ) | ||
| with pytest.raises(ValueError, match="SCVAR only"): |
There was a problem hiding this comment.
Why is this considered an error? it looks fine to me. Compared to the first case above this just has an empty (2,0,0,0,0), which in principle could happen I guess?
| return self.orders | ||
|
|
||
|
|
||
| def test_check_scvar_evolve(): |
There was a problem hiding this comment.
Please add a bunch of more test cases here, in particular some where the LO is not
There was a problem hiding this comment.
Ok, I will add more cases in the test
At what order is checked a NNLO grid used in a NLO theory? (and what about a NNLO grid in a N3LO theory?) |
| ## [Unreleased](https://github.com/NNPDF/pineko/compare/v0.6.0...HEAD) | ||
|
|
||
| ### Fixed | ||
| - `check_scvar_evolve` now raises when the highest order of a grid has only the central order (`CENTRAL`) or only the scale-variation orders (`SCVAR`); before, the check could never trigger. ([#271](https://github.com/NNPDF/pineko/pull/271)) |
There was a problem hiding this comment.
All DIS grids, for all nfonll pieces, pass?
There was a problem hiding this comment.
I did not try the DIS grids, I will make the same test with those
|
Related to this PR: after this fix, running For example with Before: After Only the NLO log is added; as^4 lr and as^4 lr^2 are missing, so pineko theory opcards 41000013 ATLAS_1JET_13TEV_DIF_PT-Y now raises CENTRAL only. Running |
The test only checks the order of alpha_s which is |
Fix the scale-variation guard in
check_scvar_evolveThe check for the scale-variation subgrids was triggered by
max_as < max_as_effective, which can never be true. It now raises whenmax_as_effective == max_as.Change:
src/pineko/theory.py: the error says which case it is:CENTRAL(sv orders missing) orSCVAR(central order missing).tests/test_theory_sv.py: the existing test expectedgrid_centralandgrid_scvaratmax_as=3not to raise, i.e. it asserted the bug. Both are now wrapped inpytest.raises.Validation:
Ran
pineko theory opcardswith theory 41000013 (NNLO, xiR = 2) on all datasets, using the original grids:CENTRAL only, as expected;Known limitation:
Only the highest order is checked, and only when the grid reaches the theory order. A grid that stops below the theory order (e.g. an NLO-only grid used in an NNLO theory) is not checked.
AI usage:
Claude Code, Claude Opus 5.5: bug analysis, code change and test. Reviewed and validated by the author.