Ray Tracing

This package implements a set of components to perform ray tracing for common optical systems.

Characterizing rays

BatchedRay(origin, direction, wl[, ...])

A class representing a batch of rays, which means both the origin and direction are tensors with the last dimension as 3, representing three coordinates x, y and z.

NoValidRayError

Error meaning that valid rays vanish.

Optical surfaces

paraxialize(surfaces, wl)

Returns the equivalent paraxial system of a collection of surfaces at given wavelengths.

surface_types([name_only])

Returns a list of accessible subclasses of Surface in lexicographic order.

CoaxialContext(surface, surface_sequence[, ...])

A subclass of Context for coaxial systems.

CoaxialSurfaceSequence([surfaces, ...])

A subclass of SurfaceSequence to contain coaxial surfaces.

Context(surface, surface_sequence)

A class representing the context of a Surface in a list of surfaces.

CircularSurface([material, aperture, ...])

Derived class of Surface for optical surfaces with circular symmetry, i.e. its property depends only on the radial distance \(r=\sqrt{x^2+y^2}\), in a group of lens.

IntersectionConfig([max_iteration, ...])

Configuration for intersection-determination algorithm.

Surface([material, aperture, reflective, ...])

Base class for optical surfaces in a group of lens.

SurfaceSequence([surfaces, ...])

A sequential container of surfaces.

Apertures

Aperture(*args, **kwargs)

Base class for aperture shapes.

CircularAperture([radius])

Circular aperture with radius radius.

AnnularAperture([inner_r, outer_r])

Annular aperture with a inner radius and a outer one.

Specific surface types

AsphericalRadialPhase([roc, conic, ...])

CircularStop([aperture, d])

Stops whose aperture is circularly symmetric.

Conic([roc, conic, material, aperture, ...])

Conic surfaces.

EvenAspherical([roc, conic, coefficients, ...])

Even aspherical surfaces.

Fresnel([roc, conic, coefficients, ...])

Fresnel lens surface.

Grating([material, aperture, period, ...])

Grating surface.

Planar([material, aperture, reflective, d])

Planar surface.

PolynomialPhase(a, b, material[, aperture, ...])

A planar surface imparting a phase shift to incident rays, parameterized as follows:

Spherical([roc, material, aperture, ...])

Spherical surfaces.

Stop([aperture, move_ray, d])

This type of surfaces only blocks rays outside the aperture and does not change their energy or direction.

ThinLens(fl1[, material, aperture, fl2, ...])

A model for thin lens.

Zernike([roc, conic, a, z, norm_radius, ...])

Ray-tracing-based optical systems

CoaxialRayTracing(surfaces[, sensor, ...])

A class of sequential and ray-tracing-based optical system model.

Configuration for Newton’s method

TODO