{"id":19505405,"url":"https://github.com/n3pdf/pycompressor","last_synced_at":"2026-02-26T17:04:09.298Z","repository":{"id":53556865,"uuid":"265837327","full_name":"N3PDF/pycompressor","owner":"N3PDF","description":"Compression code for PDF replicas.","archived":false,"fork":false,"pushed_at":"2025-02-16T16:09:37.000Z","size":8497,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-29T07:33:37.148Z","etag":null,"topics":["hep-ph","high-energy-physics","physics","python"],"latest_commit_sha":null,"homepage":"https://n3pdf.github.io/pycompressor/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/N3PDF.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-05-21T12:00:52.000Z","updated_at":"2024-11-30T13:57:07.000Z","dependencies_parsed_at":"2025-08-01T00:39:40.315Z","dependency_job_id":null,"html_url":"https://github.com/N3PDF/pycompressor","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/N3PDF/pycompressor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N3PDF%2Fpycompressor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N3PDF%2Fpycompressor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N3PDF%2Fpycompressor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N3PDF%2Fpycompressor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/N3PDF","download_url":"https://codeload.github.com/N3PDF/pycompressor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N3PDF%2Fpycompressor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29865423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T16:38:37.846Z","status":"ssl_error","status_checked_at":"2026-02-26T16:37:58.932Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hep-ph","high-energy-physics","physics","python"],"created_at":"2024-11-10T22:30:27.073Z","updated_at":"2026-02-26T17:04:09.273Z","avatar_url":"https://github.com/N3PDF.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cb\u003epyCompressor\u003c/b\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  Fast and efficient compression code for Monte Carlo PDF sets\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/N3PDF/pycompressor\"\u003e\u003cimg src=\"https://github.com/N3PDF/pycompressor/workflows/pytest/badge.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://n3pdf.github.io/pycompressor/\"\u003e\u003cimg src=\"https://github.com/N3PDF/pycompressor/workflows/docs/badge.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://doi.org/10.5281/zenodo.4616385\"\u003e\u003cimg src=\"https://zenodo.org/badge/DOI/10.5281/zenodo.4616385.svg\" alt=\"DOI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://doi.org/10.5281/zenodo.4616385\"\u003e\u003cimg src=\"https://img.shields.io/badge/arXiv-2104.04535v2-b31b1b.svg\" alt=\"DOI\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n### New features\n\nAdditional new features have been added to the following python package. The two main features are:\n\u003cp align=\"justify\"\u003e\n  \u003cb\u003e Covariance Matrix Adaptation-Evlotion strategy \u003c/b\u003e\n  In addition to the Genetic Algorithm (GA) implemented in the original compression, there is now the possibility to choose \n  as a minimizer the CMA. The choice of minimizer can be defined in the \u003ca href=\"\"\u003eruncard.yaml\u003c/a\u003e file.\n\u003c/p\u003e\n\u003cp align=\"justify\"\u003e\n  \u003cb\u003e Generative Adversarial Strategy (GANs) \u003c/b\u003e\n  This is a standalone python \u003ca href=\"https://github.com/N3PDF/ganpdfs/tree/master\"\u003epackage\u003c/a\u003e\n  that can enhance the statistics of the prior PDF replicas before compression by generating \n  synthetic replicas. For more details, refer to the \u003ca href=\"https://n3pdf.github.io/ganpdfs/\"\u003edocumentation\u003c/a\u003e. \n  In a similar way, in order to trigger the enhancement, one just has to set the value of \u003cb\u003eenhanced\u003c/b\u003e \n  in the runcard to be \u003cb\u003eTrue\u003c/b\u003e. Setting this value to \u003cb\u003eFalse\u003c/b\u003e will just run the standard \n  compression. The GANs also requires extra-parameters (as shown in the example \n  \u003ca href=\"https://github.com/N3PDF/pycompressor/blob/master/runcard.yml\"\u003eruncard.yaml\u003c/a\u003e) that \n  defines the structure of the networks.\n\u003c/p\u003e\n\n### Installation\n\nTo install `pyCompressor`, just type:\n```bash\npython setup.py install\n```\nor if you are a developer:\n```bash\npython setup.py develop\n```\n\n### How to use\n\nThe input parameters that define the compression is contained in a YAML file. To run\nthe `pyCompressor` code, just type the following: \n```bash\npycomp runcards/runcard.yml [--threads NUMB_THREADS]\n```\nA detailed instruction on how to set the different parameters in the runcard can be found [here](https://n3pdf.github.io/pycompressor/howto/howto.html).\nAnd to controo the parallelization, have a look at the following [section](https://n3pdf.github.io/pycompressor/howto/howto.html#controlling-the-parallelization).\nNotiice that by default, the methodology is based on the [standard](https://arxiv.org/abs/1504.06469) approach.\nIn order to compress from an enhanced set, the entry `existing_enhanced` has to be set to `True`.\n\n### Generating compressed PDF set \u0026 post-analysis\n\nThe code will create a folder named after the prior PDF sets. To generate the\ncompressed PDF grid, run the following command:\n```bash\nget-grid -i \u003cPDF_NAME\u003e/compressed_\u003cPDF_NAME\u003e_\u003cNB_COMPRESSED\u003e_output.dat\n```\nNote that if the compression is done from an enhanced set, the output folder will be append by `_enhanced`.\n\nFinally, in order to generate ERF plots, enter in the `erfs_output` directory and run the following:\n```bash\nvalidate --random erf_randomized.dat --reduced erf_reduced.dat\n``` \nThis script can also plot the ERF validation from the old compressor code by adding the flag\n`--format ccomp`.\n\n### Citation\n\nIf you use the package please at least cite one of the followings:\n\n```bibtex\n@article{Carrazza:2021hny,\n  author = \"Carrazza, Stefano and Cruz-Martinez, Juan M. and Rabemananjara, Tanjona R.\",\n  title = \"{Compressing PDF sets using generative adversarial networks}\",\n  eprint = \"2104.04535\",\n  archivePrefix = \"arXiv\",\n  primaryClass = \"hep-ph\",\n  doi = \"10.1140/epjc/s10052-021-09338-8\",\n  journal = \"Eur. Phys. J. C\",\n  volume = \"81\",\n  number = \"6\",\n  pages = \"530\",\n  year = \"2021\"\n}\n\n@software{pycompressor,\n    author       = {Rabemananjara, Tanjona R. and Cruz-Martinez, Juan M. and Carrazza, Stefano},\n    title        = {N3PDF/pycompressor: pycompressor v1.1.0},\n    month        = Mar.,\n    year         = 2020,\n    publisher    = {Zenodo},\n    version      = {v1.1.0},\n    doi          = {10.5281/zenodo.4616385},\n    url          = {https://doi.org/10.5281/zenodo.4616385}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn3pdf%2Fpycompressor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn3pdf%2Fpycompressor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn3pdf%2Fpycompressor/lists"}