Raytracing

Raytracing is a powerful tool to simulate, design and optimize beamlines at a synchrotron radiation sources. However, the inversion of it, i.e. extracting the simulation parameters from a diagnostic unit is a giant challenge. In our case, we record photon footprints at the end of the beamline while varying beamline parameters such as orientations and alingments of beamline components. The relative steps of these variations are well known and controlled but the first goal is to determine the absolute position/value of each parameter, i.e determine the transformation from the simulation environment to the real world. Ultimately, this information is then used to train a second AI which tunes the beamline within it constraints to the current user demands.