Skip to content

Latest commit

 

History

History
102 lines (89 loc) · 4.29 KB

README.md

File metadata and controls

102 lines (89 loc) · 4.29 KB

pyCompressor

Fast and efficient compression code for Monte Carlo PDF sets

DOI DOI

New features

Additional new features have been added to the following python package. The two main features are:

Covariance Matrix Adaptation-Evlotion strategy In addition to the Genetic Algorithm (GA) implemented in the original compression, there is now the possibility to choose as a minimizer the CMA. The choice of minimizer can be defined in the runcard.yaml file.

Generative Adversarial Strategy (GANs) This is a standalone python package that can enhance the statistics of the prior PDF replicas before compression by generating synthetic replicas. For more details, refer to the documentation. In a similar way, in order to trigger the enhancement, one just has to set the value of enhanced in the runcard to be True. Setting this value to False will just run the standard compression. The GANs also requires extra-parameters (as shown in the example runcard.yaml) that defines the structure of the networks.

Installation

To install pyCompressor, just type:

python setup.py install

or if you are a developer:

python setup.py develop

How to use

The input parameters that define the compression is contained in a YAML file. To run the pyCompressor code, just type the following:

pycomp runcards/runcard.yml [--threads NUMB_THREADS]

A detailed instruction on how to set the different parameters in the runcard can be found here. And to controo the parallelization, have a look at the following section. Notiice that by default, the methodology is based on the standard approach. In order to compress from an enhanced set, the entry existing_enhanced has to be set to True.

Generating compressed PDF set & post-analysis

The code will create a folder named after the prior PDF sets. To generate the compressed PDF grid, run the following command:

get-grid -i <PDF_NAME>/compressed_<PDF_NAME>_<NB_COMPRESSED>_output.dat

Note that if the compression is done from an enhanced set, the output folder will be append by _enhanced.

Finally, in order to generate ERF plots, enter in the erfs_output directory and run the following:

validate --random erf_randomized.dat --reduced erf_reduced.dat

This script can also plot the ERF validation from the old compressor code by adding the flag --format ccomp.

Citation

If you use the package please at least cite one of the followings:

@article{Carrazza:2021hny,
  author = "Carrazza, Stefano and Cruz-Martinez, Juan M. and Rabemananjara, Tanjona R.",
  title = "{Compressing PDF sets using generative adversarial networks}",
  eprint = "2104.04535",
  archivePrefix = "arXiv",
  primaryClass = "hep-ph",
  doi = "10.1140/epjc/s10052-021-09338-8",
  journal = "Eur. Phys. J. C",
  volume = "81",
  number = "6",
  pages = "530",
  year = "2021"
}

@software{pycompressor,
    author       = {Rabemananjara, Tanjona R. and Cruz-Martinez, Juan M. and Carrazza, Stefano},
    title        = {N3PDF/pycompressor: pycompressor v1.1.0},
    month        = Mar.,
    year         = 2020,
    publisher    = {Zenodo},
    version      = {v1.1.0},
    doi          = {10.5281/zenodo.4616385},
    url          = {https://doi.org/10.5281/zenodo.4616385}
}