Skip to content

Examples

Every example below has a runnable script in the repository root and a dedicated page with a code walkthrough and the figures it produces.

Getting Started

Example Description
GeoLens Load a refractive lens, run optical analysis, render an image.
DefocusLens Thin-lens defocus / depth-of-field & bokeh.
DiffractiveLens Pure wave-optics phase plate with ASM propagation.
HybridLens Refractive lens combined with a DOE.

Lens Design

Example Description
GeoLens Design Curriculum RMS-spot optimization of a refractive lens.
DiffractiveLens Design Optimize a Pixel2D DOE to focus, via a Strehl (peak) loss.
HybridLens Design End-to-end refractive–diffractive design (ray–wave model).

Advanced

Example Description
Automated Lens Design (RMS) Ab-initio lens design from target specs.
PSF Network Neural surrogate that predicts the spatially-varying PSF.
4f System Fourier-plane diffractive filtering in a 4f relay.
Pupil Field & Wavefront Exit-pupil wavefront by coherent ray tracing.
Multi-order Diffraction All grating diffraction orders in one ray–wave PSF.
Diffractive Surfaces Three paper-based DOE parameterizations.