Optiland documentation#

Open-source optical design, analysis and differentiable ray tracing in Python. Build, trace and optimize lens and mirror systems with a NumPy backend for everyday CPU work or a PyTorch backend for GPU acceleration and automatic differentiation.

Install#
pip install optiland
Two lines to a traced, rendered system#
from optiland.samples.objectives import ReverseTelephoto

lens = ReverseTelephoto()
lens.draw3D()

Find your path

Student or first-time user

Build and visualize your first lens in Python, then learn to read spot diagrams, ray fans and wavefront maps.

start_here.html#optics-student-first-timer
Optical engineer

Get productive fast: import catalog lenses, reproduce existing designs, and run optimization and tolerancing workflows.

start_here.html#optical-engineer-practitioner
Computational researcher

Use the PyTorch backend for autograd, differentiable optimization and end-to-end machine-learning pipelines.

start_here.html#computational-researcher
Contributor or extender

Add surface types, coatings, analyses or operands, and understand the architecture behind them.

start_here.html#software-contributor-extender

What Optiland does

Modeling and ray tracing

Sequential systems with spherical, conic, aspheric, freeform and diffractive surfaces; tilts, decenters and fold mirrors; paraxial, real and polarization-aware ray tracing.

functionalities.html#design-tools
Analysis

Spot diagrams, ray fans, distortion, field curvature, OPD, Zernike decomposition, PSF and MTF, encircled energy, image simulation and more.

functionalities.html#analysis-tools
Optimization and tolerancing

Local and global optimizers, user-defined operands, Glass Expert categorical optimization, sensitivity and Monte Carlo tolerancing.

functionalities.html#optimization-and-tolerancing
Differentiable optics

A PyTorch backend that makes every trace differentiable: gradients, GPU acceleration and integration with deep-learning workflows.

Differentiable Ray Tracing
Non-sequential illumination

Illumination design, stray-light and ghost analysis with scattering, coatings, detectors and differentiable optimization.

Non-Sequential Ray Tracing
Extensibility and interoperability

Custom surfaces, coatings, operands and analyses; Zemax, CODE V and OSLO import; vendor lens catalogs; a JSON file format; plugin packages.

Extension Recipes

Know what you want to do?

The How Do I …? page is organized by task rather than by feature: find your question, follow the link, copy the pattern.

Try Optiland in your browser

Run Optiland in an in-page Python kernel. Nothing to install.

Try Optiland in Your Browser
Learning Guide

The complete tutorial series, from foundational lens design to machine learning and non-sequential ray tracing.

Learning Guide

Note

You are reading the documentation for Optiland 0.6.2.post52+g00c0837f, built continuously from the master branch of optiland/optiland.