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. Beam import from ray-tracing codes
  2. Beam sampling from intensity maps
  3. Beam collections and statistical aggregation

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-2025.11.26.tar.gz (40.2 kB view details)

Uploaded Source

Built Distribution

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

barc4beams-2025.11.26-py3-none-any.whl (43.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for barc4beams-2025.11.26.tar.gz
Algorithm Hash digest
SHA256 d4bb3d56bc8111075aa73db333905692d80df30949d2b5dbdc31df77eda939bf
MD5 0f2d0c469abb5a445143a69efb040970
BLAKE2b-256 564e4b134bd430bdc6e5812827fb9830b7bee2a2a296734a713d7e2213bf3312

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for barc4beams-2025.11.26-py3-none-any.whl
Algorithm Hash digest
SHA256 48f26b0eed1e15aefe3e7b43dec6228f5e01bccbacaf4ee4200d985e40c31fe9
MD5 4a496a229cc550db348d31b3f7ad56c2
BLAKE2b-256 f71bdbcfae1b9658b2f72842b735d19350ceecf6b808655849427a3d3716b44d

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