Fast and efficient python implementation of PDF compression (https://arxiv.org/abs/1504.06469).
To install pyCompressor, just type:
python setup.py install # or python setup.py develop (if you want development mode)The input parameters that define the compression is contained in a YAML file. To run the standard compression,
use the reference runcard as it is by
just replacing the entry of the pdf key with the name of the PDF set, then run the following:
pycomp runcards/runcard.yml [--threads NUMB_THREADS]Although it is advised to run the ganpdfs independently, it is possible
to generate enhanced PDF replicas within the pycompressor. To do so, just set the entry enhance in the
runcard to True and specify the total number of replicas (prior+synthetics).
Finally, in order to perform a compression with an enhanced set, set the entry existing_enhanced to True.
A detailed instruction on how to set the different parameters in the runcard can be found here.
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.datNote that if the compression is done from an enhanced set, the output folder will be appended 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.datThis script can also plot the ERF validation from the old compressor code by adding the flag
--format ccomp.
This package cannot be installed with python 3.9 yet due to the numba dependency. This will be resolved soon according to #6579.