PN_33_922.opticalInvariant¶
-
raytracing.eo.PN_33_922.opticalInvariant(self, ray1, ray2, z=0)¶ The optical invariant is a quantity that is conserved for any two rays in the system. It is very general and any two rays can be used. It is often seen with the chief ray and marginal ray in an imaging system, in which case it is called the Lagrange invariant. In ImagingPath(), the principal and axial rays can be used, in which case the optical invariant is called the Lagrange Invariant, and is the maximal optical invariant between two rays that guarantees neither one will be blocked.
Parameters: - ray1 (object of Ray class) – A ray at height y1 and angle theta1 (default=None)
- ray2 (object of Ray class) – A ray at height y2 and angle theta2 (default=None)
- z (float) – A distance that shows propagation length (default=0)
Returns: opticalInvariant – The value of the optical invariant constant for ray1 and ray2
Return type: float
Examples
Since there is no input for the function, the optical invariant value is calculated for chief and marginal rays.
>>> from raytracing import * >>> path = ImagingPath() # define an imaging path >>> # use append() to add elements to the imaging path >>> path.append(Space(d=10)) >>> path.append(Lens(f=10,diameter=10,label="f=10")) >>> path.append(Space(d=30)) >>> path.append(Lens(f=20,diameter=15,label="f=20")) >>> path.append(Space(d=20)) >>> ray1, ray2 = Ray(0.5,0.05) , Ray(3,0.25) >>> print('optical invariant :', path.opticalInvariant(ray1,ray2)) optical invariant : 0.025000000000000022
Notes
This quantity is L = n (y1 theta2 - y2 theta1)