Python codes for Zygo