optiland

1 min read Original article ↗

Design optics with Python

Optiland is a Python package for lens design and optimization. Model optical systems, trace rays, analyze aberrations, and optimize designs — all in code.

Get Started View on GitHub

# Design a simple doublet lens

from optiland.samples import CookeTriplet

from optiland.analysis import SpotDiagram

# Create the optical system

lens = CookeTriplet()

# Trace rays and visualize

lens.draw()

# Analyze aberrations

sd = SpotDiagram(lens, fields=(0,1))

sd.view()

Everything you need for lens design

Sequential Ray Tracing

Fast, accurate ray tracing through complex multi-element optical systems.

Aberration Analysis

Spot diagrams, wavefront maps, Zernike decomposition, MTF, and more.

Automated Optimization

Gradient-based and global optimizers to meet your design specifications.

Python-native API

Clean, composable API — integrate with NumPy, SciPy, and your own code.

Open Source

MIT licensed. Inspect, extend, and contribute to every part of the codebase.

Rich Visualizations

2D/3D layouts, ray fans, field maps — powered by Matplotlib.