Each ray operand component is computed by tracing a ray in a specified wavelength from a specified field point (relative coordinates on the object surface), through a specified pupil point (relative coordinates on the reference surface), through the lens, and on to the image surface. The wavelength, object coordinates, and pupil coordinates are not specified directly in the operand component; rather, they exist as entries in the wavelengths, field points, and ray sets to which the operand components refer. This indirect representation is needed for efficiency: Information from a single ray can be used in multiple operand components, and it is important not to trace the same ray twice.
The field points set defines the field points that will be used for optimization. Each field has a number and specifies several data items that are used in conjunction with all rays traced from that field point, including the relative y-, x-, and z-coordinates on the object surface, relative coordinates on the reference surface for reference rays traced from the field point, and the lower and upper meridional and sagittal vignetting factors for the field point. The vignetting factors allow the reference surface coordinates of ray set rays to be adjusted to accommodate vignetting without changing the ray set. The effect of the vignetting factors is to transform a square grid of rays on the pupil into a rectangular grid or to transform a circular pattern of rays into an elliptical pattern, thereby approximating the shape of the vignetted pupil for off-axis field points.
The second table of data needed to define optimization rays is the ray set. Each ray in the ray set has a number and data items that specify a ray type, and fractional aperture coordinates. The ray type is either ordinary or reference. Ordinary rays are traced through the specified point on the entrance pupil and then through the lens system. Reference rays are iterated so that they pass through a specified point on the reference surface. Ordinary rays are faster than reference rays, and are used for most optimization tasks.
The field point set and ray set do not by themselves impose any computational burden on the program during optimization. Only rays that are referenced in operand definitions are actually traced, and if there are multiple references to a particular ray from different components, that ray is traced only once.
The type of a ray is an important factor in determining the types of components that can use it. There are three groups of ray-based operand components: those that are computed for both ordinary and reference rays, those that are computed only for ordinary rays, and those that are computed only for reference rays.
The components computed for all types of rays include the coordinates, direction cosines, and path length. These are data that involve only a single ray. The syntax for these components is
<component>(field #, ray #, wavelength #, surface #, configuration #)
The other two groups of ray components are only available in image space, and have the syntax
<component>(field #, ray #, surface #, configuration #)
where field # is the field point number (index into the field points set), ray # is the ray number (index into the rayset), wavelength # is the wavelength number, surface # is the surface number, and configuration # is the configuration number.
Example: A simple user-defined error functionTask: Set up a simple error function that uses exact-ray data to correct spherical aberration and coma.
Solution:
1. Set up the lens so that the last radius has an axial-ray angle solve (which maintains the focal length) and the last thickness has an axial-ray height solve (which holds the image surface in the paraxial focus).
2. Set up a simple field point set and ray set as follows. (Note: this field point set is predefined in OSLO PRO and OSLO SIX)
*RAYSET
FPT FBY/FY1 FBX/FY2 FBZ/FX1 FYRF/FX2 FXRF/WGT
F 1 -- -- -- -- --
-1.000000 1.000000 -1.000000 1.000000 1.000000
F 2 0.700000 -- -- -- --
-1.000000 1.000000 -1.000000 1.000000 1.000000
F 3 1.000000 -- -- -- --
-1.000000 1.000000 -1.000000 1.000000 1.000000
RAY TYPE FY FX WGT
R 1 Ordinary 1.000000 -- 1.000000
R 2 Ordinary -- -- 1.000000
R 3 Ordinary -1.000000 -- 1.000000
*OPERANDS
OP DEFINITION MODE WGT NAME VALUE %CNTRB
O 1 "DY(1,1)" M 1.000000 Sphere -0.018422 100.00
O 2 "DY(3,1)+DY(3,3)" M 1.000000 Coma 9.7812e-05 0.00
The values in the above listing pertain to a particular singlet lens and are of no particular significance. Notice that each operand has been given a name to indicate its purpose. The name has no function other than to clarify the listing of operand definitions. Notice also that field point 2 and ray 2 are not used in the operand definitions. Since they are not used, they don't cause any computational load during optimization.