| Crates.io | gluex-core |
| lib.rs | gluex-core |
| version | 0.1.2 |
| created_at | 2025-12-14 22:10:16.956538+00 |
| updated_at | 2026-01-22 18:32:24.46368+00 |
| description | Core crate related to the GlueX experiment and various projects which handle GlueX data |
| homepage | https://github.com/denehoffman/gluex-rs |
| repository | https://github.com/denehoffman/gluex-rs |
| max_upload_size | |
| id | 1985182 |
| size | 101,405 |
Foundational types shared by the GlueX crate ecosystem, including histogram utilities, physics constants, REST metadata, and helpers for parsing run-period information.
cargo add gluex-core
use gluex_core::{
histograms::Histogram,
run_periods::{coherent_peak, RunPeriod},
};
fn main() {
let edges = vec![8.0, 8.2, 8.4, 8.6];
let hist = Histogram::empty(&edges);
let (peak_low, peak_high) = coherent_peak(55_000);
println!(
"{} runs from {} to {} with a {:.1}-{:.1} GeV coherent peak range",
RunPeriod::RP2018_08.short_name(),
RunPeriod::RP2018_08.min_run(),
RunPeriod::RP2018_08.max_run(),
peak_low,
peak_high
);
println!("Histogram bins: {}", hist.bins());
}
Dual-licensed under Apache-2.0 or MIT.