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.
- 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:
Hx (float) – The normalized x field.
Hy (float) – The normalized y field.
wavelength (float) – The wavelength of the light.
num_rays (int) – The number of rays to trace.
distribution (str) – The distribution of rays to trace.
- Returns:
- The optimal axial position (z-coordinate) of the image plane
that minimizes the RMS spot size.
- Return type:
float
- to_dict()
Returns a dictionary representation of the solve.
- Returns:
A dictionary representation of the solve.
- Return type:
dict