Skip to main content

A package to compare cutflow histograms from ROOT files.

Project description

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.

Features

  • Compare cutflow histograms from multiple ROOT files.
  • Generate a CSV report of the comparison results.
  • Easy to use with command-line arguments for file input and region selection.

Installation

You can install the package using pip:

pip install cutflow_compare

Usage

After installation, you can use the command-line tool directly:

cutflow_compare --files histoOut-compared.root histoOut-reference.root -r region1 region2 region3

Or, if running from source:

python cutflow_compare.py --files histoOut-compared.root histoOut-reference.root -r region1 region2 region3

Note:

Make sure the same regions are present in both 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.
  • --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 the --relative-error flag is used, the CSV will also include relative error calculations for each region.

Example

cutflow_compare --files histoOut-compared.root histoOut-reference.root -r region1 region2 region3 --relative-error

This command compares the specified regions (region1, region2, region3) in the two provided ROOT files (histoOut-compared.root and histoOut-reference.root). It outputs the results to cutflow_comparison_result.csv, including relative error calculations.

This command will compare the specified regions in the two provided ROOT files and output the results to cutflow_comparison_result.csv.

Requirements

  • Python 3.6+
  • ROOT (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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cutflow_compare-0.1.6.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cutflow_compare-0.1.6-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file cutflow_compare-0.1.6.tar.gz.

File metadata

  • Download URL: cutflow_compare-0.1.6.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for cutflow_compare-0.1.6.tar.gz
Algorithm Hash digest
SHA256 4ac869b4cd7d74715a9f171b20008e9e0988a2729a01bac861f37368d2721ed0
MD5 b8c48e6e87acda6eea1400b68611990c
BLAKE2b-256 368ea28a2bc8f0560d69cc5d3673cafcc5734d367fd37dd9ce2f509ee08d92fb

See more details on using hashes here.

File details

Details for the file cutflow_compare-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for cutflow_compare-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a506be55ded7e5f4c46d2152e41675f26a72030755430b78cf4b339f45c62a25
MD5 a75169314a536ed8a23a2ea2b829796e
BLAKE2b-256 d19d12dc19b12b1df05bb7588088088b29359fcdc12ad747ad0d0b4af35d023b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page