Skip to content

Changing n3lo_cf_variations from int to list - #2523

Open
jekoorn wants to merge 3 commits into
masterfrom
4IHOUs_utils
Open

jekoorn wants to merge 3 commits into
masterfrom
4IHOUs_utils

Conversation

@jekoorn

@jekoorn jekoorn commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

The update in YADISM/388 NNPDF/yadism#388 will break the definition of TheoryCard. Either we accept both a list or an integer, or we go and make sure theory cards will all possess a list.

Example of what could happen

 File "/nnpdf/nnpdf_data/nnpdf_data/utils.py", line 169, in parse_yaml_inp
    raise ValidationError('\n'.join(error_text_lines)) from e
validobj.errors.ValidationError: Problem processing key at line 46 in /nnpdf/nnpdf_data/nnpdf_data/theory_cards/40007005.yaml:
Cannot process field 'n3lo_cf_variation' of value into the corresponding field of 'TheoryCard'
No match for any possible type:
Not a valid match for 'list': Expecting value of type 'list', not int.
Not a valid match for 'NoneType': Expecting value of type 'NoneType', not int.

@scarlehoff

Copy link
Copy Markdown
Member

I think the theory cards here were not supposed to be yadism-compatible @felixhekhorn ?

That said, if n3lo_cf_variation is only relevant for yadism (and not for eko) I guess we should have it synchronised.

@jekoorn

jekoorn commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

Doesn't it become an issue then, when you use these n3lo_cf_variation cards for anything else that calls this util?
Otherwise we should have just kept the convention to be an integer for the default card, and only change it to a list for the 8 theory cards that require a variation. But I think a synchronisation is still better and more fool-proof.

@scarlehoff

Copy link
Copy Markdown
Member

Doesn't it become an issue then, when you use these n3lo_cf_variation cards for anything else that calls this util?

This is why we need @felixhekhorn's input ^^U, if it is a yadism-only flag then we can change it at will and it is not a problem

@felixhekhorn

Copy link
Copy Markdown
Contributor

That said, if n3lo_cf_variation is only relevant for yadism (and not for eko) I guess we should have it synchronised.

the "cf" means "coefficient function"

I think the theory cards here were not supposed to be yadism-compatible @felixhekhorn ?

mh? how do you mean? the theory cards here are supposed to hold all information which define a theory (in the sense of this repository), thus it must be a list. Am I missing something?

This is why we need @felixhekhorn's input ^^U, if it is a yadism-only flag then we can change it at will and it is not a problem

why would be yadism here different from eko? if we have a new feature in either code we usually want to import it to here ... (There is a small overlap with NNPDF/eko#473 )

@scarlehoff

Copy link
Copy Markdown
Member

mh? how do you mean? the theory cards here are supposed to hold all information which define a theory (in the sense of this repository), thus it must be a list. Am I missing something?

Then it must be a list and that's it.

What I mean is that these cards don't need to be read (unmodified) by yadism at any point.

@jekoorn

jekoorn commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Additionally I am afraid
https://github.com/NNPDF/nnpdf/blob/master/validphys2/src/validphys/scalevariations/pointprescriptions.yaml
needs to be updated as well, since it contains the old 'central DIS', 'lower bound DIS', 'upper bound DIS' variations. But this will make any old N3LO CF variation break.

Edit: in validphys2/src/validphys/theorycovariance/construction.py the dis hou will also need to take a 9 point construction, and the full covmat also needs its own construction function (it seems to be not implemented)

(0, -1, 0, 0): 41_042_024
(0, 0, -1, 0): 41_042_025
(0, 0, 0, -1): 41_042_026
central DIS: 41_042_000

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This line conflicts with this one

I think the obvious conclusion is that this PR should sit on top of #2494 and the necessary changes should be done there to vp; i.e. this PR should only do what it says and no more

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah I am screwing up a bit, I will revert this back.

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.

3 participants