python test code for active beam stabilization