Skip to main content

opengate-gate-tree

CI Version Standard Python Standard Python Standard Python Standard Python license Ruff Checked with mypy uv

opengate-gate-tree is a utility for processing GATE 9 output ROOT file with trees (Hits, Singles,Coincidences)

Quick Start

Install From PyPI

pip3 install opengate-gate-tree

Install From Source

make init
make install

Command-Line Options

The CLI accepts the following options:

Option Type Required Allowed values Description
--input-gate-root-file path yes file with .root extension Path to the GATE ROOT input file.
--output-dir path yes existing directory or new path Directory where output file will be saved. If it does not exist, it is created automatically.
--output-file-title string yes non-empty string Base name of the output file (without extension).
--gate-tree enum-like string yes Hits, Singles, Coincidences Name of the tree to process from the input ROOT file.
--output-file-format enum-like string yes root, hdf5, csv Output file format.
--branches-to-extract list of strings no branch names valid for selected tree Space-separated list of branches to extract.

Validation behavior:

  • the input file must exist and end with .root
  • the output path must resolve to a directory
  • all required options above must be provided
  • branch names are validated against the selected tree

Examples:

opengate-gate-tree \
	--input-gate-root-file ./data/simulation.root \
	--output-dir ./out \
	--output-file-title patient_01 \
	--gate-tree Hits \
	--output-file-format csv
opengate-gate-tree \
	--input-gate-root-file ./data/simulation.root \
	--output-dir ./out \
	--output-file-title patient_01 \
	--gate-tree Singles \
	--output-file-format hdf5 \
	--branches-to-extract eventID trackID edep posX

Available Package Capabilities (Cumulative)

This section is append-only. Add a capability entry only when its roadmap stage status changes from planned to completed.

Current development stage: version-0.1.1

Available capabilities:

  • 0.1.0: project structure initialized and minimal buildable package code added.

Development

Common development commands:

make lint
make format
make typecheck
make test
make check

Pre-commit setup

You can install and activate pre-commit in two supported ways.

Option A (recommended): use uv in this repository

uv add --dev pre-commit
uv sync
uv run pre-commit install --hook-type pre-commit

Optional one-time verification on all files:

uv run pre-commit run --all-files

Option B: install pre-commit from Debian packages

sudo apt update
sudo apt install -y pre-commit
pre-commit --version
pre-commit install --hook-type pre-commit

Optional one-time verification on all files:

pre-commit run --all-files

The configured hook runs make check before each commit and blocks the commit if validation fails.

Project conventions and contribution standards:

License

MIT License

Contact: GitHub

Author

The project was designed and implemented by Mateusz Jakub Bała.

Contact: GitHub

Contribution

To contribute new functionality:

Download files

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

Source Distribution

opengate_gate_tree-0.1.1.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

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

opengate_gate_tree-0.1.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file opengate_gate_tree-0.1.1.tar.gz.

File metadata

  • Download URL: opengate_gate_tree-0.1.1.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for opengate_gate_tree-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6c765640729f0bbcebe96320d647b58dd4f1ef115572169afefee70861bd82c3
MD5 15ebbe5fff7f1edf81a94639a103a27a
BLAKE2b-256 ad0aa69dbf760789258f4e0e51e07ce1c1d50cac8ebb9366c2bf7839ed4a54ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for opengate_gate_tree-0.1.1.tar.gz:

Publisher: publish.yml on MateuszBala/opengate-gate-tree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opengate_gate_tree-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for opengate_gate_tree-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9748ae437d53984341bbf666abcbf490fdb7a437d3af3cf8e5270710404bdc7b
MD5 e4d26238a6560bc7f44936f862e66d6b
BLAKE2b-256 265c283a75ba9533ec09a35adf4460620ce21e1467764deafdf7ceffb1384703

See more details on using hashes here.

Provenance

The following attestation bundles were made for opengate_gate_tree-0.1.1-py3-none-any.whl:

Publisher: publish.yml on MateuszBala/opengate-gate-tree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

This release

0.1.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page