API reference

All modules of pyoptics, grouped by topic. Each page starts with the module docstring, followed by summary tables and the full documentation of every public class and function. Names in docstrings refer to the conventions in Conventions.

Propagation

pyoptics.propagators

Propagators for electromagnetic fields.

pyoptics.tilted

Propagation onto tilted planes.

pyoptics.analytic_phase

Propagation with analytic handling of the wavefront phase.

pyoptics.wpm

Wave propagation method (WPM) of Brenner and Singer.

pyoptics.fft

Helper module to deal with FFTs.

Rigorous electromagnetics (FDTD)

pyoptics.fdtd

Finite-difference time-domain (FDTD) solver for Maxwell's equations in 1D and 2D.

pyoptics.fdtd.grid

The Yee grid: sizes, staggered sample positions and the time step.

pyoptics.fdtd.geometry

Shapes that make up a structure.

pyoptics.fdtd.media

Media: relative permittivity and conductivity.

pyoptics.fdtd.boundaries

Boundary conditions: convolutional PML, PEC walls and periodicity.

pyoptics.fdtd.sources

Sources: time profiles, soft current sources and the total-field / scattered-field (TFSF) plane wave.

pyoptics.fdtd.monitors

Monitors record data during a run, so the full time history never has to be stored.

pyoptics.fdtd.simulation

The Simulation: structure, sources, monitors and the time stepping.

pyoptics.fdtd.storage

Saving and loading monitor data.

pyoptics.fdtd.plot

Plots and animations of FDTD simulations (needs matplotlib).

Beams, modes and paraxial optics

pyoptics.beams

Analytical beam definitions.

pyoptics.beam_quality

Beam widths, divergence and beam propagation ratio M² after ISO 11146.

pyoptics.modes

Mode analysis of beams and step-index fibre modes.

pyoptics.abcd

ABCD (ray transfer) matrices for paraxial ray optics and Gaussian beams.

Imaging and ray tracing

pyoptics.imaging

Simple imaging: coherent imaging, point spread function (PSF), optical transfer function (OTF), modulation transfer function (MTF) and Strehl ratio.

pyoptics.analytical

Analytical solutions for testing.

pyoptics.bases

Module for basis sets.

pyoptics.vectorial_imaging

Vectorial, partially coherent imaging (Abbe's method), e.g. for lithography.

pyoptics.microscopy

Microscopy: partially coherent bright field imaging, phase contrast, DIC, confocal microscopy and Fourier ptychography.

pyoptics.raytrace

Sequential ray tracing through optical systems.

pyoptics.raywave

Conversion between ray ensembles and sampled wave fields.

pyoptics.fresnel

Fresnel lenses: design, ray tracing with real facets, and the way back.

pyoptics.delano

Delano's y-ybar diagram: first order layout of optical systems.

pyoptics.lens_optimization

Damped least squares optimization of raytrace.System lenses.

Lithography

pyoptics.litho

Lithography imaging toolbox.

pyoptics.litho.illumination

Illumination sources for lithographic imaging.

pyoptics.litho.mask

Masks for lithographic imaging: layouts (geometry) and mask stacks (materials and the model that turns them into transmissions).

pyoptics.litho.wafer

Wafer stack: a resist layer on a thin film stack, for images inside the resist.

pyoptics.litho.imaging

Projection lens and lithography simulation (Abbe's method).

pyoptics.litho.metrics

Image quality metrics for lithography.

pyoptics.litho.lens

Aberrations of a ray traced projection lens in lithographic imaging: from the lens design to CD, placement and best focus across the slit, and the sensitivities of these to Zernike coefficients.

pyoptics.litho.hopkins

Hopkins imaging: transmission cross coefficients (TCC) and their sum of coherent systems (SOCS) decomposition.

pyoptics.litho.resist

Resist model for chemically amplified (DUV) resists in an x-z cross section: exposure, post-exposure bake (PEB) and development.

pyoptics.litho.rcwa

Rigorous coupled wave analysis (RCWA, Fourier modal method) of 1D lamellar gratings, for rigorous (thick) mask diffraction.

pyoptics.litho.jones_pupil

Jones pupils: the polarization properties of a projection lens, their representations and decompositions.

pyoptics.litho.source_opt

Source optimization ("SO lite"): a pixelated source optimized for a set of clips.

pyoptics.litho.opc

Optical proximity correction (OPC) of Manhattan layouts.

pyoptics.litho.illuminator

Ray traced KrF illuminator: from the secondary source to the reticle.

pyoptics.litho.plot

Plots for lithography simulations (needs matplotlib).

Interfaces, thin films and polarization

pyoptics.interfaces

Fresnel coefficients of a single planar interface between two media.

pyoptics.thin_films

Thin film reflection and transmission coefficients.

pyoptics.coatings

Thin film coatings on the surfaces of a ray traced system.

pyoptics.materials

Simple dispersion models for optical materials.

pyoptics.polarization

Polarization: Jones calculus (jones), Mueller calculus (mueller) and helpers for TE/TM bases, partially polarized light, DOP and IPS.

pyoptics.polarization.jones

Tools for Jones calculus.

pyoptics.polarization.mueller

Tools for Müller calculus: Müller matrices of common elements optical elements and Stokes vectors of common polarization states.

Measurement and phase retrieval

pyoptics.interferometry

Interferometry: simulation of interferograms, phase-shifting interferometry (PSI) and Fourier-transform fringe analysis (Takeda).

pyoptics.holography

Digital holography: recording, reconstruction, refocusing and autofocus.

pyoptics.unwrap

Phase unwrapping in one and two dimensions.

pyoptics.phase_retrieval

Phase retrieval: recover a phase from intensity measurements.

pyoptics.shack_hartmann

Shack-Hartmann wavefront sensor: spot images, centroids and reconstruction.

pyoptics.TIE

Routines for TIE

pyoptics.ifta

Module that implements IFTA-style algorithms.

pyoptics.processing

Module that defines image processing classes.

Utilities

pyoptics.utils

Utils for pyoptics.

pyoptics.geometry

Geometry helper functions.

pyoptics.masks

Masks useful for optical applications.

pyoptics.interpolator

Image interpolation.

pyoptics.plot_tools

Plot helpers: intensities, complex fields (amplitude and phase) and image stacks through focus.

pyoptics.sketch

Schematic drawings of optical layouts with matplotlib: thin lenses, stops, prisms, mirrors, detectors and paraxial rays, and ready-made sketches of microscopes, interferometers, wavefront sensors and other setups of the example notebooks.