The Compute and control for adaptive optics (Cacao) is an open source software package providing a flexible framework for deploying real-time adaptive optics control. Cacao leverages CPU and GPU computational resources to meet the demands of modern AO systems with thousands of degrees of freedom running at kHz speed or faster. Cacao adopts a modular approach, where individual processes operate over a standardized data stream stucture. Advanced control loops integrating multiple sensors and DMs are built by assembling multiple such processes. High-level constructs are provided for sensor fusion, where multiple sensors can drive a single physical DM. The common data stream format is at the heart of Cacao, holding data content in shared memory and timing information as semaphores. Cacao is currently in operation on the general-purpose Subaru AO188 system, the SCExAO and MagAOX extreme-AO instruments. Its data stream format has been adopted at Keck, within the COMPASS AO simulation tool, and in the COSMIC modular RTC platform. We describe Cacao's software architecture and toolset, and provide simple examples for users to build a real-time control loop. Advanced features are discussed, including on-sky results and experience with predictive control and sensor fusion. Future development plans will include leveraging machine learning algorithms for real-time PSF calibration and more optimal AO control, for which early on-sky demonstration will be presented.
KAUST Repository Item: Exported on 2021-02-25
Acknowledgements: Developers of the Cacao software package receive funding from the National Science Foundation (MagAO-X project), the Japanese Society for the Promotion of Science (SCExAO project), the Japanese NINS Astrobiology Center, and the European Union (project Green Flash). LDFC development at SCExAO is supported by the NASA Strategic Astrophysics Technology (SAT) Program grant 80NSSC19K0121. Development of advanced wavefront control algorithms with Cacao is supported by NASA grant 80NSSC19K0336. The development of SCExAO was supported by the Japan Society for the Promotion of Science (Grant-in-Aid for Research #23340051, #26220704, #23103002, #19H00703 & #19H00695), the Astrobiology Center of the National Institutes of Natural Sciences, Japan, the Mt Cuba Foundation and the director’s contingency fund at Subaru Telescope. The authors wish to recognize and acknowledge the very significant cultural role and reverence that the summit of Maunakea has always had within the indigenous Hawaiian community. We are very fortunate to
have the opportunity to conduct observations from this mountain.