Coder Social home page Coder Social logo

nnpdf / pineappl Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 3.0 17.1 MB

PineAPPL is not an extension of APPLgrid

Home Page: https://nnpdf.github.io/pineappl/

License: GNU General Public License v3.0

Rust 91.91% Python 3.73% Shell 2.13% Makefile 0.07% Batchfile 0.06% Dockerfile 0.13% C++ 1.88% HTML 0.09%
high-energy-physics

pineappl's Introduction

Build status DOI

NNPDF: An open-source machine learning framework for global analyses of parton distributions

The NNPDF collaboration determines the structure of the proton using Machine Learning methods. This is the main repository of the fitting and analysis frameworks. In particular it contains all the necessary tools to reproduce the NNPDF4.0 PDF determinations.

Documentation

The documentation is available at https://docs.nnpdf.science/

Install

See the NNPDF installation guide for the conda package, and how to build from source.

Please note that the conda based workflow described in the documentation is the only supported one. While it may be possible to set up the code in different ways, we won't be able to provide any assistance.

We follow a rolling development model where the tip of the master branch is expected to be stable, tested and correct. For more information see our releases and compatibility policy.

Cite

This code is described in the following paper:

@article{NNPDF:2021uiq,
    author = "Ball, Richard D. and others",
    collaboration = "NNPDF",
    title = "{An open-source machine learning framework for global analyses of parton distributions}",
    eprint = "2109.02671",
    archivePrefix = "arXiv",
    primaryClass = "hep-ph",
    reportNumber = "Edinburgh 2021/13, Nikhef-2021-020, TIF-UNIMI-2021-12",
    doi = "10.1140/epjc/s10052-021-09747-9",
    journal = "Eur. Phys. J. C",
    volume = "81",
    number = "10",
    pages = "958",
    year = "2021"
}

If you use the code to produce new results in a scientific publication, please follow the Citation Policy, particularly in regards to the papers relevant for QCD NNLO and EW NLO calculations incorporated in the NNPDF dataset.

Contribute

We welcome bug reports or feature requests sent to the issue tracker. You may use the issue tracker for help and questions as well.

If you would like contribute to the code, please follow the Contribution Guidelines.

pineappl's People

Contributors

alecandido avatar andreab1997 avatar cschwan avatar dependabot[bot] avatar felixhekhorn avatar janw20 avatar scarlehoff avatar scarrazza avatar t7phy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pineappl's Issues

Ensure backwards compatibility

Changing structs results in different file format (implicitly defined through serde and bincode). As a result, loading previously generated grids with the changed version of PineAPPL won't work. Since grid generation is a very costly operation, this is not desirable.

To avoid this and allow changes in structs we should adopt a strategy that is outlined here and first check if bincode supports this.

Add APPLgrid importer

We need a subcommand in pineappl which is able to convert APPLgrids into PineAPPL grids.

Make lhapdf crate separate

The lhapdf crate is a dependency for lhapdf_cli, but it should be a separate crate and not a member of this workspace.

Add offline file-size optimisation

Possible optimisations:

  • symmetrisation of the initial states if the hadronic initial states are the same
  • better file format, which doesn't save zeros; if the optimisation is offline, we can try several sparse matrix ideas like DOK, LIL, COO, CSR, BSR, ...
  • optimise luminosity function:
    • strip empty entries
    • strip numerical zeros, see also NNPDF/pinecards#107
    • #199
    • strip entries with factor = 0.0 (why are they there in the first place?)
    • #246
  • static scale detection; remove interpolation of Q^2 in this case
  • #119
  • use bincode's varint encoding, part of #118
  • #117
  • #151
  • #202

Add functionality to remap bins

Monte Carlo generators often do not support two- or three-dimensional distributions, which is why we need to map them to a one-dimensional distribution during their generation. It would be nice to have functionality in PineAPPL which allows to 'remap' the one-dimensional distribution to the original two- or three-dimensional one. To do so, we simply need a global vector which collects, for each bin, the new limits and possibly multiplicative factors.

Improve error messages

Whenever the methods of the crate pineappl return an error the error messages are not helpful.

Integrate with mg5_aMC

To use PineAPPL together with mg5_aMC we should add a HEPTool which install both Rust and PineAPPL.

Add new subcommand `subgrids`

This subcommand should show technical information about the various subgrids:

  • subgrid type
  • x1, x2, q2 grid values
  • which part of grid is empty (in q2, in x1, x2)
  • grids are zero

Optimize SparseArray3

Optimize SparseArray3 for the case in which the second dimension is larger than the third; in this case the two axes are best swapped.

Improve diff subcommand

  • Make sure that the differences are always visible; when the difference is smaller than a tenth of a permille, the difference is not visible. Instead of showing differences in per cent we should show relative differences fixed in commit bd869e5.
  • The order of the perturbative contributions seems to be random; this has to be fixed fixed in commit 81908de.
  • The differences shown as per cent were actually just relative differences fixed in commit 0b96587.

Upload wheels to pypi

Create an action which uploads python wheels for the master branch when a new release is created.

pineappl_capi needs a buildsystem

PineAPPL needs a build system that installs the header, the shared library, and the pkgconfig file telling other build systems where to find the files.

Integrate with apfelcomb

Write an implementation in apfelcomb to PineAPPL and find out if Grid::convolute is sufficient to do this or if any other methods are needed.

Improve convolution time

The subcommand convolute of pineappl needs roughly 8.5 seconds on cigno for the convolution of CMSDY2D11 with a PDF set. Roughly two thirds of the time is spent loading the grid (about 800 MB large), but the remainder is spent convoluting. The latter should be optimized by caching the luminosity function.

Add new subcommand to read/write/add metadata

The program pineappl needs new subcommands to read/write/add metadata:

  • cuts
  • description of the content
  • link to the arxiv paper
  • link to the experimental data on hepforge
  • parameters
  • run card
  • generator information
  • units: pb, fb, ..., MeV, GeV, ...
  • centre-of-mass energy
  • labels of the observables, latex-compatible labels, ...
  • grid author/person in charge

Add constant subgrid

PineAPPL needs a new grid type which is able to store (x1,x2,Q^2)-independent corrections, for instance to convert NNLO C factors into subgrids. These subgrids can then merged with the NLO grids, 'upgrading' them to NNLO precision.

Decrease grid file size

The grids that are currently produced are rather large (CMSDY2D11 is 800 MB large), but this can be optimized using several strategies:

  • many of out grids have basically a static scale, so that we should be able to remove the interpolation in Q2,
  • inside the non-zero Q2 grids many bins are probably empty, which can be optimized when writing to disk using a simple compression algorithm.

Support `merge` where the input and output files are the same

A useful subcommand is pineappl merge output.pineappl input.pineappl --scale 0.5 to scale the grid. This works as long as the input and output file are not the same, which is useful, however. This requires being able to compress the file inside Rust.

Add new subcommand q2

We need a subcommand that can show us, or least allows us to reverse engineer, the scale choice. To that end it is useful to know which Q^2 bins of the grid are filled (LagrangeSubgrid) or the distribution of the Q^2 values (NtupleSubgrid).

Add more checks for merging and optimization

When merging and optimizing grids we must perform more thorough checks if the grids are compatible with each other, for instance whether they have the same x1, x2, and q2 grids.

Implement theory uncertainties

The subcommand convolute of pineappl should print theory uncertainties calculated from a 3-, 7- and maybe a 9-point scale variation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.