nnpdf icon indicating copy to clipboard operation
nnpdf copied to clipboard

Create a nnpdf data cli

Open scarlehoff opened this issue 1 year ago • 2 comments

This is just a collection of scripts / ideas that I think they might be useful. I've been writing some scripts already while preparing the talk for DIS so might as well make it into a cli for the data package.

  • Given a dataset name, return the hepdata / arxiv entry
  • Given an arxiv/hepdata entry, return matching datasets.
  • Given a runcard / yaml file with dataset_inputs, return a list of all matching hep data / arxiv entry. Perhaps even prepare a nice latex format table and, if inspire/arxiv info is available, through the API, the bib file with the corresponding references.
  • Some filtering (e.g., all datasets that match CMS_1JET_13TEV and have a theory)
  • Provide a way to read and/or search in all theories

scarlehoff avatar Apr 06 '24 10:04 scarlehoff

In order to separate the data package from the rest of the code (while keeping the reading features), the only necessary step is to move this function (and its dependencies) to the data: https://github.com/NNPDF/nnpdf/blob/87daeb1b25cc913fe45a6d7d8be779f80c7ebffc/validphys2/src/validphys/commondataparser.py#L811

The only piece that keeps a dependence on validphys are the old plotting options (plus perhaps a few constants that are defined in other files). Once no more old commondata files need to be read, those will be easily removed.

In the meantime, if someone wanta to move things around anyway they can do so, but some kind of "fake plotting options"* will be needed in the middle.

*plotting options are, obviously, more than plotting options and have an effect also in e.g. the kinematics

scarlehoff avatar Oct 22 '24 18:10 scarlehoff

see #2225

felixhekhorn avatar Nov 25 '24 13:11 felixhekhorn