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

Metadata

Release files for barc4beams 2026.11.24

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.11.24
File Size Uploaded Provenance Actions
barc4beams-2026.11.24.tar.gz 57.8 kB Without provenance Details for barc4beams-2026.11.24.tar.gz

Built distribution (wheel)

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

Total release size: 114.5 kB

Release files / barc4beams-2026.11.24.tar.gz

Download URL barc4beams-2026.11.24.tar.gz
Size 57.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9caeabdfb3a7064976ec5f9feaaf1b57307495c524925799fd1fd236e570c5ac
BLAKE2b-256 checksum
How to use checksums
ea4d86e6799a9b98840d580802fcd83305fde10bf763fc3dca5bd05675498ca9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

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

Download URL barc4beams-2026.11.24-py3-none-any.whl
Size 56.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
489f9042da67a819a3cc4a46d49b6631189199dd9d7db0a0aa88dc63f22d4260
BLAKE2b-256 checksum
How to use checksums
57c07c15ef45468913ded418f97b6ef2ebf7c68ea2823db38604a18a4962b410
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Security for barc4beams 2026.11.24

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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