Metadata-Version: 2.4
Name: barc4beams
Version: 2025.11.11
Summary: A Python project for: standardization, statistics, and plotting ray-traced photon beams (PyOptiX, SHADOW3/4).
Author-email: Rafael Celestre <rafael.celestre@synchrotron-soleil.fr>
License-Expression: CECILL-2.1
Project-URL: Homepage, https://github.com/barc4/barc4beams
Project-URL: Repository, https://github.com/barc4/barc4beams
Keywords: ray-tracing,beamline design,x-ray optics,optics
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# barc4beams

**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.

---

## Features

- Import beams from **SHADOW3/4**, **PyOptiX**, or intensity maps from **SRW** / **WOFRY**  
- Convert to a standard `Beam` format  
- 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:

1. Beam import from ray-tracing codes  
2. Beam sampling from intensity maps  
3. Beam collections and statistical aggregation

---

## Installation

From PyPI:

```bash
pip install barc4beams
