Expand description
Reading and writing EKO output files.
EKO produces Evolution Kernel Operators (EKOs) which are rank-4 tensors used in perturbative QCD calculations. For a broader introduction, see the Python EKO documentation.
§File format
An EKO archive (.tar) unpacks to a directory with the following layout:
<eko>/
├── metadata.yaml
└── operators/
├── <evolution_point>.yaml # header: scale + nf
└── <evolution_point>.npz.lz4 # operator + error tensorsEach operator file stores two rank-4 arrays:
| Array | Description |
|---|---|
operator.npy | The evolution kernel tensor |
error.npy | Element-wise numerical error estimate |
§Usage
Add to your Cargo.toml:
[dependencies]
dekoder = "0.0.1"§Open an archive and inspect available operators
ⓘ
use std::path::PathBuf;
use dekoder::eko::{EvolutionPoint, EKO};
let eko = EKO::extract(
PathBuf::from("my_eko.tar"),
PathBuf::from("/tmp/eko_workdir"),
)?;
println!("Available operators: {}", eko.available_operators().len());§Load a specific operator
ⓘ
let ep = EvolutionPoint { scale: 10000.0, nf: 4 };
if eko.has_operator(&ep) {
let op = eko.load_operator(&ep)?;
let tensor = op.op.unwrap();
println!("Operator shape: {:?}", tensor.dim());
}§Write back and clean up
ⓘ
// Write to a new archive, keep the working directory
eko.write(PathBuf::from("output.tar"))?;
// Or write and remove the working directory in one step
eko.write_and_destroy(PathBuf::from("output.tar"))?;§Work with an already-extracted directory
ⓘ
let eko = EKO::load_opened(PathBuf::from("/tmp/eko_workdir"))?;Modules§
- eko
- Utilities for reading and writing an eko output.
Structs§
- Operator
- 4D evolution operator.
Enums§
- EKOError
- The EKO errors.