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 inxandyor vectors inangxandangy. 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<:Realfor 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
zplaneis a z-plane, with one coefficient used to describe the fixed z-location of the plane.sphericalis 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.asphericalis an aspherical surface, with coefficients describing the z-location, signed radius, conic constant, and arbitrary number of even order radial polynomial contributions.zernikeis a zernike polynomial series representation. The normalization radius and arbitrary number of OSA/ANSI coefficients can be provided incoeffs. Rays will terminate withNaNif 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.
traceis a Type which contains matrices of ray coordinates at all points in propagation.bigtraceis a Type which contains matrices of ray coordinates and direction cosines at all points in propagation.bigtrace_to_bundlereturns 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_terminusreturns requested ray information for all rays intraceorbigtraceasMatrixat the requested propagation position.trace_extract_rayreturns requested ray information for thei,jray in thetraceorbigtraceat all positions in propagation as a vector.
Built-in evaluation methods on trace or bigtrace types return numbers or plots:
rms_spotreturns the rms-sense spot size of all rays in the trace at a particular position in propagation.splotis a spot plot, and returns a plot of lateral ray coordinates of the bundle at a particular position in propagation.racreturns a line plot of ray coordinates at one position in propagation as a function of the same coordinates at a different point in propagation.