GraxPy documentation

GraxPy — Gratings made easy

Version 0.5.7

GraxPy is a Python package developed by Helmholtz-Zentrum Berlin (HZB) for one-dimensional X-ray grating simulations. Build laminar, blazed, sinusoidal, or custom grating profiles; combine them with material definitions and multilayer coatings; then calculate diffraction efficiencies with either modal RCWA or the Nevière differential method. GraxPy also offers two roughness models: Debye-Waller damping, which reduces diffraction efficiencies to represent roughness losses, and random-interface roughness, which models rough surfaces by perturbing material interfaces. See the roughness guide for details.

Use the same API for single simulations, energy-angle and fixed-angle sweeps, batch runs, parameter studies, optimizer fits, and multilayer design searches. Start with the single simulation tutorial, explore grating workflows, or see how to choose a solver.

Note

Installers for macOS and Windows are available upon request and are currently being tested.

GraxPy’s modal RCWA solver is inspired by the one-dimensional RETICOLO approach; GraxPy is an independent implementation, not an official port. If you use it, please cite RETICOLO V9 (CC BY 4.0).