Bundle, surface, and trace options
Each system for analysis takes some configuration of bundle and surfaces as input, and produces a trace. The built-in options are summarized as follows (more details in Reference):
Bundles
Physically, x,y,z
are position and angx,angy
are direction tangent angles (angles in radians). zpos
is a fixed z position. Dx,Dy,Dz
are direction cosine (unit vector) components.
bundle(x,y,angx,angy,zpos)
is a bundle which takes either vectors inx
andy
or vectors inangx
andangy
. All other arguments are scalar. Vectors may be different length to form rectanglular array sampling.bundle_as_array(x,y,angx,angy,zpos)
takes matricesMatrix{T} where T<:Real
for the first four arguments, and a scalar forzpos::T where T<:Real
.bundle_as_array_big(x,y,z,Dx,Dy,Dz)
takes all arguments as typeMatrix{T} where T<:Real
.
Surfaces
zplane
is a z-plane, with one coefficient used to describe the fixed z-location of the plane.spherical
is a sphere, with one coefficient used to describe the z-location of the apex, and the other to describe the signed radius of curvature relative to that apex.aspherical
is an aspherical surface, with coefficients describing the z-location, signed radius, conic constant, and arbitrary number of even order radial polynomial contributions.zernike
is a zernike polynomial series representation. The normalization radius and arbitrary number of OSA/ANSI coefficients can be provided incoeffs
. Rays will terminate withNaN
if they strike outside the normalization radius for this built-in function.
Traces and trace methods
Traces are generated when a type of bundle is sent through an opticalstack
type. Methods on traces either return organized information on the rays traced from the bundle, or directly return some basic diagnostic.
trace
is a Type which contains matrices of ray coordinates at all points in propagation.bigtrace
is a Type which contains matrices of ray coordinates and direction cosines at all points in propagation.bigtrace_to_bundle
returns a bundle object from the ray information at a particular position along propagation in abigtrace
.
Built-in methods to extract data from a trace:
trace_extract_terminus
returns requested ray information for all rays intrace
orbigtrace
asMatrix
at the requested propagation position.trace_extract_ray
returns requested ray information for thei,j
ray in thetrace
orbigtrace
at all positions in propagation as a vector.
Built-in evaluation methods on trace
or bigtrace
types return numbers or plots:
rms_spot
returns the rms-sense spot size of all rays in the trace at a particular position in propagation.splot
is a spot plot, and returns a plot of lateral ray coordinates of the bundle at a particular position in propagation.rac
returns a line plot of ray coordinates at one position in propagation as a function of the same coordinates at a different point in propagation.