nnpdf icon indicating copy to clipboard operation
nnpdf copied to clipboard

Restructure pdfbases to introduce a flavour entity

Open Zaharid opened this issue 5 years ago • 0 comments

The way https://github.com/NNPDF/nnpdf/blob/master/validphys2/src/validphys/pdfbases.py is a bit silly and really only made sense when there where two "bases" with disjoint flavours.

The minor problem is that we don't want to be repeating things like:

    r'\Sigma'  : {'u': 1, 'ubar': 1, 'd': 1, 'dbar': 1, 's': 1, 'sbar': 1, 'c': 1, 'cbar': 1 ,'b':1, 'bbar': 1, 't': 1, 'tbar': 1},

for each basis we may want to add. The more involved one is that we actually want to have properties associated to each flavour such as aliases or something saying how to compute the preprocessing exponents.

We want to have some Flavour class (note this is abuse of language, a linear combination of flavours, like 'singlet' is a flavour in this context; so maybe we should call it something else) encapsulating the current common properties, such as the decomposition in terms of the actual flavour basis, aliases or the like.

Then a basis is just a wrapper over a collection of flavours.

Note that this can all be done without touching the code from anywhere else. But it can allow to e.g. plot things from different basis in one call.

Zaharid avatar Mar 27 '20 15:03 Zaharid