WIP: Factorize Thorlabs Cube code