| Crates.io | gluex-lumi-py |
| lib.rs | gluex-lumi-py |
| version | 0.1.5 |
| created_at | 2025-12-18 17:06:05.222856+00 |
| updated_at | 2026-01-22 18:33:09.343126+00 |
| description | Python bindings for the gluex-lumi Rust crate |
| homepage | https://github.com/denehoffman/gluex-rs |
| repository | https://github.com/denehoffman/gluex-rs |
| max_upload_size | |
| id | 1992890 |
| size | 49,165 |
Python bindings for the GlueX luminosity calculators. The package exposes get_flux_histograms
from the Rust crate and an entrypoint for the gluex-lumi CLI. Use --plot=path.png to save
a matplotlib figure when running from the CLI.
Add to an existing Python project:
uv pip install gluex-lumi
or install as a CLI tool:
uv tool install gluex-lumi
To write a plot image from the CLI:
gluex-lumi --plot=flux.png --run f18=0 --bins=40 --coherent-peak --polarized \
--rcdb=rcdb.sqlite --ccdb=ccdb.sqlite --min=8.0 --max=9.0
import gluex_lumi as lumi
edges = [7.5 + 0.05 * i for i in range(21)]
histos = lumi.get_flux_histograms(
{"f18": None}, # uses current timestamp rather than REST version
edges,
coherent_peak=True,
rcdb="/data/rcdb.sqlite",
ccdb="/data/ccdb.sqlite",
exclude_runs=[50000, 50001],
)
luminosity = histos.tagged_luminosity.as_dict()
print("bin edges:", luminosity["edges"])
print("counts:", luminosity["counts"])
Dual-licensed under Apache-2.0 or MIT.