The Sirepo framework for X-ray optics, linac design, machine learning and controls

X-ray beamline and particle accelerator designers often work with command line interfaces (CLI), which can include one or more physics codes, scripting languages, visualization tools, special purpose configuration files, etc. Sirepo [1] provides online capabilities that enhance CLI workflows. Use of a Sirepo supported physics code enables a designer to work easily with a student, a new hire, or an expert collaborator who doesn't know that particular code. Many codes are already supported: elegant and 3 others for accelerator design; SRW and Shadow for X-ray optics; Warp for plasma accelerators and thermionic converters; EPICS and ACNET for control system design; FLASH for hydrodynamics and MHD; as well as others. Sirepo is an open source framework [2], using JavaScript for the UI and Python on the server, with a Docker container for the precompiled and installed HPC software. Sirepo continues to evolve and improve in response to feedback from the community. This presentation will cover the following topics:
a) online calculations of X-ray photon brightness from an ultra-low-emittance electron beam in an undulator, including energy spread and resonance detuning;
b) online access to all elegant features, with visual tools for lattice modification, and a brief discussion of its use for education at USPAS;
c) a prototype online toolbox for tuning control system algorithms, with integrated data analysis and machine learning;
d) near-term plans for enabling single-click submission of Sirepo simulations to NERSC and other remote parallel computing platforms;
e) ideas for using this technology to enable data streaming and a web-accessible UI that will seamlessly integrate with the existing software stack.

[1] Sirepo Scientific Gateway, https://sirepo.com

[2] Sirepo cloud computing framework, https://github.com/radiasoft/sirepo