The brightness and coherence of modern light sources is pushing the limits of X-ray beamline design. The open source Synchrotron Radiation Workshop (SRW) provides physical optics based algorithms for correctly simulating such beamlines.<sup>1</sup> We present new SRW capabilities to calculate source brightness and related quantites for undulators. The Sirepo cloud computing framework<sup>2, 3</sup> includes a browser-based GUI for SRW.<sup>4–6</sup> In addition to high-accuracy wavefront simulations, the Sirepo interface now supports analytical calculations for flux, photon beam size, divergence and photon brightness. We have included the effects of detuning from resonance and electron beam energy spread, which can be important in realistic operational conditions. We compare our results to features previously available in the Igor Pro interface to SRW, to analytical formulae available in the literature, and also to the results of simulated wavefront propagation. Differences between the various approaches are explained in detail, so that all the assumptions, conventions and ranges of validity can be better understood.
“Sirepo” is an open source cloud-based software framework which provides a convenient and user-friendly web-interface for scientific codes such as Synchrotron Radiation Workshop (SRW) running on a local machine or a remote server side. SRW is a physical optics code allowing to simulate the synchrotron radiation from various insertion devices (undulators and wigglers) and bending magnets. Another feature of SRW is a support of high-accuracy simulation of fully- and partially-coherent radiation propagation through X-ray optical beamlines, facilitated by so-called “Virtual Beamline” module. In the present work, we will discuss the most important features of Sirepo/SRW interface with emphasis on their use for commissioning of beamlines and simulation of experiments at National Synchrotron Light Source II. In particular, “Flux through Finite Aperture” and “Intensity” reports, visualizing results of the corresponding SRW calculations, are being routinely used for commissioning of undulators and X-ray optical elements. Material properties of crystals, compound refractive lenses, and some other optical elements can be dynamically obtained for the desired photon energy from the databases publicly available at Argonne National Lab and at Lawrence Berkeley Lab. In collaboration with the Center for Functional Nanomaterials (CFN) of BNL, a library of samples for coherent scattering experiments has been implemented in SRW and the corresponding Sample optical element was added to Sirepo. Electron microscope images of artificially created nanoscale samples can be uploaded to Sirepo to simulate scattering patterns created by synchrotron radiation in different experimental schemes that can be realized at beamlines.