pyoptools.raytrace.system.idealcomponent module¶
- class pyoptools.raytrace.system.idealcomponent.IdealThickLens(lens_shape, lens_thickness, principal_plane_positions=(0.0, 0.0), pupil_config=None, focal_length=100, show_internal_rays=False)¶
Bases:
SystemClass defined to create an Ideal Thick Lens.
It is implemented as a subsystem because the propagation inside involves multiple rays: first surface -> first principal plane -> second principal plane -> second surface
- Parameters:
lens_shape (object) – Shape of the lens (shape of both lens surfaces).
lens_thickness (float) – Thickness of the lens (distance between the two surfaces).
principal_plane_positions (tuple of float, optional) – Principal planes position. The position of each principal plane is measured from its corresponding surface. Default is (0., 0.).
pupil_config (tuple or None, optional) –
Configuration for the pupil. If None, no pupil is defined. Default is None. When provided, it should be a tuple containing: (pupil_distance, pupil_aperture_shape, pupil_reference_surface)
- pupil_distancefloat
Distance of the pupil from the reference surface.
- pupil_aperture_shapeobject
Shape of the pupil aperture.
- pupil_reference_surfacebool
Determines which lens surface is used as the reference for pupil positioning. If True, E1 is the reference surface. If False, E2 is the reference surface.
focal_length (float, optional) – Focal length of the lens. Default is 100.
show_internal_rays (bool, optional) – If True, the trace between the principal planes will be shown. If False, only the trace from and to the lens surfaces will be exact. Default is False.
Notes
The origin of the component is located at the midpoint between the two lens surfaces.
E1 is positioned at -lens_thickness/2 along the z-axis. E2 is positioned at +lens_thickness/2 along the z-axis.
Rays can travel in either direction through the lens: - For rays traveling in the positive z-direction, E1 is encountered first. - For rays traveling in the negative z-direction, E2 is encountered first.
- For the pupil_config parameter:
The pupil_distance is always measured from the reference surface.
- When pupil_reference_surface is True (E1 is reference):
For rays entering through E1, it acts as an entrance pupil.
For rays exiting through E1, it acts as an exit pupil.
For rays entering through E2, it acts as an exit pupil.
For rays exiting through E2, it acts as an entrance pupil.
When pupil_reference_surface is False (E2 is reference), the roles of E1 and E2 are reversed.
The behavior of the pupil depends on the direction of ray propagation and the reference surface chosen.
TODO: Convert from python to cython everything possible to increase performance
- pyoptools.raytrace.system.idealcomponent.deprecated_params(func)¶