raytrace.paraxial_ray_tracer

Paraxial Ray Tracer Module

This module contains the ParaxialRayTracer class, which is responsible for tracing paraxial rays through an optical system.

Kramer Harrison, 2025

Classes

ParaxialRayTracer(optic)

Class to trace paraxial rays through an optical system

class ParaxialRayTracer(optic: Optic)[source]

Class to trace paraxial rays through an optical system

trace(Hy: ScalarOrArray, Py: ScalarOrArray, wavelength: ScalarOrArray)[source]

Trace paraxial ray through the optical system based on specified field and pupil coordinates.

Parameters:
  • Hy – Normalized field coordinate.

  • Py – Normalized pupil coordinate.

  • wavelength – Wavelength of the light.

trace_generic(y: BEArray | float, u: BEArray | float, z: BEArray | float, wavelength: float, reverse: bool = False, skip: int = 0) tuple[BEArray, BEArray][source]

Trace generically-defined paraxial rays through the optical system.

Parameters:
  • y – The initial height(s) of the rays.

  • u – The initial slope(s) of the rays.

  • z – The initial axial position(s) of the rays.

  • wavelength – The wavelength of the rays.

  • reverse – If True, trace the rays in reverse direction. Defaults to False.

  • skip – The number of surfaces to skip during tracing. Defaults to 0.

Returns:

A tuple containing the final height(s) and slope(s) of the

rays after tracing.

Return type:

tuple