solves.quick_focus#
Quick Focus Solve Module
Defines the quick focus solve.
Seçkin Berkay Öztürk, 2025
Classes
|
Quick Focus :param optic: The optic object. |
- class QuickFocusSolve(optic, *args)[source]#
Quick Focus :param optic: The optic object. :type optic: Optic
- Raises:
ValueError – If the optical system is not defined.
- apply()[source]#
Applies the QuickFocusSolve to the optic.
This method calculates the optimal focus distance and sets the z-position of the last surface (image plane) accordingly.
- Raises:
UnsupportedParaxialGeometryError – If the beam path is folded off global +z, before any mutation – moving the image plane along z only would take it off its physical leg.
- classmethod from_dict(optic, data)#
Creates a solve from a dictionary representation.
- optimal_focus_distance(Hx=0, Hy=0, wavelength=0.55, num_rays=5, distribution='hexapolar')[source]#
Compute the optimal location of the image plane where the RMS spot size is minimized. This is based on solving the quadratic equation that describes the RMS spot size as a function of the propagation distance.
- Parameters:
- Returns:
- The optimal axial position (z-coordinate) of the image plane
that minimizes the RMS spot size.
- Return type:
- Raises:
UnsupportedParaxialGeometryError – If the beam path is folded off global +z (or entered along another direction), before any ray is traced. The returned value is a Cartesian global-z focus coordinate, which is not frame-correct for a folded output arm – a caller writing it into
cs.zwould move the image plane off its physical leg.