Skip to main content

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. Beams from ray-tracing codes
  2. Beam collections and ensembles
  3. Beams from wavefront propagation
    • intensity-based sampling (Rebuffi et al., 2020)
    • phase-aware reconstruction (speckle tracking principles)

Installation

From PyPI:

pip install barc4beams

Documentation Status PyPI License: CeCILL-2.1 DOI

Release files for barc4beams 2026.7.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for barc4beams 2026.7.22
File Size Uploaded
barc4beams-2026.7.22.tar.gz 57.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for barc4beams 2026.7.22
File Interpreter ABI Platform
barc4beams-2026.7.22-py3-none-any.whl Python 3 none any Details

Total release size: 113.7 kB

Release files / barc4beams-2026.7.22.tar.gz

Download URL barc4beams-2026.7.22.tar.gz
Size 57.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4cd0d53e50c3336d4f4a1330ef158e92eb954da77917802bd7d408c6253c283c
BLAKE2b-256 checksum
How to use checksums
fc2a0bf30fd0c9a4ddc71bbcf891ab31bff523db045426eb9f81f8edf3ede191
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / barc4beams-2026.7.22-py3-none-any.whl

Download URL barc4beams-2026.7.22-py3-none-any.whl
Size 56.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0beb6ce49e2f4a117e4b7f14a47e1e4a983e75316e240d3ee7b673d611b9c5f
BLAKE2b-256 checksum
How to use checksums
eb71681eea1857332c65ca24752ca3a5a9c9c30ea2b40959e85f1d7fcd0b56e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page