barc4beams is a Python package providing tools for standardization, statistical analysis, and visualization of (photon) beams from simulation codes such as SHADOW3/4 and PyOptiX. barc4beams also converts intensity maps from wave-optics codes such as SRW and WOFRY.
It offers a data class called Beam, which offers import/export utilities, statistical
moment-based analysis, and a consistent plotting API for beam profile, divergence,
phase space, and caustic visualization.
- Import beams from SHADOW3/4, PyOptiX, or intensity maps from SRW / WOFRY
- Convert to a standard
Beamformat - Compute beam moments, FWHM, skewness, kurtosis, and focal distances
- Merge and analyze ensembles of beams across runs
- Propagate beams in free space and build caustics
- Save and reload beams in HDF5 and JSON formats (stats)
- Plotting using Matplotlib
See examples/README.md for detailed descriptions of the
three reference notebooks:
- Beam import from ray-tracing codes
- Beam sampling from intensity maps
- Beam collections and statistical aggregation
From PyPI:
pip install barc4beams