Exerpt of Botorch (Bayesian Optimization in PyTorch) class written for Ocelot optimizer, a multiphysics simulation toolkit designed for studying FEL and storage ring-based light sources.
This class file can be put under /op_methods.
Rest of codes can be found in Lawrence Berkeley National Lab BELLA center Github account (private).