Name | cutflow-compare JSON |
Version |
2.0.0
JSON |
| download |
home_page | https://github.com/ibeuler/cutflow_compare |
Summary | A package to compare cutflow histograms from ROOT files. |
upload_time | 2025-07-16 15:54:06 |
maintainer | None |
docs_url | None |
author | Ibrahim H.I. ABUSHAWISH |
requires_python | >=3.6 |
license | MIT License
Copyright (c) 2023 Ibrahim H.I. ABUSHAWISH
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
2. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
root
cutflow
histograms
data analysis
cutlang
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# cutflow_compare
## Overview
`cutflow_compare` is a Python package designed to compare cutflow histograms from ROOT files. It provides a straightforward command-line interface for users to analyze and visualize differences in cutflow data across different regions and files.
## Features
- Compare cutflow histograms from two or more ROOT files simultaneously.
- Custom labels for each file using the `--labels` argument.
- Generate a CSV report of the comparison results.
- Calculate relative errors and standard deviations across all files for each selection and region.
- Easy to use with command-line arguments for file input and region selection.
## Installation
You can install the package using pip:
```sh
pip install cutflow_compare
```
## Usage
After installation, you can use the command-line tool directly:
```sh
cutflow_compare --files histoOut-compared.root histoOut-reference.root -r region1 region2 region3 --labels Compared Reference
```
Or, if running from source:
```sh
python cutflow_compare.py --files histoOut-compared.root histoOut-reference.root -r region1 region2 region3 --labels Compared Reference
```
### Note:
Make sure the same regions are present in all files with the same name.
### Arguments
- `--files`: List of input ROOT files to compare. Required.
- `--regions`: List of regions to compare within the cutflow histograms. Required.
- `--labels`: Custom labels for each file, used in the output CSV. Optional.
- `--separate-selections`: Optional flag to keep selections separate instead of merging them.
- `--relative-error`: Optional flag to include relative error calculations in the output.
### Output
The tool generates a CSV file named `cutflow_comparison_result.csv` containing the comparison results.
If multiple files are compared, the CSV will include columns for each file and region, as well as calculated relative errors and standard deviations for each selection and region.
For two files, the relative error column shows the usual comparison; for more files, the relative error is computed as the standard deviation divided by the mean across all files.
## Example
```bash
cutflow_compare --files histoOut-compared.root histoOut-reference.root histoOut-third.root -r region1 region2 region3 --labels Compared Reference Third --relative-error
```
This command compares the specified regions (`region1`, `region2`, `region3`) in the three provided ROOT files (`histoOut-compared.root`, `histoOut-reference.root`, `histoOut-third.root`). It outputs the results to `cutflow_comparison_result.csv`, including relative error and standard deviation calculations for each selection and region.
## Requirements
- Python 3.6+
- [ROOT](https://root.cern/) (must be installed separately, e.g., via conda: `conda install -c conda-forge root`)
- pandas (install via pip: `pip install pandas`)
- uncertainties (install via pip: `pip install uncertainties`)
Make sure all dependencies are installed before running the tool.
## License
This project is licensed under the MIT License. See the LICENSE file for more details.
## Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.
## Acknowledgments
This package utilizes the ROOT framework for data analysis and visualization.
Raw data
{
"_id": null,
"home_page": "https://github.com/ibeuler/cutflow_compare",
"name": "cutflow-compare",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "ROOT, cutflow, histograms, data analysis, CutLang",
"author": "Ibrahim H.I. ABUSHAWISH",
"author_email": "\"Ibrahim H.I. ABUSHAWISH\" <ibrahim.hamed2701@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/ed/05/00380d1d4909a223f520a469b806d2839adeb901d27842b6f42fc1f39786/cutflow_compare-2.0.0.tar.gz",
"platform": null,
"description": "# cutflow_compare\n\n## Overview\n`cutflow_compare` is a Python package designed to compare cutflow histograms from ROOT files. It provides a straightforward command-line interface for users to analyze and visualize differences in cutflow data across different regions and files.\n\n## Features\n- Compare cutflow histograms from two or more ROOT files simultaneously.\n- Custom labels for each file using the `--labels` argument.\n- Generate a CSV report of the comparison results.\n- Calculate relative errors and standard deviations across all files for each selection and region.\n- Easy to use with command-line arguments for file input and region selection.\n\n## Installation\nYou can install the package using pip:\n\n```sh\npip install cutflow_compare\n```\n\n## Usage\n\nAfter installation, you can use the command-line tool directly:\n\n```sh\ncutflow_compare --files histoOut-compared.root histoOut-reference.root -r region1 region2 region3 --labels Compared Reference\n```\n\nOr, if running from source:\n\n```sh\npython cutflow_compare.py --files histoOut-compared.root histoOut-reference.root -r region1 region2 region3 --labels Compared Reference\n```\n\n### Note: \nMake sure the same regions are present in all files with the same name.\n\n### Arguments\n- `--files`: List of input ROOT files to compare. Required.\n- `--regions`: List of regions to compare within the cutflow histograms. Required.\n- `--labels`: Custom labels for each file, used in the output CSV. Optional.\n- `--separate-selections`: Optional flag to keep selections separate instead of merging them.\n- `--relative-error`: Optional flag to include relative error calculations in the output.\n\n### Output\nThe tool generates a CSV file named `cutflow_comparison_result.csv` containing the comparison results. \nIf multiple files are compared, the CSV will include columns for each file and region, as well as calculated relative errors and standard deviations for each selection and region. \nFor two files, the relative error column shows the usual comparison; for more files, the relative error is computed as the standard deviation divided by the mean across all files.\n\n## Example\n```bash\ncutflow_compare --files histoOut-compared.root histoOut-reference.root histoOut-third.root -r region1 region2 region3 --labels Compared Reference Third --relative-error\n```\n\nThis command compares the specified regions (`region1`, `region2`, `region3`) in the three provided ROOT files (`histoOut-compared.root`, `histoOut-reference.root`, `histoOut-third.root`). It outputs the results to `cutflow_comparison_result.csv`, including relative error and standard deviation calculations for each selection and region.\n\n## Requirements\n\n- Python 3.6+\n- [ROOT](https://root.cern/) (must be installed separately, e.g., via conda: `conda install -c conda-forge root`)\n- pandas (install via pip: `pip install pandas`)\n- uncertainties (install via pip: `pip install uncertainties`)\n\nMake sure all dependencies are installed before running the tool.\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for more details.\n\n## Contributing\nContributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.\n\n## Acknowledgments\nThis package utilizes the ROOT framework for data analysis and visualization.\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2023 Ibrahim H.I. ABUSHAWISH\n \n Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n \n 1. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n \n 2. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "A package to compare cutflow histograms from ROOT files.",
"version": "2.0.0",
"project_urls": {
"Documentation": "https://github.com/ibeuler/cutflow_compare#readme",
"Homepage": "https://github.com/ibeuler/cutflow_compare",
"Issues": "https://github.com/ibeuler/cutflow_compare/issues",
"Repository": "https://github.com/ibeuler/cutflow_compare"
},
"split_keywords": [
"root",
" cutflow",
" histograms",
" data analysis",
" cutlang"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a5d62c7f14592829a2aeb66f7b48a506dbfe4766340cc3d5b81e8c3fcbfd96d5",
"md5": "c38658a3248fbf8374c8378fa19a039b",
"sha256": "5a47ba7f0ff3c45382b93276c296526ca5face447675b2f13681f3e5d0ba84a2"
},
"downloads": -1,
"filename": "cutflow_compare-2.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c38658a3248fbf8374c8378fa19a039b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 6168,
"upload_time": "2025-07-16T15:54:05",
"upload_time_iso_8601": "2025-07-16T15:54:05.158490Z",
"url": "https://files.pythonhosted.org/packages/a5/d6/2c7f14592829a2aeb66f7b48a506dbfe4766340cc3d5b81e8c3fcbfd96d5/cutflow_compare-2.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ed0500380d1d4909a223f520a469b806d2839adeb901d27842b6f42fc1f39786",
"md5": "ca4f55e197b2e50a7c6f101bee0c6059",
"sha256": "8c5e2b86102b3b21dcbd7ef3169c2aaaf237cf0d9fac947d546426d0c375a958"
},
"downloads": -1,
"filename": "cutflow_compare-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "ca4f55e197b2e50a7c6f101bee0c6059",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 5225,
"upload_time": "2025-07-16T15:54:06",
"upload_time_iso_8601": "2025-07-16T15:54:06.469943Z",
"url": "https://files.pythonhosted.org/packages/ed/05/00380d1d4909a223f520a469b806d2839adeb901d27842b6f42fc1f39786/cutflow_compare-2.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-16 15:54:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ibeuler",
"github_project": "cutflow_compare",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "cutflow-compare"
}