Skip to main content

A Python project for: standardization, statistics, and plotting ray-traced photon beams (PyOptiX, SHADOW3/4).

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

barc4beams-2026.5.4.tar.gz (45.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

barc4beams-2026.5.4-py3-none-any.whl (48.9 kB view details)

Uploaded Python 3

File details

Details for the file barc4beams-2026.5.4.tar.gz.

File metadata

  • Download URL: barc4beams-2026.5.4.tar.gz
  • Upload date:
  • Size: 45.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for barc4beams-2026.5.4.tar.gz
Algorithm Hash digest
SHA256 2a4a96ba81b117edb863613c3837cd308d3853b74c4500d4964470045ec068f7
MD5 603d9ecbeef9573cab33b5d9660a9fca
BLAKE2b-256 c408d56e8c3a3010f92890328d7e5212460fb62a227852c3ae3161013ccfe43d

See more details on using hashes here.

File details

Details for the file barc4beams-2026.5.4-py3-none-any.whl.

File metadata

  • Download URL: barc4beams-2026.5.4-py3-none-any.whl
  • Upload date:
  • Size: 48.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for barc4beams-2026.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 faa35639d8b8b0df46fa746c7f9d1d8b22503641d921b37c4f68e728f208257a
MD5 31b7927118062951d27e654fd906bea3
BLAKE2b-256 6178e1a21804d2c588d995d1ab646eccfc5127d353601285f24392b4e0aeecbd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page