Perfect crystal propagator for physical optics simulations with Synchrotron Radiation Workshop
Until now, a treatment of dynamical diffraction from perfect crystals has been missing in the "Synchrotron Radiation Workshop" (SRW) wavefront propagation computer code despite the widespread use of crystals on X-ray synchrotron beamlines. Now a special propagator" module for calculating dynamical diffraction from a perfect crystal in the Bragg case has been written in C++, integrated into the SRW C/C++ library and made available for simulations using the Python interface of SRW. The propagator performs local processing of the frequency-domain electric field in the angular representation. A 2-D Fast Fourier Transform is used for changing the field representation from/to the coordinate representation before and after applying the crystal propagator. This ensures seamless integration of the new propagator with the existing functionalities of the SRW package, allows compatibility with existing propagators for other optical elements, and enables the simulation of complex beamlines transporting partially coherent X-rays. The code has been benchmarked by comparison with predictions made by plane-wave and spherical-wave dynamical diffraction theory. Test simulations for a selection of X-ray synchrotron beamlines are also shown.