Does anyone have an example (or is there one in the zemax documentation) for altering the number of zernike terms and the terms themselves using a python API?
Solved
Zernike Alteration in Python API
Best answer by Ali H
Hi Chase,
You may use code similar to below to get/set the number of Zernike terms and set the values of the coefficients:
TheLDE = TheSystem.LDE
surf3 = TheLDE.GetSurfaceAt(3)
surf3.SurfaceData.NumberOfTerms = 5
surf3.GetSurfaceCell(ZOSAPI.Editors.LDE.SurfaceColumn.Par15).DoubleValue = 5.3
Best,
Ali
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.