analysis.chromatic_focal_shift#
Chromatic Focal Shift Analysis
This module provides a chromatic focal shift analysis for optical systems: the paraxial focus position as a function of wavelength, relative to the focus at the primary wavelength.
Javier Ruiz, 2026
Classes
|
Chromatic focal shift: paraxial focus position versus wavelength. |
- class ChromaticFocalShift(optic: Optic, wavelength_range: tuple[float, float] | None = None, num_points: int = 128)[source]#
Chromatic focal shift: paraxial focus position versus wavelength.
For each sampled wavelength, a paraxial marginal ray (Hy = 0, Py = 1) is traced. Its axial focus, measured from the image surface, is
dz = -y / uat the image surface. The focal shift isdzminus its value at the primary wavelength.- Parameters:
optic (Optic) – The optic object to analyze.
wavelength_range (tuple[float, float], optional) – The minimum and maximum wavelengths in µm. If None, the minimum and maximum of the optic’s defined wavelengths are used. Defaults to None.
num_points (int, optional) – The number of wavelengths sampled across the range. Defaults to 128.
- Variables:
optic (Optic) – The optic object being analyzed.
wavelength_range (tuple[float, float]) – The sampled wavelength range in µm.
num_points (int) – The number of sampled wavelengths.
data (dict) – The generated data, with keys
"wavelengths"(µm),"focal_shift"(lens units), and the same two quantities at the optic’s defined wavelengths,"defined_wavelengths"and"defined_focal_shift".
- Raises:
ValueError – If the wavelength range is empty.
- max_focal_shift() float[source]#
Returns the range of the focal shift over the sampled wavelengths.
- Returns:
The maximum minus the minimum focal shift, in lens units.
- Return type: