Skip to main content

Macro to automate smarter optimization for Zernike Standard Sag surfaces

  • January 15, 2026
  • 0 replies
  • 14 views

Forum|alt.badge.img+1

My colleague, Taylor Breen, wrote a macro for smarter optimization of complex surfaces. The ZERNIKE_OPTIMIZER.zpl macro optimizes Zernike Standard Sag surfaces, setting one Zernike coefficient to variable solve at a time between optimization runs. The first four Zernike terms (piston, x-tilt, y-tilt, and defocus) are not optimized as they do not represent meaningful surface figure errors and are better optimized elsewhere. After the optimization is complete, coefficients with small values are set to 0 and their solve is set to fixed. This is to remove unnecessary complexity in the surface shape. The system is then reoptimized a final time using only the significant terms.