Analyze¶
First-order values and the Single Ray Trace table.
First order¶
Analyze results that are not their own window.
- get_first_order(ctx: Context) dict[str, float | str | None]¶
Return first-order values for the lens open in the OpticStudio window.
The system is updated before the values are read.
working_f_numberis on axis at the primary wavelength. A number isNonewhen OpticStudio does not return a finite value.- Returns:
effective_focal_length – Effective focal length, in lens units.
entrance_pupil_diameter – Entrance pupil diameter, in lens units.
image_space_f_number – Paraxial image-space F-number.
working_f_number – Working F-number on axis at the primary wavelength.
total_length – Thickness from surface 1 to the image surface, in lens units.
status – Text reported while updating the system. Empty when the update reports nothing.
- Return type:
Single Ray Trace¶
Single Ray Trace tool.
- get_single_ray_trace(ctx: Context, wavelength: int = 1, hx: float = 0, hy: float = 0, px: float = 0, py: float = 0, trace_type: 'DirectionCosines' | 'TangentAngle' | 'YmUmYcUc' = 'DirectionCosines') dict[str, object]¶
Return the Single Ray Trace table for one ray in the open lens.
hxandhyare the normalized field coordinates.pxandpyare the normalized pupil coordinates.trace_typeselects Direction Cosines, Tangential Angle, orYm, Um, Yc, Uc.- Parameters:
wavelength – 1-based wavelength number.
hx – Normalized field coordinate X.
hy – Normalized field coordinate Y.
px – Normalized pupil coordinate X.
py – Normalized pupil coordinate Y.
trace_type –
DirectionCosines,TangentAngle, orYmUmYcUc.
- Returns:
wavelength – Wavelength number used for the ray.
hx – Normalized field coordinate X.
hy – Normalized field coordinate Y.
px – Normalized pupil coordinate X.
py – Normalized pupil coordinate Y.
type – Table format.
columns – Headings of the Single Ray Trace table, after the surface column.
surfaces – One entry per surface, in the order shown in the window.
surfaces[].surface – Surface label from the table, such as
OBJ, a surface number, orIMA.surfaces[].values – One number per heading.
Nonewhere the table has no finite number.message – Error line under the table. Empty when the table has none.
- Return type:
- Raises:
ValueError – The ray settings or the table cannot be used.