  Autonomous methods to align beamlines can decrease the amount of time spent
on diagnostics, and also uncover better global optima leading to better beam
quality. The alignment of these beamlines is a high-dimensional,
expensive-to-sample optimization problem involving the simultaneous treatment
of many optical elements with correlated and nonlinear dynamics. Bayesian
optimization is a strategy of efficient global optimization that has proved
successful in similar regimes in a wide variety of beamline alignment
applications, though it has typically been implemented for particular beamlines
and optimization tasks. In this paper, we present a basic formulation of
Bayesian inference and Gaussian process models as they relate to multiobjective
Bayesian optimization, as well as the practical challenges presented by
beamline alignment. We show that the same general implementation of Bayesian
optimization with special consideration for beamline alignment can quickly
learn the dynamics of particular beamlines in an online fashion through
hyperparameter fitting with no prior information. We present the implementation
of a concise software framework for beamline alignment and test it on four
different optimization problems for experiments at x-ray beamlines of the
National Synchrotron Light Source II and the Advanced Light Source and an
electron beam at the Accelerator Test Facility, along with benchmarking on a
simulated digital twin. We discuss new applications of the framework, and the
potential for a unified approach to beamline alignment at synchrotron
facilities.
