NNPDF / nnpdf

An open-source machine learning framework for global analyses of parton distributions.
https://docs.nnpdf.science/
GNU General Public License v3.0
30 stars 6 forks source link

Recognize units of grids #1609

Closed cschwan closed 8 months ago

cschwan commented 2 years ago

Each PineAPPL grid can store its numbers in arbitrary units, and pineko should recognize these units and convert them to the correct ones matching the ones the measurements are given in. By default Madgraph5_aMC@NLO stores cross sections in units of picobarns and energies in giga electronvolt, but nothing prevents the user to choose units different from those (what's the situation for yadism?). Ideally, we'd support any units. PineAPPL's metadata allows to specify these units in the keys with names y_unit, x1_unit, x2_unit, etc. That being said I think we should:

  1. check that this metadata is there (could be updated to be a requirement of FK table-convertable grids)
  2. check that the values make sense
  3. and finally convert the units to 'the right ones', which we probably have to define.

Alternatively to 3. we might require the units already to be the right ones, or error out if they're not. I'm not sure whether we can support this option for all datasets. Some of the fixed-target DY datasets might have non-standard units, so their measurements would have to be rescaled.

For instance, a differential cross section from a different Monte Carlo might come out as y_unit=nb/MeV, which would be 10^6 pb/GeV.

felixhekhorn commented 2 years ago

I wonder whether this is a pineko problem - instead I think this might be a vp/CommonData problem ... (meaning @scarlehoff 's responsibility )

do you agree? (if you wish we can still host the issue here until CommonData is more mature ...)

cschwan commented 2 years ago

Yes, this might be the wrong place indeed. In any case at some point 1) we should make sure the units agree, which 2) might require encoding the units of the measurements. I don't know whether 2) latter is already forseen within common data.

felixhekhorn commented 2 years ago

Looking at the current draft of CommonData https://github.com/NNPDF/nnpdf/blob/eea53bc9b191d20a48bac3d5af969e8ac4a4aae9/buildmaster/NMCPD/metadata.yaml there is no such field - so we should ask to @enocera: should we add a metadata field with the units of the measurement? (see e.g. https://github.com/NNPDF/runcards/blob/e3601ef290d9eef2e21af9454f8e5a88f900e2e8/nnpdf31_proc/ATLAS_WM_7TEV/metadata.txt)

maybe we should transfer the issue to the nnpdf repo ...

cschwan commented 2 years ago

I agree, let's move this Issue to the NNPDF repository. The fitting code should probably make sure that the units of the prediction and the measurement agree with each other.

alecandido commented 2 years ago

@felixhekhorn @cschwan Since we proposed to transfer this, can I do it? image

(maybe after moving this repo to the NNPDF organization, something that we decided to do last week)

felixhekhorn commented 2 years ago

agreed