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

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.11.tar.gz (38.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-2025.11.11-py3-none-any.whl (42.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: barc4beams-2025.11.11.tar.gz
  • Upload date:
  • Size: 38.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.5

File hashes

Hashes for barc4beams-2025.11.11.tar.gz
Algorithm Hash digest
SHA256 b401e590e7061c601b514d2b81599eb160bc0e4ca4a57d7b2d55b672d98d242f
MD5 0c548d6b6f512458e30da7afebe1ac19
BLAKE2b-256 bf4c726b15925369b8492a4cc3f664f7781ffc2be53ff79e80ac90ba0281511d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for barc4beams-2025.11.11-py3-none-any.whl
Algorithm Hash digest
SHA256 0258cad944e33367bd93b9301f9aa4348fb1383b70c4948f133938a31b4e1f02
MD5 f38ca1528996fadb803f3a5745f43256
BLAKE2b-256 56bca5bff8db83a2978bc5dfcd76ce3c8bfae4e3a58aee8f2972a14b7e60c033

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