ZOSPy

Actively maintained

A Python wrapper for the Zemax OpticStudio API, enabling reproducible optical ray-tracing simulations.

About

ZOSPy wraps the Ansys (Zemax) OpticStudio API in a more pythonic, well-documented interface, hiding the often verbose .NET-based ZOS-API behind readable, autocompletable function calls. This allows researchers to script and share optical ray-tracing simulations as ordinary Python code or Jupyter notebooks, instead of relying on manual, hard-to-reproduce interaction with the OpticStudio GUI.

Beyond the core API wrapper, ZOSPy bundles ready-made functions for common OpticStudio analyses, solvers and API constants, together with autocomplete support and a unit-test suite that guards against regressions when OpticStudio itself is updated. The package is developed by the MReye group with funding from an NWO Open Science grant, and is used internally for ray-tracing studies of intraocular lens design and ocular radiotherapy planning. It is also supported by many contributors outside our group, spanning multiple fields including optics research and astronomy.

Main Contributors

Publications that use this software

Technical Details

License
MIT
Last updated
Jul 1, 2026
Requires Python
>=3.10,<3.15

Dependencies