ThickLens
- class raytracing.ThickLens(n, R1, R2, thickness, diameter=inf, label='')
Bases:
MatrixA thick lens of first radius R1 and then R2, with an index n and length d
- Parameters:
n (float) – The refraction index of the thick lens. This value cannot be negative.
R1 (float) – The first radius of thick lens
R2 (float) – The second radius of the thick lens
thickness (float) – The length of the thick lens. This value cannot be negative.
diameter (float (Optional)) – The diameter of the thick lens. (default=Inf)
label (string (Optional)) – The label of the thick lens
Examples
>>> from raytracing import * >>> #define a thick lens with desired parameters >>> TLens=ThickLens(n=1.5,R1=4,R2=6,thickness=3,diameter=20,label='thick lens') >>> print(TLens) #print the transfer matrix of the thick lens | 0.750 2.000 | | | | -0.062 1.167 | f=16.000
Notes
A biconvex lens has R1 > 0 and R2 < 0.
- flipOrientation()
We flip the element around (as in, we turn a lens around front-back).
Notes
In this case, R1 = -R2, and R2 = -R1. It is important to call the super implementation because other things must be flipped (vertices for instance)
- property forwardSurfaces
A list of surfaces that represents the element for drawing purposes
- pointsOfInterest(z)
List of points of interest for this element as a dictionary:
- Parameters:
z (float) – Position of the element
- Returns:
pointsOfInterest – List of points of interest for the input element
- Return type:
List
- transferMatrix(upTo=inf)
Returns a ThickLens() or a Matrix() corresponding to a partial propagation if the requested distance is smaller than the length of this element
- Parameters:
upTo (float) – The length of the propagation (default=Inf)
- Returns:
transferMatrix – the corresponding matrix to the propagation
- Return type:
object of class Matrix
Methods
|
|
We flip the element around (as in, we turn a lens around front-back). |
|
List of points of interest for this element as a dictionary: |
|
|
Returns a ThickLens() or a Matrix() corresponding to a partial propagation if the requested distance is smaller than the length of this element |
Inherited Methods
|
The focal lengths measured from the back vertex. |
|
With an image at the back edge of the element, where is the object ? Distance before the element by which a ray must travel to reach the conjugate plane at the back of the element. |
|
|
|
A reasonable height for display purposes for an element, whether it is infinite or not. |
|
The effective focal lengths calculated from the power (C) of the matrix. |
|
This is the synonym of effectiveFocalLengths() |
|
Positions of both focal points on either side of the element. |
|
With an object at the front edge of the element, where is the image? Distance after the element by which a ray must travel to reach the conjugate plane of the front of the element. |
|
A simple method to obtain a MatrixGroup that includes all three matrices to travel from the front focus, through the lens, and then to the back focus. |
|
|
|
The focal lengths measured from the front vertex. |
|
If the system has a finite aperture size |
|
The magnification of the element |
|
This function calculates the multiplication of a coherent beam with complex radius of curvature q by an ABCD matrix. |
|
This function is used to combine two elements into a single matrix. |
|
This function does the multiplication of a ray by a matrix. |
|
The optical invariant is a quantity that is conserved for any two rays in the system. |
|
Positions of the input and output principal planes. |
|
|
|
|
|
The ray matrix formalism, through multiplication of a ray by a matrix, will give the correct ray but will never consider apertures. |
|
This function trace each ray from a group of rays from front edge of element to the back edge. |
|
This function trace each ray from a group of rays from front edge of element to the back edge. |
|
This function trace each ray from a group of rays from front edge of element to the back edge. |
|
This function trace each ray from a list or a Rays() distribution from front edge of element to the back edge. |
|
This is an advanced technique to gain from parallel computation: it is the same as traceManyThrough(), but splits this call in several other parallel processes using the multiprocessing module, which is os-independent. |
|
Contrary to trace(), this only returns the last ray. |
|
The list of Matrix() that corresponds to the propagation through this element (or group). |
Attributes
|
|
|
The determinant of the ABCD matrix is always frontIndex/backIndex, which is often 1.0. |
A list of surfaces that represents the element for drawing purposes |
|
|
If True, then there is a non-null focal length because C!=0. |
|
|
|
If B=0, then the matrix represents that transfer from a conjugate plane to another (i.e. object at the front edge and image at the back edge). |
|
Largest diameter for a group of elements |
|