optiland.rays.ray_generator
Ray Generator
This module contains the RayGenerator class, which is used to generate rays for tracing through an optical system.
Kramer Harrison, 2024
Classes
|
Generator class for creating rays. |
- class RayGenerator(optic)[source]
Generator class for creating rays.
- generate_rays(Hx: float, Hy: float, Px: ScalarOrArray, Py: ScalarOrArray, wavelength: ScalarOrArray) RealRays[source]
Generates rays for tracing based on the given parameters.
- Parameters:
Hx – Normalized x field coordinate.
Hy – Normalized y field coordinate.
Px – x-coordinate of the pupil point.
Py – y-coordinate of the pupil point.
wavelength – Wavelength of the rays.
- Returns:
RealRays object containing the generated rays.
- set_ray_aiming(mode: str, max_iter: int = 10, tol: float = 1e-06, **kwargs)[source]
Set the ray aiming strategy.
- Parameters:
mode (str) – The name of the ray aiming strategy. Options include “paraxial”, “iterative”, and “robust”.
max_iter (int, optional) – Maximum iterations for iterative/robust methods. Defaults to 10.
tol (float, optional) – Convergence tolerance for iterative/robust methods. Defaults to 1e-6.
**kwargs – Additional parameters passed to the aimer constructor.