online tool

Xraytrace is a raytracing solver for addressing the X-ray standing wave field calculations in realistic objects on solid surfaces. It uses voxel based computational domain geometry, variety of source and data evaluation options and graphics card computing support.

The solver is a command-line application working under Linux environment even if it its simple C code might be translateable also for other operating systems. Graphics card support is working with Nvidia CUDA capable cards.

Xraytrace has been developed by Department of Nanometrology, Czech Metrology Institute with support of EMPIR programme project 3DMetChemIT funded by Euramet participating countries and European Comission.


24/01/2018: this site created.

22/01/2018: updated periodic boundary conditions source.

22/12/2017: added Xraylib data handling with variable density


Only CVS code acces is now provided for developers. This can be done using command

cvs -d prutok.cmi.cz:/cvs co xraytrace

For more detailed instructions see the on-line documentation.


Xraytrace performs direct raytracing in voxel based material, which means tracing rays from source, through material, until they exit the simulation domain. Geometrical optics is used for ray path calculation, unless some special algorithm is used (e.g. at boundary). Material data are given as structured grid .vtk file formed by integers, associated optical constants are given in a separate file. Rays and other settings are controlled via parameter file.

The voxel based raytracing used within the solver has some benefits

  • wide variability of illuminated objects shape and placement in the computational domain,
  • selection of different source conditions and boundary conditions,
  • possibility of introducing mesh modifiers, e.g. to add surface roughness,
  • simple use of external tools for input or output, e.g. Paraview,
  • simple batch operation via commandline interface and text input file format,
  • suitable for wide range of graphic cards supporting the Nvidia CUDA technology,
  • mesh input formats compatible with Maxwell equations solver GSvit.

It has also some drawbacks, like complicated handling of evanescent fields or computational demandeness for larger domains.


Petr Klapetek, Department of Nanometrology, Czech Metrology Institute