Ctrl K

RAYX

Optical Simulation Software for Synchrotron Radiation

1
mention
5
contributors
2401 commitsLast commit ≈ 1 month ago27 stars8 forks

Cite this software

Description

RAYX

Full Documentation Getting Started

To simplify the usage of rayx-core, the platform includes rayx, a command-line interface (CLI) tool designed for fast, one-shot tracing of beamlines. It provides comprehensive data on every ray-element intersection, making it especially valuable for generating large datasets efficiently. With its focus on ease of use, rayx empowers users to quickly run simulations and retrieve detailed ray-tracing results.

RAYX vs RAY-UI

RAYX offers several advanced features, including:

  • Global (not sequential) tracing of beamlines
  • GPU utilization for accelerated tracing performance
  • A dedicated mode for tracing multiple beamlines with ease
  • Objects in RAYX can be grouped for simplified group transformations
  • A GUI for intuitive beamline design

Installing or Building RAYX

testUbuntu testWindows testUbuntuClang MKDocsDeploy

For additional information, please visit our Wiki and read our latest paper, that introduces RAYX to the scientific community. We are committed to delivering stable releases, which can be found here. Please note that the master branch and other branches might be unstable, and building RAYX from the source could lead to unstable software. We recommend this only for developers and experienced users. If you experience issues with our distributed binaries or API, do not hesitate to open an issue or contact us directly at rayx-support@helmholtz-berlin.de. We are keen to provide assistance and develop features as the need arises.

Built with RAYX

RAYX Python Bindings

Repository

To simplify the integration of RAYX into Python-based workflows, we provide Python bindings that allow direct simulation results. The figure above illustrates the simulated output at each element of a beamline using the RAYX Python Bindings and Matplotlib.

To add RAYX to your Python project simply install the package by typing: pip install rayx

RAYX-WebApp

Repository

A lightweight Flask-based web application for visualizing RAYX beamline simulations. The web app allows users to upload an .rml file, trace the beamline using the RAYX Python bindings, and interactively inspect the resulting ray distributions as 2D histograms with per-element breakdowns.

RAYX-UI

For users who prefer a more visual approach, rayx-ui offers a graphical user interface (GUI) that includes a 3D viewport of the beamline, enabling interactive design and exploration. This GUI provides an intuitive interface to construct and modify beamlines, allowing users to visualize their designs in real-time. rayx-ui not only enhances the design process but also allows users to iteratively optimize configurations based on immediate visual feedback.

Relevant Publications

If you use RAYX in your scientific work, please consider citing our paper:

RAYX – An optics simulation software for synchrotron applications Sven Erdem, Peter Feuer-Forson, Jannis Maier, Felix Möller, Enrico Philip Ahlers, Valentin Stöcker, Fanny Zotter, Peter Baumgärtel, Jens Viefhaus Review of Scientific Instruments, Vol. 96, Issue 6 (2025) DOI: 10.1063/5.0253857

We present RAYX, an advanced optics simulation software for synchrotron applications and the successor to RAY/RAY-UI [Schäfers, in Modern Developments in X-Ray and Neutron Optics, Springer, 2008]. RAYX offers a modern, versatile platform designed to accelerate beamline design, optimization, and data analysis, including machine learning workflows. It supports accurate and efficient simulations across a wide spectral range and optical elements, tailored for current and next-generation synchrotron facilities.

This publication provides an overview of the software's architecture and capabilities, including GPU acceleration, Python bindings, and GUI support.

Publications using RAYX

  • Automated spectrometer alignment via machine learning

  • Inverse Surrogate Model of a Soft X-Ray Spectrometer using Domain Adaptation

Logo of RAYX
Keywords
Programming languages
  • C++ 86%
  • Python 4%
  • CSS 3%
  • CMake 2%
  • HTML 1%
  • Jupyter Notebook 1%
  • Nix 1%
  • Shell 1%
  • Other 1%
License
</>Source code
Software Heritage
Archived | swh:1:dir:3cb40d8a165c6718f0856e815f2ffecca46f0641

Participating organisations

Helmholtz-Zentrum Berlin für Materialien und Energie

Reference papers

Mentions

Contributors

SE
Sven Erdem
Maintainer, Developer, Software Architect
Helmholtz-Zentrum Berlin für Materialien und Energie
JM
Jannis Meier
Developer
Helmholtz-Zentrum Berlin für Materialien und Energie
FZ
Fanny Zotter
Developer
Helmholtz-Zentrum Berlin für Materialien und Energie
PF
Peter Feuer-Forson
Contributor
Helmholtz-Zentrum Berlin für Materialien und Energie
PB
Peter Baumgärtel
Owner, Maintainer
Helmholtz-Zentrum Berlin für Materialien und Energie

Helmholtz Program-oriented Funding IV