OpticStudio UserManual En
OpticStudio UserManual En
OpticStudio UserManual En
User Manual
July 2023
www.zemax.com
The File Tab 65
New/Open/Save/Save As 67
Insert Lens 67
File Comparator 69
Archive Group 71
Create Archive 72
Load Archive 74
Export Group 84
CAD Files 85
Point Cloud 89
DXF/IGES Linework 90
Export 2D DXF 91
Export 3D DXF 92
Encrypted Coating 98
Fields 158
Wavelengths 175
Environment 177
Unpolarized: 191
Title/Notes 237
Files 237
Units 239
Colors 245
Editors 247
Folders 249
General 254
Toolbar 262
Privacy 271
Autosave 274
Radius 288
Thickness 288
Material 289
Conic 291
TCE 291
ABCD 300
Atmospheric 302
Biconic 303
Binary 3 309
Binary 4 312
Conjugate 326
Filter 343
Fresnel 343
Gradient 1 345
Gradient 2 346
Gradient 3 347
Gradient 4 348
Gradient 5 349
Gradient 6 351
Gradient 7 352
GRADIUM™ 353
Gradient 9 356
Gradient 10 358
Gradient 12 358
Hologram 1 366
Hologram 2 369
Paraxial XY 382
Periodic 383
Polynomial 383
Standard 391
Superconic 393
Tilted 395
Toroidal 395
TrueFreeForm™ 405
Tilt/Decenter 450
Coating 455
Import 457
Restrictions 477
Apertures 493
Go to Surface 496
NSC ray tracing in mixed mode (with entry and exit ports) 506
Annulus 581
Binary 2A 613
Cone 645
Ellipse 655
Extruded 664
Freeform Z 667
Fresnel 1 668
Fresnel 2 671
Triangle 740
Sources 812
Coat/Scatter 820
Scatter To 825
Index 839
CAD 845
Go to Operand 888
Performance 924
Cross-Section 948
3D Viewer 951
CAD Part Viewer (system viewers group, the analyze tab, sequential ui mode) 967
Wavefront 1037
Interferogram 1041
PSF 1068
MTF 1084
RMS 1115
Geometric 1131
DLL 1214
Multimode 1215
Samples 1231
Polarization and Surface Physics Group (the analyze tab, sequential ui mode) 1251
Transmission 1257
Surface 1263
Coatings (polarization and surface physics group, the analyze tab, sequential ui
mode) 1287
Transmission vs. Angle (coatings, polarization and surface physics group) 1290
Absorption vs. Angle (coatings, polarization and surface physics group) 1291
Diattenuation vs. Angle (coatings, polarization and surface physics group) 1293
Phase vs. Angle (coatings, polarization and surface physics group) 1294
Retardance vs. Angle (coatings, polarization and surface physics group) 1296
Reflection vs. Wavelength (coatings, polarization and surface physics group) 1298
Transmission vs. Wavelength (coatings, polarization and surface physics group) 1300
Absorption vs. Wavelength (coatings, polarization and surface physics group) 1301
Diattenuation vs. Wavelength (coatings, polarization and surface physics group) 1303
Phase vs. Wavelength (coatings, polarization and surface physics group) 1304
Retardance vs. Wavelength (coatings, polarization and surface physics group) 1306
Prescription Data (reports group, the analyze tab, sequential ui mode) 1320
Cardinal Points (Reports group, the Analyze tab, sequential ui mode) 1323
Dipvergence/Convergence 1340
PAL/Freeform 1344
CAD Part Viewer (system viewers group, the analyze tab, non-sequential ui mode) 1394
Object Editor (system viewers group, the analyze tab, non-sequential ui mode) 1396
Polarization and Surface Physics Group (the analyze tab, non-sequential ui mode) 1434
Prescription Data (reports group, the analyze tab, non-sequential ui mode) 1468
Slider 1490
Optimize! 1651
Changes Made to the Lens from within the ZPLM Macro 1686
TEXI: Tolerance on Surface Irregularity Using the Fringe Zernike Model 1752
TUDX, TUDY, TUTX, TUTY, TUTZ: Tolerance on User Defined Tilts & Decenters 1761
Tolerancing 1775
Histogram 1793
Yield 1795
Gallery Mode (script, sketch, and gallery modes, project preferences) 1978
Declaration 1981
Parameter 1982
Constant 1983
Objects 1983
Cube 1984
Cone 1985
Cylinder 1986
Lens 1991
Polygon 1993
Slot 1994
Spiral 1996
Torus 1997
Prism/Extrusion 1999
Revolve 1999
Copy 2002
Ring 2002
Chamfer 2002
Fillet 2002
Free 2003
Scale 2003
Move 2004
Rotate 2004
Mirror 2005
Reflect 2005
Position 2006
Union 2007
Difference 2007
Overlap 2008
Edit/Run 2059
Assignments 2066
Comments 2067
BEEP 2093
BROWSE 2093
CALLMACRO 2094
CALLSETDBL 2094
CALLSETSTR 2095
COAT 2095
CLOSE 2096
CLOSEWINDOW 2096
COMMAND 2097
CONI 2098
CONVERTFILEFORMAT 2098
CONVERTIMAGETOGRID 2098
COPYFILE 2099
CURV 2099
DECLARE 2100
DELETE 2101
DELETEFILE 2101
DELETETOL 2103
EDVA 2104
END 2104
EXPORTBMP 2104
EXPORTJPG 2106
FINDFILE 2107
FORMAT 2109
FTYP 2110
GCRS 2110
GDATE 2110
GETDENCUSER1D 2111
GETEXTRADATA 2112
GETGLASSDATA 2113
GETLSF 2114
GETMTF 2116
GETMTFUSER1D 2117
GETNSCMTF 2119
GETPSF 2120
GETVARDATA 2125
GETZERNIKE 2126
GLAS 2128
GLASSTEMPLATE 2128
GLENSNAME 2128
GOTO 2130
GTEXT 2132
GTEXTCENT 2132
GTITLE 2133
IF-THEN-ELSE-ENDIF 2134
IMA 2135
IMAGECOMBINE 2136
IMAGEEXTRACT 2136
IMASHOW 2137
IMASUM 2138
INPUT 2139
INSERT 2139
INSERTCONFIG 2140
LABEL 2142
LOADARCHIVE 2143
LOADCATALOG 2143
LOADLENS 2144
LOCKWINDOW 2147
MAKEFACETLIST 2147
MAKEFOLDER 2148
NEXT 2161
NSLT 2161
NSTR 2162
NSTR2 2163
NUMFIELD 2164
NUMWAVE 2164
OPEN 2164
OPENANALYSISWINDOW 2165
OPTRETURN 2167
OUTPUT 2167
PARM 2168
PAUSE 2169
PLOT 2170
PLOT2D 2172
POLDEFINE 2174
POLTRACE 2175
POP 2177
PRINT 2177
PRINTFILE 2178
PRINTWINDOW 2179
PWAV 2180
RADI 2182
RANDOMIZE 2182
RAYTRACE 2183
RAYTRACEX 2184
READ 2185
READ_LOCALE 2186
READNEXT_LOCALE 2187
READNEXT 2188
READSKIP 2189
READSTRING 2189
RELEASE 2190
RELOADOBJECTS 2190
REM, !, # 2191
RESUMEUPDATES 2192
RENAMEFILE 2192
REWIND 2192
SAVEARCHIVE 2193
SAVELENS 2194
SAVEWINDOW 2195
SCATTER 2196
SDIA 2196
SETAIM 2196
SETAIMDATA 2197
SETAPODIZATION 2197
SETDETECTOR 2198
SETMCOPERAND 2199
SETSTDD 2209
SETTEXTSIZE 2220
SETTITLE 2220
SETUNITS 2221
SETVAR 2221
SHOWBITMAP 2223
SHOWFILE 2224
SOLVEBEFORESTOP 2224
SOLVERETURN 2225
SOLVETYPE 2225
STOPSURF 2229
SUB 2230
SURFTYPE 2230
SUSPENDUPDATES 2230
TELECENTRIC 2231
TESTPLATEFIT 2231
THIC 2231
TIMER 2232
TOLERANCE 2232
UNLOCKWINDOW 2233
UPDATE 2233
XDIFFIA 2235
ZBF2MAT 2236
ZBFCLR 2236
ZBFMULT 2237
ZBFPROPERTIES 2237
ZBFREAD 2238
ZBFRESAMPLE 2239
ZBFSHOW 2240
ZBFTILT 2241
ZBFWRITE 2242
ZRD2MAT 2242
ZRDAPPEND 2243
ZRDFILTER 2243
ZRDPLAYBACK 2244
ZRDSAVERAYS 2244
ZRDSUM 2245
C# 2266
C++ 2267
MATLAB 2268
Python 2269
Iwavelength 2298
Analysis 2310
ISurfaceTypeSettings 2321
ILDECoatingSettings 2328
IobjectTypeSettings 2333
Initializing Local Variables to Access User Analysis Data and Settings 2363
IRayTraceNormUnpolData 2375
IRayTraceDirectUnpolData 2377
IRayTraceNormPolData 2378
IRayTraceDirectPolData 2379
IRayTraceNSCData 2380
About 2410
Knowledgebase 2421
Apodization 2432
Glasses 2438
NSC 2447
Radii 2450
Semi-Diameters 2452
Thicknesses 2454
Index 2461
This tab provides access to all of OpticStudio’s File Management capabilities for Non-
Sequential UI Mode.
The File tab contains all the file input/output functions, split into these groups:
The Lens File group contains all the normal Windows file management tasks like file opening,
saving etc. OpticStudio files are stored in .ZMX or .ZOS format files, along with associated .CFG
files that contain configuration settings, and .SES or .ZDA files that contain settings data for all
windows that were open at the time the file was saved. The .ZDA file contains saved analysis
data in addition to the settings information. The .SES file extension was used in older versions
of Zemax and OpticStudio, but is compatible with the current version.
The Archive group lets you create and open OpticStudio Archive files. These are stored in
.ZAR format, and contain all the files needed to open the file on another computer with
OpticStudio installed on it. All OpticStudio data, glass catalogs, coatings, CAD files, etc. files
used by the lens design are compressed into this single file so that you can easily make
backups of the design as it progresses through the design process, or transfer the design to
another machine.
The Project Directory group provides standard Windows file management functionality
tailored to the lens project files. For a complete description of the lens project feature, see
Convert to Lens Project.
The Export group provides access to all the export capabilities in OpticStudio, including
exporting to ZMX, STEP, IGES, SAT and STL format CAD files, and exporting to DXF and IGES
linework diagrams.
The Zemax Black Box feature allows you to encrypt a range of surfaces in the lens data
spreadsheet, which can be given to other OpticStudio users without revealing the details of the
design itself. This lets you give fully ray-traceable files to customers, or to other colleagues on
a need-to-know basis, that give exact results on ray trace but do not reveal the design
prescription.
The Export to Speos Lens System tool lets you create a reduced-order model of the current
optical system to be used in a Speos simulation. The generated model includes the relevant
parameters of the optical system to enable accurate optical sensor simulation in a realistic
environment.
The Export to PanDao tool creates a .JSON file for use by the PanDao toolset
(https://pandao.ch/), to help assess the impact of lens fabrication methods on cost and
performance.
The Convert group lets you convert between OpticStudio Sequential and Non-Sequential
Modes, and also converts various file formats (like .MAT Matlab®, .INT interferometer data and
.f3d OptiWave data) between original and OpticStudio formats. You can also save all you
project files to a project directory and package your system into an OpticsBuilder ZBD file.
The Explode group is used to explode CAD assemblies in various formats into individual parts
using the ZOF (Zemax Object Format) structure.
These provide the standard Windows file management functionality. The Open icon gives
access to the File Open dialog as well as the most recently used files list.
The Insert Lens Icon Inserts surface data from a previously stored lens data to the current lens
file.
New/Open/Save/Save As
The Lens File group provides standard Windows file management functionality.
New: Clear the existing design file and start a new one.
Open: Open any ZMX, ZOS, ZAR, ZPRJ, or ZBD file. This includes ZMX or ZOS which are set as
lens projects. The Open drop-down menu displays recently opened files.
Save: Save the design file with the current name, overwriting the older version.
Save As: Save a copy of the design with a new name, keeping the original file unchanged. You
can save a ZMX, ZOS, ZAR, or ZPRJ file. All OpticStudio lens data is stored in a ZMX or ZOS file
including lens project settings if the file is set as a lens project. Note that ZAR files include
catalog and user-defined data, and ZPRJ is specially designed to contain a lens project with all
the linked project files.
Insert Lens
This Lens File Group Tool is found only in Sequential UI Mode.
If “Ignore Object” is selected, the object thickness of the lens being inserted will be ignored.
If the lens is being inserted in mirror space, “Change Sign of Surface Geometry in Mirror Space”
will reverse the sign of radii and thicknesses for all inserted surfaces. If the lens is not being
inserted in mirror space, no change in sign will be performed even if “Change Sign of Surface
Geometry in Mirror Space” is checked.
The File Comparator accesses prescription data from two different files, or two configurations
of the same or different files, and compares the systems surface by surface. Format and
organization of the data categories is very similar to those of the Prescription Data report. A
common usage of the File Comparator is to assess how the prescription has changed before
and after optimization, or to compare versioned files. Note that the files selected for analysis
do not need to include the currently open lens file.
When opening the File Comparator, the files to be compared must be specified. Note that if
the same file is specified, the following warning is issued at the bottom of the settings dialogue
box “Warning: the same file/configuration has been selected for comparison.” If comparing
specific configurations within the file(s), the “Enable” switch under configuration can be
toggled to allow specification of the correct configuration.
Similar to the Settings menu in the Prescription Data report, particular data categories may be
selected or deselected from the list before comparison. Once the optical systems are
compared, each line of the report where a difference is found will be highlighted allowing
quick assessment of the data. If data is compared numerically, color-coding will be used to aid
visual perception.
Like other analyses, the file comparator allows you to save a new default configuration by
selecting “Save” with the desired options checked.
Archive Group
The main “lens” file in OpticStudio ends in the extension ZMX. However, many other files are
used to define critical data for the optical design. These files include glass and gradient index
data catalogs, coating data files, user defined aperture files, CAD format files, bulk and surface
This feature solves this data backup and restoration problem. The backup process gathers all
of the data and files used by the design, including all data and files used by any analysis
windows open at the time the backup archive is created, and stores the data in a single archival
file. The OpticStudio Archive format (ZAR) is a one-file solution to making a complete backup
of the optical design.
The archive works by storing a complete copy of each file the design uses in the ZAR file. The
original folder information is not stored, just the file type, name, and data. For example, the
ZAR will contain any AGF glass catalogs the design was using. When the design is restored
from the ZAR file, the AGF file will be created and placed in the current folder for glass
catalogs. This procedure allows the ZAR to be restored to another user’s machine that may
have different drive and folder names for the glass catalogs than the machine used to create
the ZAR was using.
Create Archive
OpticStudio handles two archive file formats (ZAR and ZPRJ). ZAR archives contain ZMX and
ZOS files that are not configured as OpticStudio lens projects, and ZPRJ archives contain lens
projects with all their linked files.
Select OK to start the archival process or Cancel to abort the archive. Select File Name to select
a different name for the archive file.
Note that the time it takes to create the archive file depends on how many files need to be
backed up, how large those files are, and whether data compression is applied. Most files used
by OpticStudio are modest in size, but some files, such as ZRDs, source ray DAT, and CAD files,
are potentially quite large. If any individual file exceeds 50.0 MB in size, OpticStudio will
prompt the user to decide if the file should still be placed in the archive file. Note that if “No” is
selected, the file WILL NOT be archived and cannot be restored from the archive file. In this
case, a separate backup must be made, as the file will not be stored in the archive.
Note that ZAR archives do not support some files that ZPRJ supports. For example, the ZAR
archive does not store individual part files associated with a CAD Assembly object (e.g., see
“CAD Assembly: Autodesk Inventor, Creo Parametric”). Using a ZPRJ archive for such files is
recommended, but before a ZPRJ archive can be generated, the file needs to be converted to a
lens project using the Convert to Lens Project feature. Otherwise, a separate backup of those
individual part files must be sent with the ZAR when providing a colleague with the archive file
containing a CAD Assembly object.
The Create Archive feature also supports optional data compression. This data compression is
applied to the archive to yield a smaller file size. Older versions of OpticStudio may not be able
to read these compressed files. Therefore, data compression may be disabled to provide
compatibility with older versions of OpticStudio if required. The data compression algorithm
used by OpticStudio is designed to be compatible with future versions of OpticStudio and
provides reasonably good compression with little overhead. However, the algorithm does not
generally provide the highest possible compression levels. Compression is not applied to ZRD
files, nor any mother files larger than 50.0 MB, as the compression time becomes unreasonably
long on these large files.
Load Archive
This feature loads a previously created archive file and supports ZAR and ZPRJ archive formats.
Depending on the file format, OpticStudio will open a tailored dialog box that handles either
the ZAR or the ZPRJ. When this feature is selected, OpticStudio prompts you to choose the file
to restore.
When a ZPRJ is selected, OpticStudio shows a different dialog box. This dialog box is shown
below.
To Folder: The master folder in which the archived files will be restored. The initial default
folder is the folder where the archive file is stored. However, any valid folder for which the user
has permission to read and write can be selected.
For ZAR files, this is the folder where the primary lens file (ZMX or ZOS), config file (CFG),
session file (*.ZDA), and any ray database (*.ZRD) files are stored. Most other files, such as glass
catalogs (*.AGF) and Dynamic Link Libraries (*.DLL) are stored in the folders the current
OpticStudio uses, as defined by the OpticStudio Folders options. This behavior can be changed
by activating the Extract All Files To Project Directory as described below.
For ZPRJ files, this is the folder to be used as the project directory folder by the lens project.
See Convert to Lens Project.
Extract All Files To Project Directory: This option is only shown when loading a ZAR archive
file. The ZAR content is converted to a lens project when this checkbox is active. The
accompanying files are stored in the folder selected in the “To Folder” field and are linked to
the ZMX or ZOS as project files. For more information on lens projects, see the Files In Use and
Additional Files below and Convert to Lens Project.
List Files: This option is only for the ZAR archive files. It opens a window listing all the files in
the ZAR archive, the file size, and the date. If the file is compressed, the compressed file size
but not the original file size is listed.
Existing Files: This feature tells OpticStudio what to do if the archive contains a file of the
same name as an existing file. The options are Overwrite All (the file in the archive file will
overwrite the existing file without warning or saving the old file), Skip All (the existing files will
be retained and the files in the archive file will be ignored), Prompt Every File (OpticStudio will
ask you whether to overwrite or skip every single file when a duplicate exists), and Prompt If
Different (OpticStudio prompts the user whether to overwrite or skip any file for which a file
with the same name and different contents already exists in the destination folder).
When the restoration is complete, press Close to close the dialog box. OpticStudio will then
immediately load the ZMX file that was just restored.
These two tabs only show when loading a ZPRJ archive file.
Files In Use Tab shows the files used by the lens project and are directly employed by
OpticStudio to perform related activities such as extracting glass properties. When restoring
the ZPRJ archive, files in use that have their file source set as “Project” will be saved in this
folder. Files with their file source set as “Root” will be saved as defined by the OpticStudio
Folders options.
Additional Files Tab shows manually linked files. An example of this tab can be seen below.
Note that these files cannot be restored to root and will always be restored to the project
directory folder. See Lens Project Settings for more information about how to link files
manually.
Collapse All: When clicking this button, all folders collapse, and files in the folders are not
shown.
Expand All: When clicking this button, all folders are expanded, and all files in the folders are
shown.
Set All Sources to Root: This option is only available in the Files In Use tab. When clicking this
button, all files have their file source set as “Root”.
Set All Sources to Project: This option is only available in the Files In Use tab. When clicking
this button, all files have their file source set as “Project”.
These provide standard Windows file management functionality tailored to the lens project
files.
The New Lens Project icon clears the existing design file and starts a new one with a Lens
Project Folder.
The Convert to Lens Project saves a copy of the lens project file with a new name, keeping
the original file unchanged.
The Lens Project Settings allows you to change where the project files are loaded from,
review/add/remove additional linked files and load project settings from other lens projects.
The Save Lens Project As icon saves a copy of the lens project file with a new name, keeping
the original file unchanged.
Save Lens Project As: Saves a copy of the lens project file with a new name, keeping the
original file unchanged. You can save the lens project as a ZMX or a ZOS file type. All the
project files linked to the lens project will be copied to the newly selected location. You can
customize the Lens Project Settings after saving.
When using this feature, you need to select the folder to be used as the project directory
folder. When the folder is selected, OpticStudio creates a copy of the current ZMX or ZOS file
as a new lens project and allows you to choose the Lens Project Settings before continuing.
Once you select the desired project settings, the files related to the project are saved in the
root or project folder following the chosen settings. If OpticStudio cannot find a file in the
project folder, it will look in the “Root” location specified in Folder.
Using an OpticStudio lens project makes tracking all the data related to a project easier. This
data can also be easily moved to another location or sent to other OpticStudio users using a
ZPRJ archive (See Create Archive).
The file types that are supported by the lens projects and their default location are listed in the
following table:
Note that some files that are not listed will be included. For example, merit function files (.MF)
used for tolerancing scripts are included in the lens project. Note that the MF files will only be
linked to the lens project when a tolerancing script refers to them. For unsupported MF files
that are not included automatically, you can add them manually using the additional files tab
in the Lens Project Settings window.
The Lens Project Settings allows you to change where the project files are loaded from,
review/add/remove additional linked files and load project settings from other lens projects.
When using this feature, OpticStudio opens the Lens Project Settings window that shows the
currently opened lens project file and the project directory folder. This window is also shown
when New Lens Project, Convert to Lens Project, and Save Lens Project As are used.
Files In Use tab shows the files used by the lens project and are directly employed by
OpticStudio to perform related activities such as extracting glass properties. In this tab, you
can select the location from where to load each supported file. Files with their file source set as
“Project” will be loaded from the project directory folder. Files with their file source set as
“Root” will be loaded from the root location as defined by the OpticStudio Folders options.
The file tree inside the Files in Use tab displays the loaded files and the folder from where they
are loaded. To see each file’s entire path, hover the pointer on the file’s name. OpticStudio will
display the file path in a tooltip.
It indicates that the file exists in the project directory and root folders but contains
the same data.
It indicates that the file exists in both locations but has different contents (Files do
not match) or is missing from the selected source.
The file source column includes a toggle to select and customize each file or folder loading
location. Note that the Toggle button will not overwrite files. It will copy the files to the Project
folder if needed. Any changes made to the settings will be effective once the user clicks on the
OK button.
Collapse All: When clicking this button, all folders collapse, and files in the folders are not
shown.
Expand All: When clicking this button, all folders are expanded, and all files in the folders are
shown.
Set All Sources to Root: This option is only available in the Files In Use tab. When clicking this
button, all files have their file source set as “Root”.
Set All Sources to Project: This option is only available in the Files In Use tab. When clicking
this button, all files have their file source set as “Project”.
Add Files: This option is only available in the Additional Files tab. When clicking this button,
you are prompted to select a file to link it to the project.
Load Project Settings from File: When clicking this button, OpticStudio prompts you to
select another lens project. It then copies the settings from the selected project to the open
project in OpticStudio.
OK: When clicking this button, OpticStudio applies and links the files as selected in the settings
and closes the window.
Cancel: When clicking this button, OpticStudio cancels any change made to the settings and
closes the window. The prior settings will be preserved.
Note that no files will be erased from the project directory folder when the settings are
changed. The files will just be unlinked or unloaded from the current file. You need to erase
these files if needed.
Export Group
These are the Export Group Tools in Sequential UI mode.
CAD Files
Exports the current lens data to a file as a collection of 3D solids in IGES, SAT, STEP, or STL
format.
The STL (Stereo Lithography Language) is particularly useful for sending OpticStudio designs
to 3D printing manufacturers.
Wavelength: The wavelength number to use for any traced rays to be exported.
Field: The field number to use for any traced rays to be exported.
Number of Rays: The number of rays to trace; the exact meaning depends upon the “Ray
Pattern”. When exporting to STL format, no rays are exported as STL does not support a line
entity.
Split NSC Rays, Scatter NSC Rays, Use Polarization: These settings only affect rays from
NSC sources. For more information, see the discussion on the similar controls described in
“NSC 3D Layout”.
Ray Pattern: Selects the type of ray set to export. This control is very similar to that defined for
the 3D layout plot. The solid beam option exports a solid volume representing the envelope of
the rays. The solid beam option is only available in sequential mode, and required the marginal
rays to be all traceable and unvignetted. The marginal rays may not form a caustic at any
surface. Solid beams are not generated for non-sequential surfaces. The number of rays must
be at least 8 to export a solid beam, and a smoother solid results if more rays are used.
Lens/Ray Layer: Selects the layers of the output file to place lens and ray data.
"All By File" will export all configurations, but each to a separate file name. The file name for
each configuration is the specified save file name (the save file name is selected after OK is
pressed) with the name "_config000x" appended to indicate the data is for configuration "x".
“All By Layer” will export all configurations, but each to a separate layer within the same file.
The first configuration will be placed in the layer specified by the lens layer and ray layer
settings. Subsequent configurations are placed in the lens and ray layers incremented by 1 for
each configuration. For example, if the lens layer is 1 and the ray layer is 10 and there are 3
configurations, then configuration 1 will have lens data in layer 1 and ray data in layer 10.
Configuration 2 will have lens and ray data in layers 2 and 11, and configuration 3 will have
lens and ray data in layers 3 and 12, respectively.
Note not all CAD software can read the layers information from the exported file. If layers are
not supported, use “All By Files” instead of “All By Layers.”
“All At Once” will export all configurations at once in a single layer. No attempt is made by
OpticStudio to avoid overlapping or redundant data export.
File Type: Selects the output file format type as one of STEP, IGES, SAT and STL formats.
Delete Vignetted: If checked, rays are not included in the data export if they will be vignetted
by any surface.
Surfaces As Solids: This control only applies to sequential surfaces, and not NSC surface
objects. If checked, surfaces on either side of a glass material will be combined to form a single
solid object, where possible. Not all OpticStudio surface types may be combined to form a
single solid. Both surfaces must have the same aperture shape to export surfaces as solids. For
example, both surfaces must have circular apertures, or both surfaces must have rectangular
apertures. If the aperture types do not match then the surfaces are exported as single surfaces.
Note that the first surface may not be the same as the last surface if this option is enabled. If it
is, OpticStudio will default to exporting the entire lens system. To export one lens, the first
surface should be the front surface and the last surface should be the back surface.
Export Dummy Surfaces: If checked, dummy surfaces will be exported. A dummy surface is a
surface that does not reflect or refract rays.
Dummy Thickness: The distance in lens units for the thickness of dummy surfaces if they are
automatically converted to solids. Both “Export Dummy Surfaces” and “Surfaces As Solids”
need to be checked for this control to have any effect.
Tolerance: The approximate accuracy of the exported objects in lens units. Smaller tolerances
yield more accurate representations at the expense of larger exported files and longer
computation times.
Spline Segments: The number of segments to use when spline entities are exported.
General Points to Note: The Initial Graphics Exchange Specification (IGES) is an American
National Standard whose intended purpose is to facilitate transfer of data between CAD
programs. OpticStudio currently supports version 5.3 of the IGES standard.
For more information on IGES, contact U.S. Product Data Association, P. O. Box 3310,
Gaithersburg, MD 20885-3310. The STEP format is AP203 as defined by ANS US PRO/IPO-200-
203-1994, also available from the U.S. Product Data Association.
l Lines: Lines are used to indicate the paths of rays traveling through the optical system.
Within GRIN media, rays are exported as a series of line entities. The STL format does
not support lines, so rays are not exported.
l Surfaces: Surfaces may be of arbitrary shape, including user defined surfaces and Com-
posite Surfaces; with any aperture shape OpticStudio supports, including user defined
apertures. Data for some types of surfaces (particularly aspheres and toroids) which are
exported as splines have an accuracy that depends on the number of spline points
used; more points yields more accuracy at the expense of larger, slower exported data
files. For more information on the limitations of the accuracy of the exported objects
see the discussion below.
l Lens Solid: Lens Solids include a non-zero volume enclosed by two surfaces, with the
edge region formed by the extrusion of the edges of the two surfaces. Most surfaces
surrounding glass with similar shaped apertures (e.g. both surfaces have rectangular
apertures) may be exported as solids.
l Faceted Solid: A Faceted Solid is defined by a collection of triangles that form a
volume, such as a prism or Fresnel lens. Non-sequential STL and POB objects, among
others, are exported as Faceted Solids.
l Parametric Solid: Some NSC objects, such as the Torus Volume, are exported as exact
solid NURBS objects.
OpticStudio can export the surface or solid data for all sequential surfaces and non-sequential
objects. OpticStudio exports all surfaces and rays in a 3D coordinate system referenced to the
global coordinate reference surface.
If exporting surfaces as solids, OpticStudio will export sequential dummy surfaces as thin
solids. The front and back face will be of the shape of the surface, with a thickness equal to the
dummy thickness in lens units. Mirror surfaces are exported according to the settings for the
mirror substrate.
STL is a faceted format, and all STL surfaces or objects are exported as faceted approximations.
This feature will prompt for the file name and path to save the exported data to. The default
file path is the Objects folder, as specified in the Folders section of the OpticStudio
Preferences.
OpticStudio supports many types of complex surface and object shapes. Within OpticStudio,
these shapes are modeled exactly, yielding the very high numerical precision required for
optical ray trace analysis. However, most of the complex optical shapes OpticStudio supports
have no analog in commonly used CAD programs, and no exact representation in common
CAD file formats such as IGES, STEP, and SAT.
For this reason, OpticStudio must approximate the exact surface shape with the closest
available analog within the CAD format. This approximation is usually very good, but for some
extremely precise aspheric surface shapes, the approximation is not sufficiently accurate for ray
tracing. This is not a limitation of OpticStudio. This is a limitation of the CAD data exchange
format and the CAD programs OpticStudio is being asked to export data to. In these rare
cases, it may be necessary to recreate the complex geometry within the CAD program directly
rather than use the OpticStudio export capability.
For systems with surface apertures, please note that the export of user defined apertures
(UDAs) must be verified for the following reasons:
l The accuracy to which the aperture is defined is important to have a successful CAD
export. Ensure the aperture boundary shape is correctly formed. For instance, user
defined apertures that contain ARC commands where points need to meet up should
be particularly checked. OpticStudio cannot tell what the precision requirements are for
CAD export as it relates to CAD libraries.
l Some aperture shapes may not be exported. For instance, Spider Obscurations are not
currently supported.
There is always the possibility that the conversion from the OpticStudio representation of
surfaces and objects to the CAD file format representation will cause a loss of precision.
Point Cloud
Settings:
DXF/IGES Linework
The Export CAD feature should be used unless there is a compelling need for these older
formats.
Export 2D DXF
Exports the current lens data as a 2D DXF format file. Only available for spherical symmetric
lenses.
Wavelength: The wavelength number to use for any traced rays to be exported.
Number of Rays: The number of rays to trace and include in the export.
Delete Vignetted: If checked, rays are not included in the data export if they will be vignetted
by any surface.
Marginal and Chief Only: Draws only the marginal and chief rays, overriding the other ray
settings.
This feature will prompt for the file name and path to save the exported data to. The default
file is EXPORT.DXF in the <objects>\CAD Files folder. The output will be in DXF format no
matter what extension is chosen.
Export 3D DXF
Exports the current lens data as a 3D DXF format file. This feature is similar to the 2D DXF
export feature described in the previous section. The key difference is that the 3D DXF
supports systems that are not rotationally symmetric.
Wavelength: The wavelength number to use for any traced rays to be exported.
Field: The field number to use for any traced rays to be exported.
Radial Segments: The number of radial segments used to approximate the lens shapes.
Larger numbers require more processing time.
Angular Segments: The number of angular segments used to approximate the lens shapes.
Larger numbers require more processing time.
Delete Vignetted: If checked, rays are not included in the data export if they will be vignetted
by any surface.
Exports the current lens data as an IGES line work format file
Wavelength: The wavelength number to use for any traced rays to be exported.
Field: The field number to use for any traced rays to be exported.
Number of Rays: The number of rays to trace; the exact meaning depends upon the "Ray
Pattern".
Ray Pattern: Selects the type of ray set to export. This control is very similar to that defined for
the 3D layout plot.
Lens/Ray Layer: Selects the layers of the output file to place lens and ray data.
Spline Segments: The number of segments to use when spline entities are exported.
OpticStudio exports lines, spherical arcs, and splines to represent the shape and position of
each surface. OpticStudio does not export the "edge" of the lens, and makes no distinction
between dummy surfaces, glass surfaces, and mirrors.
This feature exports data from one or more surfaces in the Lens Data Editor into a “black box”
file. The file can then be later applied to a Black Box surface to be reimported into OpticStudio
without revealing the details of the design.
Create and load...: If this option is checked, the current file will be modified to use the newly
created Black Box file. Use of this option is highly recommended to confirm the Black Box
reproduces the desired analysis data.
Optical designers may under certain circumstances be hesitant to divulge the details of their
optical designs. This is especially true when significant time and cost is involved in creating the
design, and the designer may not be compensated for the work until the end customer has
verified the design will perform as specified. This creates a dilemma, because sending the
complete ZMX file to a customer allows the customer to verify the design performance, but
also reveals in full detail the design itself. This feature is designed to satisfy the needs of both
the designer and the end customer in these circumstances.
A Zemax Black Box is an encrypted file that contains the prescription data for a range of
surfaces. The file contains most all of the data OpticStudio normally associates with a surface,
including the radius, thickness, aperture, coordinate, dispersion, and parameter. The file is
created by the original designer that holds the intellectual property rights. The file is then sent,
usually as part of a complete “playback” OpticStudio lens file, to the end customer. The
encrypted data appears as a “black box” in the Lens Data Editor. Rays go in, and the rays come
out, exactly as if the original surfaces and design data were present in the Lens Data Editor.
However, the detailed data is actually hidden inside the Black Box, and the user cannot review
or modify any of the data contained within the hidden Black Box section.
To create a Black Box file, highlight the desired range of surfaces in the Lens Data Editor, and
then select the Export Black Box icon in the Export group of the File Tab. The surface range may
also be selected from the Export Black Box Data dialog control directly. The only other option
is a check box to “Create and load test file after black box export”.
Use of this latter option is highly recommended, as it allows confirmation that the Black Box was
created properly and yields the identical ray tracing and analysis results. The “Create” option
will create a test lens file with the same name as the original file, except the letters “_BB” are
appended to the end of the name. If a file with the same name as the test file already exists, it
will be automatically overwritten. The black box data itself is created in a file with the extension
ZBB, and this file is placed in the folder <data>\BlackBoxes. This newly created file will be
referenced on the Black Box Lens surface in the Lens Data Editor, and will replace the original
surface data in the editors. The name of the Black Box file may not exceed 32 characters,
including the .ZBB extension.
Once the Black Box and test playback file are created, it is recommended that the archive
feature be used to make a single archival file that can be sent to the end user. See Create
Archive
For more information on the Black Box surface, see Black Box Lens.
The black box is drawn on layout plots as a cylinder with a radial aperture defined by the clear
semi-diameter or semi-diameter of the first surface in the selected range of surfaces when the
black box was created, or by the largest radial aperture of any surfaces within the selected
range, whichever is larger. The length of the black box as drawn is equal to the sum of the
lengths of the surfaces within the selected range.
There are some restrictions on the type of data that may be exported to a Black Box file:
l Neither the first nor the last surface of the specified range may be ignored.
l If the first surface follows an even number of mirrors, so must the last surface. If the first
surface follows an odd number of mirrors, so must the last surface. Neither the first nor
the last surface may be mirrors. The range of surfaces may be intended to be used in a
mirror space or not, however, the playback will only work if the file is properly set up
after either an even or odd number of mirrors as was the set up for the original file. In
particular, tools that automatically add mirrors to the system (Add Fold Mirror and
Make Double Pass) should not be used with a Black Box Lens as they will generate incor-
rect results without an error message.
l Coordinate Break surfaces and surface tilts and decenters are permitted, however the
last surface must be oriented in the same coordinate system as the first. This means the
local X, Y, and Z axis of the first and last surfaces must all be parallel, and the X and Y
decenters must be zero (both limits are tested to a fine tolerance set internally by
OpticStudio).
l Not all surface types are supported. Nonsequential, Birefringent, Paraxial, and surfaces
that use external data, such as user defined DLL surfaces and grid sag surfaces, and a
few other special surface types are not supported. If a need arises for a surface type
that is not supported, contact technical support for assistance.
l The stop cannot be placed in between the first and the last surfaces, although the stop
may be either of these surfaces. To export lens data on either side of the stop surface,
use two (or more) Black Boxes. Any number of Black Box Lens surfaces may be used in
the playback system.
l If any coatings are applied to the surfaces within the Black Box, they must be either
standard coatings with no tapers, or encrypted coatings (see “Export Encrypted Coat-
ing” on page 283). No ideal or table coatings are supported. The export to Black Box
feature will automatically convert all non-encrypted coatings to encrypted coatings.
The encryption is based upon a 256-bit algorithm. The user should determine if the encryption
implemented provides adequate security for the intended application before distributing
sensitive data in the encrypted format.
This feature exports a single coating to a Zemax Encrypted Coating (ZEC) file
File Name: The name of the file to create. The file name should not include any path or
extension. The file will be created in the current coating file folder and the extension “ZEC” will
be automatically appended.
Convert to Absolute Thickness: Converts optical thickness defined relative to the primary
wavelength (for example, a quarter wave thickness) in the coating to absolute thickness. For
maximum security, this option should be selected. If the relative optical thickness is left in the
coating definition, then the end user of the encrypted coating may be able to determine some
properties of the coating by changing the design wavelength. The conversion from thickness
If the coating to be exported has its layers defined in absolute thicknesses, then “Wavelength”
field and “Convert to Absolute Thickness” check box has no effect.
Optical coating designers and manufacturers are often hesitant to divulge the details of their
coating designs. This feature allows a coating defined in OpticStudio format to be exported to
a single file that is encrypted. The encrypted file may be distributed to users that need to trace
rays and perform analysis on the coating as applied to a specific optical system, without the
details of the coating design being revealed.
The coating data that is exported includes all the material, index, extinction, dispersion, and
layer data required to exactly reproduce the coating performance. No approximations or
tables are used. However, no coating tapers, ideal coatings, or table coatings are supported. A
maximum of 12 different materials and 400 layers may be used in defining the coating to be
exported.
To use an encrypted coating file, see “The ENCRYPTED data section” in the Coating File
description.
The encryption is based upon a 256-bit algorithm. The user should determine if the encryption
implemented provides adequate security for the intended application before distributing
sensitive data in the encrypted format.
Settings:
Sensor Width and Sensor Height These inputs are given in Millimeters. The default is 2*sqrt
((SemiDiamImage^2)/2)*.
Skip System Reversal When the checkbox is selected, the exporter will generate the reduced-
order model but will skip the required reversal of the system. This option is provided to be able
to evaluate systems that do not reverse correctly when the automated reversal is performed by
the exporter.
Sample points Number of sample points in the image space to generate the data.
Number of rays Specifies the rays that will be used to compute the parameters being
transferred to Speos. The default is 2,000 rays.
Configuration Selects an available configuration from the drop-down menu for multi-config
operands to modify the reversed system, the configuration selected will be the configuration
exported to Speos.
Errors
Failed to reverse system – A warning is displayed in the text field when the system fails to
reverse: “Lens adjustments were unsuccessful. Aborting computation (press the help button for
additional help)”. Suggest manually reversing the system.
Discussion:
The Sensor Map Visualization shows the X-Y cartesian axis labeled in lens units (the case lens
units = mm is shown). The image surface is shown with aradius equal to the image clear semi-
diameter. If another aperture is defined in the lens data editor for the image surface the graph
should update accordingly.
After running the tool, the text field displays the computed quantities. The output reports
timing, points being computed in (x, y) coordinates, pupil vector, pupil radius, focus distance
for the respective pupil, optical system efficiency for the given pupil, and ray divergence.
When the tool successfully completes the calculation, a file dialog is opened for the Speos
distortion file to be saved to disk. The file extension is .OPTDistortion.
To successfully generate the reduced-order model of the optical system, the system must ray
trace in reverse. The exporter includes an automatic system reversal to allow OpticStudio to
propagate rays from image to object.
For example, the double gauss sample file before the automatic reversal looks like this:
When manually reversing the systems, some of the automatic features used in the process may
return unexpected results due to their individual limitations. Therefore, it is recommended to
ensure that the steps produce the correct results. The recommended steps to reverse the
system are the following:
1. If the file has multiple configurations, the desired configuration needs to be isolated.
3. Manually set every surface with a fixed Radius, Thickness, Semi-Diameter, and Mech
Semi-Diameter if the Design Lockdown failed to set the values to fix values.
4. Copy the thickness from the surface preceding the image to the object. Note that
OpticStudio might return an error related to the inability to find coordinates. This error
6. (Optional) Add comment "Image - 1" to the surface before the image for later
comparison. This is because the image surface is not included in the next step, and the
object surface will act as the image surface.
7. Run the "Reverse Elements" tool from surface 1 to the surface preceding the image.
a. Duplicate the STOP (penultimate) surface. The system should have two identical
surfaces, with the first one being the STOP.
b. Set the thickness of the STOP to zero to locate the two identical surfaces at the
same position.
c. Set the Clear and Mech Semi-Diameter solves of the second one of these
surfaces (the penultimate surface now, which should not be the system STOP)
to automatic.
10. Remove the image surface by copying all properties of the penultimate surface onto
the image and then delete the penultimate surface.
12. Open the field editor and run the "Delete all fields" from the toolbar.
14. Use the field wizard to generate the desired fields using the image clear semi-diameter
annotated in step 5 as the maximum field. At this point, there should be no errors. If
there are any address them to ensure the OpticStudio can trace rays.
After following this process, the exporter can run with the "skip system reversal" checkbox
active. The default sensor size will be derived from the maximum field value and can be
changed manually.
Export to PanDao
This Export Group tool is in Sequential UI Mode only.
To use the tool, the user must first populate the Tolerance Data Editor in the targeted .ZMX or
.ZOS file. Then the user runs the tool and selects the .ZMX or .ZOS file. Data from the TDE and
the LDE are read from the optical model. The tool then creates a folder with the name
PanDaoJson_zmxfilename_zmx or PanDaoJson_zosfilename_zos, located in the same folder as
the optical model. A text file containing any warnings is created, and a .JSON file that contains
the surface and tolerance information. The .JSON file can be inspected with any text editor.
This tool currently supports on-axis systems that use Standard surfaces that are spherical (the
conic constant must be zero), Even Asphere, Extended Asphere, and Extended Odd Asphere
surface types. Both refractive and reflective surfaces are supported.
For most cases, the Tolerancing Wizard will populate all of the tolerance data needed for the
.JSON file, with the exception of the TSDI operand governing the tolerance on the semi-
diameter. Users should add TSDI operands to the Tolerance Data Editor manually before
running the Export to PanDao tool.
Convert Group
This group gives access to the Convert to NSC Group tool, the Prepare for OpticsBuilder tool
and various file conversion utilities.
Critical Rayset Generator: See “Critical Rayset Generator” for more information.
First Surface: This is the first surface of the lens group to be converted to non-sequential
components.
Ignore errors and convert as much as possible: If checked, the conversion will not stop even
if errors or limitations in the conversion process are detected. This switch is useful because
often the majority of a system may be converted properly even though a small portion of the
system cannot be converted.
Convert file to non-sequential mode:: If checked, the selected range of surfaces will be
converted into a “pure” non- sequential file.
Add Sources & Detectors:: If checked, Source objects and Detector objects will be
automatically added to the non-sequential file to represent the sequential source rays and
Image surface. The sequential fields defined in the Field Data Editor will be converted into
non-sequential Source objects. Each Source will have its own detector, centered about that
field’s centroid at the image plane. Note that this setting will automatically convert all surfaces
in the Lens Data Editor.
Save New System As… (Retain your Original File: When the system is converted to non-
sequential mode, it can be saved under a new file name. Otherwise, the current file will be
overwritten in memory with the newly converted non-sequential data and if the new file is
saved, then the old file will be overwritten on disk and cannot be restored. The default file
path is “<the current file name>-NONSEQ.zmx”. This default location is the same as the
currently open file.
1. First a Non-Sequential Component surface and a dummy exit port surface are inserted.
The exit port is positioned to coincide with the last surface in the defined range.
2. The range of surfaces is converted into either the corresponding NSC surface objects
(for standalone surfaces and mirrors with zero substrate thickness) or NSC objects (for
pairs of surfaces with a material between, or mirrors with non-zero substrate thickness).
3. Coordinate breaks are replaced with null objects with equivalent rotations; and sub-
sequent objects will reference the null objects.
4. The original surfaces are then deleted.
a. For focal systems with a flat image plane, each field point’s Detector Rectangle
lies in the same XY plane (assuming the Z axis is the optical axis). For most sys-
tems, these Detector Rectangles are small and separated in X & Y so that the
Detector Rectangles do not overlap. If the Detectors do overlap, then the nest-
ing rule will be followed (See “Object Placement”) and some detectors may not
see all of the rays. In this case, the user will need to manually adjust the loc-
ations of the detectors, most likely along the optical axis, such that the detect-
ors are separated by more than the “Glue Distance” in the System Explorer.
b. Although curved IMAGE surfaces are not converted into curved detectors, the
positions of the Detector Rectangles are calculated using the surface sag and
normal angles at the centroid of each field.
c. When “Afocal Image Space” is checked-on in the System Explorer, we assume
that the rays are nearly collimated at the IMAGE surface in the Lens Data Editor.
This typically means that the RMS spot size (in um) is large, so the Detector Rect-
angles for each field point will also be large, and thus are likely to overlap.
Therefore, Detector Rectangles for Afocal systems will be offset slightly along
the optical axis, by values just larger than the “Glue Distance” in the System
Explorer. This offset should not significantly change the results if the rays are
nearly collimated.
8. A Detector Color is also added, and is located slightly after the Detector Rectangle(s). It
is offset by a distance just larger than the “Glue Distance” in the System Explorer. The
size of the Detector Color is determined by the default display width of the sequential
Full Field Spot Diagram analysis.
9. For focal systems at finite conjugates (where the OBJECT is not at infinity), an inactive
Source DLL “Lambertian Overfill” and a Slide object are also inserted just before the
field point Source Ellipses. The Source DLL and Slide object can be used to test the ima-
ging quality of the system:
a. The sizes of the Source DLL and Slide object are determined by the Clear Semi-
Diameter of the OBJECT surface in the Lens Data Editor.
b. The Source DLL “Lambertian Overfill” will overfill the first aperture of the sequen-
tial system with a Lambertian distribution. The distance from the Source DLL to
10. If the IMAGE surface in the Lens Data Editor has a Material defined, then an additional
object is added to the non-sequential file, which starts at the location of the sequential
IMAGE surface. The back face of this object is not defined (because the IMAGE surface
is always the last surface in the LDE), so the radius and clear aperture of the back face
are picked up from the front face, and the thickness is 1 lens unit.
a. With this additional object representing the material after the IMAGE surface,
placement of the Detector Color becomes ambiguous. Therefore, if the IMAGE
surface has a Material defined, then the sequential file will be converted to non-
sequential mode without the Source DLL, Slide Object, and Color Detector.
11. Note that unless the “Save New System As…” box is checked on; the converted non-
sequential file will overwrite the current sequential file. This action cannot be undone.
The feature may not work correctly in all cases. Some additional dummy surfaces with small
spacings may need to be inserted prior to and after the range of lens surfaces to be converted.
See the next section for more information about the exceptions and restrictions for the
Convert to NSC Group feature.
Surface types
l Biconic
l Biconic Zernike
l Binary 2
l Coordinate Break
l Diffraction Grating
l Even Asphere
l Extended Asphere
l Extended Odd Asphere
l Extended Polynomial
l Fresnel
l Grid Sag
l Hologram 1
l Hologram 2
l Odd Asphere
l Off-Axis Conic Freeform
l Paraxial
l Paraxial XY
l Polynomial
l Q-type Asphere
l Slide
l Standard
l Toroidal
l Toroidal Hologram
l Zernike Standard Sag
2. All other surface types will be converted to a non-sequential Grid Sag Surface object.
See “Grid Sag Surface” for more information about this object. The surface sag is auto-
sampled at 64x64 grid points and converted into a .GRD file in the user data folder
<…\Zemax\Objects\Grid Files>.
3. Some of the supported surfaces include parameters which are not supported in their
otherwise equivalent non-sequential surface. If these parameters are used, then the
sequential surface will be converted to a non-sequential Grid Sag Surface object. For
example, if Zernike terms are used in a sequential Toroidal surface, it will be converted
to a non-sequential Grid Sag Surface object.
4. For pairs of sequential surfaces that define the front and back of a lens:
a. If the substrate thickness is zero (defined in the Surface Properties > Draw dia-
log, as shown in the following image) OpticStudio will convert the mirror sur-
face into the equivalent non-sequential surface object. Standard, Toroidal, Even
Asphere, Biconic, and Biconic Zernike surfaces are supported.
b. When the substrate thickness is greater than 0, the same surfaces described in
points 1-3 are supported. OpticStudio will convert the mirror to a Compound
Lens object, with the thickness equal to the substrate thickness. If the Mirror
Substrate is flat, the back of the mirror will be represented with a flat Standard
Surface object. If the Mirror Substrate is curved, the back surface of the Com-
pound Lens object will be the same surface type as the front surface. The See
“Compound Lens” for more information about.
c. The back face of the Off-axis Mirror object is an on-axis spherical surface, with
zero Conic constant and the same radius of curvature as the front face, by
default. Therefore when converting to NSC group, the thickness value of the
For a diffractive surface having a MIRROR material, if the substrate thickness is zero
(defined in the Surface Properties > Draw dialog, as shown in the image above), after
conversion the Thickness of the equivalent non-sequential object will be set to 0.02
mm. If the substrate thickness is greater than 0, after the conversion this value will be
used as Thickness parameter of the equivalent non-sequential object.
7. All coordinate break surfaces must be between elements, in “air” and not embedded
within the lenses. This is the normal condition of use.
8. The surface prior to the first surface and the last surface in the selected range must
both be made of “air” with unity index.
9. The stop must precede the first surface. This restriction is removed if the “Convert file
to non-sequential mode” box is checked.
10. Curved Image surfaces are not automatically converted into curved detectors. See the
section “Converting sequential surfaces to non-sequential objects” for more inform-
ation about how detectors are inserted.
Apertures
1. The following sequential surface apertures (defined in the Surface Properties > Aper-
ture dialog) are supported in the Convert to NSC tool. These apertures will be auto-
matically converted to an equivalent non-sequential surface aperture:
l Circular
l Rectangular
l Elliptical
l User-defined
2. Surfaces in non-sequential mode cannot have apertures that extend beyond the semi-
diameter of the surface. If the aperture of a sequential surface extends over its defined
semi-diameter, the conversion of the surface will not be successful, and an error mes-
sage will be displayed.
a. The aperture on the front surface will also define the aperture on the back sur-
face in condition that the aperture type is defined as Elliptical, Rectangular or
User-defined.
b. If the front surface contains a circular or rectangular aperture, the aperture val-
ues will be converted into the parameters of a Rectangular Volume object to
trim the non-sequential Compound Lens object with the help of Boolean Nat-
ive. See Compound Lens, Rectangular Volume, and Boolean Native for more
information.
c. If the front surface contains a decentered circular, elliptical or rectangular aper-
ture, in addition to the Compound Lens object, the converter will also insert a
decentered Cylinder Volume object, Elliptical Volume object or Rectangular
Volume object with a Boolean Native object to trim the lens to the specified
aperture. See Cylinder Volume, Elliptical Volume, Rectangular Volume, and
Boolean Native for more information.
d. If the front surface contains a circular aperture with a non-zero minimum radius,
the converter will insert an additional Cylinder Volume object to remove the
central volume with a Boolean Native object. See Cylinder Volume and Boolean
Native for more information.
e. If the front surface contains a user-defined aperture (UDA), the converter will
insert one Extruded object as well as one Boolean Native object to trim the lens
to specified aperture. To get a proper non-sequential Boolean Native object
with a UDA, make sure to use an Aperture Pickup on the second surface in the
Lens Data Editor. See Extruded, Boolean Native, and Cylinder Volume for more
information about these objects.
f. Conversion of parameters:
If the front surface contains a Circular Aperture, the aperture value (maximum
radius) defined in aperture dialog (Surface Properties > Aperture dialog) will be
converted into the value of Front Clear Semi-diameter of the non-sequential
Compound Lens, regardless of the value of the Semi-Diameter in the Lens Data
Editor. The sum of Chip Zone and Semi-Diameter (or Maximum Radius if a
There are times when the ray trace results after conversion will not yield the same results as in
sequential mode. The possible explanations for this include the following:
l Some rays may not trace the same inside a non-sequential group if some of the sur-
faces have central obscurations or annular apertures. This is likely to occur in tele-
scopes with obscured apertures. In the non-sequential representation, the chief ray will
either not make it through the group or may take a radically different path.
l Rays that are exactly at the edge of a sequential surface may miss the surface, or strike
the outer cylinder wall of a lens, in the non-sequential trace. For this reason, OpticStu-
dio adds a very small increase in the diameter of each surface when converting to a
NSC group.
l For systems with concave surfaces at the ends of the selected range, the edges of the
surface may fall outside of the entry and/or exit ports, which will cause ray tracing
errors. The solution is to manually edit the entry/exit port locations, or, insert dummy
surfaces before and after the selected range prior to conversion.
l The layout rays from non-sequential Source objects are not displayed in the same sys-
tematic manner as sequential layout rays. For example, tracing 3 non-sequential layout
rays will not necessarily trace a chief ray and two marginal rays. To compare a non-
sequential Layout (or Shaded Model) to a sequential Layout, change the Ray Pattern to
“Random” in the sequential Layout settings.
l AICN
l CONN
l COTN
l CPCN
l CRVT
l CWGT
l GLSS
l LTTL
l MCSD
l MOFF
l MTFU
l NCOM
l NGLS
l NPAR
l NPOS
l NPRO
l PRAM
l PRWV
l SDIA
l SWCN
l TEMP
l THIC
l WAVE
l WLWT
All unconverted operands will be replaced by a MOFF operand and a brief description of the
unconverted operand will automatically be inserted. Sources and Detectors will be positioned
with several NPOS and NPAR to ensure that the Source Ellipse is properly placed for each field
and the Detector Rectangle and the Detector Color are properly placed for each image
location. The Detector Rectangle will be placed at the centroid of the spot while the Detector
l CMCO
l COMM
l SAVE
l SEED
l STAT
l TABB
l TEDX
l TEDY
l TETX
l TETY
l TETZ
l TIND
l TMCO
l TNPA
l TNPS
l TOFF
l TRAD
l TSDX
l TSDY
l TSTX
l TSTY
l TTHI
All unconverted operands will be replaced by a TOFF operand and a brief description of the
unconverted operand. Note that some common tolerancing capabilities in sequential mode
have no equivalent capabilities or operands in non-sequential mode, such as modeling surface
tilts or surface irregularity. Therefore, non-sequential mode cannot tolerance on element
wedge or surface irregularity via a Zernike profile. Any flat surfaces with a TFRN operand will
need to be manually converted to the appropriate radius tolerance. Only mirror surface or
singlet tilts/decenters are currently supported with the conversion tool; any tilts/decenters for
elements with more than 1 element will need to be manually adjusted in the NSCE with the
appropriate Ref Object and pickups.
There are some sequential operands will not be applicable after the conversion to non-
sequential mode. For example, a sequential system that contains a Grid Sag surface with
Zernike terms can be successfully converted to non-sequential mode, but OpticStudio changes
the surface representation during the conversion. The surface will be resampled and converted
The Prepare for OpticsBuilder tool is used to package an OpticStudio system into a ZBD file
that may be opened in OpticsBuilder. For more information on this file format, see the section
"Save .ZBD File".
In order to properly convert the optical system, the Prepare for OpticsBuilder tool includes the
ability to:
l Convert a file from Sequential to Non-Sequential Mode. For this purpose, Prepare for
OpticsBuilder will:
The Stop mechanical half-width box works with both Circular and Rectangular aperture. If the
surface properties aperture type is set to "none" or Circular Aperture, the box will inherit the
value of the Mechanical Semi-Diameter, if the corresponding solve is set to Fixed. If the
Mechanical Semi-Diameter is not fixed, the value will be set to the Semi-Diameter value +.01
lens units. See "Convert to NSC Group" on page 107 for additional usage.
If the surface properties aperture type is set to Rectangular Aperture, the box will inherit the
largest value of the Aperture X and Y half-width values +.01 lens units
The addition of the Status tab shows a log of events to help with error handling when
preparing the files for use with OpticsBuilder.
The Prepare for OpticsBuilder tool will accept focal and afocal systems.
Prepare for OpticsBuilder will make a copy of the initial sequential file. In the copy, the Design
Lockdown tool will be run with the default settings. The alterations performed by this tool are
listed in the Help System file "Design Lockdown". Next, a Critical Rayset will be generated
using the Critical Rayset Generator and the file will be converted to Non-Sequential Mode
using the Convert to NSC Group tool. The steps for conversion (and any restrictions on surface
types) may be found in the Help System file "Convert to NSC Group".
Once complete, this copied file will be compared to the original through the following steps:
1. The rotation and offset matrices of the sequential file will be pulled from the Pre-
scription Data report and compared to the location data in the Non-Sequential Com-
ponent Editor of the converted file.
2. A ray trace will be performed in the non-sequential file one field at a time. Each ray
trace will have 10,000 analysis rays and will use the settings described in the User
Inputs section.
3. The ray trace results will be compared to the spot size data from the sequential file. This
data will be pulled from the Geometric Image Analysis tool. The Geometric Image Ana-
lysis tool will have the following settings:
Next, a ray trace will be performed in the copied file. The results will be used as a baseline
reference in OpticsBuilder. The other User Inputs will be stored to the ZBD file as described in
"Save .ZBD File".
User Inputs
Use the User Inputs section to declare how much variation will be allowed from the nominal
system performance. These inputs will be used to compare the performance of the lens file to
the ZBD after conversion (and before passing the system on to OpticsBuilder). These inputs will
also be used as reference in Creo as performance targets for the mechanical engineer.
File Loading: Select the settings for the non-sequential ray trace. This ray trace will be stored
in the ZBD file and loaded into Creo. If the Read-only checkbox is selected the ZBD file cannot
be edited using OpticsBuilder, however changes can be made using CAD tools. If the Convert
STOP Surface to Hard Aperture checkbox is selected then the Stop surface, as chosen in the
Lens Data Editor, will be converted to an Annulus object. For more information on the Analyse
with checkboxes, see Scattering and Ray Splitting.
Allowable Deltas: Choose the number of analysis rays used during the preparation process.
Select the amount of change that is allowed for the spot size in μm. Some typical causes of
spot size change are listed in "Conversion errors". Select the amount of beam clipping that is
acceptable. Beam clipping represents an acceptable amount of energy loss that may derive
from adding mechanical packaging. Finally, select the amount of acceptable image
Component Support: Choose which CAD software the ZBD file will be loaded into.
Geometric MTF: Choose whether to include MTF data in the ZBD file output. Select the
maximum frequency sampled. If converting from Sequential Mode you can also select the
number of sampling points.
Critical Ray Trace: Choose the amount of allowable change in the location and angle of the
critical rays. Position Tolerance represents the maximum allowed difference between a ray's
landing position in the original file, and in the copied file. The position is given in lens units.
The Angle Tolerance will represent the maximum allowed angle between the target ray's
vector, and the actual ray's vector. This is given in degrees.
Prepare: This button will start the process for converting the file into a ZBD format.
Open Non-Sequential File: This button will appear when the conversion fails or is terminated.
This will open the non-sequential version of the file for review.
More: In this section, the criterion for the conversion may be observed. Here, the field-by-field
spot size may be graphically compared between the original file and the converted file.
Additionally, and objects that were not able to be converted will be listed under "Object
Diagnostic".
Drawing Inputs
The values within the Drawing Inputs tab will be used to populate lens drawings in the
accompanying CAD program, as created when Generate Lens Drawings is selected in
OpticsBuilder. Each lens surface pair is represented by a labeled tab at the top of the screen. If
an element type is chosen to be anything other than "singlet", a tab is created after that
element to specify the cement properties.
Note: You will not receive an error if a "singlet" is declared to be something else, such as a
"doublet" or "triplet". If there is an air gap, it will be displayed as such in the drawing creation.
The accompanying ISO 10110 table will show the "doublet" or "triplet" parameter layout.
For sequential models, some data will be pre-populated from the Lens and Tolerance Data
Editors. Other data fields must be entered manually.
For non-sequential models, some data for Standard and Even Asphere lenses will be pre-
populated from the Non-Sequential Component Editor.
The ZBD file will be finalized and saved at this step. The Save button must be clicked here to
retain the ZBD file.
A ZBD file may be opened in OpticStudio 20.1 or newer, and in OpticsBuilder. When the ZBD
file is opened in OpticStudio, a ZAR containing the non-sequential model will be displayed.
The ZBD file will store the following information:
Conversion errors
After clicking Prepare in the User Inputs section of the tool, Prepare for OpticsBuilder may
report a failure in the conversion. This gives the engineer a chance to update the file and fix
any problems before passing it along. There are five error messages that may be displayed:
Under User Inputs, the "Allowable Delta" section allows for a specification of allowable
changes to the spot size. If there is a change in spot size that is larger than the value set by the
user, then this error will appear. There are several reasons why the spot size may vary following
a conversion, including:
l A ray trace performed in Sequential Mode is not the same as a ray trace performed in
Non-Sequential Mode. There will be some noise in the results between the two modes.
l The Design Lockdown portion of the conversion may have generated hard apertures
that are causing the beam to be clipped.
l The detector may have been misplaced when the system was converted to Non-
Sequential Mode
l If the system is very large, then the spot size delta will need to be larger. The delta is
given in um, but if the system is on the order of meters, a delta value of "1" is much too
small.
Generally, this error can be overcome by increasing the spot size delta. If that does not work,
try to run a Design Lockdown by-hand, outside of the Prepare for OpticsBuilder tool. Observe
how the system changes.
Note: This issue may appear more frequently for afocal systems. In those cases, the spot size
delta will need to be much larger. Typically, 20-100 um will work for an afocal system.
In most cases, this occurs when an object that is currently in the model does not have a
physical equivalent. A notable example of a non-supported object is a User Defined Object.
When a User Defined Object is in use, OpticStudio is defining the object geometry through an
external DLL. This information cannot be read into an external mechanical design program so it
cannot be translated into a ZBD file format. One method to repair this error would be to
convert the invalid object into a Grid Sag Surface or a Boolean object.
The Design Lockdown tool converts all idealized inputs of a system into real manufacturing
inputs. As part of this, semi-diameters are fixed and any model glass types are converted to
real glasses. There are several reasons that a Design Lockdown may fail, so when this error is
given, the tool will also try to inform you where the error came from.
This error represents a "Cannot determine object coordinates!" error in Sequential Mode.
Typically, this error is given when the ray aiming algorithm is failing to find the STOP surface.
This is rare, but it could happen in extremely decentered, tilted, or highly aberrated systems.
This error will be given during the conversion, and is most likely the result of a problem in the
Design Lockdown step.
If you received this error while using Prepare for OpticsBuilder, try manually applying a Design
Lockdown to the initial file. Check and see if the error appears. If it does, you may need to
manually update the pupil shift to help the ray trace along.
This error typically indicates that there are more objects created in the non-sequential version
of the file than there are surfaces in the sequential version. Most typically, this occurs when a
sequential surface has an aperture applied. Apertures in Non-Sequential Mode are not applied
directly to the face of an object, but are instead represented by an additional absorbing object
(usually an Annulus).
In general, this error is trivial. If this is the only error in the conversion, it usually has no bearing
on the output (Spot Diagram, MTF, etc.). The user will only need to open the non-sequential
system, confirm the layout is correct, and re-run the Prep for OB tool.
This feature is used to convert data files from other programs into the equivalent OpticStudio
format. Or to take OpticStudio data into the other program’s format.
After conversion, these files can be imported in the Lens Data Editor > Surface Properties >
Import settings of the Zernike Sag or Zernike Phase sequential surfaces. The Zernike
coefficients in the converted DAT file will have the same units as the INT file. In addition, the
Zernike phase or sag surface should be placed at a pupil plane, and the clear semi-diameter or
semi-diameter of the surface should correspond to the size of the surface or wavefront under
test. This ensures that the phase is correctly added to the optical system.
File: The file name to be converted. Only files in the most recently read folder with the proper
extension are listed in the drop-down box.
Convert: Start the conversion. Any error messages on conversion will be generated during this
process.
! comment (optional)
! comment (optional)
Title line. A title line is required.
<zerntype> <numterms> <datatype>
<value of Zernike 1 term>
<value of Zernike 2 term>
<zerntype> defines the Zernike format (either “ZRN” for Zernike Standard or “ZFR” for Zernike
Fringe).
<numterms> specifies the number of Zernike terms that will be provided in the file.
<datatype> refers to what type of data is stored in the file (either “SUR” for surface
deformation data, “WFR” for wavefront deformation data or “FIL” for intensity apodization
filter data). OpticStudio does not differentiate between the three different types of data when
importing the data to a Zernike surface.
The remaining lines in the file contain the Zernike coefficients of the corresponding
polynomial, either Zernike Standard or Zernike Fringe.
For more information on the *.DAT format of Zernike data please see the Help files section
titled “Import” under the Setup Tab > Editors Group > Lens Data Editor > Surface Properties.
The INT file format is widely used by interferometer manufacturers as a data export format.
After conversion these files can be read by the Import Tool on the Lens Data Editor toolbar into
Grid Sag or Grid Phase sequential surfaces.
Convert: Start the conversion. Any error messages on conversion will be generated during this
process.
! comment (optional)
! comment (optional)
Title line. A title line is required.
GRD <xsize> <ysize> <datatype> WVL <wavelength> SSZ <scalesize> NDA
<nodatavalue>
XSC <xscale>
<data value 1> <data value 2> <data value 3> . . . . . . . . .
<data value n>
<data value n+1> . . .
There may be any number of comment lines at the beginning of the file. All comment lines
must start with the “!” symbol. The first line in the file that does not start with the “!” symbol is
the title line. All .INT files must have a title line (which can consist of up to 80 characters). The
next line in the file consists of various parameters which define the format of the file. For Grid
Files, this line must start with a “GRD” statement.
<xsize> specifies the number of grid points in the x-direction while <ysize> refers to the
number of grid points in the y-direction.
<datatype> refers to what type of data is stored in the file (either “SUR” for surface
deformation data, “WFR” for wavefront deformation data or “FIL” for intensity apodization
filter data). OpticStudio does not differentiate between the three different types of data, the
interpretation is determined by whether the data is imported to a Grid Sag or Grid Phase
surface.
<scalesize> specifies the value for the input data values which corresponds to one wave of
deformation. The <scalesize> value must be prefaced by an “SSZ” statement.
<nodatavalue> specifies the value of the input data that should be interpreted as missing
data. Any rays that are incident in these regions of the grid are vignetted. This is an optional
parameter. If provided, the <nodatavalue> parameter must be prefaced by an “NDA”
statement.
<xscale> is the ratio of the size of the grid in the x-direction to the size of the grid in the y-
direction. This is an optional parameter. If the value is omitted, a value of 1.0 (which
corresponds to a square grid) is used. If provided, the <xscale> parameter must be prefaced
by an “XSC” statement.
The remaining lines in the file contain the individual grid point values. There should be a total
of <xsize> *
<ysize> values specified. Note that this data is in “free format”. As such, each line of data does
not necessarily correspond to a single row of data on the actual grid. The data is specified from
-x to +x starting at the +y edge of the grid.
The INT file format is widely used by interferometer manufacturers as a data export format.
After conversion these files can be read into the Grid Sag non-sequential object.
Convert: Start the conversion. Any error messages on conversion will be generated during this
process.
! comment (optional)
! comment (optional)
Title line. A title line is required.
GRD <xsize> <ysize> <datatype> WVL <wavelength> SSZ <scalesize> NDA
<nodatavalue>
XSC <xscale>
<data value 1> <data value 2> <data value 3> . . . . . . . . .
<data value n>
<data value n+1> . . .
There may be any number of comment lines at the beginning of the file. All comment lines
must start with the “!” symbol. The first line in the file that does not start with the “!” symbol is
the title line. All .INT files must have a title line (which can consist of up to 80 characters). The
next line in the file consists of various parameters which define the format of the file. For Grid
Files, this line must start with a “GRD” statement.
<xsize> specifies the number of grid points in the x-direction while <ysize> refers to the
number of grid points in the y-direction.
<datatype> refers to what type of data is stored in the file (either “SUR” for surface
deformation data, “WFR” for wavefront deformation data or “FIL” for intensity apodization
filter data). OpticStudio does not differentiate between the three different types of data, the
interpretation is determined by whether the data is imported to a Grid Sag or Grid Phase
surface.
<scalesize> specifies the value for the input data values which corresponds to one wave of
deformation. The <scalesize> value must be prefaced by an “SSZ” statement.
<nodatavalue> specifies the value of the input data that should be interpreted as missing
data. Any rays that are incident in these regions of the grid are vignetted. This is an optional
parameter. If provided, the <nodatavalue> parameter must be prefaced by an “NDA”
statement.
<xscale> is the ratio of the size of the grid in the x-direction to the size of the grid in the y-
direction. This is an optional parameter. If the value is omitted, a value of 1.0 (which
corresponds to a square grid) is used. If provided, the <xscale> parameter must be prefaced
by an “XSC” statement.
The remaining lines in the file contain the individual grid point values. There should be a total
of <xsize> * <ysize> values specified. Note that this data is in “free format”. As such, each line
of data does not necessarily correspond to a single row of data on the actual grid. The data is
specified from -x to +x starting at the +y edge of the grid.
Convert monochromatic image files (.BMP, .JPG, .TIFF, .PNG, etc) to .DAT files that can be used
with the Grid Phase surface. For RGB images, the R channel is used for the conversion.
Units: Determines the units for the size of the image. Convert the image based on Delta X and
Delta Y values in specific units.
Delta X: The individual pixel spacing in X in units. Delta X multiplied by the number of pixels in
width determines the width of the Grid Phase surface.
Delta Y: The individual pixel spacing in Y in units. Delta Y multiplied by the number of pixels in
height determines the height of the Grid Phase surface.
Output File: Enter the full path of the output .DAT file. The default path will auto-populate to
the location of the image. Note that to use this file with the Grid Phase surface the .DAT file
must be located in Documents>Zemax>Objects>Grid Files
File: The file name to be converted. Only files in the most recently read folder with the proper
extension are listed in the drop-down box.
Fit to Gaussian Beam: If unchecked, the converter will omit the step of fitting a Gaussian
beam to the E-Field data for estimating the pilot beam properties. The position of pilot beam
will be 0 and the phase data will be simply referenced to a plane.
Convert: Start the conversion. Any error messages on conversion will be generated during this
process.
The F3D file format consists of 3 lines of header information of the form
BCF3DCX 3.0
Nx Ny
xmin xmax ymin ymax
The identifier BCF3DCX identifies a linear polarized beam file. Only file format version 3.0 is
currently supported.
The values for xmin, xmax, ymin, and ymax define the physical size of the beam. All these
values must all be in units of micrometers. OpticStudio will scale these values to millimeters,
and use millimeters for the exported beam size. ZBF files only contain the x- and y-direction
widths of the beam, and not any absolute position.
The F3D format does not include any wavelength data, and all E-Field phase data is referenced
to a local plane. OpticStudio will fit a Gaussian beam to the E-Field data to estimate the pilot
beam properties required for subsequent propagation in OpticStudio, and store this data in
the ZBF file.
This feature is only available in the Professional and Premium editions of OpticStudio.
This feature reads the data from a ZRD file or a ZBF file then writes it to a tab-delimited file.
The converter accepts both binary and text-based ZBF files. The output file contains the same
data as the input files, but re-organized in a program-agnostic format so that it may be used in
any post-processing software.
Start Ray: Used with ZRD files to limit the number of rays in the output file. Use this to select
the ray number to start with.
End Ray: Used with ZRD files to limit the number of rays in the output file. A value of -1 means
all rays in the file will be selected. To select a smaller subset, use any positive number between
1 and the total number of rays in the file.
Filter String: Used with ZRD files to filter the types of rays reported in the output. For more
information about the types of values this setting will allow, see the file The Filter String.
Input File Settings...Browse: Used to find the file for conversion. The search is limited to the
file type you have selected.
Output File Settings...Browse: Used to select the folder where your file will reside. The
default folder selection is the current working directory.
The macro generally works well when converting files which are fairly basic to moderately
complex, but may not provide complete translations of significantly complex files. The list of
functionality that is currently supported for conversion is based on translation of the following
operands listed in a .SEQ file:
Any other operands present in the .SEQ file will not be translated, so care must be taken to
ensure that the input file has been converted correctly. Support for the translation of
additional operands in the .SEQ file will be added with future releases of the macro. Note that
if the .SEQ file contains any operands not shown in the above list, a message will be shown for
each such operand (e.g. “No mapping for operand IFO”) in the output text window providing a
summary of the conversion.
Note that if the .SEQ file contains a material that is not included in the Materials catalog for
OpticStudio, then a warning will be provided in the text output window providing a summary
of the file conversion, and OpticStudio will replace the material with a Model glass.
The input .SEQ file must meet some basic requirements to be converted, e.g. the file must
contain at least 3 surfaces (to allow for the definition of OBJECT, STOP, and IMAGE surfaces in
OpticStudio). Note that prior to conversion the text in the .SEQ file is re-formatted to ensure
that only one Code V command appears on each line. After this step is complete, the re-
formatted text is provided in the output text window providing a summary of the conversion
(allowing for user validation).
The macro used to perform the conversion may be found in the ZPL folder of the installation
(see Folders for more details), and is named Code V to OpticStudio Converter.ZPL. This file may
be modified by the user as desired, for example if the user wishes to change the name of the
output OpticStudio file generated by the converter or if the user is able to add support for the
translation of additional operands in the .SEQ file. We kindly request that any users who are
able to modify the macro to support translation of additional operands in the .SEQ file please
email support@zemax.com with their updated version of the macro, so that we may distribute
this in future releases of OpticStudio.
Explode is used to explode CAD assemblies in various formats into individual parts using the
ZOF (Zemax Object Format) structure.
This tool will explode an assembly file created in Creo Parametric into its individual, constituent
parts. The tool is functionally identical to the one described in “Explode Creo Parametric
Assembly” accessible from the NSC Editor Toolbar. However, this tool does not require that
assembly files already be loaded into the Non-Sequential Component Editor (NSCE). Also,
This tool will explode a CAD assembly file into its individual, constituent parts. The tool is
functionally identical to the one described in “Explode CAD Part: STEP/IGES/SAT” accessible
from the NSC Editor Toolbar. However, this tool does not require that assembly files already be
loaded into the Non-Sequential Component Editor (NSCE). Also, once the assembly has been
exploded using this tool, each of the part files will not be automatically loaded into
OpticStudio as imported CAD objects, but can be found in the
“\Documents\Zemax\Objects\CAD Files” folder. The constituent part files will have the same
name as the CAD file, but will have a _1, _2, etc. appended to the file name. For example, a file
CADAssembly.stl would create the parts CADAssembly_1.stl, CADAssembly_2.stl, etc.
Exit Button
This tab provides access to OpticStudio’s Setup features. This tab is used when you start each
design project, and is visited infrequently or not at all after initial setup.
The System group puts everything to do with basic system setup in one place. OpticStudio
Preferences lets you customize the OpticStudio installation, folder locations, quick access
toolbar, etc. and save these settings to a project configuration file.
The Mode group specifies whether you are working in Sequential Mode or Non-Sequential
Mode.
The Editors group gives access to the spreadsheets that are used to define the optical system
on a surface-by-surface (Sequential Mode) or object-by-object (Non-Sequential Mode) basis.
The System Viewers group gives access to the layout plots that are used to view the optical
system itself.
Diagnostics lets you check the OpticStudio file. The System Check utility traps many common
setup errors.
Windows Control defines how windows in the OpticStudio workspace behave. Windows can
be docked, freely floated, tiled, or cascaded. Windows can also be locked or unlocked here.
Configuration is used if the design has multiple versions, which is typically the case for zoom
lenses, thermal analysis of lenses over a range of temperatures, scanning lenses and lenses
with moving parts. The Configuration group appears on all tabs if more than one configuration
is defined.
System Explorer
The System Explorer button is available in the System section of the Setup tab, and it contains
most of the basic optical and mechanical definitions used in your OpticStudio project.
The System Explorer is used to define data that pertains to the lens as a whole system, rather
than data associated with a single surface or object.
The System Explorer can be docked on the left side of the UI. When docked, the System
Explorer can be pinned down, so it is always visible, or set to auto-hide, so that it is minimized
when the user clicks elsewhere in the UI. These settings can be changed by clicking the down
arrow in the toolbar to expand the following menu:
See following topics below for more information on the settings in the System Explorer.
These Aperture features are available in the System Explorer. The system aperture defines the
size of the beam through the system on axis. To set the system aperture, you need to define
the system aperture type and the system aperture value.
If you select "Object Space NA" or "Object cone angle" for a system aperture type, the object
thickness must be less than infinity.
Only one type of system aperture may be defined per configuration; for example, once the
Entrance Pupil Diameter is specified, all the other aperture definitions are determined by the
lens data prescription.
Aperture Value
The system aperture value meaning depends upon the system aperture type selected. For
example, if "Entrance Pupil Diameter" is selected as the system aperture type, the system
aperture value is the entrance pupil diameter in lens units. OpticStudio uses the system
aperture type and system aperture value together to determine such fundamental quantities
as the entrance pupil size, and clear apertures for all components.
Selecting "Float by Stop Size" for a system aperture type is the only exception to this rule. The
clear semi-diameter or semi-diameter of the stop surface (set on the Lens Data Editor) is used
to define the system aperture if "Float by Stop Size" is selected for a system aperture type.
Gaussian Imparts an amplitude variation over the pupil that is Gaussian in form. The
apodization factor refers to the rate of decrease of the beam amplitude as a function of radial
pupil coordinate. The beam amplitude is normalized to unity at the center of the pupil. The
amplitude at other points in the entrance pupil is given by
where G is the apodization factor and ρ is the normalized pupil coordinate. If the apodization
factor is zero, then the pupil illumination is uniform. If the apodization factor is 1.0, then the
beam amplitude has fallen to the 1 over e point at the edge of the entrance pupil (which
means the intensity has fallen to the 1 over e squared point, about 13% of the peak). The
apodization factor can be any number greater than or equal to 0.0. Values larger than about
4.0 are not recommended. This is because most computations will sample too few rays to
produce meaningful results if the beam amplitude falls too quickly at the edges of the pupil.
Cosine cubed Simulates the intensity fall off characteristic of a point source illuminating a flat
plane. Note cosine cubed apodization is only useful and should only be used for point sources
or field points close to the axis when compared to the entrance pupil diameter. For a point
source, the intensity of a ray illuminating a differential area on a plane is given by
where is the angle between the z axis and the ray intersecting the entrance pupil, and the
relative intensity at the center of the pupil is 1.0. Converting to normalized pupil coordinates
and taking the square root yields the pupil coordinate amplitude apodization
Where
If the aperture type is "Object Cone Angle" then a slightly different apodization technique is
used. The apodization is achieved by careful selection of the ray cosines in object space. The
resulting distribution is uniform in solid angle rather than angle space. The solid angle Ω of a
sphere illuminated by a cone of angle θ is given by
The normalized radial pupil coordinate p is related to the fractional solid angle by
where α is the maximum cone angle defined by the system aperture value and θ is the angle of
the ray with the normalized pupil coordinate p. This apodization will yield uniform ray density
and power per solid angle everywhere over the defined cone.
User Defined OpticStudio also supports user defined apodizations on any surface, rather than
just the entrance pupil. User defined surface apodizations are implemented using the user
defined surface type described in “User defined surface apodization using DLLs”.
Apodization Factor
The apodization factor determines how fast the amplitude decays in the pupil. Used only for
Gaussian apodization. See the previous section on the Apodization Type for details. More
information on apodization can be found in the Knowledgebase article What Does the Term
'Apodization' Mean?
For systems with closely spaced elements in or near edge contact, this yields surface apertures
that provide no clearance for finishing or mounting. Often, optical surfaces are only well
finished within some fraction of the full radial aperture, typically between 90% and 98%,
depending upon the part size.
See “Chip Zone” in Data Columns section of Lens Data Editor for help
Margin Millimeters This semi diameter margin control allows specification of an additional
amount of radial aperture as a fixed number when the surface has an automatic solve in the
clear semi-diameter or semi-diameter column. The default value of zero leaves no margin.
Margin % This semi diameter margin control allows specification of an additional amount of
radial aperture as a percentage. The default value of zero leaves no margin, while a margin of
5% would add 5% to the clear semi-diameter or semi-diameters of all surfaces under
"automatic" control. The maximum allowed margin is 50%.
If both "percent" and "millimeters" margin values are non-zero, the percent is added first, then
the lens unit margin. The Semi Diameter Margins do not apply to the stop surface. There is a
possibility to disable Semi Diameter on surface-by-surface basis. Corresponding control
checkbox is placed in the Lens Design Editor under the Surface Properties > Aperture tab:
When using afocal mode, transverse, longitudinal, and MTF aberrations are computed in units
appropriate to afocal systems. Transverse aberrations are computed as a function of angle
relative to a reference ray rather than units of length. Longitudinal aberrations are computed
as a function of defocus in diopters (inverse meters) rather than as defocus in units of length.
MTF is measured in cycles per angle rather than cycles per length. The change of units is not
always mentioned in the documentation for each individual analysis feature. When using
afocal mode, the user should be aware that some analysis window settings described in focal
To change the afocal unit type, see “Afocal Mode Units” in the Units Section and see the
section of System Explorer.
The following table compares focal and afocal system analysis units.
Wavefront error (or Optical Path Difference) is measured somewhat differently in afocal mode
than in focal mode. For afocal systems, the OPD is measured relative to a reference plane that
is normal to the chief ray of the reference wavelength. If the OPD is referenced to the exit pupil
(the recommended setting) then the afocal OPD is measured at the plane located at the exit
pupil position relative to the image surface. If the OPD reference is set to absolute then the
OPD is referenced to a plane located at the image surface. Note that a shift in the location of
the plane at which the afocal OPD is referenced will in general change the OPD values, unless
the beam is perfectly collimated.
For more information on the OPD reference, see “Reference OPD” in the Advanced Options
section of the System Explorer.
Analysis features which compute data as a function of defocus use units of length in focal
mode and diopters in afocal mode. Note that a positive defocus in diopters means the image
shifts toward the lens, which is a negative shift in length. For this reason through focus plots
will appear to flip left-to-right when switching between a focal mode system and an afocal
mode system with the same fundamental aberrations.
Other than the change of units, most OpticStudio features work exactly the same in focal and
afocal mode. Some features do not have meaning for afocal systems and an error message or
possibly meaningless data will result if the analysis is attempted in afocal mode. To optimize
afocal systems, use one of the angle based default merit functions described in “Selecting the
type of optimization”.
OpticStudio normally detects the need for iteration. However, if OpticStudio does not iterate
automatically, checking this option will force iteration on all solves when updating the lens
data. Iteration does slow down calculations, particularly optimization, and so this option
should only be checked on when required.
Fast Semi-Diameters
OpticStudio computes “automatic” clear semi-diameter or semi-diameters to estimate the
clear aperture required on each surface to pass all rays at all field points and wavelengths. For
axial systems, this computation can be done accurately by tracing just two rays, the top and
bottom marginal rays, for each field and wavelength. By default, for axial systems OpticStudio
will trace just these two rays in the “true” tangential plane (for a definition of this term see
“Sagittal and Tangential”) of the vignetted pupil for each field and wavelength, then use the
radial coordinates of each ray at each surface to determine the clear semi-diameter or semi-
diameter required.
For some non-axial systems, the resulting estimate is not accurate enough. This typically
includes systems which have tight edge and clear aperture constraints. For these systems,
there is no general way of accurately computing the clear semi-diameter or semi-diameters
other than by tracing a large number of rays in the vignetted pupil. For such systems, Fast
Semi-Diameters should be checked off!
OpticStudio will iteratively trace as many marginal rays around the perimeter of the pupil as
required to determine the clear semi-diameter or semi-diameter for each surface until the
values converge to within 0.01% (5 significant figures) of the previous estimate.
However, clear semi-diameter or semi-diameters may not be calculated accurately for surfaces
with hard boundaries when the illuminated area is very large compared to the span of the
surface.
The specific rays traced and the number of iterations used to calculate the automatic semi-
diameter values depends on the pupil size and position within the system. The semi-diameter
Iteration can be slow, especially during optimization, because OpticStudio needs to update the
clear semi-diameter or semi-diameters frequently. Thus, there is a trade-off between speed
and accuracy when calculating semi-diameters. For axial systems, OpticStudio will use the
slower iterative algorithm only if the “Fast Semi-Diameters” option is checked “off”.
Selected (On) If the “Fast Semi- Diameters” option is checked “on”, OpticStudio will trace only
as many marginal rays as required to estimate the automatic clear semi-diameter or semi-
diameters to equal or better than 0.01%. The algorithm starts by tracing 2, then 4, then 8 rays,
then 16 and so on, until the clear semi-diameter or semi-diameter values converge to within
0.01% of the previous estimate.
This option is designed mainly for axial systems. Caution must be exercised when using this
option for non-axial systems as the tracing of marginal rays may not be sufficient to properly
estimate automatic semi-diameters. If the semi-diameter or clear semi-diameter values
changes dramatically when unchecking the “Fast Semi-Diameters” option, it should be left
unchecked.
Not Selected (Off) If the “Fast Semi-Diameters” option is checked “off”, OpticStudio will trace
at least 32 rays around the vignetted pupil at each field and wavelength, and more if required
to estimate the automatic clear semi-diameter or semi-diameters to within 0.01%. This
approach is slower, but also safer for ensuring accurate calculations of clear semi-diameter or
semi-diameter values in non-axial systems.
Field Settings available in the System Explorer include the Type and Normalization. The “Set
Vignetting” button can be used to automatically calculate the vignetting factors for all field
points. The “Clear Vignetting” button removes vignetting factors for all field points.
The Field Data editor includes the same information and settings as the Fields section of the
System Explorer. It also contains tools for automatically creating several different field
distributions and converting to alternate field types. The available options are discussed in
more detail below.
Analysis and layout plots in OpticStudio can show individual field points or the first 12 field
points combined. The first 12 field points in the Field Data Editor are shown in green as a visual
reminder of which points will be used when “First 12” is selected in any of the plots. The
remaining field points are shown in yellow.
Any cell in the Field Data Editor can be set to a Variable, Pickup, or a ZPL solve.
A right-click on a selected cell or row will reveal a menu with the following options: Copy Cell
(s), Paste Cell(s), Create Cell Pickup, Cut Field, Copy Field, Paste Field, Insert Field, Insert Field
After, Delete Field, Hide Column, Ignore, Do not Ignore. Most of these operations can be
carried out on selections of multiple cells or rows.
For further information on the “Ignore” function, see the “Current Field” section below.
The Field Plot can be accessed at the right side of the Field Data Editor, as shown below. The
Field Plot shows a scatter plot of all the defined field points for the current configuration.
Field points whose rows are green in the editor are shown in the Field Plot as green points, and
are the points that will be plotted whenever “First 12” is selected in an analysis or layout plot.
Field points whose rows are yellow are shown in the Field Plot as yellow points.
Hovering over a point on the scatter plot will bring up a text box in the upper left of the scatter
plot that contains information about that field point. Clicking on any point in the scatter plot
will highlight the associated row in the Field Data Editor.
Left-clicking and dragging in the active plot area will select a region of the plot to zoom in on.
Right-clicking and dragging in the active plot area will pan or shift the plot. Right clicking on
the active chart area will reveal the “Reset Zoom” option.
The “Type” drop-down menu allows specification of the field point definition. The available
field types and the associated type codes (used by ZPL macros) are listed in the following table.
Angle Field angles are always in degrees. The angles are measured with respect to the object
space z axis and the paraxial entrance pupil position on the object space z axis. Positive field
angles imply positive slope for the ray in that direction, and thus refer to negative coordinates
on distant objects.
Please note that for finite conjugate systems, Ray-Aiming always adjusts the rays initial angle.
As a result, for finite conjugate systems with Ray-Aiming enabled and Angle as the field type,
the rays initial angle will be different from the angle set in the system explorer.
Paraxial Image Measured in lens units. When paraxial image heights are used as the field
definition, the heights are the paraxial image coordinates of the primary wavelength chief ray
on the paraxial image surface, and if the optical system has distortion, then the real chief rays
will be at different locations.
Theodolite Angle Azimuth θ and Elevation φ polar angles in degrees. These angles are
commonly used in surveying and astronomy. The relationship between the theodolite angles
(θ, φ) and rectangular angles (θx , θy) is:
θx = θ
θy = arctan(tan(φ)/cos(θ))
Normalization
Radial If the field normalization is radial, then the normalized field coordinates represent
points on a unit circle. The radius of this unit circle, called the maximum radial field, is given by
the radius of the field point farthest from the origin in field coordinates. The maximum radial
field is then used to scale all fields to normalized field coordinates.
For field angles, there may be a difference between the maximum field angle and the
maximum radial angle that OpticStudio uses for normalization.
l The maximum field angle is the maximum angle out of the defined field points, with
respect to the optical axis. In the image below, see the “Max field” value of 39.2
degrees, displayed next to the Normalization setting. This maximum field angle is dis-
played for reference only and is not used in any other OpticStudio calculations.
l OpticStudio also displays the maximum radial angle, which is the radius of the field
point farthest from the origin, in field coordinates. In the image below, see the “Normal-
ized by” value of 42.4 degrees.
Also, note that the maximum radial angle (the normalization angle) is displayed if the
maximum field option is selected in the status bar. See “General” for more information about
the status bar.
Rectangular If the field normalization is rectangular, then the normalized field coordinates
represent points on a unit rectangle. The x and y direction widths of this unit rectangle, called
the maximum x field and maximum y field, are defined by the largest absolute magnitude of all
the x and y field coordinates. The maximum x and y field is then used to scale all fields to
normalized field coordinates.
Convert To
The Convert To drop-down menu will convert existing Field Data from the current field type to
a new field type. For example, if data is entered using the type “Angle,” converting to “Object
Height” will change the field type to “Object Height,” and then recalculate the data for each
field point such that the physical size and position of each field does not change.
Exceptions: Converting fields to “Object Height” for an infinite object distance is not permitted.
If “Afocal Image Space” is checked in the Aperture section of the System Explorer, caution must
be taken when converting fields to “Real Image Height” or “Paraxial Image Height.” Image
Heights for afocal systems will be calculated at the last surface in the system and may not
produce valid results if that surface is near a pupil.
Fields Wizard
All field patterns generated will have (0,0) as the first field point.
Equidistant fields are defined as equivalently spaced points along a single line:
Start At This option is used to add the fields created by the Fields Wizard at a specific position
within the Field Data Editor.
Overwrite Check this box to overwrite the current field points when creating the new field
distribution. Note: if the new field distribution contains fewer fields than currently defined, any
extra fields will remain.
Use Pickups Check this box to automatically apply pickup solves to each field when using the
Field Wizard. These pickup solves will reference the maximum field. With this option, the size
of the whole field pattern can be changed by changing just the maximum field value.'
Current Field
The vignetting factors are defined as VDX, VDY, VCX, VCN, and TAN. These factors represent
decenter x, decenter y, compression x, compression y, and the tangential angle. For more
information about vignetting, see “Vignetting Factors” under “Conventions and Definitions”.
Vignetting
Set and Clear Vignetting functions are available in System Explorer / Fields / Settings and in the
Toolbar of the Field Data Editor, as shown below.
Clear Vignetting Clears the vignetting factors back to the default values of zero.
The algorithm may not work in all cases. For systems where the set vignetting algorithm fails,
the vignetting factors will need to be adjusted manually. The accuracy of the set vignetting
algorithm can be tested by tracing a few marginal rays.
The buttons in the Field Data Editor Toolbar (from left to right) are listed below.
Save Fields Saves the current field data in a *.FLD file. (OpticStudio automatically stores the
field data with the lens file when the lens file is saved. Saving a separate *.FLD file is optional.)
The *.FLD file is saved to the Zemax\Miscellaneous folder. The file is a simple text file and can
be created outside of OpticStudio and placed in the Miscellaneous folder for later use. The
format of the file begins with a field type code and then continues with the data for each field
point:
X Y ……..
Values in each line are separated by a space. An example file is shown below.
Insert Fields Inserts field data previously stored in a *.FLD file. Select the row at which to insert
the field data and the file to insert. The existing field data is preserved.
Delete All Fields Deletes all fields in the Field Data Editor.
Fields Wizard Opens the “Fields Wizard” tool to set up the Field Data Editor with the most
common requirements. Can be edited subsequently.
Sort Fields Sorts the fields from lowest to highest radial value.
Set All Vignetting Sets all the vignetting factors automatically. See Vignetting.
Clear All Vignetting Clears all the vignetting factors automatically. See Vignetting.
Go to Field Use this tool to find and jump to a specific field number or bookmark. See “Go to
Surface” for more information.
Toggle Express View Toggles Express View on and off. For more information, see the Express
View section.
Reset Column Order Resets column order to the default settings (see “Editors”).
Reset Column Widths Resets column widths to a standard size (see “Editors”).
Automatic Width Sets the width of each column individually to fully show its content and
header.
OpticStudio assumes that the on-axis (0,0) object space field lies within the field of view of the
optical system. The recommended setup is for this field to define the center of the field of
view. Sometimes optical systems may be defined centered on an off-axis field for various
reasons. Note, however that if the (0,0) object space field cannot trace through the system,
raytrace errors can occur for all fields. In these cases OpticStudio will issue an error in the
System Check report indicating that the “gut ray failed”. If this occurs, the solution is to
redefine the system so that the (0,0) field lies close to the center, or at least within the field of
view.
For many wide angle systems, Ray Aiming may be required. For example, a system with wide
input angles may face a large amount of pupil aberration, or may have a shifted entrance pupil.
In these cases, a more robust ray tracing calculation is required. In addition to activating ray
aiming, users may also need to update any DLLs they are using. A DLL with a simplistic iterative
ray tracing routine (such as what is found for Type 5 of the us_itera.dll) may fail to trace. This
Wavelengths
Settings:
The wavelengths dialog box is used to set wavelengths, weights, and the primary wavelength.
The buttons can be used to activate and deactivate wavelengths, and to sort, save, and load
the data. A list of commonly used wavelengths is also included. To use the entries on the list,
select the desired wavelength set, and click on the “Select Preset” button.
The Wavelength Data editor includes the same information and settings as the Wavelengths
section of the System Explorer, but also includes a button to select wavelengths using a
Gaussian Quadrature algorithm. This algorithm provides the most efficient choice of
wavelengths and weights for optimization of an optical system subject to a broadband source.
To use this approach, select the number of wavelengths (any even number from 2 to 12) and
enter in the wavelength range (in microns), and then click on the “Gaussian Quadrature”
button. The algorithm used here is described in B.J. Bauman and H. Xiao, “Gaussian quadrature
for optical design with non-circular pupils and fields, and broad wavelengths”, Proc. SPIE, Vol.
7652, p76522S-1 (2010). More details on the efficiency of this algorithm is provided in the
Knowledge Base article entitled “Using Gaussian Quadrature to Model A Broad Spectrum”.
The Decimals button sets the number of decimal digits displayed for wavelengths and weights.
If Use Editor Preferences is selected, then the decimals displayed are equal to Decimals in the
Editors tab of the OpticStudio Preferences. If Use Global Preferences is selected, then the
The Save and Load buttons are used to store and retrieve the wavelength data independently
from the lens data. The file format is text that can be edited or created outside of OpticStudio.
Environment
These Environment features are available in the System Explorer, and allow definition of the
system temperature and pressure. Note that wavelengths are always measured in micrometers
referenced to “air” at the system temperature and pressure. If the system temperature and air
pressure change; care should be taken to adjust the wavelength definitions to match the new
environment.
See Wavelengths and Thermal Analysis for more information. For more information on
changing the temperature and pressure of individual surfaces see Defining multiple
environments within a single configuration
Settings:
Adjust Index Data To Environment: If checked, all index data used for ray tracing will be
adjusted from the “raw” glass catalog values to be relative to the system temperature and
pressure. For details see Index of refraction computation. Individual surfaces may have a
temperature and pressure that is different from the system temperature and pressure; for
these surfaces the index data will be adjusted to reflect the environment of the surface.
It is highly recommended that "Adjust Index Data To Environment" always be checked "on".
There is no disadvantage in leaving the switch on at all times, as long as all index data has been
properly defined.
Pressure (ATM): The system air pressure in atmospheres. A value of 0.0 implies vacuum, 1.0
implies sea level.
The thermal analysis features of OpticStudio can account for all these effects. By accounting for
thermal effects, OpticStudio can be used to analyze and optimize a design for any specific
temperature or for a range of temperatures.
The index of refraction data given by the dispersion formulas are referenced to a specific
temperature and pressure, which is typically 20 or 25 degrees Celsius (depending upon the
manufacturer) and 1 atmosphere. Also, index of refraction data is by convention referenced to
that of air, which means thereafter the air has an index of unity. The index referenced to air is
called the relative index of refraction. When the index is referenced to vacuum (which truly has
an index of unity) then the index is called the absolute index of refraction. The difference
between these two references for any glass is a function of wavelength, temperature, and
pressure.
Two user provided values define the environment: the system temperature in degrees Celsius
and the air pressure measured in atmospheres. These values are set on the dialog box which
can be found under the Environment section of the System Explorer. By default, any defined
temperature and pressure applies to all surfaces in the optical system. However, optical
systems which require multiple temperatures to be defined in the same system are also
supported. This is required for optical systems that have some lenses in a different pressure
(such as a vacuum) or in a region that is cooler or warmer than the system environment.
Defining Wavelengths
Wavelength data are always measured in micrometers referenced to “air” at the system
temperature and pressure. The default system temperature is 20 degrees Celsius, and the
default air pressure is 1.0 atmospheres. If the system temperature and/or pressure is modified,
or under the control of multi-configuration operands, care must be taken to adjust the
wavelengths to the new air temperature and pressure.
Wavelength data is entered in the “Wavelength Data” section of the System Explorer; see the
“Wavelengths” for details.
There are several steps required for OpticStudio to compute the relative index data. The basic
steps for computing the index for each glass type at each wavelength are:
The end result, which is the index of the glass at the surface temperature and pressure relative
to air at the system temperature and pressure, is what is used by OpticStudio for ray tracing.
The index of a surface made of air is treated in the same way. This means that air surfaces at
different temperatures and pressures from the system temperature and pressure will have
slightly lower or higher index. For example, if the system pressure is 1.0 and the pressure of
one air surface is set to 0.0, the index of this one surface will be approximately 0.99973. If the
system pressure is 0.0 and the air space has a pressure of 1.0, the index for that surface will be
approximately 1.00027. Remember, air at the system temperature and pressure is defined to
be 1.0, all other indices are relative.
Note also that OpticStudio can easily model systems used in a vacuum by changing the air
pressure to zero. If only some surfaces are at vacuum, this can be set up using the TEMP and
PRES commands on the multi-configuration editor.
For the index of refraction of the glass, OpticStudio uses the dispersion formulas and data
stored in the glass catalog. For details, see “Description of catalog data”. For the index of air,
OpticStudio uses the following formula:
Where
T is the temperature in Celsius, P is the relative air pressure (dimensionless) and λ is the input
wavelength (at the system temperature and pressure) measured in micrometers. This formula
where n is the relative index at the reference temperature of the glass; ΔT is the change in
temperature relative to the reference temperature of the glass (ΔT is positive if the
temperature is greater than the reference temperature of the glass); D0, D1, D2 ,E0 ,E1, and λtk
are constants that are provided by the glass manufacturer to describe the thermal behavior of
the glass; and Stk is the sign of the λtk constant (i.e. Stk = 1 if λtk is positive and Stk = -1 if λtk is
negative). This model for the change in the glass index was developed by Schott Glass
Technologies, Inc.
The six constants must all be provided in the glass catalog for the computation to be valid. The
default values of zero for all six constants yields zero for the change in index; therefore if no
thermal data has been added to the catalog, no thermal effects are considered. OpticStudio
cannot compute thermal index variation for any glass type without these six constants
provided. However, some approximations are available if the six coefficients are not available.
See the section “Adding thermal index variation data” for details.
A means of specifying the nominal temperature at which radii and thickness are measured
must be provided.
The change in index, radii, and thickness must be accounted for as the environment changes.
Some surfaces may be at one temperature or pressure, while other surfaces are at a different
temperature or pressure.
OpticStudio is up to the task in all particulars. The basic approach to setting up a multiple
environment lens is:
Define the lens at some nominal temperature and pressure. This should be the environment
under which the lens will be fabricated. All radii and thickness data will be specified only at this
temperature and pressure.
Now define additional configurations using the multi-configuration feature (see “Multi-
configurations”). In each additional configuration, the temperature and pressure will be
specified, and special solves called "thermal pickup solves" will be used to adjust the radii and
thickness data for each configuration. The multi-configuration operands that control
temperature and pressure are TEMP and PRES.
TCE stands for thermal coefficient of expansion. When a glass element changes temperature,
the linear change in size is given by the expression L' = L(1 + αΔT), where L is a linear
dimension, α is the TCE, and ΔT is the change in temperature. As the material expands, the
radius of curvature also expands. Therefore, both the thickness and the radii of a glass surface
change linearly with temperature. The assumption of linearity is only an approximation, but a
reasonably good one for most materials and temperature ranges.
The TCE coefficient is defined along with the glass dispersion data in the glass catalog. See
"Using Material Catalogs" for details on the TCE data.
If the multi-configuration operand is a CRVT, then the curvature of that surface for that
configuration is computed from the curvature in the nominal configuration, the difference in
temperature between the two configurations, and the TCE for that material.
If the glass type for a surface is specified in the catalog (such as BK7 or F2) then the TCE from
the catalog is used. If the glass type is air (a blank entry) or “MIRROR” then there are two
possibilities: if the previous surface glass type is a catalog glass, then the TCE for that glass is
used, otherwise, the TCE value entered in the TCE column will be used. These rules have one
important ramification: if an element is a cemented doublet, the TCE for the first surface will be
that of the first glass, while the TCE for the second and third surfaces will be that of the second
glass. OpticStudio ignores the “stress” induced in the common surface. This assumption may
not be accurate for a large temperature range. Mirrors surrounded by air use the TCE from the
TCE column, mirrors preceded by glass are assumed to be made of that same glass, and
therefore use the TCE for the preceding glass.
If the operand is a THIC, then there are two possibilities. If the surface is composed of a catalog
glass, then the TCE for that glass is used. Otherwise, the TCE specified in the TCE column of the
surface is used. The TCE column is used for entering user-defined TCE data for the material
used to manufacture the mount. There is one other important point: if the surface is not
composed of a catalog glass, then the thermal expansion is computed along a length of
material which extends from the edge of the surface to the edge of the next surface. Since the
material expands along the length of the edges, not at the center thickness, this is a more
accurate computation.
The choice to calculate thermal thickness expansion along the edge thickness for air surfaces is
to simulate expansion of mechanical mounts, whose contact points are assumed to be at the
lens edges. OpticStudio also considers the thermal radial expansion of the "mount" (the air
gap between optical elements), separately from the thermal expansion of the lens mechanical
semi-diameter. Both the radial and thickness expansions of the mount are calculated using the
TCE defined for the air surface in the Lens Data Editor. Nominally, the spacer radial size is
assumed to equal the mechanical semi-diameter of the lens. As the temperature changes, the
lens and spacer diameters expand, so that the contact point of the mount on the lens moves
away from the mechanical edge of the lens (as their TCE values differ, in general). This affects
the THIC thermal expansion calculation -- any changes in the radial position of the contact
point will affect the center-to-center distance between two lenses.
OpticStudio handles this situation in one of two ways. If, due to thermal expansion, the radial
position of the contact point were to become smaller than the lens mechanical semi-diameter,
then the thermally-adjusted radial size of the mount is used in calculating the "edge
thickness". However, if the reverse is true and the mount radial contact points were to
thermally expand to fall outside the lens mechanical semi-diameter, then OpticStudio instead
uses the lens mechanical semi-diameter in calculating the "edge thickness". This is to prevent a
non-physical situation where the mount contact point lies beyond the physical size fo the lens.
Whichever method is used, the resulting "edge thickness" value is then used for a thermal
thickness expansion, which then gets transferred onto the center thickness of the air gap.
Because the expansion along the edge accounts for the change in radii of the adjacent
surfaces, even a TCE of 0.0 will result in a change of thickness if the radii change. To turn off
thermal expansion of a thickness, do not use a TCE of 0.0, rather, delete the thermal pickup
solve entirely.
The thermal pickup solve properties for parameter values depends upon the parameter
number and surface type. If the parameter is interpreted as having units of length, then the
appropriate scaling is performed just like the radius of curvature described earlier. If the units
are in powers of length, such as length squared or inverse length, then appropriate scaling is
also performed. Otherwise, the thermal pickup solve ignores thermal effects and picks up the
value from the nominal configuration.
All other values are straight pickup solves, and the value will be identical to that in the nominal
configuration. Thermal effects are ignored.
Groups of surfaces can be assigned their own temperature and pressure using the TEMP and
PRES multi-configuration operands, even if there is only 1 configuration defined. The key is
that each TEMP and PRES operand defines the environment for all operands that follow in the
multi-configuration editor. The last TEMP and PRES operands listed in the editor define the
"global" environment, which will apply to all data not listed in the multi-configuration editor.
All the curvatures, thicknesses, optical and mechanical semi-diameters, chip zones, glasses,
and other values for the surfaces 6-10 should be listed after the TEMP operand.
Then the list should end with another TEMP, this one defining the 20 degree "global"
environment. The resulting system will be evaluated at the respective temperatures (and/or
pressures) for each surface.
1. All multi-configuration editor operands that follow a TEMP or PRES operand are eval-
uated at that temperature or pressure.
2. The last TEMP and PRES listed in the multi-configuration editor define the temperature
and pressure for all other lens data, on the multi-configuration editor or not.
By far the most important step in setting up a complicated multiple environment lens is to
check the set up carefully. Two excellent tools for doing this are the index of refraction data
and multi-configuration data table on the prescription report. This table lists the temperature
and pressure for each glass type, and the thermal pickup relationships.
Checking the thermal pickup solves on each parameter is also a good idea; the data should be
at least partially verified by hand to verify the correct temperature range and expansion are
being used.
If the surface does not use a catalog glass, then the TCE value is extracted directly from the TCE
column in the Lens Data Editor. The TCE column is the last column in the spreadsheet, to the
right of the parameter columns.
In this special case, OpticStudio needs to use the TCE supplied in the Lens Data Editor to define
the mounting material properties, rather than the TCE supplied in the glass catalog. This can be
accomplished by setting the “Ignore Thermal Expansion” switch for the material in the glass
catalog.
Using a single dn/dT value to estimate the D0 term is only a rough approximation. The actual
index variation with temperature is not likely to be linear over any extended wavelength or
temperature range. Therefore, extreme caution and suspicion is warranted when using only a
single dn/dT value.
It is also possible to optimize the TCE of the spacing material between lens groups. To do so,
set a variable on the value in the TCE column of the Lens Data Editor.
The thermal analysis does not necessarily work correctly with tilted, decentered, or otherwise
unconventional optical systems. The difficulty arises when computing edge thickness
displacements on components that are not symmetric; for example, between two lenses tilted
with respect to one another.
The thermal index and TCE data provided for Schott glasses comes from Schott, and they state
the data is accurate over the temperature range from -40 to +80 degrees Celsius, and over the
wavelength range 0.435 to 0.644 micrometers. The data may be extrapolated out to 1.06
Because of the complexity of thermal effects modeling, none of the data should be trusted in
critical applications and all computations, index values, and TCE data should be verified
independently of OpticStudio. This is true even when working with Schott glasses within the
ranges specified above.
These Polarization features are available in the System Explorer. The controls in this section set
the default input polarization state for many sequential analysis computations which use
polarization ray tracing. For sequential analysis features such as Spot Diagrams and RMS vs.
Field that support the "Use Polarization" switch to enable polarization ray tracing and
apodization, this is the only method to set the initial polarization state.
Some features consider not only transmission, but also the separate orthogonal vector
components of the polarized light, and polarization phase aberrations (these polarization
aberrations can be calculated using the polarization phase aberration plot; for details, search
the help files for “Phase Aberration”). The Huygens PSF and PSF Cross Section, Huygens MTF,
and Encircled Energy using the Huygens PSF all consider the full polarization vector and
polarization phase aberrations. These computations work by computing data for the Ex, Ey,
and Ez components of the polarized electric field separately, then incoherently summing the
results. The polarization phase aberrations induced in each orthogonal component of the
electric field are considered as any other phase aberration. For a discussion of how Physical
Optics Propagation considers polarization, search the help files for “Accounting for
polarization”.
To define the polarization state of non-sequential sources, see the “Sources” section of the
Object Properties (non-sequential component editor)
The thin film industry uses a different phase convention than is required for ray tracing. The
thin film convention is to measure the phase shift along the normal vector as an imaginary
plane wave propagates from the outermost coating layer to the substrate. This convention
implies the phase shift is largest at normal incidence, and tapers off to zero by approximately
the cosine of the angle of incidence for larger angles of incidence. OpticStudio calls the τs and
τp values “Field” coefficients when using this reference.
For ray tracing, the optical phase advance or delay is measured along the ray. OpticStudio
traces rays directly to the substrate, ignoring the coating thickness. This is because the
thickness between surfaces specified in the Lens Data Editor is the thickness between the
substrates, ignoring coatings. The coating is presumed to grow into the space preceding the
surfaces. Correctly computing the phase of the ray requires back propagating the electric field
to the point the coating begins, and adjusting the coating phase to be measured along the ray
vector rather than the normal vector. OpticStudio calls the τs and τp values “Ray” coefficients
when using this convention. A similar computation yields the factors for reflective surfaces, or
for surfaces where the coating stack has automatically been reversed, and OpticStudio
automatically chooses the correct factors in all cases.
Unpolarized:
If checked, then the polarization values Jx, Jy, X-Phase, and Y-Phase are ignored, and an
unpolarized computation will be performed. An unpolarized computation is performed by
tracing each ray twice, assigning orthogonal initial polarization state for each trace, and then
averaging the resulting transmission. Note that unpolarized computations take longer than
polarized computations, which take longer than computations that ignore polarization entirely.
Some OpticStudio features, such as the optimization operand CODA, require a single specific
polarization state to be defined. These features will use the defined Jx, Jy, X-Phase, and Y-
Phase values defined below even if the “Unpolarized” option is checked.
Method (polarization):
This feature is available whether or not the “Unpolarized” option is checked. It selects the
method used to determine the S and P vectors based on the ray vector. For a discussion of this
feature, see “Defining the Initial Polarization”. The polarization is defined using a Jones vector:
where Jx and Jy have both a magnitude and a phase, and the symbol J is used instead of E to
distinguish the 2D Jones vector from the 3D electric field vector E. OpticStudio normalizes the
specified Jx and Jy values to have unity magnitude, and then scales the intensity as appropriate
if any pupil apodization has been specified. The Jx and Jy values are therefore measured in
terms of relative electric field amplitude.
Let the ray vector be K, which has X, Y, and Z direction cosines (l, m, n). For rays traveling
parallel to the Z axis, or K = (0, 0, 1), the electric field in the Z direction is zero, and the
conversion from the Jones vector to the Electric field is trivial: Ex = Jx, Ey = Jy, and Ez = 0.
For a more general ray, the conversion of the Jones vector (Jx, Jy) to the 3D electric field values
(Ex, Ey, Ez) is ambiguous. It is not possible to interpret the Jx and Jy values as meaning that for
any ray, the Jx value should be applied in such a way to leave the Ey zero, and for the Jy to be
applied so that the Ex is zero. The reason is that the E resulting for the Jones vectors (Jx = 1, Jy
= 0) and (Jx = 0, Jy = 1) must be orthogonal to both K and to each other.
OpticStudio allows user selection of three different methods to perform the conversion from J
to E. In each method, the vector K refers to the ray vector, the Jx value is the field along a
vector S, and the Jy value is the field along a vector P. Note that K, S, and P must all be unit
vectors and orthogonal to each other. The three methods are:
X Axis Reference The P vector is determined from K cross X, and S = P cross K. This method is
the default.
Polarization Analysis
Ray tracing programs generally treat rays as purely geometric entities, which have only a
position, orientation, and phase. For example, a ray is completely described at a surface by the
ray intercept coordinates, the direction cosines which define the angles the ray makes with
respect to the local coordinate axes, and the phase, which determines the optical path length
or difference along the ray.
At the boundary between two media, such as glass and air, refraction occurs according to
Snell's law. Usually, the effects at the interface which do not affect beam direction are ignored.
These effects include amplitude and phase variations of the electric field which depend upon
the angle of incidence, the incident polarization, and the properties of the two media and any
optical coatings at the interface.
Polarization analysis is an extension to conventional ray tracing which considers the effects
that optical coatings and reflection and absorption losses have on the propagation of light
through an optical system.
where Ex, Ey, and Ez are complex valued. The electric field vector must be orthogonal to the
propagation vector of the ray. At a boundary between two media, the transmittance,
reflectance, and phase of the electric field is different for the S and P components of the field.
The S component of the field is the projection of E that lies along the axis orthogonal to the
plane of incidence, while the P projection lies within the plane of incidence. The plane of
incidence contains both the ray propagation vector and the surface normal vector at the
intercept point. The electric field is then divided into Es and Ep components, both of which are
complex valued. When the ray propagates normal to the surface, the distinction between S
and P components of the field is ambiguous.
See section titled “When the ray is normal to the surface” below.
The electric field after the boundary is computed by the consideration of the S and P
transmittance (if the surface is refractive) or reflectance (if the surface is reflective). OpticStudio
computes the reflectance and transmittance coefficients, but only uses the one appropriate to
propagation of the ray. For brevity, the rest of this discussion will use the terms transmittance
and refraction to indicate the terms of interest. If the surface is a reflector (i.e. the material type
is MIRROR) then the reflectance coefficients will be used by the program automatically. The
electric field after refraction is then
where the transmittance coefficients, τs and τp , are complex valued. After the Es and Ep
projections are computed, they are recomposed into the Ex, Ey, and Ez electric field vector and
propagation continues to the next surface. The computation of the transmittance coefficients
depends upon the index of refraction of the incident media, the (possibly complex) index of
refraction and thickness of each layer in the optical coating (if any), and the (possibly complex)
index of refraction of the substrate. The details of this computation are provided in The
Handbook of Optics Volume I, McGraw Hill, 1995, and will not be repeated here.
The thin film industry uses a different phase convention than is required for ray tracing. The
thin film convention is to measure the phase shift along the normal vector as an imaginary
plane wave propagates from the outermost coating layer to the substrate. This convention
implies the phase shift is largest at normal incidence, and tapers off to zero by approximately
the cosine of the angle of incidence for larger angles of incidence. OpticStudio calls the τs and
τp values “Field” coefficients when using this reference.
For ray tracing, the optical phase advance or delay is measured along the ray. OpticStudio
traces rays directly to the substrate, ignoring the coating thickness. This is because the
thickness between surfaces specified in the Lens Data Editor is the thickness between the
substrates, ignoring coatings. The coating is presumed to grow into the space preceding the
surfaces. Correctly computing the phase of the ray requires back propagating the electric field
to the point the coating begins, and adjusting the coating phase to be measured along the ray
vector rather than the normal vector. OpticStudio the τs and τp values “Ray” coefficients when
using this convention. A similar computation yields the factors for reflective surfaces, or for
surfaces where the coating stack has automatically been reversed, and OpticStudio
automatically chooses the correct factors in all cases.
The default in OpticStudio is to convert the Field coefficients to Ray coefficients, and this
setting is recommended in all cases. However, the conversion may be disabled, see “Convert
thin film phase to ray equivalent” in the Polarization section of the System Explorer.
A convenient way of describing the polarization state of the electric field for rays parallel to the
local Z axis only is to ignore the Ez component and consider only Ex and Ey. By plotting on a
cartesian graph the endpoint of the vector (Ex, Ey) as time moves through one period, a figure
is traced out which may be a straight line, a circle, or most generally an ellipse. This curve is
defined by the major and minor axis lengths, and the angle the major axis makes with respect
to the X axis on the cartesian graph. Note the minor axis may have a length of zero, in the case
of linear polarization. For circular polarization the major and minor axis lengths are identical.
Whenever the polarization ellipse is used, it is important to remember that the Ez component
is ignored; which limits the utility of the polarization ellipse in beams that are not nearly
collimated along the local Z axis.
Intensity, I
The intensity is the sum of the squares of the individual components of the electric field, or
equivalently, the dot product of the electric field and it’s complex conjugate:
where the symbol E˜ denotes the complex conjugate of the vector E . Subscripts are applied to
the symbol I to indicate which intensity is listed, for example, Ix would be the intensity in the x
direction only.
Phase, P
The phase of any one component of the electric field can be computed with the arg function,
which is the arctan2 (imaginary / real). The phase is given by
Subscripts are applied to the symbol P to indicate which intensity is listed, for example, Ps
would be the phase for the S component of the electric field.
For homogeneous medium, the path length is the distance in lens units along the ray from the
previous surface to the current surface. Note the index is accounted for separately; this is not
the "optical" path length. For gradient index medium, the effective path length (for purposes
of computing internal absorption) is the actual integral of the optical path length divided by
the base index of the medium (the index at x=0, y=0, z=0). The path length is only used for
computing the internal absorption. The path length will be negative for virtual propagations.
This factor accounts for the internal or bulk absorption propagating through glass. The
absorption is computed from the data provided in the glass catalog. See Defining
Transmission Data in the section Using Material Catalogs.
Internal Transmittance, IT
As the ray propagates from surface to surface, the electric field rotates according to
where τ is the path length and λ is measured in the medium. The propagation factors are
written as the cosine and sine of the angle θ. The “E Field After” from the previous surface will
be multiplied by these factors to yield the input electric field to the current surface.
OpticStudio adopts the negative sign convention for the propagation phase factors to be
consistent with the convention of negative imaginary index to indicate absorption in coating
materials as discussed in “Defining coatings in OpticStudio”.
Amplitude Reflectance, ρ
The reflectance amplitude is the complex valued coefficient of reflectance for the electric field.
These are computed for both S and P polarizations and using both field and ray phase
conventions, as described above.
Amplitude Transmittance, τ
The transmittance amplitude is the complex valued coefficient of transmittance for the electric
field. These are computed for both S and P polarizations and using both field and ray phase
conventions, as described above.
Reflectance intensity is measured normal to the surface. It is given the symbol R, and is always
real valued between 0 and 1. Reflectance can be computed from the reflectance amplitude as
follows:
Absorption intensity is the intensity of the electric field which is neither transmitted nor
reflected:
Diattenuation, D
Diattenuation means "two attenuations", and is used to compare the loss of intensity of the S
polarized light compared to the P polarized light. Diattenuation is defined as
The phase of the transmitted beam is generally different for the S and P polarizations. The
phase is given by
Retardance, S
For transmission, the retardance is the phase of the P polarization minus the phase of the S
polarization:
For reflection, the retardance is the phase of the P polarization minus the phase of the S
polarization plus π :
The different conventions are used to agree with common practice in the thin films industry.
where the (Ax, Ay, Az) are the amplitude and the (Px, Py, Pz) are the phase in each direction.
When we need to consider polarization ellipse, we need to write the electric field (E vector) on
a 2D plane. One of the possible way is to rotate the coordinates to be reference on the plane
normal to ray direction. However, different rays may have different reference plane. Therefore,
when calculating polarization ellipse or Jones vectors, we project the E vector on to the local
xy-plane of each surfaces. This is how the data is calculated in tools "Polarization Ray Trace"
and "Polarization Pupil Map". Note this convention in OpticStudio means the z component of
the E vector will be dropped. A care should be taken when reading the parameters of the
polarization ellipse.
By projecting E vector onto xy-plane, we can write the electric field as below.
where Pxy = Px - Py, which is the phase difference between the X and Y components of the
electric field.
By solving the ellipse, we can get its major axis length, EM, minor axis length Em, and the angle
between major axis and local x axis, Ap.
See Defining Polarizing Components and Defining the Initial Polarization for more information
about Jones vector.
If a ray propagates normal to a surface the distinction between the s- and p- polarizations is
ambiguous. In principle, one is free to choose any two directions that are mutually orthogonal
and orthogonal to the ray’s propagation direction and label them as s- and p- polarizations. If
output ray direction, and be the surface normal then ZOS makes the
following choices to define the s-polarization:
and . In the above chart, to determine if is nearly normal to the surface we check
where Jx and Jy have both a magnitude and a phase, and the symbol J is used instead of E to
distinguish the 2D Jones vector from the 3D electric field vector E. OpticStudio normalizes the
specified Jx and Jy values to have unity magnitude, and then scales the intensity as appropriate
if any pupil apodization has been specified. The Jx and Jy values are therefore measured in
terms of relative electric field amplitude.
Let the ray vector be K, which has X, Y, and Z direction cosines (l, m, n). For rays traveling
parallel to the Z axis, or K = (0, 0, 1), the electric field in the Z direction is identically zero, and
the conversion from the Jones vector to the Electric field is trivial:
, ,
For a more general ray, the conversion of the Jones vector (Jx, Jy) to the 3D electric field values
(Ex, Ey, Ez) is ambiguous. It is not possible to interpret the Jx and Jy values as meaning that for
any ray, the Jx value should be applied in such a way to leave the Ey zero, and for the Jy to be
applied so that the Ex is zero. The reason is that the E resulting for the Jones vectors (Jx = 1, Jy
= 0) and (Jx = 0, Jy = 1) must be orthogonal to both K and to each other.
OpticStudio allows user selection of three different methods to perform the conversion from J
to E. In each method, the vector K refers to the ray vector, the Jx value is the field along a
X Axis Reference: The P vector is determined from K cross X, and S = P cross K. This method is
the default.
When the object is at infinity, the method selected will change the polarization orientation of S
and P for different fields, but all rays from the same field will have the same polarization since
all rays are parallel to each other. For finite conjugates, especially when the object space
numerical aperture is large, the S and P vector orientations will vary for different rays in the
pupil. No matter which method is selected, the transmission results for unpolarized light will
be unaffected because any two orthogonal rays may be traced to compute transmission. For
systems where a particular polarization is desired, care should be taken to verify that the
conversion from J to E yields the intended polarized ray. To review the detailed conversion
results, see “Polarization Ray Trace” in the “Polarization” section of “The Analyze Tab” help file.
where A, B, C, D, Ex, and Ey are all complex numbers. In the Lens Data Editor and in the Non-
sequential Component Editor, OpticStudio provides cells for defining A real, A imag, etc.
Note that what happens to the z component of the electric field is not defined by the Jones
matrix surface, which implicitly assumes the ray is at normal incidence. The E component of the
electric field must satisfy the boundary condition:
The Jones matrix can be used to define a wide variety of polarizing components. For example,
see the sample Jones matrices in the following table. The format of the numbers is (a, b) where
the “a” value is the real part and “b” is the imaginary part.
Component Matrix
Null matrix
X analyzer
Y analyzer
Using the “Polarization Ray Trace” feature, OpticStudio can compute and tabulate the detailed
calculations used to trace the polarization state through the system for any given ray. Other
features directly compute polarization dependent results; see the “Polarization and Surface
Physics” section of “The Analyze Tab” help file for details.
where α is the absorption coefficient and τ is the path length through the glass. The parameter
α generally depends upon wavelength and has units of inverse length. See the Defining
Transmission Data in the section Using Material Catalogs. Polarization effects are not
considered in all OpticStudio computations.
Frustrated TIR (FTIR) occurs when a ray of light traveling through glass strikes an interface at an
angle exceeding the critical angle. If another dielectric medium, such as another piece of glass,
is placed close, but not touching the interface, some light will transmit through the thin gap
and propagate, even though the refraction at the boundary cannot satisfy Snell's law. Both the
reflected and the transmitted beams will be affected, depending upon the thickness of the
gap. In the limit of the gap having zero thickness, the light will continue through as if there
Although this appears to be a special case, the very general model incorporated into the
polarization routines of OpticStudio handle FTIR as any other coating problem. The trick is to
define a coating that reflects the situation. One of the default coatings is GAP, defined to be
0.1 waves of AIR, with index unity. Using the tilted surface with a Y-Tangent of 1.0, and placing
the coating GAP on the boundary yields the following system, with correctly modeled
polarization properties. Note the air gap may be changed by editing the coating file as
described in the “Defining coatings in OpticStudio” section of this reference file.
With the GAP coating in place, OpticStudio can now compute either transmitted or reflected
polarization properties.
The following layout is an example of a FTIR beamsplitter in transmission. The tilted surface
between the two glass blocks has a GAP coating.
However, the ray tracing for other purposes (such as computing system transmission, ray fans,
optimization) will only proceed along the transmitted path. To model the reflected path, give
the internal tilted surface a glass type of MIRROR, add a 90 degree coordinate break after the
tilted surface, and change the sign of the remaining thicknesses as usual.
The coating in this case now needs to be modified to indicate the presence of the second
dielectric block, even though no ray tracing will be conducted in the transmitted path; just the
reflected path. A new coating needs to be defined in the coating file (called FTIR in this
example) that looks like:
COAT FTIR
AIR .1
N15 1
The “coating”, when applied to a mirror, treats the mirror as a gap of air followed by piece of
glass. Note that detailed modeling of the index and dispersion of the substrate glass is
Finally, note that conventional TIR can also be modeled by increasing the gap thickness.
Distances much greater than a fraction of a wavelength are essentially equivalent to an infinite
gap. However, very large thicknesses for evanescent wave propagation should not be defined
in the coating file because of "underflow" numerical errors which arise because the
transmission is exceedingly low. One wave, or an optical thickness of 1.0, is usually sufficient.
The following layout is an example of a FTIR beamsplitter in reflection. The tilted “mirror”
surface has a FTIR coating.
The graph below shows the reflection versus angle for the FTIR beamsplitter in reflection.
There are a few limitations to the polarization analysis capabilities of OpticStudio. The data in
the coating file should always be carefully checked for accuracy whenever fabrication decisions
are being made. Also, the reflectivity and transmission curves generated by OpticStudio should
always be presented to the coating manufacturer as a check to ensure the coatings will behave
as intended.
The polarization ray tracing algorithm generally does not return correct results for certain
types of surfaces, such as paraxial surfaces, diffraction gratings, binary optics, or Fresnel
surfaces. Generally, only surfaces which have refraction or reflection described by Snell's law
have valid polarization data computed. In particular, the polarization algorithm assumes that
rays remain in the plane of incidence after refraction or reflection. This is true for conventional
refractive optics (it is a condition of Snell's law) but is not true in general for diffractive optics
and "imaginary" surfaces such as paraxial lenses.
Because the exit pupil is the image of the stop in image space, the exit pupil represents the
only location in image space where the beam has a clearly defined edge. The illumination at
the exit pupil is generally smoothly varying in amplitude and phase, and there is a clearly
defined boundary between regions of zero amplitude and nonzero amplitude. A reasonable
assumption is that there are no diffraction effects apparent in the wavefront when viewed in
the exit pupil. This is asymptotically true if all apertures in the optical system are large
compared to the stop limited beam size incident upon each aperture. Even if the exit pupil is
virtual, which is often the case, the exit pupil still defines the only location in image space
where the beam is diffraction free.
As the wavefront propagates from the exit pupil towards the image surface, the beam profile
becomes complex in amplitude and phase, and the wavefront extends over all space due to
the effects of diffraction. For this reason, the phase error as measured in the exit pupil is
uniquely and critically important to the description of the wavefront and image quality.
Exit Pupil
OpticStudio by default uses the exit pupil as a reference for OPD computations. Therefore,
when the OPD is computed for a given ray, the ray is traced through the optical system, all the
way to the image surface, and then is traced backward to the “reference sphere” which lies in
the exit pupil.
The figure below shows a singlet. The orange surface represents the reference sphere at the
exit pupil.
The OPD as measured back on this surface is the physically significant phase error important to
diffraction computations, such as MTF, PSF, and encircled energy. This is shown in blue in the
image below.
Infinity
The reference to “Infinity” makes the assumption that the exit pupil is very far away and that
the OPD correction term is given strictly by the angular error in the ray.
For focal systems (where option Afocal Image Space is unchecked), the OPD is the difference
of optical path lengths up to the image plane between the ray being considered and the chief
ray, minus a correction term. The correction term is defined as below:
This setting should only be used if OpticStudio is unable to correctly compute the effective exit
pupil location and size. This can occur with some very unusual optics which do not form
images (real or virtual) of the stop surface, or for some non-axial systems where the computed
exit pupil lies too close to the image surface for the exit pupil correction to be accurate. Do not
use the Infinity reference unless there is compelling reason to believe that the exit pupil
computation is not correct.
This settings can also be used when working on coherent effects from multiple rays at the chief
ray point. This OPD calculation sets all the phase values to be appropriate for passing through
that one point.
Note that for afocal systems (where option Afocal Image Space is checked), this option has no
effect. The OPD calculation will be equivalent to setting the Reference OPD to Exit Pupil.
Absolute/Absolute 2
l For focal systems, where option Afocal Image Space is unchecked, the reference plane
is the Image Surface, which is the last surface of the Lens Data Editor. Absolute and
Absolute 2 will use the same definition.
l For afocal systems (where option Afocal Image Space is checked), the difference
between Absolute and Absolute 2 is detailed in the table below:
Reference
Absolute Absolute 2
OPD:
Reference
Plane (in
Plane normal to the chief ray at the
orange):
location of the image surface,
Image plane
regardless of the system’s exit pupil
location.
The Absolute option is useful if the exit pupil position cannot be determined accurately, as may
be the case for non-axial afocal systems.
Paraxial Rays
Paraxial ray properties are generally not defined for non-rotationally symmetric systems. For
this reason, OpticStudio by default ignores all tilts and decenters due to coordinate breaks
when tracing paraxial rays. By ignoring tilts and decenters, OpticStudio can compute the
paraxial properties of an equivalent centered system, which is generally the correct approach
even for systems without symmetry. The default setting “Ignore Coordinate Breaks” is
therefore highly recommended for systems where ignoring tilts and decenters results in a
reasonable axial approximation to the actual system.
There are cases where "Consider Coordinate Breaks" may be required. For ray tracing through
gratings, coordinate breaks may be required even for paraxial rays, otherwise, the rays may not
be able to satisfy the grating equation. Ray tracing through non-sequential objects may also
require that paraxial rays consider coordinate breaks.
Tracing Rays
By default, OpticStudio computes the paraxial and working F/# of a system using ray tracing.
For details, see the definitions for “Paraxial working F/#” and “Working F/#”.
For systems with very large F/#s, the ray tracing method may be inaccurate, because the very
small angles between the marginal and chief rays leads to round-off error, and even small
amounts of aberrations such as spherical aberration can significantly affect the calculation of
F/#. For these reasons, OpticStudio will “cap” the maximum F/# to a value of 10,000. It is
recommended that rays be used to compute the F/# for all systems whose F/# is less than
10,000.
Pupil Size/Position
The preferred method of modeling systems with very large F/#s is to use afocal mode. See
“Afocal Image Space”. Optionally, the F/# can be computed using the exit pupil distance
divided by the exit pupil diameter. There are some important points to consider when using
this option. First, OpticStudio makes no attempt to scale the F/# with either pupil orientation
or field angle. Second, the exit pupil diameter and position used are based upon the paraxial
values for these parameters (see the definition for “Exit pupil diameter”). In the presence of
significant pupil aberration, the paraxial values may not agree with the real, aberrated pupil
sizes. The best way to avoid this possibility is to place the stop at the end of the optical system,
prior to the image surface, and use ray aiming (see the definition for “Ray Aiming”) and float by
stop size for the aperture type (see the Aperture section of the Surface Properties). This option
Note that some of these only use the Huygens integration with specific settings. See the
documentation for the specific analysis or operand to understand when it relies on the
Huygens PSF.
Auto
Allow OpticStudio to control which phase reference is used to compute the Huygens Integral.
The criterion is based on consideration of the exit pupil distance from the image plane, the
wavelength, and the size of the image.
Force Planar
Override OpticStudio’s criterion to determine which phase reference is used to compute the
Huygens Integral and instead always use a planar phase reference. Additionally, the Huygens
integration will use plane waves propagated from the exit pupil to the image plane to
coherently sum up the wavefront contributions at each point in the image plane.
Force Spherical
Override OpticStudio’s criterion to determine which phase reference is used to compute the
Huygens Integral and instead always use a spherical phase reference. Additionally, the
Note that if Afocal Image Space has been selected under the Aperture section of the System
Explorer, then the selection for the Method To Compute Huygens Integral will be automatically
set to “Force Planar” with no ability to be modified. This is because the planar phase reference
is the only reference that can be used in afocal imaging systems.
Other Settings:
If checked, selected data will not be printed for coordinate break surfaces. Use of this option
can shorten and clarify some text listings, particularly in systems with many coordinate break
surfaces. Supported features include ray trace listings, index data, and global coordinate data.
If checked, OpticStudio will not split calculations into multiple threads of execution. Threading
allows computers with multiple CPU’s or multi-core CPU’s to calculate results more quickly.
The only reason to turn off threading is if insufficient memory exists to break calculations into
separate threads. This is primarily a debugging and diagnostic tool and should normally be left
unchecked.
OPD Modulo 2 pi
If checked, all OPD data will be computed as the fractional part of the total OPD. All OPD
computations will return results that are between -π and +π, or -0.5 and +0.5 waves. This
method of computing OPD may have applications to some specific problems. However, its use
is discouraged unless the user fully understands the meaning and ramifications of computing
OPD in this manner.
If checked, then calculated data for all open analysis windows (sequential mode) and/or all
detectors (non-sequential mode) will be cached in the current session file.
This will allow the data to be restored when the lens file is loaded – significantly decreasing the
time for file load – but also increases the size of the session file associated with the lens file.
Note that this setting overrides the default “Include Calculated Data in Session File” setting in
the OpticStudio Preferences.
Note: Not all analyses support caching calculated data in the Session file. If a need arises for an
analysis that is not supported, please contact technical support for assistance.
If checked, then tolerance data will be cached in the current session file. This will allow the data
to be restored when the lens file is loaded but also increases the size of the session file
associated with the lens file. Note that this setting overrides the default “Include Tolerance
Data in Session File” setting in the OpticStudio Preferences.
Ray Aiming
Ray Aiming is available in Sequential mode only.
These Ray Aiming features are available in the System Explorer. The controls define the ray
aiming algorithm.
Ray aiming is an iterative ray tracing algorithm in OpticStudio that finds rays at the object that
correctly fill the stop surface for a given stop size. It is generally only required when the pupil,
which is the image of the stop as seen from object space, is considerably aberrated, shifted, or
tilted.
If ray aiming is off, OpticStudio will use the paraxial entrance pupil size and location
determined by the aperture settings and calculated at the primary wavelength on axis for
launching rays from the object surface. This means OpticStudio will ignore entrance pupil
aberration. For slow systems with modest field angles, this is perfectly acceptable. However,
certain systems, such as those with low F/#'s or large field angles, may have significant
OpticStudio can be instructed to account for aberrations of the pupil using ray aiming. With
ray aiming, every ray trace is performed iteratively, with the program adjusting the ray
coordinates or cosines in object space so that the ray crosses the correct location on the stop
surface. To determine the correct location on the stop surface, the stop surface radius must be
computed. The stop surface radius is computed by tracing a marginal ray from the center of
the object to the stop surface at the primary wavelength. Either paraxial or real rays may be
used in this trace to determine the stop radius.
Paraxial rays are well behaved and paraxial definitions are commonly used for most first-order
system properties such as focal length, F/#, and magnification, and so paraxial rays may also
be used to determine the stop size. However, for systems that have significantly aberrated
pupils, there will be a difference between the paraxial and real ray stop radius. These systems
will exhibit a difference between the real and paraxial ray system aperture. For example, the
paraxial object space numerical aperture may be defined as 0.4, but the actual numerical
aperture of real rays may be a different value.
For real rays to have the object space properties defined by the system aperture, use real rays
instead of paraxial rays to determine the stop radius. Note that real ray based ray aiming will
not work in systems where the stop lies in a caustic or where the real rays cannot be traced at
the full entrance pupil diameter or numerical aperture. If real ray aiming causes any of these
problems, set the ray aiming to paraxial rather than real. Also, if real rays undergo TIR or are
otherwise unable to trace to the stop, OpticStudio will use paraxial rays to determine the stop
radius, and a warning to this effect will be included in the System Check Report. Note that once
the stop radius is determined all rays are aimed to the correct location on the stop, regardless
of whether paraxial or real rays were used to determine the stop radius.
Although real ray aiming is more accurate than paraxial entrance pupil aiming, most ray traces
will take from two to eight times as long to perform. Therefore, real ray aiming should only be
used when required, and when paraxial ray aiming does not account for the majority of pupil
aberrations.
To determine the amount of entrance pupil aberration in your system, select ray aiming off,
and then look at the pupil aberration plot. Pupil aberration of less than a few percent is
generally insignificant. If your system has significant pupil aberration, turn paraxial ray aiming
on, and look at the pupil aberration plot again. If there is still significant pupil aberration with
paraxial ray aiming, then change to the real ray aiming algorithm. The aberration will decrease
to zero, or very nearly so. Note that ray aiming does not, of course, actually eliminate pupil
aberration, it merely accounts for it.
For systems with virtual stops, such as some eyepieces, the effective stop location and size may
be a function of wavelength. For these systems, use the multi-configuration capability to treat
each wavelength and system aperture definition separately.
If checked, OpticStudio caches ray aiming coordinates so that new ray traces take advantage of
previous iterations of the ray tracing algorithm. Using the cache can speed up ray tracing
dramatically. However, use of the cache does require that the chief ray can be traced
accurately. For some systems, the chief ray cannot be traced, and for these systems, the cache
should be turned off. If Robust Ray Aiming is checked, then Use Ray Aiming Cache is forced
into effect.
If checked, OpticStudio uses a more reliable, but slower algorithm for aiming rays. This switch
should only be set if the ray aiming algorithm is failing even with the cache turned on. This
switch has no effect unless the ray aiming cache is checked on. Robust mode goes through an
additional check to make sure that if multiple ray paths to the same stop surface location exist,
only the correct one is chosen. This is typically a problem in very fast, very wide angle systems
where off axis fields may find a virtual path to the stop that confuses the ray aiming iteration.
Pupil Shift:
For some very wide angle or highly tilted or decentered systems, the ray aiming feature will fail
if unassisted. The problem is that the paraxial entrance pupil is used as a first guess to trace the
ray. If the pupil aberration is severe, it is possible that even this first guess cannot be traced,
which prevents the algorithm from taking a second, more refined guess.
The solution is to provide a rough guess as to how much the pupil has been shifted and
compressed with respect to the paraxial pupil. There are three shift components; x, y, and z; all
measured in lens units. There are two compress components; x and y, and these are
dimensionless scaling factors. The default value of zero for all five may be modified to assist
the algorithm in finding a successful first guess for the ray aiming.
The shifts move the center of the aim point on the paraxial entrance pupil. Positive values for
the z shift indicate that the aim point is to the right of the paraxial pupil, negative values
indicate the pupil is shifted to the left. Most wide angle systems have left-shifted pupils. The z
pupil shift value provided is scaled linearly with the field angle of the ray being traced, so the
pupil shift refers to the offset of the pupil at full field. All shifts are in lens units.
If the stop is to the left of the object, the automatic calculation won't give accurate
information, and the automatically calculated shifts are set to zero. The user will need to set
the pupil shifts himself.
If selected, the x and y pupil shift values are also scaled with field, otherwise, the x and y shift
values are used for all fields without any scaling. All shifts are in lens units.
Pupil Compress:
The x and y compress values are used to change the relative coordinates on the paraxial
entrance pupil to start the iteration. A value of zero means no compress, while a value of 0.1
indicates the pupil is compressed 10%. The compress values are particularly useful when the
real pupil is smaller than the paraxial pupil, and rays traced at the full paraxial pupil size are
difficult or impossible to trace.
It is important to understand that the exact values of the pupil shift and compress values is
unimportant. Once the first guess ray can be traced, the algorithm will robustly find the exact
pupil location. The pupil shift and compress values are just to get the ray aiming started.
Neither the shift nor the compress values actually change the size of the entrance pupil.
Generally, guessing at the pupil shift and compress values is an acceptable way of determining
a suitable value.
If selected, the Enhanced Ray Aiming algorithm is used, this is designed to be more stable and
faster for systems where the standard or Robust ray aiming algorithms can struggle, in
particular wide field-of-view systems.
The Enhanced Ray Aiming algorithm is designed to be used for the following types of systems:
than 90°.
This option can be used to improve the Enhanced Ray Aiming algorithm for systems
substantial rotations around the z-axis although it may improve ray tracing in other types of
systems. It is recommended to leave this option unchecked unless there are ray aiming issues.
Number of Steps:
Choose the number of steps used during the Cache Setup for Enhanced Ray Aiming. It is
recommended to use the default value (10) however a higher number of steps can improve
stability but will reduce speed of the ray aiming calculations.
Troubleshooting:
Occasionally there will be cases where it can be observed that ray bundles do not fill the stop
surface or errors messages such as "Cannot Determine Object Coordinate" and "Cannot find
rays to yield requested image height" are displayed. Usually turning on ray aiming will solve
this error message. If, when ray aiming is turned on, the initial first guess ray cannot be traced
then the fall back option is to search over a grid of rays. That grid of rays needs a scale to set
the distance between grid points, and that scale is set by the first surface with optical power.
If the semi-diameter of that surface is zero, then we cap the search scale based on the radius of
that surface or the entrance pupil diameter depending on which is smaller. Note this is mainly
for a cautious check as it's unusual to have a surface with optical power and zero semi-
diameter at the same time.
If the semi-diameter of that surface is non-zero, then we cap the search scale based on the
radius and a multiple of the semi-diameter value depending on which is smaller.
The ray aiming search can be aided by applying a fixed semi-diameter solve to the first surface
with optical power. This will narrow down the search and will help the ray aiming algorithm
converge more quickly. Even in cases where no error messages are generated, applying a Fixed
solve to the Clear Semi-Diameter of the first surface with optical power can significantly
increase the update speed of the system.
The Ray Aiming Wizard uses information from Pupil Aberration and the RMS Wavefront Error
(see RMS vs. Field for more information) to determine which Ray Aiming settings to
recommend. The reasons for the recommendations are described in the Decision Metrics
section of the output text.
After running the Ray Aiming Wizard, a text report is generated. There are four main sections
in the report:
l Basic system information: File name, system aperture and field settings.
l Decision Metrics: A summary of how the Ray Aiming Wizard tested the system and
found the recommended settings.
l Raw data: The data used to make each decision shown in the previous section.
After reviewing the recommended settings, the recommendations can be applied by clicking
"Apply Recommended Settings and Close".
If no combination of Ray Aiming settings will resolve unexpected system behavior such as
discontinuities in analysis results or missing rays, the Ray Aiming Wizard will not provide
recommended settings.
Material Catalogs
These Material Catalog options are available in the System Explorer. To access a catalog, it
must be placed in the glass catalog folder (see Folders).
For more information on changing material catalogs, see Using Material Catalogs.
To set a default catalog, see the Editors section of the OpticStudio Preferences window,
accessible from the Setup Tab.
Catalogs To Use
Lists the names of the currently used glass catalogs (without file extensions).
Catalogs Available
Lists the names of the available but not currently used glass catalogs. Catalogs may be moved
back and forth between these lists using the arrow buttons.
Note that these catalogs were referred to as “Glass Catalogs” instead of “Material Catalogs” in
previous versions of the software.
In some systems, such as a source placed inside a reflective sphere with perfect reflectivity and
no bulk absorption, the rays will bounce around until this limit is reached, and the energy of
the ray finally will be discarded. These systems are of course not physically possible, since no
reflection or propagation through anything but a vacuum is perfectly lossless. The maximum
value allowed is 4,000 intersections.
It is critical to understand that each ray launched from a source can have up to the maximum
number of segments. If the maximum number of segments is 1,000, and 5,000 individual rays
are launched, OpticStudio can store up to 5,000,000 segments. The total RAM requirement is
about 140 bytes times the maximum number of segments. Setting the limit at 100,000
segments would require 14 Mb of RAM per ray. For this reason, do not arbitrarily (and
needlessly) set the maximum to very large numbers; there is a limit of 2,000,000 OpticStudio
will allow.
Note that with even a modest number of segments, OpticStudio can still trace millions of
rays.... the maximum number of segments is only a limit on how many segments are allowed in
one single ray. Most OpticStudio features only use one ray at a time, so the total RAM
requirement is driven by the maximum number of segments rather than the number of rays
traced. The exception is the Shaded Model display, which must be able to allocate enough
RAM to hold all segments for all source rays drawn.
The glue distance is the distance below which the objects are considered in contact. It is
important that objects not be separated by distances very close to the glue distance. If it is
intended that two objects be in contact, then the maximum spacing between the objects
should be several times smaller than the glue distance. If it is intended that the objects be
separated, then the distance between the object should be several times larger than the glue
distance. Object spacings very close to the glue distance will yield inconsistent ray tracing or
geometry errors. This should be avoided by adjusting either the object spacing or the glue
distance.
The glue distance also determines the minimum propagation length for ray tracing. If a ray-
object intersection is less than the glue distance away from the previous intercept, the
intercept is ignored.
The glue distance is also used in the tolerance associated with ray tracing to general curved
surfaces. OpticStudio will iterate until the error in the ray-surface intercept solution is less than
one-fifth of the glue distance.
In the majority of cases, no adjustment should be made to the glue distance parameter. The
glue distance must be no smaller than 1.0E-10 and no larger than 1.0E-03.
l If Simple Ray Splitting is off, then both the reflected and refracted rays are traced. Each
ray gets the fraction of energy corresponding to the reflection and transmission
l If Simple Ray Splitting is on, then either the reflected or the refracted ray is traced, but
not both. If part of the light is absorbed at the interface, Simple ray splitting will only
consider the non-absorbed rays, but the loss of energy will be taken into account. The
decision to trace the reflected or the refracted ray is probabilistic, with the reflection
and transmission coefficients interpreted as a relative probability of taking that path.
Whichever path is selected, the reflected or refracted will ray be assigned all the energy
that would have propagated down both paths. The advantage to using Simple Ray Split-
ting is that fewer rays are traced, so computations are faster. The disadvantage is that
the rays traced contain less detailed information.
If the surface has scattering or diffraction properties, then the incident rays may still be split
into multiple segments, but only for either the reflected segments or the transmitted
segments. In other words, though rays may still be splitting based on the defined surface
properties, the splitting will only occur in the reflected or transmitted path, but not in both
paths at once.
Named Filters
Named Filters is available in Non-sequential mode only.
For example, the following syntax will create a named filter called "MyFilter" that will select rays
that hit both objects 5 and 6, but not 9:
MyFilter; H5 & H6 & M9
The name "MyFilter" may then be used instead of the explicit string wherever filter strings are
used.
Settings:
Lens Title The lens title will appear on graphic and text output. The title is specified by typing
the title in the required space.
Notes The notes section allows entry of a few lines of text which is stored with the lens file.
Files
Settings:
Coating File The name of the file, in the coatings folder (see Folders), that contains the coating
material and layer definitions used by this lens. The default name is COATING.DAT. Each lens
file may use a separate coating file if desired.
Scatter Profile The name of the file, in the <data>\Profiles folder (see Folders), that contains
the scattering profiles used by this lens. New scatter profiles may be added or old ones deleted
on the Scattering tab of the NSC Objects property dialog box. See “Coat/Scatter tab” for
details. The default name is SCATTER_-PROFILE.DAT. Each lens file may use a separate scatter
profile file if desired.
ABg Data File The name of the file, in the <data>\ABg_Data folder (see Folders), that contains
the ABg data definitions used by this lens. The default name is ABG_DATA.DAT. Each lens file
may use a separate ABg data file if desired.
Gradium Profile The name of the file, in the glass catalog folder (see Folders), that contains
the Gradium surface profile data. The default name is PROFILE.GRD. Gradium profile files must
end in the extension GRD. See “GRADIUM™”.
Is Project Directory Select whether to use files saved in a Project Directory. This checkbox is
automatically selected when a Project Directory is first created or when a file is loaded from a
Project Directory. It is important to note that this checkbox can no longer be unticked (or
ticked) manually by the user once the Project Directory is created. For more information on
Project Directories, see Convert to Project Directory.
Units
Lens Units:
Lens units defines the units of measure for dimensions in most of the spreadsheet editors.
These dimensions apply to data such as radii, thickness, entrance pupil diameters, non-
sequential position coordinates, and most other parameters in OpticStudio.
There are four choices for lens units: millimeters, centimeters, inches, or meters.
Source Units:
Source units define the unit of measure for the flux (power) or energy emitted by non-
sequential sources. This setting is used for sources defined in the Non-sequential Component
Editor, and for defining the power and irradiance in physical optics analysis. Source units may
be either watts, lumens, or joules, with the additional choice of the prefixes femto, pico, nano,
micro, milli, kilo, mega, giga, or tera. Watts are used for radiometric analysis, lumens for
photometric analysis, and joules for energy analysis. The key difference between radiometric
and photometric units is that photometric units are wavelength weighted to the response of
the human eye. See the table in the next section for more information on units.
Analysis Units:
Analysis units define the unit of measure for irradiance (radiometric) or illuminance
(photometric). This setting only affects data as displayed on detectors collecting light from
sources defined in the Non-sequential Component Editor. Irradiance units are watts/area,
where area is in square meters, centimeters, millimeters, feet, or inches. Illuminance units are
lumens/area. Energy density units are joules/area. The unit prefixes femto, pico, nano, micro,
milli, kilo, mega, giga, or tera are all supported.
watt/inch2 joule/inch2
Radiance Luminance Radiance
One unfortunate convention in the optics industry (and in OpticStudio) is to use the term
“Intensity” for two distinctly different things. Intensity is commonly used in ray tracing
applications and the optical design community to define the flux represented by a single ray,
measured in watts or lumens. Intensity is also used in the illumination and radiometry fields,
but the definition used there is flux per solid angle, measured in watts per steradian or lumens
per steradian (candela).
OpticStudio keeps track of energy by associating with each ray a flux value, which is equal to
the square of the electric field vector also associated with the ray. When this ray strikes a
detector object, OpticStudio computes the area the pixel represents to compute irradiance
(flux/area) and the solid angle the pixel represents to compute the radiometric intensity
(flux/solid angle). The difference in these two uses of the word intensity can always be resolved
by considering the nature of the analysis OpticStudio is performing.
For more information on radiometric and photometric units, see the Handbook of Optics
referenced in “What doesn't OpticStudio do?”
MTF Units:
MTF units for focal systems may be cycles per millimeter or cycles per milliradian. When using
cycles per millimeter, the MTF is computed for spatial frequencies in image space on the image
surface. When using cycles per milliradian, the MTF is computed for angular frequencies in
object space. The MTF units selection affects the units for all MTF computations, including
analysis, optimization, and tolerancing. The MTF units selection is not used in afocal mode, as
afocal mode MTF always uses cycles per afocal mode unit.
Manage Providers Button: Select this button to open the Estimate providers dialog to edit
your account information for cost estimate providers.
If you don’t already have a user account registered with the cost estimate provider, select the
Open in browser link to load the website in your default web browser before using cost
estimator functionality in OpticStudio. In order to save user login information between
different OpticStudio sessions, make sure to check the “Save password” checkbox.
Export Provider Data Button: Select this button to export your provider login credentials in
an encrypted file that can be ported to other computers or shared with trusted co-workers.
Import Provider Data Button: Select this button to import provider login credentials from
encrypted files previously exported from OpticStudio.
OpticStudio Preferences
The OpticStudio Preferences are available in the System section of the Setup tab.
The OpticStudio Preferences button opens a window where the user can define preferences for
the current project and save to a project configuration file.
Settings:
Address Line 1 The first line of text to appear in the address box.
Address Line 2 The second line of text to appear in the address box.
Address Line 3 The third line of text to appear in the address box.
Address Line 4 The fourth line of text to appear in the address box, unless file name or zoom
position is chosen instead.
Address Line 5 The fifth line of text to appear in the address box, unless file name or zoom
position is chosen instead.
Show Line 5 As Choose either the entered text, the lens file name, or the zoom position.
Button Functions
Colors
The Colors settings are available in the OpticStudio Preferences window, which can be
displayed via a button in the System section of the Setup Tab.
These settings define the colors used for drawing graphics and for the background color of
rows in the various spreadsheet editors.
Each color is used by the corresponding wavelength or field position when graphing ray fan
data, spot diagrams, and other data. For example, typically wavelength or field number 1 uses
color 1, field or wavelength 2 uses color 2, and so on. When using the defined colors in the
spreadsheet editors, OpticStudio automatically blends the color with white to make the
foreground text more readable.
Highlight Color The color OpticStudio uses to draw lens surfaces and NSC objects currently
selected in the LDE and NSCE, respectively.
Gradient Top/Gradient Bottom These colors are used to define the colors for the gradient fill
background in the Shaded Model displays.
Button Functions
Editors
The Editors settings are available in the OpticStudio Preferences window, which can be
displayed via a button in the System section of the Setup Tab.
These settings determine characteristics of the spreadsheet editors. If the editor cell sizes are
too narrow to display all the data in each cell, an asterisk "*" symbol will be printed instead of
the truncated data.
Load Reloads the last saved width settings of the specified editor.
Cell Size The width in characters of a single edit cell in the specified editor.
Color Rows If checked, then rows in the specified editor spreadsheet are color coded. See
“Row Color”.
Other Settings
Decimals This sets the number of decimal digits displayed in the editors. Selecting "Compact"
will vary the number of decimals displayed to minimize the space required to display numbers.
Exponential Above / Below OpticStudio displays numeric data in either fixed decimal or
exponential (scientific) notation. If the absolute value of the number is either a) greater than or
equal to the “Exponential Above” value, or b) not zero but less than or equal to the
“Exponential Below” value, then the number is displayed in exponential notation. Otherwise
fixed notation is used.
Auto Update Controls how and when OpticStudio performs updates on the editor data. The
“None” setting means pupil positions, solves, and other lens data editor data are not updated
until “Update” button is pressed selected from the desired data window. This is usually either
for performance reasons or because the system will likely be in an invalid intermediate state
and a bunch of error messages aren't helpful.
1) When a change is made in the Multi-Configuration Editor, the change will not be reflected in
the Lens Data Editor because the system is not updated, which includes processing the Multi-
Configuration Editor to overwrite system values.
2) On the other hand, when making a change in the Lens Data Editor the change will be
reflected in the Multi-Configuration Editor. This is not to 'hide' changes that have been made
to the system from the interface.
The “Update” setting will cause an update to be performed whenever new data is typed in to
the lens data or multi-configuration editors.
“Update All” causes all windows to be updated whenever new data is typed in the editors.
Note that the Auto Update setting in the OpticStudio Preferences sets the default preference
for new lens files. This setting can be overridden in any open lens file by changing the Update
mode in the Lens Data Editor Toolbar, Non-sequential Component Editor Toolbar, Multi-
Configuration Editor Toolbar, or System Explorer.
Default Catalog The name of the default glass catalog to use. See “Glass Catalogs”.
Move Selection After Pressing Enter / Direction To Move Selection After pressing Enter in
an editor cell, this setting specifies which adjacent cell is selected next. The options are: down,
right, up, and left.
Default Editor View Select the default viewing mode for editors. Newly opened editors will
default to the view selected here. The recommended default is Normal View, as this view
enables more dynamic editor functionality. For more information, see the Express View section.
Font Choose the Font, Style, and Size for the editor displays. To change the text in the graphics
based analysis windows see the "Graphics" section of the OpticStudio Preferences. To change
the text displayed in the text based analysis windows see the "General" section of the
OpticStudio Preferences.
Update Merit Function On Load Controls when OpticStudio performs updates on the merit
function editor data.
Button Functions
Folders
The Folders settings are available in the OpticStudio Preferences window, which can be
displayed via a button in the System section of the Setup Tab. These settings determine where
OpticStudio will place or search for certain types of files.
OpticStudio uses two main folders for storing programs and data. The OpticStudio Application
itself is stored under the Program Files folder, typically in C:\Program Files\Zemax OpticStudio.
This folder is determined upon installation and should generally not need to be changed by
the user. This folder is called the “Program” folder and is referred to as <program>.
Other user data files, Dynamic Link Library (DLL) files, executable files for OpticStudio
extensions, license and configuration information, and the default OpticStudio sample files are
stored in a “root” folder that is selected the first time you launch OpticStudio. OpticStudio will
display this root folder as the “Data” folder, and is referred to as <data>.
The first time you launch OpticStudio, it will create a folder called “Zemax” inside your user
account’s “Documents” folder. A typical path would be C:\users\username\Documents\Zemax.
Using this folder makes it easily accessible, and is a folder that is typically selected by most
backup software and company IT departments. For OpticStudio Online, the <data> folder will
be set to the Cloud drive “P:\Zemax\” by default. For speed reasons, the default “Undo” folder
for OpticStudio Online is set to the local virtual machine drive
“C:\Users\Mainframe2\Documents\Zemax\UNDO”.
The “…” button may be used to browse for and to select the desired folder.
After choosing a new folder, you will get the following prompt:
As indicated by the above message, when you change the <data> folder, it will copy the
default data files supplied by Zemax into the new folder. It also resets all the following
individual folder selections to be subfolders of your new <data>folder. Therefore, if you have
previously changed the other folder locations on this list (such as Lens, Objects, ZPL…), you will
need to change them again.
The folders for lens, object, macro, glass catalog, coating, POP, image, scatter, CAD, MATLAB,
and Undo files may be individually modified from the default in these preference pages. The
“…” button may be used to browse for and to select the desired folder.
Note that if the default folder names are changed, then any updated files distributed with a
new version of OpticStudio will NOT automatically be placed in the new folders. For this
reason, it is recommended that if the folder names are modified, that none of the files included
with the OpticStudio distribution (such as SCHOTT.AGF) are used in the modified folders.
Objects The folder for Non-sequential Component object, source, aperture, and other files.
ZPL The folder for ZPL Macros. Macros may also be placed in subfolders within the specified
folder.
Images The folder for Image Simulation IMA, BMP, JPG, and PNG files.
Inventor Files The folder for Autodesk Inventor *.IPT and *.IAM files.
Creo Parametric Files The folder for Creo Parametric *.PRT and *.ASM files.
Creo Path The folder where the PTC Creo Parametric executable is installed.
If you have changed the <data> folder, the below folders will be contain only the default files
Zemax ships with. If you have added any of your own files, you will need to move them
manually to the correct subfolder within your new <data> folder.
Autosave This folder is where files that are periodically automatically saved in case
OpticStudio shuts down unexpectedly.
DLL Dynamic Link Library files both supplied with OpticStudio and added for user-defined
capabilities, and executable files for OpticStudio extensions, are stored in the DLL folder inside
the <data> folder. The DLL folder location cannot be modified.
Button Functions
Extension Description
ANSI Glass Format. These are text files which contain the data for the glass
AGF catalogs. A text format is used so that additional data may be incorporated in
future releases of OpticStudio.
Annotation files. These binary files store user defined annotations for
ANN
OpticStudio graphics.
Binary Glass Format. To accelerate the loading of AGF files, OpticStudio
BGF converts AGF files to BGF, which are the version specific binary images of the
glass catalogs.
C C language source code files.
Configuration file. OpticStudio.CFG is the main configuration file which
describes the user-selected options on the environment dialog box. There are
CFG
numerous other files that may be present which end in CFG, such as RAY.CFG,
which contains the user-defined defaults for the ray fan plot.
General
These General settings are available in the OpticStudio Preferences window, which can be
displayed via a button in the System section of the Setup Tab.
Date/Time Select either None for no date or time, Date for the date only, and Date/Time for
both the date and the time to be printed on plots and graphics.
Check For Updates Select how often OpticStudio should check to see if a new version of
OpticStudio is available. Updates may be downloaded from www.zemax.com. An active
Internet connection is required for OpticStudio to be able to check for updates. The “Check For
Updates” button listed under the Help tab can be used to check for updates anytime.
Language Choose English, Japanese, or Chinese. This setting changes the user interface
language of OpticStudio. Not all features fully support languages other than English.
ZMX File Encoding To support user interface languages other than English, OpticStudio by
default uses Unicode (UTF-16 LE) file encoding for most files, including ZMX files. This control
allows ZMX files to be written using ANSI (also called ASCII) encoding instead. The use of ANSI
may allow older versions of OpticStudio to read ZMX files created by newer versions of
OpticStudio. However, it is never advisable to use older versions of OpticStudio to read newer
OpticStudio files as the newer version data format may not be fully compatible with older
versions. Session and CFG files are usually not compatible with older versions of OpticStudio.
ANSI encoding may only be used if the interface language is English.
Significant Digits Controls the number of digits shown for values in the editor properties
dialog and the analysis settings dialog. For example, if the number of significant digits is set to
“3” (the default), and an aperture on a surface in the Lens Data Editor has radius of 1.2345, then
the value displayed in the Properties > Aperture dialog will be 1.23.
Undo The Undo feature has three selectable states: None, Memory 1 Step, and Disk Multi Step.
For more information, see “Using the Editors”.
Parasolid Export Version Parasolid version to use for export. Only applicable to Parasolid
native formats – SAT/SAB/ASAT/ASAB. This can be useful if a CAD package like Creo does not
support the latest Parasolid version.
Autosave Toggles the amount of time between automatic saves. The autosave feature will
save a .ZMX file as outlined in the Undo feature, and save a .ZDA file at the specified time
intervals. The files will be saved into the Autosave folder. Details on Autosave behavior can be
found in “Autosave Functionality”.
Autosave Reopen Prompt Determines whether OpticStudio displays the autosave dialog box
when an autosaved file is detected. The file will still be present in the autosave file if the
prompt is disabled.
Default File Format Choose ZOS or ZMX. This setting changes the default lens file format. It is
recommended to use the ZOS file format to save lens data instead of the ZMX format. For
more information, see "OpticStudio File Types by Extension".
Change Startup Defaults These settings determine the startup defaults of OpticStudio.
l If "Imaging/Afocal Systems" is selected, then the initial lens file will be a Blank Sequen-
tial System. That template file can't be changed by the user.
l If "Illumination Systems" is selected, then the initial lens file will be a Blank Non-Sequen-
tial System. That template file can't be changed by the user.
l If "User Selected Systems" is selected, then the initial lens file will be a user defined file.
Auto Apply This determines the default setting (checked on, or off) for the Auto Apply option
in the Settings of the various analysis windows.
Dock New Windows Toggles between docked and floating windows in the workspace.
Use Parasolid Libraries Recommended libraries for CAD objects. Unticking this option will
select ACIS libraries.
Status Bar These settings determine which values are displayed in the OpticStudio status bar,
or if the status bar is hidden. There are 4 regions which can be set to display various data, such
as EFL, EPD, F/#, etc.
Text Window Font The font type, style, and size to be used for text based analysis windows,
such as a ray fan text listing. To change the text displayed in the graphics based analysis
Use Session Files If checked, all open windows will be closed, and new windows will be
opened and restored to their original locations when new lens files are loaded. If unchecked,
files will be loaded without changing the arrangement of open windows.
Include Calculated Data in Session This determines the default setting for how data is saved
in the session files. If checked, then calculation data for all open analysis windows (sequential
mode) and/or all detectors (non-sequential mode) will be cached in the session file. This will
allow the data to be restored when the lens file is loaded – significantly decreasing the time for
file load – but this also increases the size of the session file associated with the lens file. Note
that this setting only affects the default behavior, i.e. whether the similarly named setting in the
System Explorer is set by default to checked or unchecked when beginning a new design. It is
ultimately the setting in the System Explorer that determines whether calculation data is saved
to the session file for any particular ZMX file.
Note: Not all analyses support caching calculated data in the Session file. If a need arises for an
analysis that is not supported, please contact technical support for assistance.”
Include Tolerance Data in Session This determines the default setting for how toleranced
data is saved in the session files. If checked, then toleranced data (the Text Viewer showing the
analysis of Tolerances) will be cached in the session file. This will allow the data to be restored
when the lens file is loaded. But this increases the size of the session file associated with the
lens file. It is ultimately the setting in the System Explorer that determines whether calculation
data is saved to the session file for any particular ZMX file.
Button Functions
Font/Font Style Choose the font name and style for graphics.
Show Options First If this checkbox is selected, then the settings box will appear before any
analysis graphic or text is computed and displayed.
Print Layout Plots to Scale Automatically size the printed graphic such that the output
matches the true size of the system.
Frame Zoomed Graphics If selected, zoomed graphics which are pasted to the clipboard will
be framed; otherwise, the frame will not be shown.
Layouts Rotate Z, Y, X If selected, all 3D Layout type plots will rotate the displayed lens first in
Z, then Y, then X about the window’s coordinates. This selection results in rotations that are
similar to OpticStudio Coordinate Break conventions if the order flag is zero. If this option is
not selected, then the displayed lens will be rotated first in X, then Y, then Z about the
window’s coordinates. This selection results in rotations that are similar to OpticStudio
Coordinate Break conventions if the order flag is not zero.
Highlight Layouts If selected, then the current surface (in the LDE or EDE) or object (in the
NSCE) will be highlighted in all open layout type plots. Moving the cursor from row to row will
Enable Classic View This option enables an additional “Classic View” for some analysis
windows. The example below shows the Classic View of the Physical Optics Propagation
window with the OpticStudio sample file “Double Gauss 28 degree field.zmx”.
Use Active Cursor This setting determines whether or not the active cursor is initially on when
creating a new window.
Use DirectX 11 for System Viewers If checked, any new windows that contain layouts of the
optical system (such as Cross-Section, 3D Viewer, and Shaded Model plots) will be rendered
using DirectX 11 if the system’s graphics card is capable of supporting it. If unchecked, any new
System Viewer windows will be rendered using DirectX 9. The state of the checkbox applies
only to newly opened windows; windows that are already open when a change is made will
continue to use the DirectX version defined at the time the window was opened.
Background The background color on graphics windows can be selected from this drop down
list.
Aspect Ratio The default aspect ratio for OpticStudio graphic windows is 3 x 4, which fits well
on a standard 8.5 x 11 inch paper printer. For 11 x 17 inch printing, a 3 x 5 aspect ratio fits
better. The 4 x 3 and 5 x 3 aspect ratios are taller than they are wide. This option selects the
default aspect ratio for both printing and display graphics. Each graphic window may have its
own aspect ratio, modified in its toolbar with a drop down setting.
Default Line & Surface Thickness Determines the default line thickness for the graphics in
analysis windows, as well as surface thickness in layout plots. Note that this does not control
the line thickness for annotations in layout plots, whose thickness is currently fixed and cannot
be modified.
Shaded Model Anti-Aliasing Controls the degree of anti-aliasing in shaded models, where
higher values create a smoother image but may take a longer time to render.
Print Orientation Controls whether the plot is printed with a Default, Best Fit, Portrait, or
Landscape layout. “Default” uses the current printer settings. “Best Fit” uses the aspect ratio of
the plot window and the printable area of the paper to determine whether portrait or
landscape will result in a better fit.
Disable Modern Graphics This setting should only be changed if the computer hardware isn’t
sufficient to support the graphics requirements. The options are Off, Layout Plots, Non-Layout
Plots, and All Plots. If Layout Plots or All Plots is selected, the Shaded Model viewer will be
disabled, because it depends on advanced graphics support.
Default Blending Mode Sets the default blending setting for the Shaded Model viewer. For
more information, see the Blending definition in Toolbar Button Functions.
Default Export Resolution Determines the default resolution when exporting analysis and
layout data as an image file. With the From Window option under the Default Export
Resolution drop-down, the window is saved using the on-screen resolution. When selecting
Custom from the drop-down, the size of the exported image is determined by the Custom
Export Width (or Height) and the window's current Aspect Ratio.
Custom Export Width Sets the default width in pixels for saving analysis and layout data as an
image file when exporting with custom output resolution.
Fletch Size Determines the relative size of fletch marks drawn on the various layout plots. The
default value of 1.0 draws fletches at the default size; a value of 2.0 would draw the fletches
twice as large as normal, and 0.5 would draw fletches at half size. Any value between 0.0 and
100.0 may be used.
Orientation Indicator Size Determines the relative size of the orientation indicator drawn on
the various layout plots. The default value of 1.0 draws the indicator at the default size; a value
of 2.0 would draw the indicator twice as large as normal, and 0.5 would draw the indicator at
half size. Any value between 0.0 and 10.0 may be used. A value of zero will remove the
indicator.
Grid Lines Intensity An integer value between 0 and 255 that indicates the intensity of the
grey grid lines, if shown. A value of 0 will make lines that are pure white, while a value of 255
will make the grid lines pure black.
Window X Size The default x size for graphics and text windows in pixels. This can be adjusted
to suit the monitor size and resolution.
Button Functions
Toolbar
The Toolbar settings are available in the OpticStudio Preferences window, which can be
displayed via a button in the System section of the Setup Tab.
This allows the user to customize the icons after the separator in the Quick Access Toolbar.
To add a new tool to the Quick Access Toolbar, first select the Sequential or Non-sequential UI
Mode tab, click on one of the features listed on the right, and then use the left arrow to move
the feature to the toolbar.
For example, type “dock” to search for the “Dock All Windows” tool.
Click on the tool to select it, and then use the left arrow to move it to the toolbar:
Button Functions
Shortcut Keys
On the user interface the defined shortcut keys will be displayed when hovering over any icon
of the ribbon bar or editor bar as shown below.
Active Shortcuts
Available Shortcuts
Click on the add or remove button next to the name of the available shortcut to either
add or remove it from the list of Active Shortcuts.
Button Functions
F1 Help
F3 Undo
Ctrl + F3 Redo
F4 Materials Catalog aka Glass Catalogs
F5 Lens Catalogs
F6 Merit Function Editor
F7 Multi-Configuration Editor
F8 Formerly Extra Data Editor; now obsolete
Non-sequential UI Mode
F1 Help
F3 Undo
Ctrl + F3 Redo
F4 Materials Catalog
F5 Lens Catalogs
F6 Merit Function Editor
F7 Multi-Configuration Editor
F9 Edit/Run ZPL Macros
Editors
Home Zoom in
End Zoom out
Page Up Rotate layout
Page Down Rotate layout
Arrows Rotate layouts OR toggle surface number
Ctrl + Tab Next Window
Please note that the following Shortcut Keys are not configurable.
Ctrl + Alt + 1-9 Select the nth tab (use 0 for tab 10). For example, in a FFT analysis with
‘Enable Classic Plots’ on, there are three tabs 1 = Modern, 2 = Classic, 3 = Text. In this case,
pressing Ctrl + Alt + 2 will select the ‘Classic’ tab.
Message Boxes
For some messages that require a user choice (e.g. Yes/No, Retry/Cancel), this preference
option allows OpticStudio to remember your selection and always choose that selection by
default in the future. For example, suppose that you were to enter a name into the Material
If you select ‘Don’t ask me again’ and click ‘Yes’, then the next time you enter a name into the
Material column of the Lens Data Editor of a material from a catalog that is not one of those
listed under the “Catalogs To Use” section of the System Explorer, the catalog that does
contain the material will automatically be added to the “Catalogs To Use” section of the
System Explorer without any further input on your end.
It is important to realize that only the dialog response (e.g. ‘Yes’) is remembered, not the
outcome of the selection. In other words, in the above example, the first catalog that
contains the material will be automatically selected in future cases, not necessarily the catalog
from the original message in which you originally said ‘Yes’.
These settings can be viewed and changed under Preferences > Message Boxes:
Privacy
The Privacy settings are available in the OpticStudio Preferences window, which can be
displayed via a button in the System section of the Setup Tab.
This allows the user to opt in or out of sending anonymous usage information to Zemax.
This data is completely anonymous and cannot be linked to your name or license number.
Scale Lens
This feature will scale the entire lens by the specified factor. This is useful for scaling an existing
design to a new focal length, for example. Wavelengths are not scaled. The scale lens feature
may also be used to change the units from mm to inches, or other combinations of unit types.
Settings:
First Surface The first surface of the range when scale by factor is selected.
Last Surface The last surface of the range when scale by factor is selected.
Scale by units If selected, then the lens will be converted by the selected units.
Scaling of data is performed based upon the units of measure for the data. If the scale factor is
X, then data measured in lens units of length will be scaled by the factor X. Data measured in
OpticStudio will generally scale all lens data in the Lens Data Editor and the Non-sequential
Component Editor correctly. OpticStudio also will scale almost all of the data in the Merit
Function Editor, the Multi- Configuration Editor, and the Tolerance Data Editor correctly as
well.
OpticStudio will not attempt to scale some types of data, even though scaling would be
appropriate for those types of data. These exceptions are for data items such as the multi-
configuration operands PRAM and NPAR, that modify general parameter data of surfaces or
objects, or the parameter data of user-defined DLL surfaces or objects. These data items
should be scaled manually, if required. In addition, OpticStudio will not attempt to scale the
size of a CAD Part or CAD Assembly object. These objects should be scaled in the original
creating program, if required.
Autosave
The autosave will use the copy of the .ZMX file saved by the Undo setting. If the Undo setting
is set to 'None,' then both the .ZMX and .ZDA files will be saved at the specified time interval.
The autosave will not save while any tool is actively running (i.e. in the middle of an
optimization run) and will instead save one time interval after the tool has completed running.
If OpticStudio unexpectedly closes, the next time it is opened, a dialog box will appear
informing the user that files were autosaved. This dialog box can be disabled in the
OpticStudio Preferences > General. This box will give you the option to open the file, delete
the file, open the recovered file folder location, or close the dialog and proceed to open the file
selected when OpticStudio was launched. Unless the user specifically deletes a file, it will
remain in the Recovered folder indefinitely.
Sequential UI Mode
The Sequential UI Mode button is available in the System section of the Setup tab. This
enables the sequential and hybrid non-sequential ray tracing user interface.
The following screenshot was taken with the OpticStudio sequential objectives sample file
“Double Gauss 28 degree field.ZMX” in Sequential UI Mode:
In Sequential mode, all program features are available, including the ability to place a non-
sequential group upon any surface. In Sequential mode, OpticStudio will trace rays which leave
the object surface through all defined surfaces and non-sequential groups. This is the
preferred mode for designing imaging systems, or any system requiring optimization,
tolerancing, and detailed image analysis.
Non-sequential UI Mode
The Non-sequential UI Mode button is available in the System section of the Setup tab. This
enables use of the pure non-sequential ray tracing interface.
Non-sequential means the rays trace in the actual physical order they hit various objects or
surfaces, and not necessarily in the order the objects are listed in the software user interface.
Note rays in a non-sequential trace may hit the same object repeatedly, and entirely miss other
objects. Generally, the order in which objects are hit by rays depends upon the object
geometry and the angle and position of the input ray. Objects which require or at least benefit
from non-sequential ray tracing include prisms, light pipes, lens arrays, reflectors, and Fresnel
lenses. Certain types of analysis, such as stray or scattered light effects, are only practical in a
completely non-sequential environment.
In Non-sequential mode, multiple changes are made to the user interface and to the lens data
to simplify the analysis of these systems:
Only surface 1 is used, and all NSC objects are placed in a single non-sequential group placed
on surface 1. The object and image surfaces are not used. The Lens Data Editor is not used. The
Non-sequential Component Editor (NSCE) is used instead as the primary editor. The field
dialog box is not used. The wavelengths dialog box is still used to define the wavelengths to be
traced. Only rays which originate from sources placed within the NSCE are traced.
Features which are not used in Non-sequential mode are removed from the menus and button
bars to simplify the user interface. These features include ray fans, MTF plots, spot diagrams,
and many other features unique to sequential ray tracing. The primary means of analysis in
Non-sequential mode is tracing rays to one or more detector objects.
Switching from Sequential mode to Non-sequential mode will cause all the sequential data to
be deleted.
The following screenshot was taken with the OpticStudio sequential objectives sample file
“Double Gauss 28 degree field.ZMX”:
This changes the UI mode to Non-sequential UI Mode, where the Non-sequential Component
Editor is available, but the Lens Data Editor is not:
It is always possible to switch from Non-sequential mode to Sequential mode without loss of
data.
The following screenshot was taken with the OpticStudio non-sequential scattering sample file
“Fluorescence Example.ZMX”:
For systems with multiple Non-sequential Component surfaces in the Lens Data Editor, it is
possible to switch between the NSC groups using the surface number arrows in the Non-
sequential Component Editor toolbar.
These are the Editors, available in the Setup Tab in (Non-sequential UI Mode).
For a list of sequential surfaces, see Sequential Surfaces (lens data editor)
The screenshots in this section were taken with the OpticStudio sequential objectives sample
file “Double Gauss 28 degree field.ZMX”.
Single lenses are defined by two surfaces (a front and a back), and the object and image also
each require one surface. This fundamental data can be entered directly on the spreadsheet.
When the Lens Data Editor is displayed, data can be entered on the spreadsheet by typing in
Note that initially (unless a lens has been loaded) three surfaces are shown; the object, stop,
and image surfaces:
The object and image surfaces are permanent, and cannot be deleted. However, other surfaces
can be inserted and deleted by using the Insert and Delete keys. No surface can be inserted in
front of the object, or behind the image. In this context “in front of” means a smaller surface
number, and “behind” means a larger surface number, in the sense that the light reaches the
various surfaces sequentially. OpticStudio numbers surfaces from the object, being surface
zero, upwards to the last surface, being the image surface.
To enter values in the spreadsheet, move the cursor to the correct cell, and start typing. To edit
values currently displayed, double click or press F2. Once you are editing the cell contents, you
can use the left/right cursor keys and the home and end keys to navigate around in the text.
When the data has been changed, press any cursor key, or click on any other cell, or press
enter.
There are also a few shortcuts available. To add a value to the current value, type a plus sign
before the number. For example, if the displayed number is 10, typing "+5" and pressing enter
will change it to 15. The symbols "*" and "/" also work. To subtract a value, use the minus sign
followed by a space. For example entering "- 5" would change a 17 to a 12. Note the space
between the "-" and the "5". If no space was entered, the program assumes you are entering a
new value which happens to be negative. Entering "*-1" will change the sign of the number.
A right-click on a selected cell or row will reveal a menu with the following options:
Paste Cells Paste cell from the Windows Clipboard to the current cell(s).
Cut Surface Copies all the data for a single surface or a range of surfaces to the Windows
Clipboard, then deletes the surface.
Copy Surface Copies all the data for a single surface or a range of surfaces to the Windows
Clipboard.
Paste Surface Copies all the data for a single surface or a range of surfaces from the Windows
Clipboard to the current cursor location in the Multi-Configuration Editor. The surface data
must first have been copied to the Windows Clipboard using either "Cut Surface" or "Copy
Surface" described above.
Insert Surface This inserts a new row in the LDE at the current row. The new surface type is
"OFF" which means the surface is ignored. The Insert key is a shortcut for this menu option.
Insert Surface After This inserts a new row in the LDE after the current row. The new surface
type is "OFF" which means the surface is ignored. The Ctrl-Insert key combination is a shortcut
for this menu option.
Delete Surface This deletes the current row in the LDE. The Delete key is a shortcut for this
menu option.
Hide Row Hides the selected row(s) from view in the LDE.
Hide Coordinate Breaks Hides the selected coordinate breaks from view in the LDE.
Hide Composite Surfaces Hides the selected Composite Surface(s) from view in the table.
Unhide Composite Surfaces Unhides any selected Composite Surface(s) in the LDE.
Delete All Composite Surfaces Deletes all Composite Surfaces from the LDE, either selected
or unselected.
Freeze Columns To Left When working in a smaller window a column can be frozen to the left
and scrolling right will continually show the selected frozen column.
Unfreeze Columns Unfreezes the selected column(s) when scrolling to the right.
Unfreeze All Columns Unfreezes all of the selected columns when scrolling to the right.
Edit Bookmark Assigns a bookmark to the selected cell indicated by a red "greater than"
symbol, this can be deleted and updated.
Data Columns
The following are data fields in the Lens Data Editor.
Some additional information is displayed adjacent to the surface number. When an aperture is
defined on a surface, OpticStudio will display “aper” next to the surface number. If surface
tilt/decenter data is defined on a surface, then “tilt/dec” will be displayed. If both aperture and
tilt/decenter data are defined then “aper and tilts” is displayed.
To define the surface type and other properties, see “The Surface Properties dialog box”. To
define the stop surface, see “Make Surface Stop”. For information on defining surface aperture
data, see “Aperture type and other aperture controls”. For information on defining
tilt/decenter data, see “Surface tilt/decenter tab”.
Radius
To enter or change the radius of curvature of a surface, move the cursor to the desired cell, and
type in the new value. Radii data is always entered and displayed in lens units, which have
dimensions of length.
Thickness
To enter or change the thickness of a surface, move the cursor to the desired cell, and type in
the new value. Thickness data is always entered and displayed in lens units, which have
dimensions of length. The thickness of a surface is the distance to the next surface. The only
thickness that is not used is the thickness of the image surface.
Material
The material used for each surface is usually specified by entering the name of the glass in the
“Material” column on the Lens Data Editor. The glass name entered must be in one of the
currently loaded glass catalogs. The default catalog is the “Schott” catalog; others are available.
To use multiple glass catalogs, or to review, edit, or append the glass catalogs, see the section
called Using Material Catalogs. To specify that a particular surface be a mirror, use the glass
name “mirror”.
If a surface or object has the material type MIRROR, and no coating is specified, then the
surface is assumed to be coated with a thick layer of aluminum, with an index of refraction 0.7 -
7.0i. The aluminum layer is assumed to be thick enough that no light propagates past the layer.
This means that an uncoated mirror surface has a reflectivity of less than 1, though the exact
value will depend on the polarization of the rays.
There is an optional “/P” command that may be appended to the glass name when entering a
new glass. This option will cause OpticStudio to alter the curvatures before and/or after the
surface to attempt to maintain a constant power for the lens element. For example, if the glass
type is already BK7, entering a new glass type of “SF1/P” will change the glass type to SF1 while
adjusting the radii of the surface and the surface after, to maintain constant power.
OpticStudio considers the front and back vertex powers, as well as the element power
correction due to the lens thickness. The algorithm adjusts both front and back curvatures if
the lens is in air. If either the front or back surfaces are adjacent to another glass element, then
only the curvature adjacent to the air is adjusted.
If any value is entered for the semi-diameter, then the new number will be retained and a “U”
will be placed next to the value. This indicates the semi-diameter is user defined. For
information on the use of clear semi-diameter or semi-diameters, see “Semi-diameters”. For
Chip Zone
The Chip Zone is a radial surface extension built on top of the clear aperture. Here clear
aperture is defined either by the clear semi-diameter, semi-diameter or by the circular
aperture. Chip Zone surface curvature is the same as for the clear semi-diameter or semi-
diameter. Chip Zone does not change Semi-Diameter value, it is built on top of it, and is a non-
traceable area. By default the Chip Zone is set to zero. Chip Zone functionality may be
supplemented by the Semi Diameter margins for general system-wide changes. Semi Diameter
margins may be disabled for a particular surface, for details see “Semi Diameter margins”
chapter.
Chip Zone has three solve types: fixed, pick-up, and the zpl macro.
If a mechanical semi-diameter is set larger than that sum, then the difference is modelled as a
flat surface with the sag value constant and equal to the value of the chip zone outer edge.
When surface edge drawing option is defined as “square” – automatic mechanical semi-
diameter is extended radially to explicitly define square edge for a lens. Besides automatic,
there are fixed, pick-up, and the zpl macro solves.
Chip Zone and Mechanical Semi-Diameter are surface extensions aimed to provide users with
greater flexibility while generating optomechanical features outside of the clear aperture.
These parameters allow definition of optics shapes suitable for manufacturing.
Since the Mechanical Semi Diameter defines the radial dimension of the surface up to the
mechanical edge of the lens, this value is used to determine the edge thickness of the lens and
how that edge thickness will vary with temperature when conducting thermal analysis.
TCE
The TCE value is the thermal coefficient of expansion in 1e-6/K. For example, the expansion of
a 10 mm thick piece of material over 10K can be calculated as TCE * 1e-6 * 10 K * 10 mm.
OpticStudio currently uses the TCE value to model linear thermal expansion independent of
the temperature range being used. The catalogs values supplied by the glass vendor are
usually the TCE for the temperature range from -30 to +70 degrees Celsius, but OpticStudio
will use the TCE value for any temperature range.
Once a material is defined in the glass catalog, OpticStudio uses the TCE specified for that
material to determine the thermal expansion of the radius, center thickness, and other data for
the surfaces using the material. However, if the material is not a solid, but is instead a gas or a
liquid, then generally the thermal expansion is not governed by the material properties, but is
instead determined by the edge thickness of the mounting material.
In this special case, OpticStudio needs to use the TCE supplied in the Lens Data Editor to define
the mounting material properties, rather than the TCE supplied in the glass catalog. This can be
accomplished by setting the “Ignore Thermal Expansion” switch for the material in the glass
catalog.
Other Parameters
Parameter data consists of additional numeric values which define the properties of certain
surface types. For more information on parameter data, see the section Sequential Surfaces
(lens data editor).
Parameter data
A Standard surface can be a plane, spherical, or conic aspheric surface which is followed by a
homogeneous material (such as air, mirror, or glass). The only parameters required are a radius
(which may be infinity to yield a plane), a thickness, a conic constant (the default zero value
indicates a sphere), and the name of the glass type.
Other surface types use these same basic data, as well as other values. For example, the Even
Asphere surface uses all the Standard surface column data plus additional values which
describe coefficients on a polynomial. These values are called parameters. The most important
property of the parameter values to understand is that their meaning changes depending
upon the surface type selected. For example, the Even Asphere surface uses parameter 1 to
specify the coefficient on the parabolic aspheric term. However, the Paraxial surface uses
parameter 1 to specify the focal length of the surface. Both surface types use parameter 1, but
for different purposes, since both surface types are never used on the same surface at the
same time.
This sharing of data storage simplifies the OpticStudio interface, as well as reduces the total
memory required to run the program. After you change a surface from Standard to some other
surface type, OpticStudio will automatically change the column headings on the parameter
columns to reflect what each parameter does on that surface. As you move the cursor from cell
to cell, the column headings will always show you what that cell is used for. If the current
surface does not use the parameter column, the column heading will display “Unused”.
The types of surfaces supported by OpticStudio are summarized in the following table. The
most common surface type is the Standard surface. For types not listed, see “User Defined”.
The following is an alphabetical list of surface types, including their associated parameter
definitions.
Zernike terms.
Toroidal Grating Ruled grating on a conic toroid.
Fresnel Zone Plate model using annular rings of
Zone Plate
varying depth.
Diffractive Surfaces
Idealized Surfaces
Specialist Surfaces
ABCD
The ABCD surface provides a powerful method for modeling "black box" optical systems. If you
have a lens (or a complete optical system) which is only a subsection of what you wish to
model, and you do not have prescription data for the individual components, you can still
model the behavior to first order.
The ABCD surface accepts eight parameters: Ax, Bx, Cx, Dx, Ay, By, Cy, and Dy. These are used
to form two- by-two matrices (one for the x-direction and one for the y) which are used to alter
the ray as it crosses the surface. The exit ray is related to the incident ray by
with a similar expression for the y components. Because there is no reliable way to compute
the phase through an ABCD surface, any calculation that requires OPD data, such as OPD fans,
MTF, and Zernike coefficients, will not be supported if an ABCD surface is present in the lens
description.
Alternate Even
There are two solutions to the ray-surface intercept equations used in tracing a ray to the next
optical surface, if that surface is of the form of the standard or even aspheric surface types.
OpticStudio selects the correct solution in the vast majority of cases. However, in certain
systems, so-called “strange” rays are actually intended to intersect the next surface at the
other, “alternate” solution. Strange rays are most likely to occur after a grazing incidence
reflection in which the ray is still traveling in the same direction (the Z component of the ray
vector does not change sign). The alternate even surface model is identical to the even asphere
surface model, except the alternate solution is used. OpticStudio may not be able to correctly
compute the optical path difference when the alternate even surface is being used.
Alternate Odd
There are two solutions to the ray-surface intercept equations used in tracing a ray to the next
optical surface, if that surface is of the form of the standard or even aspheric surface types.
OpticStudio selects the correct solution in the vast majority of cases. However, in certain
systems, so-called “strange” rays are actually intended to intersect the next surface at the
other, “alternate” solution. Strange rays are most likely to occur after a grazing incidence
reflection in which the ray is still traveling in the same direction (the Z component of the ray
vector does not change sign). The alternate odd surface model is identical to the odd asphere
surface model, except the alternate solution is used. OpticStudio may not be able to correctly
compute the optical path difference when the alternate odd surface is being used.
C. Y. Hohenkerk and A. T. Sinclair, NAO Technical Note 63, Royal Greenwich Observatory
Science and Engineering Research Council, 1985.
Six parameters are supplied to the model: The observed zenith angle of the source in degrees,
the height of the observer above sea level in meters, the ambient temperature at the observer
in Kelvin, the atmospheric pressure at the observer in millibars, the relative humidity (a number
between 0.0 and 1.0), and the latitude of the observer in degrees.
OpticStudio computes the atmospheric refraction angle in radians for all defined wavelengths,
then subtracts from all wavelengths the amount of refraction at the primary wavelength;
thereby using the primary wavelength as a reference. To disable the referencing to the primary
wavelength, set the “Absolute ?“ flag to 1. Atmospheric refraction manifests itself as a small tilt
in the OPD fan plot, or a slight chief ray offset similar to lateral color in the ray fan plot. All
refraction is assumed to occur in the y direction only.
This surface models color separation. To model atmospheric turbulence, use the Grid Phase
surface with an externally provided data file. For information on the Grid Phase surface, see
“Grid Phase”.
Parameter # Definition
1 Zenith
2 Height
3 Temperature
4 Pressure
5 Humidity
6 Latitude
7 Absolute ?
Where
The radius in the x direction is set in the parameter 1 column. If set to zero, the x radius is
interpreted to be infinity.
An ellipsoid has different semi-axial-lengths in x, y, and z. If “a”, “b”, and “c” correspond to the
semi-axial-lengths along the x, y, and z-axes, respectively, then an ellipsoid whose vertex is
along the z-axis is given by:
Then, by comparing to the sag formula of the Biconic surface, radius and conics are converted
from semi-axial-lengths:
Note that c, cx, and cy are different parameters. The c parameter is the semi-axial-length in z
direction, whereas the cx, and cy parameters are curvatures in x and y directions.
Parameter # Definition
1 Rx
2 kx
Biconic Zernike
Where
and the Zi terms are the Zernike standard terms as described in “Zernike Standard Sag”.
Parameter 0 is the extrapolate flag. If the extrapolate flag is set to 0, the Zernike terms are
ignored outside of the normalization radius. If the extrapolate flag is set to 1, then the Zernike
terms are considered no matter where the ray lands on the surface; even if the ray lands
beyond the normalization radius. The radius and conic in the x direction are set in the
parameter 1 and 2 columns. If the radius is set to zero, the x radius is interpreted to be infinity.
Parameter 3 is the maximum number of Zernike terms, this value may be between 0 and 210,
inclusive. Parameter 4 is the normalization radius used in the Zernike expansion.
Parameter # Definition
0 Extrapolate
1 Rx
2 kx
3 Number of Zernike terms (maximum 210)
4 Normalization Radius
13-28 Coefficients on powers of x
29-44 Coefficients on powers of y
45-254 Coefficient on the Zernike Standard polynomials
The binary optic 1 surface is similar to the extended polynomial surface, except the polynomial
terms represent the variation in phase (rather than surface height) across the optic surface. The
coefficients therefore have units of radians rather than lens units. The shape of the binary optic
1 surface is identical to the even asphere surface type; planes, spheres, conics, and polynomial
aspheres up to order 16 are supported. The sag of the surface is given by the following
expression:
where the terms are identical to those in the even asphere surface model. See “Even Asphere”
for a complete discussion. The binary optic 1 surface adds phase to the ray according to the
following polynomial expansion:
where N is the number of polynomial coefficients in the series, Ai is the coefficient on the ith
extended polynomial term, and M is the diffraction order. The polynomials are a power series
in x and y, as described in “Extended Polynomial”. The coefficients Ai all have units of radians (
2π radians is one wave). If Parameter 9 is any value other than zero, then the absolute value of
the x and y coordinates are used for computing the phase in the above expression. This
“Absolute” option yields a different, generally discontinuous phase profile.
Parameter
Definition
#
0 M, the diffraction order
The "Maximum term number" is used to specify the maximum polynomial term to be used in
calculating the surface phase. This number is provided to speed the ray tracing calculation, as
terms beyond this number are ignored. For example, if the last term in the series you wish to
use is xy3 , which is term number 13, then specify "13" in the maximum term number column.
Note that the term number is 13, because it is the 13th term in the polynomial expansion (not
the 13th parameter in the editor).
The normalization radius scales the X and Y intercept coordinates of the ray so that the
polynomial terms are all dimensionless and the coefficients are all in radians. For modeling
phase surfaces that are not well described by polynomials, see “Grid Phase”.
It is important to understand the binary optic surface phase coefficients sign convention.
Imagine a collimated beam being focused by an infinitesimal thin binary optic surface. If the
collimated beam becomes a focused, converging beam on the other side of the binary optic,
then the path length of a marginal ray is longer than the path length of the axis ray. Therefore,
the binary optic must add a negative path length to the marginal ray. Using this convention, a
positive power binary optic has a negative quadratic phase coefficient. Although the sign
convention chosen by OpticStudio is arbitrary, it may be important to know what the
convention is as far as fabrication decisions are concerned. It is always a good idea to test a
few cases to verify the sign convention being used by the software before committing a design
to fabrication.
Diffractive Surfaces
The Binary 1 Surface is part of the Diffractive Surfaces category. Diffractive Surfaces are ideal
surfaces that model the phase.
The binary optic 2 surface is similar to the extended asphere surface, except there are
additional polynomial terms which represent the variation in phase (rather than surface height)
across the optic surface. The coefficients therefore have units of radians rather than lens units.
The shape of the binary optic 2 surface is identical to the even asphere surface type; planes,
spheres, conics, and polynomial aspheres up to order 16 are supported. The sag of the surface
is given by the following expression:
where the terms are identical to those in the Even Asphere Surface model. See “Even Asphere”
for a complete discussion. The Binary Optic 2 surface adds phase to the ray according to the
following polynomial expansion:
Parameter
Definition
#
0 M, the diffraction order
1-8 α1 - α8
13 Maximum term number (up to 240)
Normalization radius. All ray-intercept points are divided by this number to
14
determine the x and y coordinates for polynomial evaluation.
15 Coefficient in radians on ρ^2
16 Coefficient in radians on ρ^4
17-254 Coefficient in radians on ρ^(2(n-14))
The "Maximum term number" is used to specify the maximum polynomial term to be used in
calculating the surface phase. This number is provided to speed the ray tracing calculation, as
terms beyond this number are ignored. For example, if the last term in the series you wish to
use is ρ14 , which is polynomial term number 7, then specify "7" in the maximum term number
column. Note that the term number is 7, because it is the 7th term in the polynomial expansion
(not the 7th parameter in the editor).
The normalization radius scales the X and Y intercept coordinates of the ray so that the
polynomial terms are all dimensionless and the coefficients are all in radians. For modeling
phase surfaces that are not well described by polynomials, see “Grid Phase”.
Binary 3
The Binary Optic 3 surface is very similar to the Binary Optic 2 surface. The key difference is
that the Binary Optic 3 supports two concentric radial zones, with independent radius, conic,
and polynomial aspheric deformation and diffractive phase data for each zone. The surface is
The sag of the surface in the inner zone is given by the following expression:
where N is the number of aspheric terms which may be set by the user as described below. The
value for the inner zone curvature, c1, is the reciprocal of the radius of curvature specified in
the Lens Data Editor. The inner zone conic constant is also set in the Lens Data Editor, in the
usual conic column. A similar expression with different coefficients and an offset value is used
to define the sag of the surface in the outer zone:
where the term zo is chosen to make the surface continuous across the boundary between the
inner and outer zones at the radial coordinate A1 , or zo = z1 (A1) – z2 (A1 ) (the value of zo is
temporarily set to zero while evaluating z2 for this calculation). The outer zone radius of
curvature (from which the value c2 is computed) and the outer zone conic are set in the
parameter data as described below. For a flat outer zone radius, use zero.
Both the inner and outer zones have a diffractive phase profile, with independent coefficients.
The phase of the inner zone is given by:
The phase offset serves a similar purpose to the sag offset, and is defined by
(the value of ẟo is temporarily set to zero while evaluating Ω2 for this calculation).
Note that the normalization radius A2 is used only for defining the radial aperture to normalize
the phase coefficients for the outer zone. The outer zone of the surface, and the associated
phase profile, may extend beyond this value.
The dual zone nature of this surface creates a complication when computing the phase of the
surface as the zone boundary is crossed. The phase offset value ẟo makes certain the phase is
continuous across the zone boundary. This is desirable for design and analysis purposes,
because phase jumps of hundreds of waves make interpretation and analysis difficult.
However, the phase offset is artificial, and this must be accounted for in the actual design. For
optimum imaging properties, the outer zone should be in phase with the inner zone. This
condition is met when the inner and outer zones differ in phase by an integral number of
wavelengths at the boundary, or more to the point, if ẟo = J2π , where J is some arbitrary
integer. This condition can usually be met by a small change in A1 , as long as there is some
difference in the slope of the phase on either side of the boundary. To make this boundary
condition simple to meet, OpticStudio computes sin ẟo and places this value in parameter 7.
The merit function boundary operand PMVA can then be used to target this value to be zero.
Note this value is computed from the phase data, and should not be user defined or made
variable.
The difference in sag between the inner and outer zones can be accounted for two ways. If the
“Break?” parameter is set to 0, then the outer one is shifted along the local z axis so that the
surface is continuous at the zone boundary. If “Break?” is set to 1, then the outer sag is defined
by the sag equation with no offset, and in general a discontinuity in the sag will result. This
discontinuity will cause a large discontinuity in the OPD computations that OpticStudio cannot
subtract out.
Binary 4
The Binary Optic 4 surface is similar to the Binary Optic 2 and 3 surfaces. The key difference is
that the Binary Optic 4 supports a variable number of concentric radial zones, with
independent radial size, radius, conic, diffraction order, polynomial aspheric deformation, and
diffractive phase data for each zone. The number of zones, even asphere coefficients, and
phase coefficients, are all user definable, up to the maximum allowed number of values in an
extra data file (see the Import section of the Surface Properties). Each zone requires 4 values
(aperture, radius, conic, and diffraction order) plus a variable number of even aspheric and
binary phase coefficients. The total number of terms is Nz*(4 + Na + Np) where Nz is the
number of zones, Na the number of asphere terms, and Np is the number of phase terms. The
total may not exceed 242 terms. Nz must be between 1 and 60; Na and Np must be between
zero and 20.
The surface is divided into zones. The first zone extends from the vertex to the radial
coordinate, A1, the second zone from A1 to A2, and this continues through the last zone. The
radial coordinates are also used for normalizing the aspheric and phase coefficients within
their respective zones. Each zone is offset from the prior zone to make the surface sag
continuous across the zone boundary. OpticStudio requires that the first zone have a radial
aperture larger than zero, and each subsequent zone must be larger than the previous one.
Note c, k, and the α terms are all unique to each zone. The term zo is chosen to make the
surface continuous across the boundary between the current and prior zone at the radial
coordinate Aj – 1 , or
(the value of zo is temporarily set to zero while evaluating zj for this calculation). The
normalized coordinate p is given by r / Aj.
All zones also may have a diffractive phase profile, with independent coefficients. The phase in
zone j is given by:
where Np is the number of polynomial coefficients in the series, β1i is the coefficient on the 2ith
power of ρj , which is the normalized radial aperture coordinate, and Mj is the diffraction
order.
The phase offset serves a similar purpose to the sag offset, and is defined by
(the value of ẟo is temporarily set to zero while evaluating Φj for this calculation).
Note that the normalization radius for the outermost zone is used only for defining the radial
aperture to normalize the coefficients for the outer zone. The outer zone of the surface, and
the associated phase profile, may extend beyond this value.
Parameter # Definition
1 Nz
2 Na
3 Np
4 SS sin ẟo
13 The radial aperture of zone 1.
14 The radius of curvature of zone 1.
15 The conic constant of zone 1.
16 The diffraction order of zone 1.
Next Na The aspheric sag coefficients for zone 1.
Next Np The phase coefficients for zone 1.
Remaining
The pattern continues in groups of 4+Na+Np coefficients for Nz groups.
terms
OpticStudio can also model uniaxial crystals whose crystal axis orientation varies within the
material. Several different polynomial models for the form of the variation are supported. For
more information see “Defining the crystal axis for inhomogeneous materials”.
Birefringent materials refract rays according to Snell’s law, but the effective index of refraction
in the media depends upon the input polarization state and the angle the refracted ray makes
with respect to the crystal axis. Ordinary rays are refracted according to
where the subscript "o" indicates the ordinary index. This is just Snell’s law, of course. For
extraordinary rays, the refraction law is
This is also Snell’s law, but the effective index of refraction in the birefringent material is a
function of the angle θw , which is the angle between the crystal axis vector aˆ and the
refracted wave vector k . Additionally, the ray vector s^, which is the vector pointing in the
direction of energy propagation (also called the Poynting vector), does not follow the wave
vector kˆ , but makes a small angle with respect to kˆ . In isotropic media kˆ and sˆ are the
same, so for most optical design we keep track of kˆ ; here we must consider the ray and the
wave vector being different. The angle θw is defined by cos θw = kˆ aˆ .The effective index of
refraction is defined by
Where
and the vectors k^ and s^ and are both coplanar with the crystal axis vector a^ . The wave
vector k^ points along the normal to the wavefront, while s^ points along the direction of
energy propagation. For ray tracing purposes, OpticStudio uses the components of s^ as the
ray direction cosines.
Birefringent In/Out surfaces may be planes, spheres, conic aspheres, or toroids. The default
substrate shape is the same as a Standard surface (see “Standard”) defined by the radius of
curvature and a conic constant. This standard substrate is called shape 0. The other substrate
shape currently supported is shape 1, which is a surface similar to the Toroidal surface (see
“Toroidal”) except the aspheric coefficients are limited to 10th order and no Zernike terms are
supported. The shape number is defined by parameter 6.
To define the ordinary index, OpticStudio uses the glass catalog and glass name in the usual
way. For example, to use Calcite, define the surface to be a birefringent “in” type, and enter
Calcite for the glass name. OpticStudio uses this name to compute the ordinary index at any
defined wavelength.
To compute the extraordinary index, OpticStudio appends “-E” to the glass name, and then
looks for this material in the glass catalog. For the case of Calcite, OpticStudio searches for
Most OpticStudio calculations, such as EFL, EPD, F/#, etc. use the ordinary index of refraction.
The extraordinary index is only used to trace extraordinary rays. The Prescription report will list
both the ordinary and the extraordinary index, and this data should be carefully checked
before using this feature for any critical analysis.
For homogeneous materials, the crystal axis orientation is constant throughout the media. The
crystal orientation is defined using parameter columns 2, 3, and 4 for the x-, y-, and z- direction
cosines of the axis. For example, to define the crystal axis along the x axis, the vector values are
(1, 0, 0). For the axis aligned to the surface vertex normal, which is along the z axis, the vector is
(0, 0, 1). Note the coordinates are local to the “Birefringent In” surface and OpticStudio
internally converts to unit vector components.
Birefringent materials whose crystal axis orientation varies as a function of position are
supported. For a discussion of the method used to model these types of materials, see C.
Jenkins, R. Bingham, K. Moore, and G. Love, “Ray equation for a spatially variable uniaxial
crystal and its use in the optical design of liquid-crystal lenses”, J. Opt. Soc. Am. A, Vol. 24, No.
7, pp2089-2096 (2007). The variation in the crystal axis orientation is defined using one of
several polynomials. The selection of the polynomial used is called the Gradient Mode, and the
Gradient Mode is defined by Extra Data Value 1. The supported Gradient Modes are defined in
the following table.
OpticStudio will trace the ordinary ray if the mode is set to 0 or 2. If the mode is set to 1 or 3,
the extraordinary ray will be traced. The mode is parameter 1 in the lens data editor. In
sequential mode, OpticStudio cannot trace both rays at once, however it is easy to create a
multi-configuration lens with the mode set to 0 in configuration 1, and to 1 in configuration 2;
this allows inspection of both possible paths as well as simultaneous optimization and layouts
of the traced rays. The difference between modes 0 and 2 for ordinary rays and modes 1 and 3
for extraordinary rays is described in the next paragraph.
When the ordinary and extraordinary ray are normal to the surface
When the ray propagates along the crystal axis, the distinction between the ordinary and
extraordinary rays becomes ambiguous. For this case, all rays will have an index of refraction
equal to the ordinary index, but the distinction between ordinary and extraordinary rays
remains important when determining which rays are traced in the different polarization modes.
ZOS chooses the ordinary ray to be s-polarized and the extraordinary ray to be p-polarized.
There are further complications, if the ray also propagates normal to the surface because in
this case the distinction between the s- and p- polarizations is also ambiguous.
See the section When the ray is normal to the surface in Definition of Polarization Terms for a
discussion of how ZOS deals with this ambiguity.
and
actually depend on the input polarization, the axis defining the ordinary and extraordinary
polarizations also depends on the input ray’s polarization. So rays traveling along the crystal
axis with two different polarizations will have different ordinary and extraordinary polarization
axis. This can lead to counterintuitive results when considering mode 0 or 1. It is possible to
arrange systems in which an input ray with polarization (1,0) is 100% transmitted, an input ray
To account for phase rotation when performing polarization ray tracing, there are two limiting
cases to consider. Conceptually, the beam splits into an ordinary beam and an extraordinary
beam with a small angle between the two beams. If the beams then propagate a large
distance, the ordinary and extraordinary beams will separate and become two distinct beams.
If however the propagation distance is short, the ordinary and extraordinary beams coherently
interfere and recombine, resulting in a single beam with a (usually) rotated polarization vector.
Conceptually this is like tracing both the ordinary and extraordinary rays, then coherently
recombining them after propagation through the birefringent media. Which model is used to
determine the transmission and polarization properties may be selected by the mode.
If the mode is 0 or 1, then only the ordinary or extraordinary part, respectively, is traced. These
modes model the extraordinary and ordinary rays as two separate beams, and the fraction of
ray energy in the part of the ray that is not traced is discarded. No polarization rotation will be
modeled using mode 0 or 1. For transmission computations, both rays need to be traced
separately and the total energy computed. It is difficult to compute the effects of phase
rotation using mode 0 or 1.
Modes 2 and 3 assume that the angular deviation between the ordinary and extraordinary
beam is so small that the region of interest can be approximated by a single beam. If the
mode flag is 2, then the ordinary ray is traced, however the phase rotation due to the
extraordinary ray is accounted for. If the mode is 3, the extraordinary ray is traced, and the
phase rotation due to the ordinary ray is accounted for. For modes 2 and 3, no energy is
discarded, and the polarization of the ray is properly rotated by the birefringent media.
To model birefringence with sequential rays, OpticStudio must assume that the ordinary and
extraordinary beams will either overlap entirely or not at all. These limitations do not exist for
non-sequential models. Non-sequential rays can be used to model the ordinary and
extraordinary beams at the same time, and will account for any interference in the overlapping
regions.
Modes 0, 1, 2, and 3 for the sequential “Birefringent In” surface are shown in the graphic below:
When light propagates through birefringent media, the index of refraction of the glass is
different for the S and P polarizations. The ordinary index is what is seen by the perpendicular,
or S-polarized light, while the effective index is seen by the parallel or P-polarized light. Note
the S and P polarization directions used in this context are not in general the same as those
used by the coating and Fresnel surface effects computation. Here S and P refer to the
perpendicular and parallel orientations relative to the crystal axis rather than the surface
normal vector. The plane that contains the refracted ray and the crystal axis vector is the
parallel plane; and the P vector lies in this plane normal to the ray vector. The S vector is
perpendicular to both P and the ray vector.
For polarization analysis of birefringent materials, a few assumptions are needed. If the mode
is 0, the ordinary ray is traced, which only has an S component, so the P component
transmission is set to zero. If the mode is 1, the extraordinary ray is traced, and the S
component is therefore set to zero. This technique yields the correct transmission results for
each possible path separately. However, to get the total transmission requires analysis of each
If the mode is 2, then the ray follows the ordinary path, but the ordinary index is used to phase
rotate the S component of the field, and the effective index (properly referenced to the
ordinary ray direction) is used to rotate the P component of the electric field. Only 1 trace is
needed to properly model both transmission and phase rotation. If the mode is 3, then the ray
follows the extraordinary path, with a similar phase rotation as in the case of mode 2.
When modeling bulk transmission through birefringent media, only the internal transmittance
as defined by the ordinary index data is considered. No accounting for dichroism is supported.
Parameter
Definition
#
0 Length to draw crystal axis, 0 to not draw.
1 Mode, 0, 1, 2, or 3.
2, 3, 4 X, Y, and Z-cosines
5 Parax Ignore. If 1, paraxial rays ignore the extraordinary index.
Shape. If the shape is not zero, parameters 7 -12 are used to define the
6
surface shape.
7 Radius of rotation for optionally toroidal surface.
8 - 12 2nd to 10th order aspheric coefficients.
13 Gradient Mode. Material is homogeneous if 0.
If the gradient mode is > 0, then parameters 14 and up are used to define the
14 and up
gradient mode polynomial.
Parameter
Definition
#
0-5 Unused
Shape. If the shape is not zero, parameters 7 -12 are used to define the
6
surface shape.
7 Radius of rotation for optionally toroidal surface.
8 - 12 2nd to 10th order aspheric coefficients.
To load a BB file, set the surface type to “Black Box Lens” and then enter the name of the file,
with the extension ZBB, in the comment column of the Lens Data Editor. The file must be
placed in the <data>\BlackBoxes folder. OpticStudio will load the file, decrypt the prescription
data contained within the file, and then use the data to trace rays through the hidden
prescription data whenever a ray is incident upon that surface.
A Black Box Lens surface can be reversed using the Reverse Elements tool. However, in a
system with mirrors, a Black Box Lens surface will only work correctly if the file is properly
configured after either an even or odd number of mirrors, as was the configuration for the
original file.
This means care should be taken when manually adding mirrors before a Black Box Lens as this
can lead to rays being traced incorrectly and incorrect results being displayed without an error
message. In particular, tools that automatically add mirrors to the system (Add Fold Mirror and
Make Double Pass) should not be used with a Black Box Lens as they will generate incorrect
results without an error message.
When using BB surfaces, not all analysis features are supported to such an extent as to be able
to reproduce the analysis data for the original system. These include features where the
individual surface data must be modified to complete the analysis, such as for the thermal
analysis features. Also, analysis features that require significant surface-by-surface
computations cannot yield the same analysis data as the original file, and are therefore not
supported. These include Physical Optics Propagation and Skew Gaussian Beam analysis. It is
highly recommended that the creator of the ZBB data verify that the computations of interest
to the end user of the ZBB work as they did for the original file, and provide guidance to the
end user as to what aspects of the lens performance the BB is intended to illustrate. All
common features that rely directly on ray tracing, such as ray fans, OPD fans, spot diagrams,
MTF, PSF, image analysis, and most other analysis features work well.
Chebyshev Polynomial
The Chebyshev Polynomial surface is a freeform surface that is described by a base radius of
curvature and a sequence of Chebyshev polynomials. A one-dimensional Chebyshev
polynomial of the first kind is given by:
T0 (x) = 1
T1 (x) = x
T2 (x) = 2x2 – 1
T3 (x) = 4x3 - 3x
The transition to a two-dimensional Chebyshev polynomial is done using the product basis tij
(x,y) :
In OpticStudio, the maximum order for both x and y is set to 14. Any function may be
interpolated as a finite sum of Chebyshev polynomial terms:
The arguments of the 2D Chebyshev polynomials are defined on the unit interval. To make the
interpolation valid for an arbitrary interval, we use normalized and as the
arguments of the polynomials.
where c is the curvature at the vertex of the surface, and are the normalization lengths,
Chebyshev surfaces are not defined outside of the normalization radii, X0 and Y0. Rays that
strike a Chebyshev surface outside of the normalization radii cannot be traced and will be
vignetted at the Chebyshev surface.
Parameter
Name Definition
#
Maximum Polynomial Order in X-coordinate (integer, up to
1 Max X Order
14)
Maximum Polynomial Order in Y-coordinate (integer, up to
2 Max Y Order
14)
Norm X
3 Normalization length (positive, 1.0 by default)
Length
Norm Y
4 Normalization length (positive, 1.0 by default)
Length
13-236 Normalized polynomial coefficients,
Conjugate
The conjugate surface is defined by two user-specified points. OpticStudio always uses the
surface vertex as the reference point; the two points required to define the conjugate surface
are specified relative to this vertex. The conjugate surface will always perfectly image one point
to the other point, assuming the surface is a mirror. Although the conjugate surface can have
any material type, it is useful to think of it as being defined by its reflective properties.
If the z-coordinates of the two points are either both positive or both negative, then the image
formed from one of the points to the other is real. In this case, the distance from one of the
The surface generated by these two points satisfies the following expression if both z1 and z2
have the same sign:
Note that the surface must intersect the point (0,0,0). Several types of surfaces can be formed
with this model. For example, a sphere can be formed by setting the x and y values to zero, and
the two z values each to the radius of the sphere. An elliptical surface of arbitrary orientation
can be formed by specifying non-zero values for either the x or y values.
If z1 and z2 have opposite signs, then the image formed from one of the points to the other is
virtual. In this case, the distance from one of the points to an arbitrary point on the surface,
minus the distance from the arbitrary point on the surface to the second point, is constant for
all points on the surface. Like the real imaging case, the surface must pass through the vertex
of the local coordinate system.
The surface generated by these two points satisfies the following expression if z1 and z2 have
opposite signs:
Note that the surface must intersect the point (0,0,0). Several types of surfaces can be formed
with this model. For example, a hyperbola can be formed by setting the x and y values to zero,
and the two z values to opposite values. If the z values are equal but opposite, then a plane will
be generated.
The coordinates of the two construction points are specified in the parameter columns, as
shown in the following table. Neither the z1 nor the z2 value can be zero.
Parameter # Definition
1 x1
Coordinate Break
The coordinate break surface is used to define a new coordinate system in terms of the current
system. It is always considered a "dummy" surface for ray tracing purposes. There are six
parameters used to describe the new coordinate system: x-decenter, y-decenter, tilt about x,
tilt about y, tilt about z, and a flag to indicate the order of tilting and decentration. Coordinate
break decenters are always specified in lens units. Coordinate tilts are specified in degrees, and
are right-handed with respect to the positive axes. Coordinate breaks are always relative to the
coordinate system of the previous surface.
An alternate way of implementing coordinate breaks is to use surface tilts and decenters, see
“Surface tilt/decenter tab” for details.
If the “order” flag is set to zero, OpticStudio first decenters in x and y (decenters are
orthogonal so the order does not matter). Then OpticStudio tilts about the local x axis (which
rotates the y and z axes to new orientations), then tilts about the new y axis (which rotates the
x and z axes), then finally tilts about the new z axis.
If the “order” flag is any other value (such as unity), then the tilts are done first, in the order
around local z, then around the new y, and then around the new x, and then finally the
decenters are done. This “order” flag is extremely useful because a single coordinate break can
undo an earlier coordinate break, even for compound tilts and decenters.
The coordinate break acts like a plane surface oriented in the coordinate system after the
decenters and tilts have been applied. The thickness of the coordinate break defines the
position of the following surface in the new coordinate system, and is applied last, regardless
of the order flag. The surface is never drawn, and cannot be used to define the boundary
between two media. The glass type will always be the same as the prior surface, and
OpticStudio will display “-” for the glass name, which is meant to indicate that a glass type
cannot be entered there. Coordinate breaks themselves can never be mirrors, nor can the
object surface be a coordinate break.
Parameter # Definition
1 Decenter X
2 Decenter Y
3 Tilt About X
4 Tilt About Y
5 Tilt About Z
6 Order
Cubic Spline
The cubic spline surface is described by sag values which are the distances between the vertex
tangent plane and the surface. Spline surfaces are used to describe unusual correctors,
headlamps, and other non-standard optical surfaces, but rarely for imaging applications
because of the fundamental properties of splines. See "Comments about spline surfaces"
below for more discussion.
The Cubic Spline surface uses eight values to represent the sag at one-eighth, two-eighths,
and so on to eight- eighths of the clear semi-diameter or semi-diameter of that surface. Cubic
spline surfaces are rotationally symmetric. All eight points must be defined. A subset cannot be
used, although the clear semi-diameter or semi-diameter may be defined to exceed the useful
aperture of the surface. This is often required because of the steep curvatures occasionally
introduced by spline fitting. If eight points provides an overly coarse sampling, see “Extended
Cubic Spline”. For a more general non-rotationally symmetric surface, see “Grid Sag”.
Cubic splines are formed by a piece-wise concatenation of curved segments. Within the
bounds of each segment, the curve is defined by a third order polynomial. The polynomial
coefficients describing each segment are determined from the sag values of the defined
segment boundaries. The determination of the coefficients is driven by the boundary
requirements that the curve goes through the defined points, and both the first and second
derivatives be continuous across segment boundaries. For a third order spline, it is not possible
to require higher order derivatives, such as third, to be continuous across segment boundaries.
For this reason, splines are of limited accuracy and usefulness in high precision optical design.
A common characteristic of tracing rays through spline surfaces is rough or noisy looking ray
data, with discontinuities in some results. These ray trace discontinuities are a fundamental
limitation of splines, and they are not due to a flaw in OpticStudio, or a lack of numerical
precision.
For an excellent discussion of spline theory, properties and algorithms, see Numerical Recipes
in C, by Press et al., Cambridge University Press.
Parameter # Definition
1 Sag at 1/8
2 Sag at 2/8
3 Sag at 3/8
4 Sag at 4/8
5 Sag at 5/8
6 Sag at 6/8
7 Sag at 7/8
8 Sag at 8/8
Cylinder Fresnel
The Cylinder Fresnel surface has a polynomial aspheric cylindrical substrate with an
independent polynomial aspheric cylindrical function defining the Fresnel lens properties. The
surface substrate sag is given by:
The previous expression is used to compute the ray-surface intercept. Once the intercept is
found, the refraction (or reflection) of the surface is determined by the local slope of the
Fresnel facets. The Fresnel facet shape is described by an identical expression, with
independent coefficients:
The substrate sag radius, conic, and polynomial terms are all specified in the Lens Data Editor.
The Fresnel sag terms are specified as extra data values in an extra data file (see the Import
section of the Surface Properties). However, the extra data file uses curvature (the reciprocal of
radius) rather than radius for the Fresnel sag. The Parameter and Extra Data Values used are
summarized in the following tables.
Parameter
Definition
#
1-8 α1 - α8
13 Maximum aspheric polynomial term number, n. The maximum is 8.
The Y direction curvature (NOT RADIUS) of the Fresnel surface. This
14 parameter will effect the refraction of the surface, but not the shape of the
substrate.
The Y direction conic constant of the Fresnel surface. This parameter will
15
effect the refraction of the surface, but not the shape of the substrate.
16 Coefficient on y^2
17 Coefficient on y^4
… …
23 Coefficient on y^16
The "Maximum aspheric polynomial term number" is used to specify the maximum polynomial
term to be used in calculating the Fresnel sag. This number is provided to speed the ray tracing
calculation, as terms beyond this number are ignored. As with any complex surface model,
extreme care should be taken to evaluate the accuracy and appropriateness of this model,
especially where fabrication decisions are concerned.
Because there is no reliable way to compute the phase through a Fresnel surface which is not a
plane, any calculation that requires OPD data, such as OPD fans, MTF, and Zernike coefficients,
will not be supported if a non-plane substrate Fresnel surface is present in the lens description.
The data surface is a dummy surface that provides up to 240 extra data values to a
subsequently defined user- defined surface (UDS). The data surface must be placed
immediately before the UDS and up to 20 such surfaces defined sequentially may be used by a
single UDS. The purpose of this surface is to allow a large set of user- definable values to be
parametrically controlled and optimized, such as grids of data points. This capability requires
the FIXED_DATA4 UDS DLL structure.
Parameter # Definition
13 - 252 Extra data values (up to 240)
where d is the grating spacing (always in micrometers), θ2 is the refracted angle, θ1 is the
incident angle, M is the diffraction order, λ is the wavelength (always in micrometers), n1 and
n2 are the indices of refraction before and after the grating, and T is the grating frequency in
lines per micrometer. Note that the sign convention for M is completely arbitrary. OpticStudio
uses the definition for T (lines per micrometer) rather than d (micrometers per line). The
grating surface can be plane, spherical, or conical, and the medium before the grating, as well
as the grating itself, can be air, glass, “MIRROR” or any other valid glass type. The grating is
described by the y-spacing of the grating lines measured in lines per micrometer (independent
of the system units) and the diffraction order. OpticStudio only models gratings to the extent
of deviating ray paths. Other properties, such as efficiency, and relative transmission are not
supported. If the grating spacing is too small (or if T is too large) to satisfy the grating relation,
then a “Ray missed surface” error will be reported.
Parameter # Definition
1 Grating lines per micrometer
2 Diffraction order
Elliptical Grating 1
The elliptical grating 1 surface is a combination of an elliptical surface with polynomial aspheric
terms and a grating with grooves that are straight when projected on to the vertex tangent
plane (although the surface itself is usually not planar). The grating lines are parallel to the
local x-axis, and may be equally spaced or have a variable spacing defined by a 4 term
polynomial (up to the cubic term in y). Other orientations can be simulated by using a
coordinate break surface before and after the grating surface. For a plane grating, rays traced
to the grating are refracted according to the equation
where d is the effective grating spacing (always in micrometers), θ2 is the refracted angle, θ1 is
the incident angle, M is the diffraction order, λ is the wavelength (always in micrometers), n1
and n2 are the indices of refraction before and after the grating, and T is the effective grating
frequency in lines per micrometer. OpticStudio uses the definition for T (lines per micrometer)
rather than d (micrometers per line). The effective grating frequency T is defined by:
Note the constant spacing term is defined in reciprocal units to be compatible with other
grating surfaces in OpticStudio; while the higher order terms are defined in a polynomial in the
y coordinate. If T evaluates to zero, the grating component is ignored, which is useful for
modeling elliptical aspheres which are not gratings.
The surface shape is an ellipse with added polynomial aspheric terms. The sag of the surface is
given by the following expression:
Where
In these expressions, x, y, and z are the ray-surface intercept coordinates, a, b, and c are the
coefficients which define the shape of the ellipse, and the extended polynomials represented
by E are defined in the section “Extended Polynomial”.
Note the symbols a, b, and c do not have the same meaning in this sag expression as these
same symbol names do in the description of the Standard surface. To make a spherical
elliptical surface, the values a and b should be identical and equal to one over the radius of
curvature of the surface, and the value c should be equal to the radius of curvature:
Parameter
Definition
#
1 Lines per micrometer, T0
2 Diffraction order
3 a
4 b
Elliptical Grating 2
The elliptical grating 2 surface is very similar to the elliptical grating 1 surface. The distinction is
that the grating lines are formed by the intersection of tilted, parallel, evenly spaced planes
with a substrate defined by an elliptical surface with polynomial aspheric terms. The
intersection of the surface and tilted planes yield a grating with grooves that are straight when
projected on to a plane tilted by an angle θy , measured in the local y direction. When
projected onto a surface which is not plane, the grooves are curved, not straight.
The grating is defined by the parameter T, which is the lines per micrometer (the grating
frequency) when the groove lines are projected onto the tilted XY plane. This is the reciprocal
of the spacing between the planes which form the grooves. The diffraction order is M, and the
elliptical substrate is defined by the parameters a, b, c, and extra data terms, exactly as for the
elliptical grating.
The medium behind the grating surface may be air, glass, or a mirror. OpticStudio only models
gratings to the extent of deviating ray paths. Other properties, such as efficiency and relative
transmission are not supported. If the grating spacing is too small (or if T is too large) to satisfy
the grating relation, then a “Ray missed surface” error will be reported. The surface shape is an
ellipse with added polynomial aspheric terms, see the “Elliptical Grating surface shape”.
Parameter
Definition
#
1 Lines per micrometer, T0
2 Diffraction order
3 a
4 b
5 c
6 θy
13 Maximum term number (up to 240)
14 Normalization radius. All ray-intercept points are divided by this number to
Even Asphere
Rotationally symmetric polynomial aspheric surfaces are described by a polynomial expansion
of the deviation from a spherical (or aspheric described by a conic) surface. The even asphere
surface model uses only the even powers of the radial coordinate to describe the asphericity.
The model uses the base radius of curvature and the conic constant. The surface sag is given
by:
Note that the coefficients have units. The coefficients are entered in the corresponding
parameter columns, as shown in the following table.
Parameter # Definition
1-8 α1 - α8
Extended Asphere
The extended asphere surface is similar to the Even Asphere surface; see “Even Asphere”.
However, the extended asphere can support aspheric coefficients up to order 480, whereas the
even asphere is limited to 16. Also, a slightly different method is used for computing the
coefficients of the polynomial terms. The sag of the surface is given by the following
expression:
Parameter
Definition
#
13 Maximum term number. The maximum is 240.
Normalization radius. All ray-intercept points are divided by this number to
14
determine the x and y coordinates for polynomial evaluation.
15 Coefficient in lens units on ρ^2
16 Coefficient in lens units on ρ^4
17-254 Polynomial terms.
The "Maximum term number" is used to specify the maximum polynomial term to be used in
calculating the surface sag. This number is provided to speed the ray tracing calculation, as
terms beyond this number are ignored. For example, if the last term in the series you wish to
use is ρ14 , which is term number 7, then specify "7" in the maximum term number column.
Note that the term number is 7, because it is the 7th term in the polynomial expansion.
The normalization radius scales the X and Y intercept coordinates of the ray so that the
polynomial terms are all dimensionless and the coefficients are all in lens units. For modeling
surfaces that are not well described by polynomials, see “Grid Sag” or “User Defined”.
If you have a list of sag points that describes your optical surface (as might be generated from
a computer program other than OpticStudio) and you wish to enter them into OpticStudio, use
the Import section of the Surface Properties dialog. This feature is described in “Extra Data”.
Parameter # Definition
13 Maximum number of spline points (up to 240)
14 Step size in lens units between points along the radius.
15 The sag at a distance of one step size away from the vertex.
16-254 The sag at a distance of (n-14) step sizes away from the vertex.
The "Maximum number of spline points" is used to specify how many points define the
surface. This number may be between 4 and 240. At least 4 points are required to define the
curved surface.
Spline surfaces can cause rough or ragged ray tracing results. A more general and much
smoother solution is to use the grid sag surface, which is not restricted to rotational symmetry.
See “Grid Sag”.
Extended Fresnel
The Fresnel surface described in “Fresnel” models a plane surface which has the refractive (or
reflective) power of a curved surface. The Extended Fresnel surface increases the flexibility of
this model by supporting a plane, spherical, conic, or polynomial aspheric substrate on which a
plane, spherical, conic, or polynomial Fresnel pattern is etched.
See the section “Even Asphere” for details. The previous expression is used to compute the ray-
surface intercept. Once the intercept is found, the refraction (or reflection) of the surface is
determined by the local slope of the Fresnel facets, which depends upon both the Fresnel facet
shape expression for Zf (below) and the substrate shape expression for Zs (above). The Fresnel
facet shape is described by an expression virtually identical to the even asphere sag
expression:
The substrate sag radius, conic, and polynomial terms are all specified in the Lens Data Editor,
just like the even asphere surface. The Fresnel sag terms are specified as extra data values in an
extra data file (see the Import section of the Surface Properties). However, the extra data file
uses curvature (the reciprocal of radius) rather than radius for the Fresnel sag. The Extra Data
Values used are summarized in the following table.
Parameter
Definition
#
1-8 α1 - α8
13 Maximum aspheric polynomial term number, n. The maximum is 8.
The curvature (NOT RADIUS) of the Fresnel surface. This parameter will effect
14
the refraction of the surface, but not the shape of the substrate.
The conic constant of the Fresnel surface. This parameter will effect the
15
refraction of the surface, but not the shape of the substrate.
16 Coefficient on r^2
17 Coefficient on r^4
… …
23 Coefficient on r^16
The "Maximum aspheric polynomial term number" is used to specify the maximum polynomial
term to be used in calculating the surface sag. This number is provided to speed the ray tracing
calculation, as terms beyond this number are ignored. As with any complex surface model,
extreme care should be taken to evaluate the accuracy and appropriateness of this model,
especially where fabrication decisions are concerned.
where the first expression is identical to the Standard surface, and the second term is a power
series sum over a normalized radial coordinate. The normalized radial coordinate ρ is used
because then the coefficients αi all have units of lens units. The extra data terms are defined in
the following table.
Parameter
Definition
#
13 Maximum term number. The maximum is 240.
Normalization radius. All ray-intercept points are divided by this number to
14
determine the x and y coordinates for polynomial evaluation.
15 Coefficient in lens units on ρ^1
16 Coefficient in lens units on ρ^2
17 Coefficient in lens units on ρ^3
18-254 Coefficient in lens units on (n-14)^3
The "Maximum term number" is used to specify the maximum term to be used in calculating
the surface sag. This number is provided to speed the ray tracing calculation, as terms beyond
this number are ignored.
where N is the number of polynomial coefficients in the series, and Ai is the coefficient on the
ith extended polynomial term. The polynomials are a power series in x and y. The first term is x,
then y, then x*x, x*y, y*y, etc. There are 2 terms of order 1, 3 terms of order 2, 4 terms of order
3, etc. The maximum order is 20, which makes a maximum of 230 polynomial aspheric
coefficients. The position values x and y are divided by a normalization radius so the
polynomial coefficients are dimensionless.
For example, the 12th term in the polynomial expansion, which is extra data term number 14, is
the coefficient on the term in x2y2 . The coefficients Ai all have units which are the same as the
lens units, such as millimeters or inches.
Parameter
Definition
#
13 Maximum term number (up to 230)
Normalization radius. All ray-intercept points are divided by this number to
14
determine the x and y coordinates for polynomial evaluation.
15-244 Polynomial terms.
The "Maximum term number" is used to specify the maximum polynomial term to be used in
calculating the surface sag. This number is provided to speed the ray tracing calculation, as
terms beyond this number are ignored. For example, if the last term in the series you wish to
use is xy3 , which is term number 13, then specify "13" in the maximum term number column.
Note that the term number is 13, because it is the 13th term in the polynomial expansion. The
normalization radius scales the X and Y intercept coordinates of the ray so that the polynomial
terms are all dimensionless and the coefficients are all in lens units.
This curve is similar to the even asphere surface sag formula, except the coordinate argument
is y, not r. This curve is then rotated about an axis a distance R from the vertex. This distance R
is referred to as the radius of rotation, and may be positive or negative. The Y-Z radius of
curvature is specified in the same column on the spreadsheet editor as the radius for Standard
surfaces. The radius of rotation is set on parameter column number 1. To model a cylinder lens
which is flat in the X direction use zero, which OpticStudio interprets as infinite radius.
The resulting surface is then modified by the addition of the extended polynomial terms:
where N is the number of polynomial coefficients in the series, and Ai is the coefficient on the
ith extended polynomial term. The polynomials are a power series in x and y. The first term is x,
then y, then x*x, x*y, y*y, etc. There are 2 terms of order 1, 3 terms of order 2, 4 terms of order
3, etc. The maximum order is 20, which makes a maximum of 230 polynomial aspheric
coefficients. The position values x and y are divided by a normalization radius so the
polynomial terms are dimensionless.
For example, the 12th term in the polynomial expansion, which is extra data term number 14, is
the coefficient on the term in x2 y2. The coefficients Ai all have units which are the same as the
lens units, such as millimeters or inches.
The diffraction grating is defined in terms of the number of lines per micrometer and the
diffraction order. These values are specified in parameter columns 2 and 3, respectively. The
grating lines are parallel to the local x axis, and are evenly spaced when projected onto a plane.
Parameter
Definition
#
The "Maximum term number" is used to specify the maximum polynomial term to be used in
calculating the surface sag. This number is provided to speed the ray tracing calculation, as
terms beyond this number are ignored. For example, if the last term in the series you wish to
use is xy3 , which is term number 13, then specify "13" in the maximum term number column.
Note that the term number is 13, because it is the 13th term in the polynomial expansion. The
normalization radius scales the X and Y intercept coordinates of the ray so that the polynomial
terms are all dimensionless and the coefficients are all in lens units.
Filter
Filter surfaces are modeled using the User Defined Surface described in “User defined surface
apodization using DLLs”.
Fresnel
The Fresnel surface model is used to simulate flat surfaces which have been etched to have a
spherical (or optionally aspheric) profile on a small scale (for Fresnel lenses which are not flat
see the extended Fresnel surface type description). The surface intercept is determined by
computing the intersection of the incoming ray with a plane. Once the plane intercept points
are found, the surface is then treated as generally curved for the purposes of refraction into
the next medium. This is only an approximation to a real Fresnel lens, however. The real Fresnel
lens has grooves which may alter the exact intercept point. The model used here is adequate
for Fresnel lens which have fine grooves (the groove depth is very shallow compared to the
aperture). Extreme Fresnel lenses, such as those used in lighthouses, are not modeled well. The
radius of curvature and conic constant, if any, are specified in the same manner as a Standard
surface. The parameter values are exactly the same as for the even asphere model; polynomial
aspherics are supported to 16th order.
Parameter # Definition
1-8 α1 - α8
Generalized Fresnel
This surface represents a generalization of the Fresnel surface described in “Fresnel”. The basic
concept of a Fresnel surface, as far as ray tracing is concerned, is that the overall shape of the
surface substrate is independent of the local slope. The generalized Fresnel uses a polynomial
aspheric substrate model, identical to the Even Aspheric surface described in “Even Asphere”.
The sag of the surface is given by the following expression:
where the terms are identical to those in the even asphere surface model. See that section for a
complete discussion.
Once the ray has intercepted the surface, the ray reflects or refracts as if the surface had a
shape described by a polynomial expansion of the form:
where N is the number of polynomial coefficients in the series, and Ai is the coefficient on the
ith extended polynomial term. The polynomial terms are identical to those described in
“Extended Polynomial”. It is the gradient of the extended polynomial terms alone that
determines the reflective or refractive properties of the surface, not the surface substrate
shape.
One application for this surface type is modeling faceted surfaces. For example, a flat substrate
may consist of a series of small faceted planes, which would reflect or refract the light as
though the surface was tilted. This can be simulated using a flat substrate and a linear x or y tilt
term in the polynomial coefficients.
Note that the coefficients have units. The coefficients are entered in the corresponding
parameter columns, as shown in the following table.
Parameter
Definition
#
1-8 α1 - α8
13 Maximum term number (up to 230)
Normalization radius. All ray-intercept points are divided by this number to
14
determine the x and y coordinates for polynomial evaluation.
15-244 Polynomial terms.
The "Maximum term number" is used to specify the maximum polynomial term to be used in
calculating the surface sag. This number is provided to speed the ray tracing calculation, as
terms beyond this number are ignored.
Gradient 1
This surface has the same shape as the Standard surface, with media whose index of refraction
is described by
where r2 = x2 + y2 . Four parameters are required: the maximum step size, Δt , the base index,
n0, the radial quadratic index, nr2 , and the radial linear index, nr1 . Note that nr2 and nr1 have
units.
The maximum step size is measured in lens units along the local z-axis and determines the
increments in which the gradient index is recalculated. For example, if Δt = 0.1 and the system
The maximum step size Δt determines the trade-off between ray tracing speed and accuracy.
The exact value required depends upon the numerical aperture of the system and the
magnitude of the coefficients. To determine a suitable step size, start at a large value (on the
order of the thickness of the surface), and then perform a spot diagram. Note the RMS spot
radius. Now decrease the step size by a factor of two. If the RMS spot radius changes by less
than a few percent, the new step size is probably small enough. Otherwise, decrease the step
again. For the final design phase, you may want to decrease the step size again. Using too
small a step size needlessly slows the ray tracing speed without enhancement of accuracy. OPD
tracing generally converges more slowly than ray tracing, so you may want to repeat the above
procedure while inspecting the OPD fan. Occasionally check to ensure that the step size is
appropriate as the design progresses.
The ray trace through a gradient index media requires iteration to determine the point of
intersection of the ray with the surface following the gradient index surface. Because of this,
not all surface types are allowed to follow gradient index surface types. If the type of the
surface after a gradient index surface is not supported, a message will be presented indicating
the error.
Parameter # Definition
1 Δt
2 n0
3 nr2
4 nr1
Gradient 2
This surface has the same shape as the Standard surface, with media whose index of refraction
is described by
The maximum step size Δt determines the trade-off between ray tracing speed and accuracy.
For details see “Discussion on maximum step size for GRIN surfaces”. Also see “Restrictions on
surfaces following GRIN surfaces”.
Parameter # Definition
1 Δt
2 n0
3 nr2
4 nr4
5 nr6
6 nr8
7 nr10
8 nr12
Gradient 3
This surface has the same shape as the Standard surface, with media whose index of refraction
is described by
where r2 = x2+y2. Eight parameters are required: the maximum step size, Δt, the base index, n0,
and the remaining six coefficients of the preceding equation. Note that some of the
coefficients have units.
The maximum step size Δt determines the trade-off between ray tracing speed and accuracy.
For details see “Discussion on maximum step size for GRIN surfaces”. Also see “Restrictions on
surfaces following GRIN surfaces”.
Gradient 4
This surface has the same shape as the Standard surface, with media whose index of refraction
is described by
Eight parameters are required: the maximum step size, Δt, the base index, n0, and the
remaining six coefficients of the preceding equation. Note that some of the coefficients have
units. This particular GRIN model is useful for gradient index optics with a cylindrical power
profile. It is also useful for modeling thermal gradients in optical elements, if you have
sufficient data to compute the coefficients.
The linear transverse terms, nx1 and ny1, are ignored when performing paraxial ray tracing.
The maximum step size Δt determines the trade-off between ray tracing speed and accuracy.
For details see “Discussion on maximum step size for GRIN surfaces”. Also see “Restrictions on
surfaces following GRIN surfaces”.
Parameter # Definition
1 Δt
2 n0
3 nx1
4 nx2
5 ny1
Gradient 5
The shape of the Gradient 5 surface is the same as the Standard surface plus a “tilt” term in
both x and y directions:
where c is the curvature (the reciprocal of the radius), r is the radial coordinate in lens units, k is
the conic constant, and tan α and tan β are the tangents of the tilt angles in x and y. Note this
is not the same surface shape as a tilted Standard surface, but it is a close approximation as
long as the curvature is small, or if the tilt angles are small. The Gradient 5 surface has the
following gradient profile:
where r2 = x2+y2. Ten parameters are required: the maximum step size, Δt, the base index, n0,
and the remaining six coefficients of the preceding equation, and the two tilt terms. Note that
some of the coefficients have units.
The important feature of the Gradient 5 model is that the model allows specification of
dispersion properties of the media. The dispersion data is user defined and is stored in an
ASCII file called SGRIN.DAT. The format for SGRIN.DAT will be described shortly.
The material name is entered in the glass column of the Gradient 5 surface type. If the glass
column is blank, then dispersion effects are ignored.
To perform ray tracing, OpticStudio first computes the index at a “reference” wavelength using
the preceding formula for nref. The index at any other wavelength is then computed using the
following method based upon a general expansion of the Sellmeier formula:
The coefficients Kij and Lij define the dispersion of the material, whereas the gradient
coefficients specified by parameters 2-8 (see the following table) define the index gradient
profile at the reference wavelength. This very general dispersion model permits modeling of
nearly arbitrary gradient index dispersion over a wide wavelength band. The parameters K_
MAX and L_MAX may be as little as 1 term, or up to 8 terms for more accurate modeling.
The dispersion data is stored in the ASCII file SGRIN.DAT which must reside in the <glass>
folder (see “Folders”).
The SGRIN.DAT file contains blocks of 10 lines each. The file format has the following structure:
MATERIALNAME
MIN_WAVELENGTH MAX_WAVELENGTH
REF_WAVELENGTH
K_MAX L_MAX
K11 K12 K13 ... K1K_MAX
K21 K22 K23 ... K2K_MAX
K31 K32 K33 ... K3K_MAX
L11 L12 L13 ... L1L_MAX
L21 L22 L23 ... L2L_MAX
L31 L32 L33 ... L3L_MAX
Multiple materials may be defined in the same file by placing additional blocks of 10 lines one
after the other, with no blank lines between. The supplied file SGRIN.DAT contains coefficients
to describe some gradient materials offered by LightPath Technologies.
The maximum step size Δt determines the trade-off between ray tracing speed and accuracy.
For details see “Discussion on maximum step size for GRIN surfaces”. Also see “Restrictions on
surfaces following GRIN surfaces”.
Parameter # Definition
1 Δt
2 n0
3 nr2
4 nr4
Gradient 6
This surface has the same shape as the Standard surface, with media whose index of refraction
is described by
with identical expressions (but different values for A, B, C, and D) for n0 , n1 , n2 , n3 uses
nanometers rather than micrometers for λ.
The dispersion data is user defined and is stored in an ASCII file called GLC.DAT. This file is
stored in the folder <glass> (see “Folders”). The first line in the file is a file version format
specifier of the form:
VERSION N
where N is the version number of the file format, currently 1. OpticStudio will read older GLC
data files that omitted the version number, however the current version number and format
should be used for any new files created or data added. The remaining lines are blocks of 21
lines defining the name and data for each material in the form:
NAME A0
B0
C0
The first line in the block is the name of the material, which can be any name (without special
characters such as spaces or quotes) less than 10 characters long. The next 20 lines are the
values for A, B, C, and D for n0 through n4, respectively. There are no blank lines or comments
allowed. OpticStudio can read in data for up to 25 different materials in the GLC.DAT file.
The dispersion data in the supplied GLC.DAT file was provided by the Gradient Lens
Corporation (GLC) in Rochester, NY, (716) 235-2620. Contact GLC for detailed information on
material properties. Not all of the materials offered by GLC are included in the GLC.DAT file.
The following materials are included: ARS10, ARS20, ARS27, and ARS31.
To use the Gradient 6 surface materials, change the surface type to Gradient 6, and then enter
the appropriate material name in the glass column of the Lens Data Editor.
The maximum step size Δt determines the trade-off between ray tracing speed and accuracy.
For details see “Discussion on maximum step size for GRIN surfaces”. Also see “Restrictions on
surfaces following GRIN surfaces”.
Parameter # Definition
1 Δt
Gradient 7
This surface has the same shape as the Standard surface, with media whose index of refraction
is described by
Where
The isoindex contour radius R may be specified independently from the front or rear radius of
curvature of the lens. However, if R is set to be zero, then OpticStudio assumes the isoindex
radius and the front radius of curvature are equal.
The maximum step size Δt determines the trade-off between ray tracing speed and accuracy.
For details see “Discussion on maximum step size for GRIN surfaces”. Also see “Restrictions on
surfaces following GRIN surfaces”.
Parameter # Definition
1 Δt
2 n0
3 R
4 α
5 β
GRADIUM™
This surface type models lenses made from stock gradient index blanks available from
LightPath Technologies, Inc. The surface shape is the same as the Standard surface. The blanks
have an axial gradient index profile, which describes a reference index of refraction as a
function of axial position within the glass blank. All that is required to define the lens is the
starting position within the blank, the name of the stock blank profile, and of course the radii
and thickness. The GRADIUM surface has a gradient index profile which is described by a
polynomial of the form:
To select a different profile file, see “GRADIUM Profile”. For a list of the available profiles, see
“Gradium™ Profile”.
Each block of data starts with the name of the profile, which can be any valid ASCII name less
than 20 characters. On the same line, the glass family name follows, which must be a gradient
index material as defined in the SGRIN.DAT file, which is described in the section on the
Gradient 5 surface type. The glass family name defines the reference wavelength which the
profile describes. The last entry on the line is the maximum z coordinate of the blank. The 12
polynomial coefficients follow, from n0 to n11. The maximum allowed number of profiles is
100.
When OpticStudio performs ray tracing, the local z coordinate on the surface (which may be
negative) is computed. The offset value is then added to determine where in the profile the
coordinate lies.
Normally, the resulting value must always be positive and less than or equal to the maximum z,
otherwise an error is generated (See the discussion of “Capping” below). The reference index is
then evaluated. Once the reference index is computed, the index at the wavelength being
traced is computed using the technique described in the section on the Gradient 5 surface.
The reference wavelength index at the front vertex is displayed as parameter 3. This value may
be changed in the Lens Data Editor. When a new value is entered, OpticStudio computes the
appropriate Δz to yield the specified reference index. However, Δz is the value that matters.
The reference index is just displayed for convenience, and should not be made variable, or a
multi-configuration operand. Note the reference index is the vertex index at the reference
wavelength, which is the wavelength defined in the glass family definition file SGRIN.DAT. It is
not necessarily the primary wavelength.
Where
and tx, ty, tz are the coefficients of the unit vector which points along the axial gradient axis
and dx and dy are the decenters in lens units of the start of the profile. If tx and ty are both
zero, then the dx and dy values do not matter (since the gradient is only along the z axis) and
the tz value is unity. The terms tx and ty determine the slope of the profile axis in x and y, which
is intended to model the tolerance of axial alignment between the gradient axis and the
mechanical axis of the lens. This expression is a linear approximation which is only valid for
asymptotically small tx and ty.
The tolerance terms, dx , dy , tx , and ty , are ignored when performing paraxial ray tracing.
Usually, only the defined range of the profile is used. However, in some cases the profile may
be extended in one or both directions to add additional glass to the ends of the profile, which
allows the use of GRADIUM in thicker lenses. This technique is called “capping”. By default,
OpticStudio turns capping off, so that any ray trace which requires glass beyond the profile
limits is flagged as an error. This automatically enforces boundary constraints during
optimization. To remove this restriction, the capping flag can be set to be 1, 2, or 3. The default
value of zero indicates the blank is bounded to the profile length at both ends. If the capping
flag is 1, then only the left edge is bounded (the right edge is allowed to pass beyond the
profile limit). If the capping flag is 2, then only the right edge is bounded. And if the capping is
3, then neither the left nor right edges of the blank are bounded, and both the thickness and
the offset may take on any values. The additional material added to the beginning and end of
the profile is assumed to be a homogeneous glass with the same index and dispersion as the
respective end points of the profile. This assumption may be inaccurate if there is some slope
to the profile at the defined endpoints, which is usually the case. Contact LightPath
Technologies for more detailed information on designing with GRADIUM capping.
All GRADIUM profiles are defined in pairs; there is a "positive" and "negative" profile. These are
identical profiles that are reversed in the axial direction. When modeling lenses in double pass,
The maximum step size Δt determines the trade-off between ray tracing speed and accuracy.
For details see “Discussion on maximum step size for GRIN surfaces”. Also see “Restrictions on
surfaces following GRIN surfaces”.
Parameter # Definition
0 boule thickness
1 Δt
2 Δz
3 n_ref
4 dx
5 dy
6 tx
7 ty
8 Capping
Gradient 9
The Gradient 9 surface may be used to model SELFOC ® materials available from NSG
America, Inc., or any gradient glass with a similar index variation. The shape of the Gradient 9
surface is the same as the Standard surface plus a “tilt” term in both x and y directions:
where c is the curvature (the reciprocal of the radius), r is the radial coordinate in lens units, k is
the conic constant, and tan α and tan β are the tangents of the tilt angles in x and y. Note this
is not the same surface shape as a tilted Standard surface, but it is a close approximation as
long as the curvature is small, or if the tilt angles are small. The Gradient 9 surface has the
following gradient profile:
where the wavelength is measured in micrometers. The dispersion data is user defined and is
stored in an ASCII file called GRADIENT_9.DAT. This file is stored in the folder <glass> (see
“Folders”). The GRADIENT_9.DAT file contains blocks of 6 lines each. The first line in the file is
the name of the material, which can be any name (without special characters such as spaces or
quotes) less than 20 characters long. The next 5 lines are the values for B, C, K0, K1, and K2.
There are no blank lines allowed between blocks. OpticStudio can read in data for up to 25
different materials in the GRADIENT_9.DAT file.
The dispersion data in the supplied GRADIENT_9.DAT file was provided by NSG America, Inc.,
in Somerset, NJ, (732) 469-9650, or by Corning, Inc., Corning NY, (607) 974-4755. Contact the
respective manufacturers for detailed information on material properties. Not all of the
materials offered by these manufacturers are necessarily included in the GRADIENT_9.DAT file.
The included materials are: SLS-1.0, SLS-2.0, SLW-1.0, SLW-1.8, SLW-2.0, SLW-3.0, SLW-4.0,
and SLH-1.8 for NSG and Corning-Grin for Corning.
To use the Gradient 9 surface materials, change the surface type to Gradient 9, and then enter
the appropriate material name in the glass column of the Lens Data Editor.
The maximum step size Δt determines the trade-off between ray tracing speed and accuracy.
For details see “Discussion on maximum step size for GRIN surfaces”. Also see “Restrictions on
surfaces following GRIN surfaces”.
Parameter # Definition
1 Δt
2 tan α
3 tan β
where ya = |y| and the || symbols indicate the absolute value. This form of gradient has a
discontinuity at the plane y = 0, and the gradient is bisymmetric about the y = 0 plane. If the
glass type is left blank, then there is no dispersion. If a glass type is entered in the glass
column, then it must be one of the Gradient 5 materials defined in the section on the Gradient
5 surface type. The above formula then defines the index profile at the reference wavelength
for the material, and the index at other wavelengths is computed according to the dispersion
model defined for the Gradient 5 surface. The linear transverse term, ny1, is ignored when
performing paraxial ray tracing.
The maximum step size Δt determines the trade-off between ray tracing speed and accuracy.
For details see “Discussion on maximum step size for GRIN surfaces”. Also see “Restrictions on
surfaces following GRIN surfaces”.
Parameter # Definition
1 Δt
2 n0
3 ny1
4 ny2
5 ny3
6 ny4
7 ny5
8 ny6
Gradient 12
The shape of the Gradient 12 is the same as the Standard surface, with media whose index of
refraction is defined by:
The maximum step size, Delta T, determines the trade-off between ray tracing speed and
accuracy. For details, please see the “Discussion on maximum step size for GRIN surfaces” and
“Restrictions on surfaces following GRIN surfaces” under the Gradient 1 documentation.
The Order is the order of the highest polynomial constant (for x, y, and z) shown in the Lens
Data Editor. The maximum is 20, which will show all constants as defined in the index of
refraction expression above, as Parameters 4-63. Any constants not shown in the editor are
assumed to equal zero. If this order parameter is zero, then all constants are zero and only the
base index, n0, is available in the lens data editor.
Parameter
Definition
#
1 Δt
Order. The order of the highest polynomial constant (for x, y, and z) shown in
the lens data editor. The maximum is 20, which will show all constants as
defined in the index of refraction expression above. Any constants not shown
2
in the editor are assumed to equal zero. If this order parameter is zero, then
all constants are zero and only the base index (Parameter 3) is available in the
lens data editor.
3 n0, the base index
4, 5, 6 c_x1, c_y1 , c_z1 (1st order coefficients)
7, 8, 9 c_x2, c_y2 , c_z2 (2nd order coefficients)
… …
61-63 c_x20, c_y20, c_z20 (20th order coefficients)
The maximum size of the GGD file is based on the following formula:
In 32-bit we require that limit is less than 1 billion (1E9), while in 64-bit we require that limit is
less than 4 billion (4E9).
The file is split into two parts: the first line is the header and the second is the index and
dispersion data. The header contains information about the contents of the file and the
dispersion formula that OpticStudio will use. The main part will contain either index data,
dispersion coefficients or both. The syntax is shown below.
DISPERSION_FORMULA_IDENTIFIER NX NY NZ DX DY DZ
X Y Z n0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10
.
.
.
In the header, the dispersion formula is a string that corresponds to one of the dispersion
formulas described under “The glass dispersion formulas”. The dispersion formula identifiers
are the formula names with the spaces removed (e.g. the Sellmeier 3 formula would be
Sellmeier3). Only those formulas listed in the aforementioned section are currently supported.
The NX, NY and NZ values are the number of x, y and z points in the file, respectively. These
values must be greater than 5. The DX, DY and DZ are the spacing between the points in x, y
and z, respectively.
The maximum step size is the only parameter for this surface type. See “Discussion on
maximum step size for GRIN surfaces” for details.
Surfaces other than the following are not allowed to be placed directly after a Grid Gradient
surface.
l Even Asphere
l Extended Polynomial
l Gradient 1-12
l GRADIUM
l Grid Gradient
l Grid Sag
l Irregular
l Odd Asphere
l Standard
l Tilted
l Toroidal
l User Defined
Parameter # Definition
1 Δt
The Interpolate column determines the interpolation method used between the data points.
Use 0 for bicubic spline, 1 for linear, and 2 for pixelated. For interpolation methods 0 and 1 the
phase and phase slope vary continuously over the surface. When using interpolation method
2, the Grid Phase surface will have distinct pixels. The phase change is determined based on
the individual pixel. The phase slope will be determined based on the derivatives (dz/dx, dz/dy,
and d2z/dxdy) present in the .dat file. If all derivative values are zero for every point in the file,
then OpticStudio will automatically estimate the derivatives based on the pixel and the
neighboring values.
The file format and general information provided in the grid sag description is otherwise valid.
One method of modeling atmospheric turbulence is to use a Grid Phase surface with data
generated by an external atmospheric modeling program. Accurate modeling may require
multiple surfaces with different phase data modeling atmospheric layers separated by long
distances. Because of the separation between these layers, different field angles pass through
different parts of the atmosphere, depending upon the distance between the layers and the
ray angle. The separation causes a field dependent lateral shearing between the surfaces.
To model this shearing, one could in principle place multiple Grid Phase surfaces separated by
large distances in front of the optical system. In practice, this works poorly, because the
bending of the rays as they pass through a Grid Phase surface may cause the rays to miss the
entrance pupil entirely. To avoid this problem, the Grid Phase surface may be placed at the
entrance pupil of the system, and then the “shear distance” corresponding to the actual
position of the phase layer may be defined. When ray tracing to the Grid Phase surface, for
phase purposes only, OpticStudio will adjust the ray coordinates to correspond to the
coordinates the incoming ray would have had if the Grid Phase surface had been placed at the
shear distance. Normally, shear distances are negative as the distance is measured from the
surface to the effective position of the phase layer. If the shear distance is zero, no lateral
shifting occurs.
Parameter
Definition
#
0 Diffraction order
1 Shear Distance
Interpolation method. Use 0 for bicubic spline, 1 for linear and 2 for pixelated.
2
See “Bicubic spline vs. linear interpolation"
Grid Sag
The Grid Sag surface has a shape defined by a base plane, sphere, conic asphere, polynomial
asphere, or Zernike asphere plus additional sag terms defined by a rectangular array of sag
values. The surface shape is determined by either a linear or a bicubic spline interpolation of
the sag values. The sag can be described at discrete points by
Where
and the Zi terms are the Zernike standard terms as described in “Zernike Standard Sag”. The
terms delx and dely are the spacings between grid points in the x and y directions, xdec and
ydec are optional decentration coordinates, and nx and ny are the number of points in the grid
in each direction. The nx and ny values must be no smaller than 5. The terms defining Zbase are
identical to those defined for the even asphere surface. Note that the sag defined by the grid
points may be decentered relative to the sag defined by the base aspheric shape. There are
All of this data must be computed and tabulated outside of OpticStudio, arranged in the
proper file format, and then read using the Import section of the Surface Properties. The
proper file format is as follows:
The first line in the file contains seven values, which define the (integer) number of points in
the x and y directions, the (floating point) increment in the x and y directions (positive values
are assumed, only the absolute values of delx and dely are taken into account), an (integer)
flag indicating the units of the data: 0 for mm, 1 for cm, 2 for in, and 3 for meters, and the
(floating point) decenter of the grid points relative to the base surface in x and y. Any required
scaling to the current lens units will be performed. Note that sag and cross derivative values
have dimensions, and are therefore scaled, but first derivative values are dimensionless, and
are not scaled.
The remaining nx*ny lines of the file contain four (floating point) numbers and (optionally) one
integer each. The four floating point values are the sag, the x derivative of the sag, the y
derivative of the sag, and the cross derivative d/dxdy. The optional fifth data entry is an integer
flag that indicates if the data is invalid. Valid measured data should either have a zero or blank
space for the nodata flag. Points for which the data is not valid should have a nodata value of
unity.
If the nodata value is unity, the whole line of entries will be replaced with zeros and only the
base portion of the sag will be used for calculations. If any entry in the grid sag table is not a
number, the entry is replaced with zero.
The first data line in the file corresponds to the upper left corner of the surface, that is, the
corner defined by -x and +y limits. Each point that follows is read across the face of the surface
from left to right. After nx points, the nx+1 point is read in as the first value in row 2, and so on
until nx*ny points have been read in. The file must be in ASCII and end in the extension .DAT
(for files used by NSC objects, the extension should be .GRD).
The derivative values are required for smooth bicubic interpolation of the sag between the
data points. The derivative values are not used by the linear interpolation algorithm. If all of the
The grid sag file format also supports comment lines. Any line starting with the "!" character is
ignored.
The sag of the surface at any arbitrary point is computed using either of two interpolation
algorithms. The bicubic spline algorithm is used by default, and provides an interpolation that
is smooth in both sag and the first derivative of the sag. The bicubic spline is the preferred
algorithm for reasonably smooth data. For noisy pseudo- random like data, or grid data with
sharp discontinuities, bicubic spline can cause "overshoot", which means the interpolation of
the surface data can yield sag points which are far from the grid points. For these cases, a
linear interpolation algorithm may provide more useful results. The choice of bicubic spline or
linear interpolation is user selectable as one of the parameters.
For important information about the limitations of splines, see “Comments about spline
surfaces”. To use the grid sag surface, first change the surface type to grid sag. Then go to the
Import section of the Surface Properties dialog, and select the DAT file name. The data will be
loaded into memory, but will not be displayed on the Lens Data Editor. The reason for not
displaying the data is the potentially large number of points. Once the grid file is loaded, the
values can be checked using the Surface Data Report. The data is thereafter stored with the
lens file, and the original DAT file is ignored. If the DAT file must be changed, the file needs to
be reloaded using the Import feature in the Surface Properties dialog.
The grid size is only limited by available memory. Each point in the grid requires 4 8-byte
double precision values and 1 1-byte value, or 33 bytes. A 255 by 255 grid file would require
approximately 2 Megabytes of memory. Surfaces using Grid Sag surfaces with many points can
be slow to edit and read and write from files. One way to speed up editing is to turn off the
“disk multi step” undo feature in OpticStudio. See the “Editors” section of “OpticStudio
Preferences” (from the Setup Tab).
The bicubic interpolation algorithm is smooth to third order, with exact results at the grid
points, and large grid files are generally not required for reasonably smooth surface shapes.
However, like all low order spline models of surfaces, the Grid Sag surface can never closely
model a high order asphere surface. The reason is that no reasonable number of piece-wise
third order polynomials can accurately follow a higher order shape. The Grid Sag surface is
intended to model arbitrary low order shapes without higher order undulations.
The Grid Sag surface is not defined outside of the bounds of the grid. Rays traced outside the
grid area are treated as a ray miss error. It is a good idea to make the valid data portion of the
For Grid Sag surfaces that model steeply curved optics, such as fast mirrors, it is better to use
the base radius and conic to define the parent shape, and then use the Grid Sag data to define
the deviations from the base shape; rather than to embed the entire sag definition for the
surface in the grid data. The reason is OpticStudio can use the base radius and conic to find a
good “first guess” to the ray-surface intercept, then use the additional grid sag data to iterate
to the exact solution. It is difficult and slow for OpticStudio to find the correct intercept
between a steeply incident ray and a steeply curved Grid Sag surface if the base spherical
surface is flat.
Parameter
Definition
#
Interpolation method. Use 0 for bicubic spline, 1 for linear. See “Bicubic spline
0
vs. linear interpolation”.
1-8 α1 - α8
9 Zernike decenter X in lens units
10 Zernike decenter Y in lens units
13 Number of terms (up to 231)
14 Normalization radius. Coordinates are normalized by this value.
15-245 Coefficients on Zernike polynomials 1 - 231, respectively, in lens units.
Hologram 1
The hologram 1 surface can be used to model optically constructed holograms. The hologram
surface can be plane, spherical, or conical, and the medium behind the hologram can be air or
glass. The glass can also be "MIRROR" which indicates the hologram is constructed and used in
reflection. The hologram itself is described by the x, y, and z coordinates of two different
where n^ is the unit vector normal to the surface of the hologram at ray intersection point, ro is
the unit vector along the first construction beam, rr is the unit vector along the second
construction beam, r’r is the unit vector along the incident readout beam, r’o is the refracted
ray, λc and λp are the construction and playback wavelengths, and m is the diffraction order. A
value of m = 0 means the ray is undeviated, while other integral values of m refer to higher
diffracted orders. The notation used here is from the book "Aberrations of Optical Systems" by
Welford, Adam Hilger (1986). Modeling holograms requires an understanding of their behavior
which is beyond the scope of this section, and the user is advised to see the discussion in
Welford, or some other reference, before using this feature.
Most holograms are constructed and used in transmission or reflection. There are occasions
where the hologram is constructed in transmission, and then the substrate is aluminized and
used in reflection. This special case can be simulated with the hologram surface by specifying a
negative construction wavelength. Although ray tracing will be correct for this special case,
OPD tracing will not work.
By default OpticStudio only models holograms as surface holograms to the extent of deviating
ray paths. For other properties such as efficiency, the surface must be set up as a volume
hologram using the Volume Hologram? parameter.
The two construction beams are defined in terms of their source points. The x, y, and z
coordinates of the source points are measured relative to the hologram vertex coordinate are
defined in current lens units. OpticStudio computes the unit vector at the ray-surface
intersection point using the local coordinate data and the construction point data for the two
construction beams. The construction wavelength always has units of micrometers. If the
distance to a source point is greater than 1.0E+08 lens units, the point is assumed to be
infinitely distant and the construction beam is a perfect plane wave for that point. This
assumption yields more accurate OPD computations than simply entering large coordinate
values.
To use a Hologram 1 surface as a volume hologram set the Volume Hologram? parameter to a
non-zero value. This allows the input of the volume hologram parameters as listed below.
The hologram is defined by the interference between the two defined construction beams,
with no aberrations assumed on the construction beams. Optically fabricated holograms with
aberrated construction beams may be modeled in a very general way, see “Optically Fabricated
Hologram”.
The hologram 1 surface assumes that both construction beams diverge from the specified
construction points. Because of the reciprocity of the construction beams, this is identical to
the case where both construction beams converge toward the construction points. Some
hologram fabrication methods require one beam to be converging while the other beam is
diverging. See "The hologram 2 surface" for information on this latter type of hologram.
The equation we discussed above doesn't consider the index of the materials at two sides of
the hologram surface. If one of the rays is from different material, then we should multiply its
unit vector by the index where the ray is in. For example, if the hologram is attached on a glass
with index of ng and is used in reflection, then we should write incident readout beam and the
refracted beam as ngr'r and ngr'o. This is already handled by OpticStudio. However, the
construction beams are always assumed to be in the AIR as there is no parameter for defining
the index of the material where the construction beams are. In cases where the hologram is
optically manufactured in a non-AIR material, the construction wavelength should be
effectively changed from λc to λc/ng.
Note that, according to what we discussed above, when the index of the materials at two sides
of the hologram are different, we should expect rays to be diffracted to different directions.
This is exactly what we would expect for a grating diffraction. Shown below is a sketch that
depicts this concept.
PARAMETER DEFINITIONS FOR HOLOGRAM 1 SURFACES (Par 14-21 only available when Par
13 ≠ 0)
Parameter
Definition
#
1 X coordinate for first construction beam, Construct X1
2 Y coordinate for first construction beam, Construct Y1
3 Z coordinate for first construction beam, Construct Z1
4 X coordinate for second construction beam, Construct X2
Hologram 2
The hologram 2 surface is very similar to the hologram 1 surface. The key difference is that the
hologram 1 surface assumes both construction beams either diverge from or converge to the
construction points, whereas the hologram 2 surface assumes one construction beam
converges to one construction point, and the other construction beam diverges from the other
construction point. Which beam is first or second does not matter due to reciprocity. The
parameter data is the same for both hologram 1 and hologram 2 surfaces.
Shown below are plots explaining how the beam's convergence and divergence are taken by
Hologram 1 and 2. Note that the rays in orange represent diverging beams and the rays in
green represent converging beams. We can see Hologram 1 takes the point sources as both
being divergent, which is identical to the case where both construction beams converge
toward the construction points due to reciprocity. On the other hand, Hologram 2 takes the
two point sources as one divergent and one convergent. Which point source is divergent or
convergent does not matter due to reciprocity.
Parameter
Definition
#
1 X coordinate for first construction beam, Construct X1
2 Y coordinate for first construction beam, Construct Y1
3 Z coordinate for first construction beam, Construct Z1
4 X coordinate for second construction beam, Construct X2
5 Y coordinate for second construction beam, Construct Y2
6 Z coordinate for second construction beam, Construct Z2
7 Construction Wavelength, λc
8 Diffract Order, m
13 Volume Hologram? (0 for false, 1 for true)
14 Hologram Thickness (only used for efficiency calculations not ray-tracing)
15 Refractive index seen by construction beam 1 outside hologram, n1
16 Refractive index seen by construction beam 2 outside hologram, n2
17 Average refractive index of the hologram emulsion, n
18 Modulation of the refractive index, dn
Shrinkage (0 for no shrinkage, else scale of thickness e.g. 0.98 is 2% shrink-
19
age)
20 Index Shift (change of average refractive index after developing)
21 Consider Fresnel? (0 for false, 1 for true)
where
and rmax is the maximum radial aperture of the lens, defined by the clear semi-diameter or
semi-diameter value for the surface. The coefficients Zs, Za, and Zc represent the amount of
spherical aberration, astigmatism, and coma, respectively, in lens units at the maximum radial
aperture. The astigmatism and coma are oriented along a line that makes an angle θ in
degrees with respect to the y axis.
The x and y coordinates of the previous equations are in a decentered and tilted coordinate
system defined by the decenter x, decenter y, tilt about x, and tilt about y values. The decenters
are in lens units, and the tilt is in degrees. The tilt and decenter values work exactly like the
coordinate break surface defined in this section, however, the tilts and decenters are undone
after the ray is traced to the surface. Ray tracing is done according to this algorithm:
The irregular surface uses the first seven parameters to define the decenter, tilt, and Z
coefficients, and the eighth parameter to define the angle. All the coefficients are measured in
lens units, except the tilt angles which are in degrees.
Parameter # Definition
1 Decenter X
2 Decenter Y
3 Tilt About X
4 Tilt About Y
5 Zs
6 Za
7 Zc
8 θ
where A, B, C, D, Ex, and Ey are all complex numbers. See “Defining polarizing components” for
a complete discussion of the Jones matrix. Only polarization analysis features consider the
effects of this surface type. This surface uses eight parameter values, and none of the extra
data values.
Parameter # Definition
1 Ar
2 Ai
3 Br
4 Bi
5 Cr
6 Ci
Lenslet Array
Lenslet arrays are modeled using the User Defined Surface described in “Lenslet arrays using
DLLs”.
Non-sequential Component
The sag of the Non-sequential Component surface is the same as the Standard surface.
This surface enables ray tracing through one or more non-sequential objects. See “Non-
sequential Overview” for details.
Odd Asphere
The odd asphere model deviation is similar to the even asphere, except both even and odd
powers of r are used. The sag is given by
Note that the coefficients have units. The coefficients are entered in the corresponding
parameter columns, as shown in the following table.
Parameter # Definition
1-8 β1 - β8
The first term is the sag for a Standard surface (plane, sphere, or conic). The second term is
similar to the Odd Asphere surface, but the number of coefficients is fixed at 16. The third term
supports m cosine terms, where the integer m must be between 0 and 6, inclusive. The
coordinate s is the normalized radial coordinate given by s = r / R, where R is the user defined
normalization radius. If R is zero or negative, the cosine terms are ignored. The surface may not
be continuous in the first derivative if any B values is not an integer. The βi coefficients have
units which depend upon the index i, and the Ai coefficients have units of length in lens units.
The angle θ is measured in radians and is related to the x and y coordinates on the surface by:
tan θ = y/x.
The coefficient B is dimensionless and C is in units of radians. The coefficients are entered in
the corresponding extra data columns, as shown in the following table.
Parameter
Definition
#
13 - 28 The odd aspheric coefficients βi .
29 The number of cosine terms m, must be between 0 and 6
The normalization radius R for the coordinate s in the cosine portion of the
30
sag formula.
31 - 54 The A, P, B, and C terms in the cosine portion of the sag formula.
To build an optical system as shown below, the Off-axis Conic Freeform needs to be tilted by
an angle equal to atan(Y0 /sag(Y0 ). When the surface is a parabola (conic constant = -1), this
can be simplified to atan(Y0 /Radius of Curvature).
where
are introduced. The off-axis conic surface is given analytically by the equation
where
and
The XY polynomial in Eq. 5 is centered at the origin of the off-axis conic segment and, thus,
provides effective degrees of freedom for the lens design of plane-symmetric mirror systems.
More details on the Off-Axis Conic Freeform surface and design examples can be found in:
Dmitry Reshidko, Jose Sasian, "A method for the design of unsymmetrical optical systems
using freeform surfaces," Proc. SPIE 10590, International Optical Design Conference 2017,
105900V (27 November 2017); https://doi.org/10.1117/12.2285134
The Optically Fabricated Hologram is far more general. The hologram is defined using 3
OpticStudio lens files:
1) The playback file, in which the Optically Fabricated Hologram surface is placed.
When rays are traced in the playback system, OpticStudio automatically calls the two
construction systems to determine the vectors defining the interference of the two
construction beams at the interception point in the playback system. There are significant
advantages to this method of defining the hologram:
1) The construction optics may be completely arbitrary. Each construction file may consist of
multiple lenses, mirrors, or even other holograms; anything OpticStudio can model. The
aberrations introduced in the construction beams are therefore fully considered.
2) The two construction optics files may include completely different optics.
3) Any variables set in the construction system can be exposed in multi configuration editor via
the operand HLGV; allowing simultaneous closed loop optimization of the construction and
playback systems.
Shape 1: Same as the “Elliptical Grating surface shape”, using a, b, c, and the polynomial terms.
To define an Optically Fabricated Hologram, first create two lens files that each define the
optics used to illuminate and record the hologram. There are several important rules which
MUST be followed when defining the construction optics files:
1. The files must have the same name, with a "_1" and "_2" appended to the end. For
example, the file names "FAB_1" and "FAB_2" are valid file names for a pair construction
optics files.
2. The construction files must reside in the same folder as the playback lens file.
3. The surface at which the two construction beams will interfere must be the stop surface
in each file. Only the ray intercept vectors at the respective stop surfaces will determine
the hologram properties. The stop surface may be a different surface number in each
file.
4. The stop surface in each construction file must be either standard, elliptical grating, or
toroidal grating surface types.
5. Only 1 configuration is allowed in each construction file. The playback system may use
multiple configurations.
6. Only 1 field point is allowed in each construction file, although the field definition is
arbitrary. Vignetting factors should not be used.
7. Only 1 wavelength is allowed in each construction file, and the wavelengths in each con-
struction file must be identical. The playback wavelength is arbitrary, and need not be
the same as in the construction optics.
8. Ray aiming must be turned on in each construction file.
9. The system aperture type must be "float by stop size" in each construction file.
10. No virtual propagations are allowed in the construction files; the rays must all take phys-
ically significant paths.
With the construction optics files defined, the name of the files is given to OpticStudio via the
comments column. In the playback system, the hologram surface is set to “Optically Fabricated
Hologram” and the comment for that surface is set to the name that defines the construction
As OpticStudio traces rays in the playback system, any variables which affect the shape of the
playback hologram (the clear semi-diameter or semi-diameter, a, b, and c parameters, or extra
data parameters) are automatically copied into the construction optics stop surfaces. This is
why the stop surfaces in the construction and playback optics must be of the same type, so the
construction beams overlap on a surface with the same shape as the playback surface.
Any variables set in the construction optics automatically become variable in the playback
system, so the construction optics may be optimized simultaneously with any and all variables in
the playback system.
Whenever the playback lens file is saved; the construction optics files are automatically saved as
well.
Any variables set in the construction system can be exposed in multi configuration editor via
the operand HLGV, so the construction optics may be optimized simultaneously with any and
all variables in the playback system.
Whenever the playback lens file is saved; the construction optics files are automatically saved
as well. Note that only the construction files used in the current configuration are saved.
To constrain design parameters in the construction files while optimizing both the playback
and construction files simultaneously, use the CMFV operand in the playback system’s merit
function to call the merit functions defined in each of the construction beams. See
"Optimization" for information about the CMFV operand.
Because this surface uses external OpticStudio files to define the construction beams, the
Global Optimization algorithm should not be used. The other optimization algorithms are
acceptable to use.
1. By assuming that both construction beams either diverge or converge from their
respective sources, or
2. By assuming that one source beam converges and one diverges from their respective
sources.
In the majority of cases, OpticStudio can correctly compute the OPD through the hologram
using the default “OPD Mode” of zero. However, there are some special cases where the OPD
is not computed correctly. For these cases, the user must manually determine the proper OPD
algorithm by setting the OPD Mode equal to 1, 2, 3, or 4. The correct OPD Mode is a function
of the construction and playback geometry and the total number of mirrors in the three files.
There is no reliable algorithm for determining the proper OPD Mode automatically in all cases.
If the OPD is obviously wrong, try each of the OPD mode values 0 - 4 until the OPD values are
computed correctly.
Parameter
Definition
#
0 Shape
1 Holo Type (1 or 2)
2 Diffraction order
3 Curvature/a/Curvature
4 Conic/b/Conic
5 Unused/c/Rotation R
6 OPD Mode (0 for default, 1-4 to set manually)
7 Hologram Thickness (only used for efficiency calculations not ray-tracing)
8 Average refractive index of the hologram emulsion, n
9 Modulation of the refractive index, dn
Shrinkage (0 for no shrinkage, else scale of thickness e.g. 0.98 is 2% shrink-
10
age)
11 Index Shift (change of average refractive index after developing)
12 Consider Fresnel? (0 for false, 1 for true)
13 Maximum term number (up to 240; shape 1 & 4 only)
Normalization radius (all ray-intercept points are divided by this number to
14 determine the x and y coordinates for polynomial evaluation; shape 1 & 4
only)
15-254 Polynomial terms (shape 1 & 4 only)
Mode = 0 is very fast and accurate in most cases if the aberrations are not severe. If the Mode
= 0, then the OPD computation is based upon the conjugate positions computed by tracing a
real parabasal ray. This is preferred for axial optical systems with modest aberrations.
Mode = 1 integrates the actual phase introduced by the surface for each ray traced. Mode = 1
is substantially slower than the other modes, but is generally the most accurate. If the
aberrations in the optical spaces on either side of the paraxial lens are large, the paraxial lens
OPD computation cannot assume that the lens is working at fixed conjugates for all incoming
rays. For these systems, the OPD mode should be set to 1. Mode = 1 can also be used to check
if one of the other modes is accurate. If the same OPD results are produced by Mode = 1 as
another mode, then the other mode may be used as it will generally compute the OPD much
faster.
Mode = 2 assumes that the lens is used at infinite conjugates regardless of the actual
conjugates. This option will return incorrect results if the incoming beam is not reasonably
collimated.
Mode = 3 is similar to Mode = 0, except paraxial rather than real rays are used. Mode = 3 is
only valid for systems with modest aberrations that are well described by first order optical
theory.
For maximum OPD computation accuracy, the working F/# of the paraxial lens should be no
faster than about F/4, regardless of the OPD mode selected.
To model systems with collimated output, consider using Afocal Image Space rather
than a paraxial lens; see “Afocal Image Space”
Parameter # Definition
1 Focal length
2 OPD Mode
Paraxial XY
The paraxial XY surface type is similar to the paraxial surface except the optical power can be
specified in the X and Y directions separately. This surface can therefore be used as a paraxial
cylindrical or toroidal lens. Two parameters are required to define the paraxial XY surface: the X
power, and the Y power. OPD through paraxial XY surfaces is computed using mode = 1
described in the paraxial surface description. Optical power is measured in inverse length lens
units, such as inverse millimeters if the lens units are millimeters. See “Units”.
Parameter # Definition
1 X Power
2 Y Power
where A is the peak to valley height in lens units of the modulation, and the values α and β are
the spatial frequencies of the oscillations in the x and y directions, respectively. Note this
expression is the sag of a sphere plus the cosine modulation. The sag of the surface is exactly
zero at the vertex, and the amplitude is the peak to valley amplitude. The frequencies are
measured in inverse lens units.
This surface uses three parameter values, and none of the extra data values.
Parameter # Definition
1 A
2 α
3 β
Polynomial
The base radius of curvature and the conic constant are not used by this surface model. The
sag of the polynomial surface is given by
Parameter # Definition
1-8 γ1-γ8
The Qcon surface is described in G. W. Forbes, "Shape specification for axially symmetric
optical surfaces," Opt. Express 15, 5218-5226 (2007), equations 2-3.
The mathematics of these surfaces are fairly involved compared to traditional aspheric
polynomials and the details are not reproduced here.
The extra data terms this surface uses are defined in the following table.
Parameter
Definition
#
13 Type. Use 0 for Qbfs and 1 for Qcon.
14 Maximum term number. The maximum is 100.
Normalization radius in lens units. This is used by the algorithm to normalize
15
the radial coordinates, analogous to the Extended Asphere surface.
16 Coefficient A0
17 Coefficient A1
… …
115 Coefficient A99
≡ the 2D Q-polynomials;
≡ coefficients.
The Q-polynomials can be expressed in terms of Jacobi polynomials by using the following
recurrence relationship:
where
As the sag equation indicates, the polynomials of order m = 0 are radially symmetric. The
maximum polynomial radial power equals 2N + 4 in the case of the radially-symmetric
polynomials & 2N + 1 for the rest. These polynomials, in addition to their orthogonality, have
the following property:
The left-hand side of the above equation equals the mean square gradient of this normal
departure. Therefore, the sum of the squares of the polynomial coefficients provides a good
measure of the surface’s manufacturability.
and
where d is the grating spacing (always in micrometers), θ2 is the refracted angle, θ1 is the
incident angle, M is the diffraction order, λ is the wavelength (always in micrometers), and n1
and n2 are the indices of refraction before and after the grating. The radial grating surface
allows d to vary over the surface according to the equation:
where the Ai coefficients all have units of micrometers, and p is the normalized radial
coordinate defined by
where r is the radial coordinate on the surface in lens units and R is the user defined
normalization radius. The grating spacing d can be interpreted in two different ways. The
normal OpticStudio convention is to measure d along the projection of the grating on the XY
plane, ignoring any sag or curvature of the underlying surface. The Radial Grating surface
supports an additional “Grating Mode”, where d is interpreted as being measured along the
local surface tangent. The Grating Mode can be set to 0 or 1 in parameter 9 in the Lens Data
Editor.
Note that the sign convention for M is arbitrary. The grating surface can be plane, spherical,
conical, or even aspheric, and the medium before the grating, as well as the grating itself, can
be air, glass, “MIRROR” or any other valid glass type. OpticStudio only models gratings to the
extent of deviating ray paths. Other properties, such as efficiency, and relative transmission are
not supported. If the grating spacing is too small to satisfy the grating relation, then a “Ray
missed surface” error will be reported.
Parameter # Definition
0 Diffraction Order
1-8 Even aspheric coefficients α1 –α8
9 Grating Mode
13 Maximum number of terms
14 Normalization Radius
15 Coefficient on p^0
16 Coefficient on p^1
n Coefficient on p^(n-15)
Radial NURBS
The acronym NURBS stands for Non-Uniform Rational B-Spline. NURBS are a very general class
of curves and surfaces. For a complete discussion of NURBS, which is well beyond the scope of
this discussion, see The NURBS Book, Second Edition, by Les Piegl and Wayne Tiller, Springer-
Verlag, ISBN 3-540-61545-8.
The radial NURBS surface is defined by a series of weighted control points. The control points
define a curve which starts at the origin and lies in the YZ plane along the +Y direction. Once
this curve is defined, a figure of revolution is formed by rotating the curve a full 360 degrees
around the Z axis. Unlike a spline surface, a NURBS curve does not actually go through the
control points, except for the first and last control points. This can be seen in the example
below.
‘Each control point has a positive "y" coordinate, a "z" coordinate (which may be positive or
negative), and a weight "w". The first point is always at y = 0 and z = 0 (as this point cannot be
modified by the user, it is defined as control point 0), so the curve begins at the vertex origin of
the surface. Subsequent points, numbered from 1 to the maximum number of points desired,
extend monotonically outward in the +Y direction. The y values must be spaced at least 1.0E-3
lens units apart for numerical stability in the spline fit. When using this surface to design an
imaging system (i.e. one in which wavefront error is an important metric), the z coordinate for
control point 1 should be set to zero and the y coordinate for control point 1 should be set to a
small fraction of the y coordinate for control point 2 (in this case control point 2 is really the
The weights should all be set to 1.0 initially. The higher the weight, the closer the curve will be
to the actual control point. Lower weights mean the curve is less constrained to be near the
control point. See the above reference for details on the influence of weights on a NURBS
curve.
The y value of the last point defined determines the maximum radial clear aperture of the
surface. This value should generally be fixed, and not be a variable. Any rays which do not
intercept the surface within the defined areas of the curve will be terminated with a "ray miss"
error.
The advantage to the NURBS description is that any shape may be defined and traced reliably.
Unusual aspheric correctors which cannot be described by polynomials may be modeled as
NURBS.
The disadvantages to the NURBS description include very slow ray tracing, and sometimes
great difficulty in finding suitable starting values for the control curve points and weights.
Retro Reflect
The Retro Reflect surface is a planar shape surface. If the surface is made of glass or air, rays
refract according to Snell’s law in the usual way. If the surface is made of “MIRROR”, rays do
not reflect in the usual way; instead the rays are undeviated. This means under subsequent
propagation in the opposite direction the rays will follow the incident path; that is, the rays
retro-reflect.
OpticStudio cannot accurately compute the optical path difference of rays retro-reflected from
this surface if the aberrations are large (hundreds of times the diffraction limit) and the beam
incident upon the retro-reflect surface is very fast (about F/2 or faster). For this reason, the
retro reflect surface should only be used with reasonably slow beams and modest aberrations.
This surface models a planar bitmap image. The values of the individual pixels in the bitmap
define the transmission of the surface. Select the file name from the “Bitmap Image” control of
the Type tab of the Surface Properties dialog (see “Surface Type”). The bitmap image file must
reside in the <images> folder (see “Folders”).
If the Mode parameter is 0, rays outside of the bitmap image will have a transmission of 0. If
Mode is 1, these rays will have a transmission of 1. The X-Half Width defines the half width of
the bitmap in lens units. The bitmap is always centered at the vertex of the surface. The Y-Half
The transmission of the slide is based upon the RGB values of each pixel and the incident
wavelength. Because the RGB values do not correspond to a specific wavelength spectrum, a
linear interpolation algorithm is used to estimate the bitmap transmission.
Limitation:
There are no limits in the code on the image size. However, be aware that a large image may
cause issues namely in terms of memory allocation (for example during optimization, multiple
copies of the system are done and that will require a large amount of free memory). The slide
image can be seen in the Shaded Model but the number of pixels displayed are limited and
large slide images may not draw correctly.
Parameter # Definition
1 Mode
2 X-Half Width
3 Aspect Ratio
Standard
The most commonly used optical surface is a spherical surface. The sphere is centered on the
current optical axis, with the vertex located at the current axis position. OpticStudio treats
planes as a special case of the sphere (a sphere with infinite radius of curvature) and conics as a
special case as well. The “sag” or z-coordinate of the Standard surface is given by
The Standard surface does not use any of the parameter values.
There are a few handy formulas for converting the semi major and semi minor axis lengths of
an elliptical surface to a radius and conic description. If "a" is the semi major axis length, and
"b" is the semi minor axis length, then
See “Biconic” for an ellipsoid surface that has different semi-axial-lengths in x and y.
The Standard surface can be used to make an almost perfect axicon. If (1 + k) c2 r2 >> 1 , the
Standard surface reduces to
or z = r tan(α), where
Superconic
The most common form of a polynomial aspheric surface uses a power series expansion in the
radial coordinate r to define the surface sag, where r is defined by
For example, the Even Aspheric surface described in “Even Asphere” uses such an expansion.
Since r does not depend upon z, the expansion term is the distance from the vertex to the
point on the surface as projected on to the tangent plane. Generally, the departure of the
asphere from the tangent plane increases with radial aperture. As the departure increases, the
power series expansion parameter r corresponds to a point on the tangent plane which is
farther from the point on the surface. This causes the expansion to have poor convergence.
where k is the conic constant and R is the radius of curvature, a general power series expansion
can be made of the form
where U and V are coefficients which define the aspheric shape. Note that if all the U and V
terms are zero, a standard conic results. If A is also zero, then the superconic becomes a
sphere. The coefficients A, U1, and V1 together form a Cartesian oval. These properties make
the superconic stable when optimizing for the coefficients. The superconic can be used to
model surfaces which otherwise would require aspheric terms of very high order. OpticStudio
models superconics with up to 240 terms, in practice designs rarely use more than 5 terms.
Parameter # Definition
13 Maximum term number. The maximum is 240, but 4-10 is typical.
14, 15 U1 and V1
16, 17 U2 and V2
… …
252, 253 U120 and V120
The tilted surface uses the first two parameters to define the tangents of the x and y angles.
This surface is very useful for implementing tilted object and image surfaces, as well as tilted
faces on prisms. The tilted surface does not change the local coordinate system, and so should
not be used for implementing fold mirrors; use the coordinate break surface instead.
Parameter # Definition
1 tan (θx)
2 tan (θy)
Toroidal
Toroidal surfaces are formed by defining a curve in the Y-Z plane, and then rotating this curve
about an axis parallel to the Y axis and intersecting the Z axis. Toroids are defined using a base
radius of curvature in the Y-Z plane, as well as a conic constant and polynomial aspheric
coefficients. The curve in the Y-Z plane is defined by:
Where zt is the base toroidal sag and the Zernike Standard terms are defined in the section
“Zernike Standard Sag”, and are entered using the Import section of the Lens Data Editor. Note
if the Y-Z radius is set to infinity, a surface with power in x but not in y can be described,
therefore, the cylinder may be oriented in either direction. The other parameter columns are
Parameter # Definition
0 Extrapolate
1 Radius of Rotation, in lens units.
2-8 α1 - α7
13 Number of terms.
14 Normalization radius. Coordinates are normalized by this value.
15-245 Coefficients on Zernike polynomials 1 - 231, respectively, in lens units.
The "Number of terms" is used to specify the maximum Zernike polynomial term to be used in
calculating the surface sag. This number is provided to speed the ray tracing calculation; terms
beyond this number are ignored.
Zernike polynomials are orthogonal over the unit circle, and so the normalization radius should
be set to the radius over which the coefficient data was normalized. Zernike polynomials tend
to diverge quite rapidly beyond the normalization radius, and so care should be taken that rays
do not strike the surface beyond this radius. Although the ray tracing algorithm may work, the
data may be inaccurate. The extrapolate flag may be set to zero to ignore the Zernike terms for
rays that land outside the normalization radius.
Toroidal Grating
Toroidal grating surfaces are similar to regular toroidal surfaces, except no aspheric sag terms
are supported, and a diffraction grating may be placed on the toroidal surface. Toroidal
gratings are described by defining a curve in the Y-Z plane, and then rotating this curve about
an axis parallel to the Y axis and intersecting the Z axis. Toroidal gratings are defined using a
base radius of curvature in the Y-Z plane, as well as a conic constant. The curve in the Y-Z plane
is defined by:
Note if the Y-Z radius is set to infinity, a surface with power in x but not in y can be described,
therefore, the cylinder may be oriented in either direction.
The diffraction grating is defined in terms of the number of lines per micrometer and the
diffraction order. These values are specified in parameter columns 2 and 3, respectively. The
grating lines are parallel to the local x axis, and are evenly spaced when projected onto a plane.
For a toroidal grating with aspheric deformation terms see “Extended Toroidal Grating”.
Parameter # Definition
1 Radius of Rotation
2 Grating Lines per micrometer
3 Diffraction order
The radius and conic values, along with the parameter values, are used to define the surface
shape. The extra data values are used to define the holographic properties of the surface. The
terms used to define the holographic construction beams are identical to those described in
the earlier sections on the Hologram 1 and Hologram 2 surface types. Extra data values 1-6 are
The hologram is defined by the interference between the two defined construction beams,
with no aberrations assumed on the construction beams. Optically fabricated holograms with
aberrated construction beams may be modeled in a very general way using the “Optically
Fabricated Hologram”.
There is also a ninth extra data value which is used as a "flag" to indicate if the two
construction beams are converging or diverging. If both beams are converging or diverging to
or from the construction points, then the flag value should be +1. If one beam is converging
and one is diverging, then the flag should be -1. Any value less than zero is the same as -1, and
any value greater than zero is the same as +1. This flag value serves to distinguish these two
cases, which is the only difference between the Hologram 1 and 2 surface types.
To use the Toroidal Hologram surface as a volume hologram set the Volume Hologram?
parameter to a non-zero value. This allows the input of the volume hologram parameters.
PARAMETER DEFINITIONS FOR TOROIDAL HOLOGRAM SURFACES (Par 23-30 only available
when Par 22 ≠ 0)
Parameter
Definition
#
1 Radius of Rotation
2-8 α1 - α7
13 X coordinate for first construction beam, Const. X1
14 Y coordinate for first construction beam, Const. Y1
15 Z coordinate for first construction beam, Const. Z1
16 X coordinate for second construction beam, Const. X2
17 Y coordinate for second construction beam, Const. Y2
18 Z coordinate for secondi construction beam, Const. Z2
19 Construction Wavelength, λc
20 Diffract order, m
21 Converge/Diverge flag
22 Volume Hologram? (0 for false, 1 for true)
23 Hologram Thickness (only used for efficiency calculations not ray-tracing)
Toroidal NURBS
The toroidal NURBS surface is similar to the radial NURBS surface. The key difference is that
instead of rotating the curve about the Z axis to form a surface; the curve is instead mirror-
imaged to the -Y axis, then rotated about an offset Y axis to form a toric shape.
The offset axis may be in the +Z or -Z direction, depending upon the sign of the radius of
rotation. If the radius of rotation is zero, then the radius is assumed to be infinite and the
surface has cylindrical symmetry. The X width of the surface is determined by either the range
of rotation angle or by direct specification of the -x and +x limits; the latter being used if the
radius of rotation is infinite (which is defined by a zero value).
Parameter
Definition
#
1 Radius of Rotation
2 Min X or angle
3 Max X or angle
Number of control points. At least 4 points are required, and no more than 60
13
allowed.
14 y coordinate for control point 1.
15 z coordinate (sag) for control point 1.
16 w (weight) value for control point 1.
TrueFreeForm™
This feature is only available in the Premium and Enterprise editions of Ansys Zemax
OpticStudio.
The TrueFreeForm™ surface type defines a freeform surface as a combination of Biconic terms,
Even asphere terms, Extended Polynomial terms, and Zernike Standard Sag terms on top of a
grid of sag points. This surface type will allow users to add any of these terms to an already
defined surface (via the conversion tool “Make TrueFreeForm™”) and optimize specific sections
in the grid of sag points via the Grid Point Selector tool.
Parameter
Definition
#
# Variable Points. This is the number of Grid Sag points set to be variable by
0
the Grid Point Selector tool
1 X Radius
2 X Conic
3-10 Even Asphere terms
11 Zernike decenter X in lens units
12 Zernike decenter Y in lens units
13 Maximum Zernike Terms
14 Maximum Polynomial Terms
15 Normalization Radius
16 - 254 Zernike & Polynomial Terms, with Zernike terms appearing first
The "Maximum term number" is used to specify the maximum Zernike or polynomial term to
be used in calculating the surface sag. This number is provided to speed the ray tracing
calculation, as terms beyond this number are ignored.
User Defined
The secret to this great flexibility is that all the properties of the surface are defined by the user
in a separate C or C++ program compiled and linked into OpticStudio dynamically using the
Windows Dynamic Link Library (DLL) capability. The DLL must contain functions which return
to OpticStudio all the data required to draw the surface, trace rays, compute refraction angles,
and for gradient index, to determine the index as a function of position within the media
following the surface.
Because the DLL is compiled code, and because OpticStudio passes to the DLL a pointer to the
data that needs to be computed, UDS are very fast; nearly as fast as native OpticStudio code
(there is a small amount of overhead due to the function call).
The power of the UDS comes at a price, although it is a reasonable one. Use of the UDS does
require that the user have a suitable compiler or development tool that can generate 32 bit (or
64 bit if using the 64 bit version of OpticStudio) Windows compatible DLLs. It is also assumed
that the user can write the required code, and most importantly, ensure that the code is
reliable and bug-free. To maximize speed, OpticStudio performs very little error checking on
data returned by the DLL, and so buggy UDS DLLs are quite capable of bringing OpticStudio to
a crash.
For this reason, technical support on the implementation of UDS is strictly limited to
illustrating that the provided sample files work correctly.
The best way to learn how to create a UDS DLL is to start by copying the source code file (the
one that ends in .C) of a sample DLL to a new file name, edit the sample to suit your
requirements, and then recompile to make a new DLL. A good portion of the DLL source code
is "boiler plate" which is common to all DLLs.
There are two files that are required to define a UDS DLL: a C (or C++) source code file such as
MY_SURF.C, and a header file called USERSURF.H. Only the C file needs to be modified. The C
file defines 2 functions; the first is “DLLMain” which is used to (optionally) initialize data used
by the DLL. The other function is “UserDefinedSurface5”, and this is the function that is
modified for each surface type. Earlier versions of the OpticStudio User Defined surface
interface used the function names UserDefinedSurface, UserDefinedSurface2,
OpticStudio passes two structures to the function, and these structures are defined in the
USERSURF.H file.The structures are:
l "USER_DATA"
l “FIXED_DATA5”
USER_DATA
l The ray x, y, z locations on a plane tangent to the surface vertex. The DLL must iterate
to the real surface (or calculate intercept analytically) and return the updated ray loc-
ation.
l l, m, n direction cosines of the ray at the ray intercept
l ln, mn, nn surface normal at the ray intercept to be computed and returned
l Other data like index for gradient index, transmission, path length
The DLL must compute all new ray data after interacting with surface.
FIXED_DATA5
This data structure mainly contains data the DLL cannot change like all surface data in the
editors, ray wavelength, polarization state, ... . The ray polarization state and the scaling of
parameters are the only data the DLL may modify
FIXED_DATA5 also contains a "Type" and "Numb" parameters indicating what data OpticStudio
wants from a given call to the DLL. Inside the UserDefinedSurface5 function is a C “switch-case”
construct on those parameters. "Type" is a number between 0 and 10, inclusive.
The DLL only needs to handle this type code if the DLL requires one-time
initialization before the DLL can trace rays.
The termination of the DLL, if required. This includes releasing allocated memory or
closing data files. This type value is called when the DLL is removed from the
surface or the lens is closed. See the comments for type code 8 above for details on
9 how Zemax may load, initialized, and terminate multiple DLLs at once.
The DLL only needs to handle this type code if the DLL must release memory or
perform some other “clean-up” before terminating.
The scaling of parameter and extra data values used by the DLL. The scale factor is
10
stored in the USER_DATA structure in the path argument.
Extensive comments are provided in the sample DLL source code files. The DLL files can be
found in the folder <data>\DLL\Surfaces, and any new DLL files must be placed there as well.
For conventional homogeneous surfaces which are reflective or refractive, but not gradient or
diffractive, start with the file US_STAND.C. That file is the source code for US_STAND.DLL,
which is a clone of the built-in OpticStudio Standard surface. It is not exactly the same code,
and is somewhat slower than the form of equations used by OpticStudio, however, it is
functionally equivalent. US_STAND.C includes a generic Snell’s' law refraction function which
also works for reflection. The DLL, like all UDS DLLs, provides the sag, ray intercept equations,
surface normals, optical path, and paraxial refraction functionality.
Gradient surfaces should use US_GRIN1.C as a starting point. The code is very similar to US_
STAND.C, except a flag is returned indicating that the surface is a gradient type, and data type
“6” is implemented to return the index of refraction given X, Y, Z, and all the parameter and
extra data. The first derivative of the index in the X, Y, and Z directions must also be provided.
Diffractive optics are very similar to standard optics, except the rays are further deviated by the
derivative of the phase as a function of X and Y, and the optical path length needs to be
modified to include the phase change.
where l and m are the direction cosines, and the z direction cosine, n, is computed to make the
magnitude of the direction vector unity, and φ is the phase in radians.
Lenslet arrays are easily modeled using the user defined surface. Basically, the ray trace
determines which segment of the array is struck, then uses the local lens curvature to
determine the refraction. The sample source code and DLL are provided as US_ARRAY.C and
US_ARRAY.DLL, respectively.
The real ray trace portion of the DLL, type code 5, allows definition of the surface
transmittance. The surface transmittance must be a number between 0.0 and 1.0, and indicates
the relative fraction of intensity that the ray transmits through the surface. In this context,
The surface transmittance can be used to define arbitrary surface apodizations. The
transmittance function can be any formula based upon the ray coordinates, direction cosines,
surface parameters, or other data; or may be derived from a look up table, or any other
method that can be implemented within the DLL.
The surface transmittance need not be defined. If it is not defined by the DLL, OpticStudio
assumes it is 1.0. Whatever the surface transmittance is, the ray intensity will still be modified
by OpticStudio to account for the Fresnel surface, thin film, and bulk absorption affects that
are normally accounted for when doing polarization ray tracing.
If OpticStudio is not doing polarization ray tracing, then the DLL defined transmittance is the
only attenuating effect. Unlike pupil apodization, surface apodizations defined using UDS may
be placed on any surface anywhere in the optical system. Note that for apodizations which are
a function of ray position (and most are) different fields will then see a different effective
apodization. Note that this technique can be used to model arbitrary neutral density filters, or
filters whose transmission are wavelength dependent.
The real ray trace portion of the DLL, type code 5, allows definition of either the transmitted or
reflected electric field directly, or the definition of the s and p orientation complex reflection
and transmission coefficients. The field or coating data can be based upon any data available
within the DLL, including ray cosines, normal vectors, index, or other user defined data, or any
other method that can be implemented within the DLL. The field and coating data need not be
defined. If it is not defined by the DLL, OpticStudio uses the default algorithm for the surface.
For a source code example of how to define the electric field or coating data see the sample
DLL US_POLARIZATION.
The convention OpticStudio uses internally is to return a zero value if the DLL computed a
meaningful result, and no error occurred. Otherwise, the DLL should return -1. The exception is
when ray tracing, either paraxial or real. If the ray misses the surface, it should return the
surface number. If the ray total internally reflects (TIRs) then the return value should be the
negative of the surface number. OpticStudio uses these error codes to help provide
meaningful diagnostics to both the user and various OpticStudio features.
Sample DLLs
“In all descriptions of the DLLs below, c is for curvature, k is for conic constant, z describes the
sag coordinate, r describes the radial coordinate, ρ describes the radial coordinate normalized
to the clear semi-diameter or semi-diameter of the surface, and D describes the logarithmic
transmission function (i.e. D = -Log10(T) where T is the transmission). Where necessary other
parameters are specified in the corresponding description.”
US_
EAPERIODIC Where the parameters c, k, and , are the same as for the Even Asphere
surface. The parameter A represents the magnitude of the sinusoidal sag
perturbation, and should be specified in lens units. The parameter
represents the frequency of the sinusoidal sag perturbation, and should be
specified in inverse lens units. The parameter is the initial phase of the
sinusoidal sag perturbation, and should be specified in degrees ( the value is
converted to radians inside of the DLL for calculation of the sag).
This surface defines an apodization function of the form
US_FILT1
US_FILT5
US_FILT6
Where and are the spatial frequencies of the sinusoidal transmission in x
and y respectively.
This surface apodizes the surface transmission via linear interpolation of
values specified on the extra data editor as function of either the radial
US_FILT7
coordinate on the surface or a function of the angle the ray makes with
respect to the local Z axis after refraction from the surface.
This surface models a soft edged rectangular aperture. The MaxX and MaxY
parameters are the X and Y half widths of the rectangular aperture. The
Transmission varies smoothly from 1 to 0 over twice the distance defined by
US_FILT8
the DelX and DelY distances from the aperture boundaries. This function
make a convenient “soft-edged” aperture which is useful for optimization of
transmission through a rectangular aperture.
Models a cylindrical surface with a gradient index medium. The GRIN
US_GCYL medium has concentric cylindrical shells of constant index, and a polynomial
GRIN profile centered on the center of curvature. This DLL was intended to
Note: The iteration within this sample DLL is simplistic, and may not be able
to handle rays with a very large angle of incidence. When used in a wide
angle system, the DLL may fail with the following error message: Error 2. In
these cases, a more robust algorithm should be used, such as what is given
in US_STAND.DLL.
Models a Luneburg lens, which is a ball lens where the material is a gradient
US_LUNE index varying linearly as a function of the distance to the center of curvature,
i.e.
Parameter 8 (Rot Angle): Angle of rotation about the Z axis to the tip the
mirror
The rotation angle effectively rotates the plane of tip of the mirror around
the local Z axis; with the initial tip plane being around the local X axis. The
rotation angel is measured clockwise from the +y axis. The mirror angles are
then tipped about the rotated tip direction.
r/c/m: 3 2 1 Parameters
0 0 0 0
0 0 1 1
0 0 2 2
0 1 0 3
0 1 1 4
0 1 2 5
0 2 0 6
Etc…
US_OGIVE
Where
US_
This DLL shows how to define the electric field or coating data.
POLARIZATI
US_
ZERNIKE+MS-
F
The terms a2, a4 ... a16 have units of length to the power of -1, -3 ... -15. The
term A has units of length. The term ω0 has units of inverse length. The term
φ0 has units of degrees as entered, but is converted to radians for evaluation
in the expression above.
Compile example
To compile a DLL for user-defined code, see the Knowledgebase article How to compile a
User-Defined DLL. There is also an example project based on Visual Studio C++ located in
{Zemax}\DLL\Surfaces\Solution\AllProjects\.
Although the hologram surface type could be used to model the ideal grating, in practice
holographic construction is not always possible. A compromise is made in the fabrication,
where the grating lines are straight and parallel (as opposed to curved for the hologram case).
This introduces aberrations into the beam, which this surface model accounts for.
Five parameters are used to describe the surface: M, the diffraction order upon playback; L, the
(positive) radius of the concave focal surface, cos(α0), the cosine of the angle the incident
beam makes with the plane of the grating, cos(β0), the cosine of the angle the reflected beam
makes with the plane of the grating, and λ0, the construction wavelength. This is the
wavelength at which the grating will reflect the axis ray along the angle β0.
where y varies across the grating surface. The variable line space grating surface uses five of
the parameter surfaces, but none of the extra data surfaces.
Parameter # Definition
1 M
2 L
3 cos (α_0)
4 cos (β_0)
5 λ_0
Where N is the number of Zernike coefficients in the series, Ai is the coefficient on the ith
Zernike Fringe polynomial, ρ is the normalized radial ray coordinate, φ is the angular ray
coordinate, and M is the diffraction order. The Zernike Fringe polynomials are defined in the
table given in “Zernike Fringe Coefficients”. OpticStudio supports up to 37 terms. The
coefficients Ai all have units of waves. One wave is 2π radians. Note that the phase of the
surface is independent of the wavelength; OpticStudio accounts for the deviation in the ray
path based upon the wavelength being traced. If the “Extrapolate” flag is set to 0, the Zernike
terms are ignored outside of the normalization radius. If the “Extrapolate” flag is set to 1, then
the Zernike terms are considered no matter where the ray lands on the surface; even if the ray
lands beyond the normalization radius.
Note that the Zernike Fringe Phase surface describes phase variations (or wavefront error), not
surface deformations directly. If you have Zernike coefficient data in terms of surface
deformations, as might have been measured with a profilometer, see “Zernike Fringe Sag”. See
also “Zernike Standard Phase”.
Parameter
Definition
#
0 Diffraction order
1 Extrapolate
13 Number of terms (up to 37)
14 Normalization radius. Coordinates are normalized by this value.
Coefficients on Zernike polynomials 1-37, respectively, in units of waves.
15 - 51
Coefficient terms are provided in the file "Zernike Fringe Coefficients".
The "Number of terms" is used to specify the maximum Zernike polynomial term to be used in
calculating the phase. This number is provided to speed the ray tracing calculation; terms
beyond this number are ignored.
where N is the number of Zernike coefficients in the series, Ai is the coefficient on the ith
Zernike Fringe polynomial, r is the radial ray coordinate in lens units, ρ is the normalized radial
ray coordinate, and φ is the angular ray coordinate. The Zernike terms may be decentered
from the conic and aspherical terms using parameters 9 and 10. The Zernike Fringe
polynomials are defined in the table “Zernike Fringe Coefficients”. OpticStudio supports up to
37 Zernike Fringe terms. The coefficients Ai all have units which are the same as the lens units,
such as millimeters or inches. The coefficients αi have units, and are as defined in the section
“Even Asphere”. If the “Extrapolate” flag is set to 0, the Zernike terms are ignored outside of the
normalization radius. If the “Extrapolate” flag is set to 1, then the Zernike terms are considered
no matter where the ray lands on the surface; even if the ray lands beyond the normalization
radius.
Note that the Zernike Fringe Sag surface describes surface deformations, not wavefront error
directly. If you have Zernike coefficient data in terms of waves of OPD, as might have been
measured with an interferometer, see “Zernike Fringe Phase”. Also see “Zernike Standard Sag”.
The "Number of terms" is used to specify the maximum Zernike polynomial term to be used in
calculating the surface sag. This number is provided to speed the ray tracing calculation; terms
beyond this number are ignored.
Zernike polynomials are orthogonal over the unit circle, and so the normalization radius should
be set to the radius over which the coefficient data was normalized. Zernike polynomials tend
to diverge quite rapidly beyond the normalization radius, and so care should be taken that rays
do not strike the surface beyond this radius. Although the ray tracing algorithm may work, the
data may be inaccurate. The extrapolate flag may be set to zero to ignore the Zernike terms for
rays that land outside the normalization radius.
where N is the number of Zernike coefficients in the series, Ai is the coefficient on the ith
Zernike Standard polynomial, ρ is the normalized radial ray coordinate, φ is the angular ray
Note that the Zernike Standard Phase surface describes phase variations (or wavefront error),
not surface deformations directly. If you have Zernike coefficient data in terms of surface
deformations, as might have been measured with a profilometer, see “Zernike Standard Sag”.
Parameter
Definition
#
0 Diffraction order
1 Extrapolate
13 Number of terms (up to 231)
14 Normalization radius. Coordinates are normalized by this value.
Coefficients on Zernike polynomials 1-231, respectively, in waves. Coefficient
15 - 245
terms are provided in the file "Zernike Standard Coefficients".
The "Number of terms" is used to specify the maximum Zernike polynomial term to be used in
calculating the phase. This number is provided to speed the ray tracing calculation; terms
beyond this number are ignored.
Zernike polynomials are orthogonal over the unit circle, and so the normalization radius should
be set to the radius over which the coefficient data was normalized. Zernike polynomials tend
to diverge quite rapidly beyond the normalization radius, and so care should be taken that rays
do not strike the surface beyond this radius. Although the ray tracing algorithm may work, the
data may be inaccurate. The extrapolate flag may be set to zero to ignore the Zernike terms for
rays that land outside the normalization radius.
n
norm_rad
Z1
Z2
Z3
Where n is the number of Zernike terms to be used, norm_rad is the normalization radius, and
Z1 - Zn are the individual Zernike terms to be imported. The file should be saved with a .DAT
extension and placed in the Zemax/Objects/Grid Files folder.
where N is the number of Zernike coefficients in the series, Ai is the coefficient on the ith
Zernike Standard polynomial, r is the radial ray coordinate in lens units, ρ is the normalized
radial ray coordinate, and φ is the angular ray coordinate. The Zernike terms may be
decentered from the conic and aspherical terms using parameters 9 and 10. The Zernike
Standard polynomials are defined in the table given in “Zernike Standard Coefficients”.
OpticStudio supports the first 231 Zernike Standard terms. The coefficients Ai all have units
which are the same as the lens units, such as millimeters or inches. The coefficients αi have
units, and are as defined in the section on the “Even Asphere” surface type. If the “Extrapolate”
flag is set to 0, the Zernike terms are ignored outside of the normalization radius. If the
“Extrapolate” flag is set to 1, then the Zernike terms are considered no matter where the ray
lands on the surface; even if the ray lands beyond the normalization radius.
Note that the Zernike Standard Sag surface describes surface deformations, not wavefront
error directly. If you have Zernike coefficient data in terms of waves of OPD, as might have
been measured with an interferometer, use the Zernike Standard Phase surface instead.
Parameter
Definition
#
0 Extrapolate
1-8 α1 - α8
9 Zernike decenter X in lens units
10 Zernike decenter Y in lens units
13 Number of terms (up to 231)
14 Normalization radius in lens units. Coordinates are normalized by this value.
Coefficients on Zernike polynomials 1-231, respectively, in units of lens units.
15 - 245
Coefficient terms are provided in the file "Zernike Standard Coefficients".
The "Number of terms" is used to specify the maximum Zernike polynomial term to be used in
calculating the surface sag. This number is provided to speed the ray tracing calculation; terms
beyond this number are ignored.
Zernike polynomials are orthogonal over the unit circle, and so the normalization radius should
be set to the radius over which the coefficient data was normalized. Zernike polynomials tend
to diverge quite rapidly beyond the normalization radius, and so care should be taken that rays
do not strike the surface beyond this radius. Although the ray tracing algorithm may work, the
data may be inaccurate. The extrapolate flag may be set to zero to ignore the Zernike terms for
rays that land outside the normalization radius.
Also see the section “Importing Zernike coefficient data” in the definition of the Zernike
Standard Phase surface.
where N is the number of Zernike coefficients in the series, Ai is the coefficient on the ith
Zernike Annular polynomial, ρ is the normalized radial ray coordinate, φ is the angular ray
coordinate, and M is the diffraction order. The Zernike Annular polynomials are defined in the
table given in “Zernike Annular Coefficients”. OpticStudio supports up to 231 terms. The
coefficients Ai all have units of waves. One wave is 2π radians. Note that the phase of the
surface is independent of the wavelength; OpticStudio accounts for the deviation in the ray
path based upon the wavelength being traced. If the “Extrapolate” flag is set to 0, the Zernike
terms are ignored outside of the annular region defined by the normalization radius and the
obscuration ratio. If the “Extrapolate” flag is set to 1, then the Zernike terms are considered
outside the normalization radius. Within the obscuration radius, the Zernike terms are always
ignored, no matter how the “Extrapolate” flag is set. The Obscuration is a dimensionless
number between 0.0 and 1.0, that defines the annular region size relative to the normalization
radius. For example, if the normalization radius is 10.0, then an obscuration of 0.3 would define
the annular region of the phase terms to be from 3.0 to 10.0 units.
Note that the Zernike Annular Phase surface describes phase variations (or wavefront error),
not surface deformations directly.
Parameter
Definition
#
0 Diffraction order
1 Extrapolate
3 Obscuration
13 Number of terms (up to 231)
14 Normalization radius. Coordinates are normalized by this value.
Coefficients on Zernike polynomials 1-231, respectively, in units of waves"
with "Coefficients on Zernike polynomials 1-231, respectively, in units of
15 - 245
waves. Coefficient terms are provided in the file "Zernike Annular
Coefficients".
The “Number of terms” is used to specify the maximum Zernike polynomial term to be used in
calculating the phase. This number is provided to speed the ray tracing calculation; terms
Zernike polynomials are orthogonal over the annular region defined by the obscuration ratio
within the unit circle, and so the normalization radius should be set to the radius over which
the coefficient data was normalized. Zernike polynomials tend to diverge quite rapidly outside
the annular region defined by the normalization radius and obscuration ratio, and so care
should be taken that rays do not strike the surface outside this region. Although the ray tracing
algorithm may work, the data may be inaccurate. The extrapolate flag may be set to zero to
ignore the Zernike terms for rays that land outside the normalization radius.
Where N is the number of Zernike Annular coefficients in the series, ai is the coefficient for the
aspheric polynomial, Ai is the coefficient on the ith Zernike Annular polynominal, r is the radial
ray coordinate in lens units, ris the normalized radial ray coordinate, ris the angular ray
coordinate, and ris the obscuration ratio.
If the “Extrapolate” flag is set to 0, the Zernike terms are ignored outside of the annular region
defined by the normalization radius and the obscuration ratio. If the “Extrapolate” flag is set to
1, then the Zernike terms are considered outside the normalization radius. Within the
obscuration radius, the Zernike terms are always ignored, no matter how the “Extrapolate” flag
is set. The “Obscuration” is a dimensionless number between 0.0 and 1.0, that defines the
annular region size relative to the normalization radius. For example, if the normalization
Note the Zernike Annular Standard Sag surface describes surface deformations, not wavefront
error directly. If you have Zernike coefficient data in terms of waves of OPD, as might have
been measured with and interferometer, use the Zernike Annular Phase surface instead.
Parameter
Definition
#
0 Extrapolate
1-8 Aspheric Coefficients (2nd Order to 16th Order)
13 Obscuration
14 Maximum term number
15 Normalization Radius. Coordinates are normalized by this value.
Coefficients on Zernike polynomials 1-80, respectively, in lens units.
16 - 95
Coefficient terms are provided in the file "Zernike Annular Coefficients".
The “Number of Terms” is used to specify the maximum Zernike polynomial term to be used in
calculating the surface sag. The number is provided to speed the ray tracing calculation; terms
beyond this number are ignored. Currently OpticStudio limits the number of terms to 80. If
more terms are required, please contact OpticStudio Support at support@zemax.com.
Zernike polynomials are orthogonal over the annular region defined by the obscuration ratio
within the unit circle, and so the normalization radius should be set to the radius over which
the coefficient data was normalized. Zernike polynomials tend to diverge quite rapidly outside
the annular region defined by the normalization radius and obscuration ratio, and so care
should be taken that rays do not strike the surface outside this region. Although the ray
tracing algorithm may work, the data may be inaccurate. The extrapolate flag may be set to
zero to ignore the Zernike terms for rays that land outside the normalization radius.
Zone Plate
This surface is used to model a Fresnel Zone Plate (FZP). A FZP consists of a refractive or
reflective surface upon which annular zones of varying depth are cut or etched. Typically, the
spacing between grooves is large compared to the wavelength, and therefore FZP's are
entirely refractive, and not diffractive, devices. The varying depth of the annular zones imparts
The FZP is modeled by altering the local depth of the surface. Edge effects, such as rays striking
the side of the zone, and diffraction from the edges, are ignored. The FZP is defined by a
normalized optical thickness of each zone. Each zone is spaced a fixed radius apart, and up to
240 zones may be defined. Three parameter values are required: the mode, the Δr , and the
reference wavelength, λ0.
If the mode is zero, the steps are not interpolated, and each zone has a constant optical
thickness. This results in discontinuous phase steps, like a staircase. If the mode is unity, then
the optical thickness is interpolated between adjacent zones. Although the phase will be
continuous, the first derivative of the phase will generally be discontinuous at the zone
boundaries. The " Δr " is the step in radius between adjacent zones in lens units. The "reference
wavelength" is the wavelength in micrometers used to normalize the optical thickness. For
example, if the FZP defines the boundary between a material with index 1.55 and air, with index
1.00, and the reference wavelength is 0.45 micrometers, then an optical thickness of 1 wave
corresponds to a groove depth of
This thickness is the actual groove depth if the optical thickness is given to be 1.0. OpticStudio
uses this normalized optical thickness for convenience. To specify a zone that introduces one-
half wave of phase at the reference wavelength, enter an optical thickness of 0.5. At other
wavelengths, the phase will be greater or less depending upon the dispersion of the two
adjacent medi The optical thickness is defined at n points, separated by Δr : r1, r2, r3, ...rn
.specified in the first column of data in the extra data file to import (see the Import section of
the Surface Properties). The remaining terms are defined in columns 2 through n+1 in the extra
data file.
Parameter # Definition
0 Mode
1 Δr
3 Ref. wave
13 Number of points (up to 240)
14 Optical thickness at Δr
15 Optical thickness at 2 Δr
16 Optical thickness at 3 Δr
n Optical thickness at (n-13) Δr
For a list of sequential surfaces, see SEQUENTIAL SURFACES (lens data editor)
Surface Type
If the surface type is “User Defined” then the surface shape and ray trace properties are defined
in an external program linked into OpticStudio called a Dynamic Link Library, or DLL. This
control selects which DLL the surface uses. See “User Defined” for more information. If the
surface type is “Slide” then the bitmap image to apply to the surface is selected with this
control.
Surface Color
By default, on the Shaded Model Layout plot, OpticStudio draws mirrors in green, and
refractive and dummy surfaces in blue. The color of the surface as drawn on shaded models
may alternatively be selected to be any of the colors defined in the Colors settings, available in
the OpticStudio Preferences window, which can be displayed via a button in the System
section of the Setup Tab.
Surface Opacity
If the opacity is set at 100%, then the surface will be rendered on the shaded model plot as a
solid color, and the surface may fully obscure other surfaces from view. If the opacity is less
than 100%, then the surface is partially transparent, which allows other surfaces to be visible
through the partially obscure surface.
Row Color
This control chooses the color of the row in the Lens Data Editor for the surface. By default,
glass surfaces, coordinate breaks, mirrors, and paraxial lenses are color coded. Any surface may
use either no color, the default color, or a user defined color. The user defined colors are
described in “Colors”. The coloring of rows may be disabled, see the “Editors” section of the
OpticStudio Preferences. The entire spreadsheet may be set to show default or no colors, see
“Menu options”.
The system aperture is the overall system F/#, Entrance Pupil Diameter, Numerical Aperture, or
Stop Size. Any of these 4 quantities is sufficient to define the other 3 for a particular optical
The stop surface may be any surface in the system, except for the object and image surfaces.
To change the stop surface, select the "Type" tab and then click on the checkbox labeled
"Make surface stop" and press OK. The dialog box will disappear and the surface now will
display the "STO" label instead of the surface number. This control is grayed out if the surface
is the object, image, or is already the stop surface.
It is important to define the stop surface such that the entrance pupil is on the same axis as the
object surface. You can ensure this condition by placing the stop surface of the optical system
before any coordinate breaks, obscuration decenters, holograms, gratings, or other
components which can alter the optical axis. If your system is symmetric for rotations about
the optical axis, then this limitation does not apply. Only systems that use surfaces which can
tilt or decenter the optical axis should have the stop placed before any such surfaces. If
coordinate breaks are used, but only to implement fold mirrors in an otherwise axial system,
then the pupil locations will be correctly computed even if the stop is placed after the fold
mirrors.
In certain systems it is not possible to place the aperture stop before coordinate breaks. In this
case, ray aiming must be used. Ray aiming is discussed in “Ray Aiming”.
The global coordinate reference surface may be specified in the Type section of the Surface
Properties window, or in the Miscellaneous section of the System Explorer.
Global coordinates are defined by a rotation and translation from the local coordinates on
each surface. The rotation matrix and the offset vector can be computed for any surface using
any other surface as a global reference. The default reference surface is 1, but any other
surface may be chosen. There are two exceptions. One exception occurs when the object is at
infinity, and then 0 may not be the reference surface. The other exception is that a Coordinate
Break surface may not be set as the Global Coordinate Reference Surface. The surface selected
determines the global coordinate system origin location and orientation. The reference surface
is also used to define the point of overlap for multiple zoom positions on the 3D layout plot.
If checked, the surface will be ignored for most purposes. Ray tracing, analysis, layout plots,
optimization, tolerancing and most other features will produce results as if the surface had
been deleted. The purpose of this feature is to completely ignore surfaces, or groups of
surfaces, particularly in multi-configuration lenses where optics are present in some
configurations but not others. The multi-configuration operand IGNR can be used to change
the ignore surface setting for each configuration.
When a surface is ignored, all properties of the surface are ignored; including radius, thickness,
glass, apertures, surface tilts and decenters, coordinate break data, and refraction. However,
the surface is not actually deleted, and therefore subsequent surfaces are not renumbered. The
ignored surfaces retain their specific surface numbers. Some features which are or may be
surface number specific, such as spot diagrams, can still be computed on the ignored surfaces.
The resulting data will be for the first surface that is not ignored following the requested
surface. Some features that list text data on a surface by surface basis may still list data for
ignored surfaces, but the data on subsequent surfaces that are not ignored will be as if the
ignored surfaces had been deleted.
If checked, no rays will be drawn to the surface in the various types of layout plots. See Skip
Rays below for an alternate means of hiding rays to dummy surfaces.
If checked, rays will skip the surface. This means ray segments will be drawn from the last
surface that was not a coordinate break and did not have the Skip Rays option checked, all the
way to the next surface that is not a coordinate break and does not have the Skip Rays option
checked. For example, if Skip Rays is selected on surfaces 3, 4, and 5, rays will be drawn directly
from the coordinates on surface 2 to their coordinates on surface 6, as long as surfaces 2 and 6
are not coordinate breaks.
The purpose of the Skip Rays option is to suppress the drawing of rays to and from dummy
surfaces. Although this can be useful in some cases, this option can cause strange, misleading
layout plots if the skipped surfaces can refract or diffract the rays. Therefore, the option should
only be used on dummy (optically ineffective) surfaces. OpticStudio does not check or verify
that surfaces with the Skip Rays option are in fact dummy surfaces, so care is required when
using this feature.
If this option is checked, then no edges will be drawn from this surface to the next surface. This
feature makes for cleaner drawings in some systems, especially those using liquids or other
non-air fillers between optical surfaces.
If checked, an arrow will be drawn to indicate the orientation of the local Z axis at the surface
on 3D Layout plots. The size of the arrow is determined by the fletch size, see “Fletch Size”.
Draw Edges As
This setting controls how edges that connect a surface to the next surface are drawn on the
various layout and element drawings. Usually this setting is only used to connect edges on
surfaces with circular apertures defined by the radial clear semi-diameter or semi-diameter.
Other cases may use another, usually simpler algorithm than the options described here, or
may not draw the edge at all. The available options are described below:
Squared To Next Surface A flat face is drawn radially outward from the smaller of the current
and next surfaces to match the clear semi-diameter or semi-diameter of the larger surface. The
outer edge of the surface is then formed by a cylinder extending to connect the surface edges.
Tapered To Next Surface The current and next surface are connected by a single tapered
cylinder.
Flat To Next Surface The current surface edge is drawn as a cylinder at the current clear semi-
diameter or semi-diameter value extending to the contact point on the next surface.
The 3D Layout, Wireframe, Shaded Model, and Solid Model plots currently do not support the
"Flat To Next Surface" option. Surfaces with this setting selected will be drawn using the
"Squared To Next Surface" method.
Below are three examples of these three drawing options for a simple singlet lens:
Option 3: Surface 1: Draw Edges as “Flat to Next Surface” (Note, this option is not drawn but is
equivalent to the red dotted lines)
Drawing Resolution
This setting controls the resolution with which the surface is rendered in the layout and Shaded
Model plots. Options are Standard, Medium, High and Presentation. Note that this setting is
available for all surfaces, even in cases when it might not apply. Also, it may be that the setting
from the front surface of a lens affects the back surface – or vice-versa – so it is recommended
that the same setting be specified for both the front and back surfaces of a lens whenever
possible.
Sequential surfaces with a glass type of “MIRROR” may be drawn as either a thin surface, or as
a solid object with a substrate. The back of the substrate may be a flat surface that is
perpendicular to the local z axis, or as a curved surface that follows the contour of the actual
mirror surface. The thickness of the substrate is measured along the local z axis at the vertex of
the surface, even if the surface aperture is decentered or user defined. OpticStudio will draw
the edges of the substrate by connecting the mirror surface and the substrate back. All surface
and aperture types are supported on all layout plots.
By default, OpticStudio will draw the back of the mirror substrate as a curved surface with a
thickness of 4% of the surface clear semi-diameter or semi-diameter, or 0.5 lens units if the
Mirror substrates will not be drawn on surfaces which are mirrors in some, but not in all
defined configurations. Likewise, they will not be drawn on mirrors that are only set to draw in
specific configurations. Mirror substrates are also not drawn on surfaces which are Mangin
mirrors (mirrors on the back of glass substrates) in any configuration. To draw mirror
substrates on surfaces which are present in some configurations but not in others, use the
multi-configuration operand IGNR to ignore the mirror surface rather than GLSS to change the
surface from a mirror to glass or air. See “Adding and removing elements”.
Surface apertures are used to account for the effects of vignetting. The aperture and
obscuration types define regions which pass or stop rays, respectively. More than one aperture
may be described at a given optical element by inserting a dummy surface with zero thickness
at the desired location, and then setting additional apertures on that surface. This is useful for
constructing complex apertures. Multiple simultaneous apertures and obscurations may also
Please note that, although this is allowed in Sequential Mode, it is not physically meaningful to
define a surface aperture that extends beyond the clear semi-diameter or semi-diameter of the
surface. For this reason, if the surface aperture extends over the defined clear semi-diameter
or semi-diameter, it may not be drawn correctly in the system viewers.
Aperture Type
None When "None" is selected for the aperture type (the default), all rays which can be
refracted or reflected by this surface are allowed to proceed. To clear any aperture to this
default state, or to change the current aperture type, select another aperture type.
Rectangular Aperture/Obscuration Rays are vignetted which intercept the surface outside
the rectangular region defined by the half widths in x and y. The Rectangular Obscuration is
the complement to the Rectangular Aperture.
Spider The spider is defined by the width of each arm, and by the number of arms.
OpticStudio assumes the arms are all the same width, and that they are spaced in equal radial
angles. The first arm starts at a radial position of zero degrees, which is along the local positive
x-axis. More complex spiders, which contain arms of different widths at unequal angles can be
constructed using several spiders on adjacent dummy surfaces. The coordinate break surfaces
can be used to rotate the spider(s) to any desired angle.
Floating Aperture A floating aperture is very similar to the circular aperture, except the
minimum radius is always zero, and the maximum radius is always equal to the clear semi-
diameter or semi-diameter of the surface. Since the clear semi-diameter or semi-diameter
value may be adjusted by OpticStudio (when in automatic mode) the aperture value “floats” as
the clear semi-diameter or semi-diameter value. The floating aperture is useful when macros
or external programs use OpticStudio to trace rays that may lie outside of the default clear
semi-diameters or semi-diameters, and these rays are to be vignetted. Note that if a Surface
Aperture is set to None and the surface is not a dummy surface, changing the Solve Type of
Semi-Diameter or Clear Semi-Diameter on the surface from Automatic to Fixed will
automatically change the Surface Aperture to Floating Aperture.
All types of apertures may be decentered from the current optical axis by specifying either X-
or Y-decenters, or both. The decenters are given in lens units. If the identical aperture is used
on more than one surface, the aperture "Pickup From" is a useful feature. Any aperture may be
picked up from any previous surface.
Different types of apertures use the two available aperture parameters for different purposes
as described in the following table. The codes are used by the ZPL macro language, see
"SETSURFACEPROPERTY, SURP" for details.
The circular, rectangular, and elliptical apertures and obscurations are easy to use and cover
common cases. However, there are times when a more general aperture model is required.
OpticStudio supports a general user specified aperture defined by a series of line segments,
arcs, circles, polygons, and rectangles. The aperture may be closed in a simple or complex way,
The button "Edit Aperture File" will invoke a text editor to allow user editing of the selected
UDA file. The UDA file needs to saved and the lens file updated to make the changes effective.
The UDA Scale is a dimensionless multiplier that scales the aperture defined in the UDA file.
This control allows scaling of the UDA without need to modify the UDA file.
The UDA file consists of a series of simple text commands that define pieces of the boundary
shape of the aperture. The individual pieces are called entities. All UDA entities are defined as
they lie on the XY plane. The Z coordinate is determined by the sag equation of the surface to
which the UDA is applied. The commands which define the entities consists of three letter
mnemonics followed by numerical values stored in a text file whose extension ends in UDA.
The file name may not include any spaces.
In the entity definitions, all spatial coordinates are in lens units and all angles are in degrees.
Note that the numerical precision required for coordinate values and angles depends on the
shape being defined. Before tracing rays through the surface, check the aperture geometry
and ensure the numerical precision is high enough for the boundary shape to be correctly
formed. This is especially true for entities like ARC defining non-linear sections of the aperture.
The other available entity types are described in the following table.
Entity
Description
Name/Syntax
Arc. Appends an arc to the current end point. The starting point of the arc
is the current end point, defined by a previous ARC or LIN command. The
cx and cy values are the center of the circle on which the arc lies. Note
that the current end point, along with cx and cy, define the radius of the
ARC cx cy angle arc. The angle (in degrees) defines the length of the arc. Positive angles
n are clockwise on the XY plane. OpticStudio internally represents the arc as
a series of line segments. The parameter n determines how many line
segments are used to approximate the arc. A recommended value is
roughly 1 segment for each 6 degrees of arc. The maximum allowed value
is 64 segments.
BRK Break. Ends the current aperture definition, closing any previously defined
0.0 0.0 or
The parameter angle (in degrees) may be used to rotate the ellipse
clockwise to any desired position.
Line. Appends a line segment from the current end point to the specified
x, y coordinates. Use BRK to close a polygon formed by LIN commands.
OpticStudio optionally represents the line as a series of shorter line
segments; this is useful when the line lies on a steeply contoured part. The
LIN x y n or x y parameter n determines how many line segments are used to construct
the total line. If n is omitted then 1 line segment is used.
The mnemonic LIN is not required; if two coordinates are listed with no
mnemonic, LIN is assumed. This is for backward compatibility with older
versions of OpticStudio.
Polygon. Defines an “n” sided regular polygon centered on cx and cy, with
each vertex the specified radial distance from the center point. The POL
command may be used to define triangles, squares, pentagons, hexagons,
and other polygons with equal length sides. The first point on the
POL cx cy radius polygon starts at the angle
n angle
0.0 (along the local +x axis) and proceeds clockwise from there. The
parameter angle (in degrees) may be used to rotate the polygon to any
desired position. The maximum allowed number of segments is 64, the
minimum is 3.
Rectangle. Defines a rectangle centered on cx and cy with the specified
half widths in the x and y directions. The parameter angle (in degrees)
REC cx cy xhw may be used to rotate the rectangle clockwise to any desired position.
yhw angle nx ny The optional arguments nx and ny define how many segments to use in
the x and y directions. Using a larger number of segments will yield better
rendering of NSC object surfaces that are steeply curved over the
The end of a polygon is indicated by either a BRK entity or a LIN entity with both X and Y being
set to zero. For this reason, a polygon may not be defined which has a vertex at (0,0), or within
a tolerance distance on the order of 1.0E-06 to that origin coordinate. If a vertex must be
defined at (0,0), a work around is to instead use some very small (but larger than the tolerance)
value for one of the coordinates, such as (1.0E-05, 0) As long as at least one of the coordinates
is not zero, the point will be considered a vertex rather than indicating the end of a polygon.
The last listed vertex in the polygon is assumed to then connect to the first point. Note that
because the last vertex is automatically connected to the first vertex, the last vertex should not
be defined to be identical to, and redundant with, the first point. Defining multiple points that
are within round-off error of the same location may result in incorrect ray tracing or aperture
rendering.
Note that the UDA entities REC and CIR define “stand alone” apertures not connected to any
other aperture entities, while LIN and ARC define pieces of a polygon whose definition ends
with a BRK. When using LIN and ARC entities, the first entity defined should be an LIN, which
defines the first point of the polygon. Multiple apertures may be defined separated by BRK
entities.
The maximum number of line segments defined within the UDA file is limited only by available
memory. However, ray tracing and rendering of surfaces and objects is slower when using very
complex UDA data files. See the following sections for UDA examples.
UDA Examples
To define a square 20 lens units on the side, the UDA file is:
REC 0 0 10 10 0
Note the REC command does not require a BRK command to define the end of the aperture.
Multiple polygons may be defined by separating them with a single BRK. For example, to
define an aperture consisting of two slits, each 5 lens units wide, with an inner separation of 10
lens units, the UDA file is:
Or the equivalent
LIN -1 2
LIN 1 2
ARC 1 1 90 12
LIN 2 -1
ARC 1 -1 90 12
LIN -1 -2
ARC -1 -1 90 12
LIN -2 1
ARC -1 1 90 12
The first LIN command defines the starting point near the upper left corner. The subsequent
commands define each of the 8 parts of the aperture. Note a BRK command is not needed if
only a single aperture region is defined.
Note that when multiple polygons are defined, the polygons may be separated or nested.
However, they may not intersect or share adjacent boundaries.
Here is a UDA with the rounded corner square from the previous example, with 5 small sub
apertures nested within; a pentagon, a hexagon, an ellipse, a rectangle, and a circle. Note the
BRK command is not needed to separate the REC, ELI, POL, and CIR entities from the ARC and
LIN entities because REC, ELI, POL, and CIR all define stand alone aperture regions:
LIN -1 2
LIN 1 2
ARC 1 1 90 12
LIN 2 -1
ARC 1 -1 90 12
LIN -1 -2
ARC -1 -1 90 12
LIN -2 1
ARC -1 1 90 12
REC 1 1 .3 .5 -30
ELI -1 -1 .6 .2 15
POL 1 -1 .5 5 0
POL -1 1 .5 6 0
CIR 0 0 .3
Highly polished optical surfaces typically have a small amount of scattered light over a small,
roughly angular cone around the specular refracted or reflected ray direction. Surface
scattering properties are useful for modeling this small amount of scattered light, to analyze
the effects of the scattering on MTF or other quality measures. Scattering is modeled in
OpticStudio by randomly deviating the refraction or reflection angle of some or all of the rays
leaving a surface.
There are two fundamentally different ways of modeling scattering in OpticStudio: sequential
and non-sequential.
For the sequential model, the scattering is assumed to deviate the ray angle only very slightly.
The primary effect is a "blurring" of the spot diagram or ray pattern at the image surface.
Sequential scattering is not intended for modeling the effects of back scatter, wide angle
scatter (such as Lambertian) or other scatter where the scattered rays may not follow a well
behaved sequential path to the image surface.
For the non-sequential model, scattering may occur over any range of angles, and rays will be
traced correctly no matter in what direction they propagate. The non-sequential model is the
better choice if it is necessary to model scatter from surfaces that are not part of the sequential
ray path, such as from lens mounts, baffles, or other objects. See “NSC Ray Tracing” under the
“Non-sequential Component Editor” section of the Setup Tab help file for details on this
method of modeling scatter. It is not necessary to use the non-sequential component feature
of OpticStudio to model scattering, if the system is otherwise sequential and the only
scattering of interest is small angle scatter from the small scale roughness of the optical
surfaces, and the only desired analysis is the degradation in image quality due to scattering.
Scatter models are defined in terms of a probability distribution function. When OpticStudio
scatters a ray, a new direction of propagation is chosen. The direction is chosen using a
probability function and one or more random numbers. The net effect is that if many rays are
traced, the resulting scattered ray distribution would approach the probability distribution
function. There are seven scattering models available: none, Lambertian, Gaussian, ABg, ABg
File, BSDF, and user defined. Each available scatter model is summarized below, but see
“Scattering” for the detailed technical descriptions.
None The default scatter model is “None”, which means no scattering will occur. The resulting
ray is called the unscattered or the “specular” ray (even if the surface is not actually reflective).
The Bi-Directional Scatter Distribution Function (BSDF), which is the scattered radiance per unit
incident irradiance, is zero.
Lambertian In the Lambertian scattering model, the scattered ray projection vector has equal
probability anywhere in the unit circle, and the BSDF is just 1/π. The scattered intensity is
proportional to the cosine of the angle between the normal vector and the scattered ray angle.
Note Lambertian scattering is independent of the ray incident angle. Most diffuse surfaces are
nearly Lambertian. Although Lambertian is a valid option on the sequential surface dialog, rays
which scatter using this model may go in any forward direction, which may cause rays to
scatter at large enough angles so that they do not correctly propagate through the rest of the
optical system.
Gaussian In the Gaussian scattering model, the scattering distribution is rotationally symmetric
in direction cosine space, no matter what angle the specular ray makes with respect to the
surface normal. The BSDF expression (see “Scattering”) contains a dimensionless value σ,
which determines the width of the Gaussian distribution on the projected plane. Values of σ
greater than about 5.0 yield a BSDF that is nearly Lambertian. For this reason, the maximum
allowed value of σ is 5.0.
ABg Model The ABg scattering model is a widely used method for defining the BSDF. This
scattering model is generally a good model to use when the scattering is mainly due to
random isotropic surface roughness, and the scale of the roughness is small compared to
wavelength of light being scattered. These assumptions are generally valid for polished optical
surfaces. See “Scattering” for a detailed technical description.
ABg File The ABg File scattering model allows a sum of ABg profiles to be used to define the
scattering properties of a surface. The profiles to use are specified in a text file. The text file
BSDF The BSDF scattering model allows the use of tabular BSDF data for defining the
scattering properties of a surface. Data are provided via text files. Files must follow the BSDF
Data Interchange file format described in the article entitled “BSDF Data Interchange File
Format Specification”, which may be found in the OpticStudio Knowledge Base. OpticStudio
allows definition of separate BSDF data for reflection and refraction. If the specular ray reflects
or refracts, the ray is subsequently scattered using data from the appropriate input file. For a
file to be available for use in this scatter model, it must have a .BSDF extension (as indicated in
the article describing the file format), and be located in the <data>\Scatterdata folder (see
“Folders”). A full description of the model and its use is provided in the Knowledge Base article
entitled “How to Use Tabular Data to Define the Surface Scattering Distribution” also available
on the OpticStudio web site.
User defined scattering Completely general surface scattering may be defined via an external
program called a Dynamic Link Library (DLL). Sample DLLs are provided with OpticStudio with
source code. New DLLs may be easily created with a suitable compiler. See also “Comments
about DLLs” and “Scattering – User defined scattering” for a detailed description.
The non-sequential ABg, ABg File, and BSDF scattering models support both reflection and
refraction coefficients, while the equivalent sequential scattering models use a single set of
coefficients since sequential surfaces either reflect or refract, but not both. Whether a
sequential surface reflects or refracts depends only upon the whether the surface is a mirror or
not.
Many sequential analysis features have a “Use Polarization” option to consider ray
transmission. When using polarization, all sequential surfaces that scatter rays should be
defined to have small-angle scatter. Small-angle scatter means the rays are only perturbed in
direction by an amount that would not significantly change the polarization properties of the
ray. The reason for this requirement is that the polarization transmission computation is
performed only on the unscattered ray. The unscattered polarization transmission is then
applied to the actual scattered ray. This limitation only applies to sequential systems. For
systems that require large angle scatter and polarization analysis, use the non-sequential
component capability as described in “Non-sequential Overview”.
Only some OpticStudio analysis features use the scattering data. Most features, such as
optimization and layout diagrams, ignore surface scattering. Features that use the scattering
data, such as the Standard Spot Diagram, through Focus Spot Diagram, Full Field Spot
Diagram, Matrix Spot Diagram, Configuration Matrix Spot Diagram, Geometric MTF, Geometric
Scatter Fraction
If a scattering model other than “None”, “ABg”, or “ABg File” is selected, the “Scatter Fraction”
must be defined. This fraction must be between 0.0 (no rays will be scattered) and 1.0 (every
ray will be scattered). For the ABg and ABg File scattering models, the fraction to scatter is
determined by the ABg parameters, see “Defining ABg data”.
The decision to scatter or not to scatter is made by the generation of a single random number
between 0.0 and 1.0. If this random number is larger than the fraction to scatter, the ray will
not scatter, otherwise, the ray will scatter. For example, if the fraction to scatter is 1.0, the ray
always scatters. If the fraction to scatter is 0.0, the ray will never scatter. If the fraction to scatter
is 0.25, then on average one out of four rays will scatter. All of the energy of the ray follows the
randomly generated scatter path.
Tilt/Decenter
Surface tilt and decenter options are set in the Tilt/Decenter section of the Surface Properties
window. The Surface Properties can be reached by clicking the down arrow in the Surface
Properties bar above the Lens Data Editor.
Surface tilts and decenters may not be placed on a coordinate break surface. However,
coordinate break surfaces support a coordinate return solve, see “Using the Coordinate
Return”. Surface tilts and decenters are also not allowed before the first surface if the object is
at infinite conjugates.
The advantage to using surface tilts and decenters is the elimination of "dummy" coordinate
break surfaces in the Lens Data Editor. This allows for a somewhat less cluttered display some
users prefer. The disadvantage of using the surface tilts and decenters is the current
implementation does not support optimization of surface tilt and decenter data.
Before the surface, the coordinate system is decentered in X, decentered in Y, and then tilted
around X, tilted around Y, tilted around Z. Decenters are measured in lens units, tilts in degrees
about the respective axis in a right hand direction. Alternatively, the order may be chosen to tilt
then decenter. In this case, the coordinate system is tilted around Z, tilted around Y, tilted
around X, decentered in Y then finally decentered in X.
After the surface, the same set of operations may be performed in either order. The values for
the before and after decenters and tilts, and the order in which they are done, may be
b) Pickup the values from the before data of the current surface (typically used for fold mirrors)
c) Reverse the values from the before data of the current surface (sometimes called a decenter/
tilt and return)
e) Reverse the values from the before data of a prior surface (typically used for decentering a
range of surfaces)
All of these options are supported by the "After Surface" settings. Reversing values from a
prior surface involves changing the order and picking up the tilt and decenter values from the
target surface and reversing the sign.
The coordinate system resulting from the before and after tilt and decenters will define the
coordinate system for the next surface. The thickness of a surface is the thickness in the new
coordinate system after all the tilt and decenters are applied, measured along the resulting Z
axis.
It is frequently convenient to return to the coordinate system of a prior surface. The Coordinate
Return feature can be used on any coordinate break surface to achieve this. Note that the
surface must be a coordinate break surface. Use of the Coordinate Return will overrule any
solve, variable, or multi-configuration status on any data controlled by the Coordinate Return.
To control the Coordinate Return solve from the multi-configuration editor, see “CROR” under
Multi-Configuration Operands.
None: The feature is disabled and the coordinate break tilts and decenters are not
automatically determined.
Orientation Only: The tilt about x, y, and z axes are determined to return the orientation of
the coordinate system to the previous surface. No adjustment is made to the position offset of
the surface vertex.
Orientation XY: The tilt about x, y, and z axes, and the decenters in x and y are determined to
return the orientation of the coordinate system and the x and y components of the vertex
offset to the previous surface. No adjustment is made to the z position offset of the surface
vertex.
To Surf: This setting controls the prior surface to return the coordinate system to.
For more information on coordinate transformations, see the “Coordinate Break” Sequential
Surface.
Physical Optics
The Physical Optics options are set in the Physical Optics section of the Surface Properties
window. The Surface Properties can be reached by clicking the down arrow in the Surface
Properties bar above the Lens Data Editor.
If checked, then the diffraction propagation algorithms will not be used to propagate the
beam to the next surface. Instead, rays will be traced to the next surface and the resulting ray
transfer function will be used to propagate the beam and update the pilot beam parameters.
Use of this feature is required for non-sequential, birefringent, and gradient index surfaces.
Multiple sequential surfaces may all have this option checked, in which case the beam will
advance through all the surfaces using only ray propagation. This feature may also be used to
speed up the propagation algorithm by propagating through several surfaces at once, if the
distance between the surfaces is small enough so that the diffraction propagation is
unimportant. The default is unchecked. Search the help files for “Considerations when using
By default, OpticStudio will use the ray grid to determine any distortion, stretching, scaling or
other change in the beam shape. A good example of this is the passing of the beam through a
grating. The beam will become compressed along the direction of the diffraction. However,
there are times when this computation fails. One such case is when the ray grid enters a
caustic. The rays no longer accurately represent the beam, and should not be used to
determine the beam shape. OpticStudio automatically skips this step if it detects the ray grid is
in a caustic, however, there may be other cases where the algorithm should not be applied,
and this option allows user selective disabling of the algorithm.
If selected, the angular spectrum propagator will be used for propagation through the surface
instead of the propagator OpticStudio would automatically select. This option should only be
used if the beam size does not change dramatically over the propagation distance. The array
width will remain constant using the angular spectrum propagator. The default is unchecked.
If selected, the ZBF of the displayed name will be drawn on shaded model layout plots at the
location of the surface. The file name is the same as the name of the lens file, with a 4 digit
suffix equal to the surface number. This is the same name convention that automatically saved
beam files use. See “Display Tab” for information on saving beam files at every surface. If this
option is selected, and the correct beam file name is found, then the surface itself will not be
drawn, just the beam file at that surface. For this reason, this option works best on dummy
surfaces. Drawing large beam files uses considerable amounts of memory and will slow down
the drawing of shaded model displays.
Some surfaces significantly alter the beam characteristics. A good example is a pinhole
aperture. After passing the aperture, the beam waist size, divergence, and position may be
significantly altered, even though technically the pinhole has no optical power (this is in fact
the core difference between geometric and physical optics). After passing the pinhole, the pilot
beam parameters need to be recomputed for subsequent accurate propagation. Checking this
option will invoke an algorithm which finds the pilot beam parameters that best fit the actual
beam.
By default, the grid of rays used to generate the transfer function at any surface is oriented
such that the Y-axis of the grid aligns with the Y-axis of the beam. In highly tilted systems this
choice of alignment may not be appropriate. This option allows the orthogonal choice of grid
alignment, i.e. one in which the X-axis of the grid aligns with the X-axis of the beam.
This control allows the beam sampling and width to be changed after propagating through
any surface. If selected, the new x and y sampling and beam width may be specified. Note that
this control is ignored if rays are used to propagate through the surface. See also "Auto
Resample" below.
Auto Resample
If checked, the beam will be automatically resampled. The algorithm used first recomputes the
pilot beam parameters as described in “Re-Compute Pilot Beam Parameters” above. The X and
Y- widths are then set according to the equations described in “Comments about point
spacing and sampling”. The number of points used in the X- and Y- sampling will not change.
The output pilot beam is used to reference the phase and other properties of the beam after
refraction through the surface. This control defines the method of computation for the phase
radius of curvature of the output pilot beam.
Best Fit selects the optimum pilot beam based upon ray tracing through the surface and is the
recommended setting.
Plane selects a pilot beam with a waist at the surface and infinite phase radius.
User allows specification of the X and Y radius in lens units. Use the value of zero for infinite
radius.
Coating
The Coating section allows selection of the optical coating to be applied to the surface. For
information on defining coatings, see “Defining coatings” and “Optimizing coatings with
OpticStudio”.
This section supports an additional capability to individually modify the thickness, index, or
extinction of any layer of a defined coating applied to a particular surface without changing
the underlying definition of the coating. Individual layer thicknesses may be scaled by a
“coating multiplier”, a dimensionless parameter. The index and extinction coefficients may be
offset by a dimensionless value. Note the index offsets are applied uniformly at all
wavelengths; no dispersion in the offset is supported. These parameters may be unique for
every layer and every surface, even if the same coating is applied to more than one surface.
Encrypted coatings do not support this feature.
Coating Settings:
Use Layer Multipliers If unchecked, all coating layer multipliers are disabled for this surface.
The coating thickness will be as defined by the coating data file. If checked, the coating
multipliers are considered.
Layer Chooses the particular layer to edit or review the coating multiplier for.
Status The multiplier may be a fixed value, a variable for optimization, or a value picked up
from a prior layer.
Index Offset The dimensionless offset of the real part of the coating index for the selected
layer.
Extinction Offset The dimensionless offset of the imaginary part of the coating index for the
selected layer.
Extinction Status The extinction may be a fixed value, a variable for optimization, or a value
picked up from a prior layer.
The buttons provide a fast way of setting all multipliers and offsets to fixed or variable status or
resetting the multipliers and offsets to the default unperturbed values.
Import
The option to import an extra data file is in the Import section of the Surface Properties
window. The Surface Properties can be reached by clicking the down arrow in the Surface
Properties bar above the Lens Data Editor.
The import tool is used to load extra data values for extra data surfaces from a file rather than
by typing the numbers in directly. Data files must end in the extension .DAT. Numerical data
must be in the file exactly as it appears in the extra data spreadsheet. The format of the file is a
single column of free-format numbers, and the file must end in the DAT extension. Data for
grid sag and phase surfaces may also be imported using this tool. For a description of the
proper file format, see “Importing grid data”. Initially, the folder OpticStudio will look for DAT
files is the <data> folder (see “Folders”). However, after any import or data output operation,
the most recently used folder will be used.
Composite Surface
Any number of surfaces can be added together (these are referred to as “Composite Add-on”,
or simply “Add-on”). The sag profile of the Add-on surfaces will be added to the following
Add-on surface, and the total sag will finally be added to the first non-composite surface
(referred to as “Composite Base”, or simply “Base”) that follows the Add-ons. The Base surface
profile will then be the summation of all the Add-on profiles, plus its own profile. The overall
surface resulting from the sum of Add-On and Base is referred to as “Composite Stack”, or
simply “Composite”.
For example, adding the two surfaces below on the left hand side, the complex shape in the
right hand side can be created:
Composite Surface: Add sag to next surface: Makes the surface a Composite Add-on
Set Tilt/Decenter to follow Base surface aperture: Automatically populate tilt and decenter
values to ensure surface is positioned at the center of the off-axis aperture of the Base surface
(see details below)
Update Tilt: Automatically updates tilt values to reflect the surface orientation at the specified
decenters (see details below)
Decenter X: The X-decenter of the surface with respect to the Composite Base
Decenter Y: The Y-decenter of the surface with respect to the Composite Base
Decenter Z: The Z-decenter of the surface with respect to the Composite Base
Tilt X: The X-tilt of the surface with respect to the Composite Base
Tilt Y: The Y-tilt of the surface with respect to the Composite Base
Tilt Z: The Z-tilt of the surface with respect to the Composite Base
Note: To make the sum possible, the Add-on and Base sags being added must be in the same
coordinate system. In this respect, tilt values, when present, are always defined with respect to
the coordinate system of the Base surface, or to center of the off-axis aperture when decenter
values are specified.
Add-on surfaces won’t be visible in Layout and Shaded Model, only the Composite stack
resulting from the sum of Add-ons and Base surfaces will be. In future releases a visualization
tool for Add-on surfaces will be implemented. Decenter Z will define the visual separation
between each Add-ons. Until implementation of the visualization tool, this property will be
greyed out and unavailable to users. Note that Decenter Z does not contribute to overall
system length.
Surface types that can be used as Composite Add-On surfaces can also be used as Composite
Base. Supported surfaces are listed in the table below, the composite checkbox is unavailable
for all other surface types.
Supported Surfaces
l Biconic
l Biconic Zernike
l Chebyshev Polynomial
l Cubic Spline
l Even Asphere
l Extended Asphere
l Extended Polynomial
l Grid Sag
l Irregular
l Odd Asphere
l Odd Cosine
l Periodic
l Polynomial
l Q-Type Asphere
l Q-Type Freeform
l Standard
l Superconic
l Tilted
l Torodial
l Toroidal NURBS
l TrueFreeForm
When an off-axis Aperture is defined on the Base, users can use the “Set Tilt/Decenter to follow
Base surface aperture” button to positions the Composite Add-on surfaces at the center of the
off-axis aperture of the Base. OpticStudio will populate automatically tilt and decenter values
under Composite to ensure alignment. Decenters match the vertex location of the Base
surface, as specified in its Aperture property. Tilts match the orientation of the Base surface at
the center of the off-axis aperture. If present, any existing tilt/decenter values will be
overwritten.
If more than one Add-on is present in the Composite Stack, all Add-on surfaces will be stacked
according to the Tilts and Decenters specified in the Composite properties of the lowest Add-
on in the LDE. All other Add-on surfaces will have all Tilts and Decenters under Composite
greyed out, as Add-on surfaces cannot be moved with respect to one another. This limitation
might be removed in future releases.
Decenter Z is greyed out for present release, but will be available in future ones to allow
visualization of the Add-on surfaces
To avoid cluttering the Lens Data Editor, the option to delete, hide or unhide Composite Add-
on surfaces is available in the right-click menu of the Lens Data Editor.
While the Composite surface per se, represented for raytracing purposes by the Composite
Base, is treated by OpticStudio like any other surface, Composite Add-on surfaces are not
directly considered for raytracing. Therefore, data for these surfaces won't appear in the Single
Global coordinates for the Base surface will be calculated and displayed in the Prescription
Data, but not for the Composite Add-on surfaces, which are in the coordinate system relative
to the Base specified by the Decenters and Tilts above.
Because the Add-on surfaces are physically one with the Base, tolerancing operands such as
TSDX or TIRY that imply a misalignment in tilt, decenter or roll between the Add-ons and the
Base are disabled for Add-ons.
There are two available settings listed in the Solve Type drop down menu for all data columns:
Variable To make a parameter variable for optimization, click on the small cell to the right of
parameter, and select Variable in the drop down Solve Type menu. Alternatively, click on the
parameter and press Ctrl-Z on the keyboard. Ctrl-Z also removes the variable status, and acts
like a toggle.
Solves are highly efficient, and should be used when possible instead of variables during
optimization. For example, it is usually better to place a radius solve on the last surface to
control effective focal length than to optimize for focal length explicitly. See “Optimization” for
more information.
Summary of Solves
Curvature Solves
The chief ray angle solves work the same way as the marginal ray angle, except the paraxial
chief ray is used for the calculations instead. The chief ray solve is useful for maintaining a
particular magnification or for maintaining collimation. The letter “C” will appear in the
curvature cell to indicate that a chief ray angle solve is active on that surface.
Pickup
The curvature pickup solve uses a scaled value from another surface and column as the
curvature on the target surface. The pickup allows variables to be coupled together, and they
will change under the influence of other solves, editing, or optimization. See also “Restrictions”.
To set a pickup solve from a ZPL macro, see “Integer codes for column numbers”.
When using a curvature pickup solve and targeting another surface's Radius in Lens Data
Editor, the Scale Factor is applied to the curvature, not the radius of curvature. For example, if
the targeted radius is 2 and the Scale Factor in the curvature pickup solve is 0.5, the calculated
value shown in the Lens Data Editor will be 1/((1/2)*0.5) = 4.
This solve will force the surface to be normal to the paraxial marginal ray. This is also called an
image-centered surface. These special surfaces introduce no spherical aberration or coma. The
letter "N" will appear in the curvature cell to indicate that a normal ray angle solve is active on
that surface.
This solve will force the surface to be normal to the paraxial chief ray. This is also called a pupil-
centered surface. These special surfaces introduce no coma, astigmatism, or distortion. The
letter "N" will appear in the curvature cell to indicate that a normal ray angle solve is active on
that surface.
Aplanatic
Element Power
This solve adjusts the value of c2, to maintain the specified element power. The solve is
assumed to be on the second of two adjacent surfaces. This solve is ignored if the surface
number is less than 2, or if n3 and n2 are identical at the primary wavelength.
Concentric Surf
This solve will force the curvature of the surface such that the surface is concentric about the
specified surface. The specified surface must precede the surface on which the solve is placed.
The letter "S" will appear in the cell to indicate that the surface concentric solve is active on
that surface.
Concentric Radius
This solve will force the curvature of the surface such that the surface is concentric about the
same point that the specified surface is concentric to. The specified surface must precede the
surface on which the solve is placed. The letter "R" will appear in the cell to indicate that the
radius concentric solve is active on that surface.
F Number
This solve will force the curvature of the surface such that the marginal ray angle exiting the
surface is -1/2F where F is the paraxial F/#. The letter “F” will appear in the cell to indicate that
the F/# solve is active on that surface.
ZPL Macro
For a complete description of ZPL Macro solves, see “Using ZPL Macro solves”. Note curvature
solves must return data in units of curvature, which is the reciprocal of the radius of curvature.
The most common thickness solve is the marginal ray height solve, which can be used to
constrain the image surface to the paraxial focus. To move the image surface to the paraxial
focus, click next to the thickness of the last surface before the image surface, and select
"Marginal Ray Height" from the drop-down list of Solve Types. Since the marginal ray has a
height of zero (it crosses the axis) at the paraxial image surface (assuming a rotationally
symmetric system), we would like to set this last thickness to bring the image surface to the
point where the marginal ray height is zero. The default height value is zero, which is desired,
and so click on OK to exit the window, and the solve will adjust the thickness appropriately.
Only the primary wavelength is used for this computation.
In principle, the solve could have been set for some other marginal ray height by entering a
value other than zero for height, the first optional parameter. Note that any surface can have a
marginal ray height solve, not just the thickness before the image surface. The "Height" is the
height of the marginal ray on the tangent plane of the next surface (again, not necessarily the
image surface). Note the height is measured at the point the ray intercepts the tangent plane,
not the actual curved surface of the next surface.
The third value, "Pupil Zone", allows the ray pupil coordinate to be defined. The default is zero,
which indicates that a paraxial ray should be used. Any non-zero value indicates that a real
marginal ray is to be used. The zone value must be between -1 and 1. This is the Py coordinate,
or the normalized entrance pupil coordinate in the y direction. This solve can be used to
constrain that a particular ray, such as the .7 zonal ray, to have zero transverse aberration on
This is similar to the marginal ray height solve, except the paraxial chief ray is used. This solve is
useful for locating a surface at a pupil plane. The letter "C" will appear in the thickness cell to
indicate that a chief ray height solve is active on that surface.
Edge Thickness
This solve dynamically adjusts the spacing between two surfaces to maintain a specified
distance between the surfaces at a specified radial aperture. This is useful for preventing
negative or overly sharp edges on elements. The letter “E” will appear in the thickness cell to
indicate that an edge thickness solve is active on that surface. If the radial aperture is set to
zero, then the current mechanical semi-diameter will be used.
Pickup
The thickness pickup solve uses a scaled and offset value from another surface and column as
the thickness on the target surface. The pickup thickness T is given by: T = O + S * V, where V is
the value of the source data, S is the scale factor, and O is the offset. See also “Solve
restrictions”. To set a pickup solve from a ZPL macro, see “Integer codes for column numbers”.
This solve will actively adjust the thickness to maintain a specific optical path difference at a
specific pupil coordinate. The OPD is measured at the exit pupil, not at the surface that the
solve is placed on. The two parameters to be set are the OPD in primary waves, and the pupil
zone at which to evaluate the OPD. For example, to maintain the focal position so that the real
marginal ray has the same optical path length as the real chief ray, define an OPD solve on the
last thickness before the image surface. Set the OPD parameter to zero, and the pupil zone to
1.0. The letter "O" will appear to indicate the OPD solve is active. Perform an OPD plot and
verify that the OPD is in fact zero at the pupil edge. Only the primary wavelength is used, and
only the on-axis field is considered.
Position
The position solve maintains the “z” distance from a specified reference surface. If the
reference surface precedes the surface on which the solve is placed, then the sum of the
thicknesses from the reference surface to the surface following the solve surface will be
The position length solve is particularly useful for maintaining the length of a portion of a
zoom lens to a fixed value. The solve can also be used to meet a total lens length constraint. In
either case, the solve may eliminate optimization variables and operands, enhancing
optimization convergence and speed. The letter “T” will appear in the thickness cell to indicate
that a total length solve is active on that surface.
This solve assumes that all the surfaces in the affected range are in the same coordinate
system.
Compensator
The thickness compensator solve is very similar to the position solve. This solve maintains the
thickness on a surface so that the sum of the surface thickness and the thickness on another
"reference" surface equals a constant. In equation form, this solve maintains the condition T =
S - R, where S is the sum of the thicknesses of the two surfaces, and R is the thickness of the
reference surface. The reference surface must precede the surface with the solve.
Center of Curvature
This solve will adjust the thickness of the surface to place the following surface at the center of
curvature of any prior surface. The letter “X” will appear in the cell to indicate that the center of
curvature solve is active on that surface.
Pupil Position
This solve will place the next surface at the pupil position for the optical space following
refraction from the current surface. The pupil position is determined by tracing real, differential
rays about the central field chief ray.
ZPL Macro
For a complete description of ZPL Macro solves, see “Using ZPL Macro solves”.
Material Solves
The “Model” Material Solve is more like the “Variable” Radius/Thickness setting than a true
solve. OpticStudio will come up with a “model” glass by varying the index, Abbe number, and
partial dispersion term at d-light to idealize dispersion of the glass. Using the Ctrl-Z shortcut
on the Material column will also set the solve to “Model”. The model glass data values can then
be optimized using the standard optimization methods.
Unconstrained glass optimization usually will lead to very high index materials being selected.
This is because surfaces with high refractivity (a large difference in index across the boundary)
need less curvature than low refractivity surfaces to have the same optical power. Lower
curvature surfaces introduce less aberration.
Unfortunately, high index materials are expensive, heavy, harder to fabricate, and may be
brittle, delicate, or susceptible to stains and scratches. Also, very high index materials do not
always exist; there are few glasses (for the visible spectrum) available with an index higher than
about 1.9. The Abbe number also is limited to the range of roughly 20 to 80. Therefore, it is
essential to limit the index and Abbe numbers to reasonable ranges during optimization. The
partial dispersion deviation also must be limited in range.
Even with reasonable limitations, one disadvantage of the model glass method is that the
optimized parameters and resulting index values may not correspond to any physically existing
glass. Another disadvantage is that model glasses are only sufficiently accurate in the visible
spectrum because the dispersion is idealized at d-light (.5875618 micrometers). Outside the
visible wavelength range, such as in the ultraviolet or infrared, the model glass is not accurate
and should not be used.
Pickup
Substitute
Like the “Model” setting, the “Substitute” setting is not a true solve, and is similar to the
“Variable” Radius/Thickness setting. If the glass Solve Type is set to "Substitute", then the
global optimization algorithms are permitted to change the glass type during optimization.
If no catalog name is given (i.e. the catalog field is blank) then glasses may be selected from all
catalogs selected for use in the Glass Catalogs section of the System Explorer. If a catalog
name is given (i.e. Hoya) then only glasses from that one catalog will be selected.
To prevent only certain glasses from being chosen during optimization, choose “Exclude
Substitution” for the glass that should be avoided on the glass catalog dialog box, or use a
glass substitution template; see “Using glass substitution” for more information.
Note that the Substitution solve is removed if OpticStudio is unable to find any glasses in the
catalog that meet the requirements of the Glass Substitution Template.”
Offset
The offset solve allows a small change in index and/or Abbe number to be added to the index
as computed by the dispersion formulas and the glass catalog dispersion data. The primary
use of this solve is for tolerancing. There are two conditions for using the index and Abbe
numbers in computing the change in index as a function of wavelength:
The minimum wavelength in use is greater than 0.3 micrometers and less than 2.5 micrometers
The dispersion data in the glass catalog must span the wavelength range of 0.4861327 to
0.6562725 micrometers.
If these conditions are met, then the change in index is given by the difference in the model
glass index computed at the base index (Nd) and Abbe number (Vd) as compared to the offset
Nd and Vd values. See the discussion of the "Model" glass for a discussion of the model glass
properties. In equation form the index is:
where the function n() is the model glass function. Note this model will add a different index
offset to the index at each wavelength. If the wavelength band criteria listed above is not met,
then the index offset is added to all the base index values:
Automatic
The default clear semi-diameter or semi-diameter is calculated using the automatic solve to be
the radial clear aperture required to pass all rays from all field points
Pickup
The semi-diameter pickup solve uses a scaled value from another surface and column as the
semi-diameter on the target surface. See also “Solve restrictions”. To set a pickup solve from a
ZPL macro, see “Integer codes for column numbers”.
Maximum
The maximum solve is used for setting the semi-diameter value to the maximum required
across multiple configurations. For example, a zoom lens which has three configurations will
generally have three different semi-diameter values for every surface that is using "automatic"
semi-diameters. The maximum solve will compute the semi-diameter for each configuration,
and then use the largest of the values.
ZPL Macro
For a complete description of ZPL Macro solves, see “Using ZPL Macro solves”.
Pickup
The conic pickup solve uses a scaled value from another surface and column as the conic on
the target surface. See also “Solve restrictions”. To set a pickup solve from a ZPL macro, see
“Integer codes for column numbers”.
ZPL Macro
For a complete description of ZPL Macro solves, see “Using ZPL Macro solves”.
TCE Solve
Pickup
Parameter Solves
Pickup
The Parameter Pickup solve uses a scaled and offset value from another surface and column as
the parameter on the target surface. The pickup parameter is given by: P’ = O + S * V, where V
is the value of the source data, S is the scale factor, and O is the offset. See also “Solve
restrictions”. To set a pickup solve from a ZPL macro, see “Integer codes for column numbers”.
Chief Ray
The Chief Ray solve works only on coordinate break surfaces, and only on the first four
parameters. When placed on a decenter x or y parameter, the solve will set the decenter to
place the selected wavelength (use zero for primary wavelength) real chief ray from the
selected field position at an x or y coordinate of zero on the coordinate break surface,
respectively. If set on the tilt x and tilt y parameters, the tilt angles are adjusted to make the
exiting chief ray angle zero in the y and x directions, respectively. The order flag on the
coordinate break surface will determine the order in which the parameters are fit, and the
solution may not be unique. The output chief ray coordinates can be viewed in the Ray Trace
Data window (from the Rays & Spots button in the Image Quality section of the Analyze tab);
and it is a good idea to verify the solve works correctly. This solve is not allowed when the stop
surface follows the surface the solve is placed on and ray aiming (see “Ray Aiming”) is on.
There are times when the resulting values will yield an output chief ray angle or coordinate that
is small, but not zero. This is caused by the non-orthogonal rotations not always being able to
completely "undo" an arbitrary rotation in a single set of matrix rotations. There are two
solutions to this problem:
1) Try changing the "order" flag from 1 to 0 or 0 to 1, then update the system, to see which set
of coordinate transforms works better.
ZPL Macro
For a complete description of ZPL Macro solves, see “Using ZPL Macro solves”.
Restrictions
Solves are evaluated sequentially from the first surface to the image surface, in this order:
curvature, thickness, glass, clear semi-diameter or semi-diameter, conic, parameters (in order
left to right), TCE, and extra data values (in order left to right). Because of this order, pickup
solves may only pickup values from prior surfaces, or from the same surface if the source
column precedes the target column.
Because solves can affect the entrance pupil position, OpticStudio does not allow certain types
of solves, such as marginal ray height solves or macro solves, to be placed before the stop
surface. This will avoid ambiguous or incorrect settings for the solved parameters. There is no
way to predict the results of solves placed before the stop. A similar problem arises when a
marginal ray solve is used on the last surface to control the focal length - the aperture
definition must be entrance pupil diameter (rather than F/#) to keep the solution unique.
The buttons in the Lens Data Editor Toolbar are listed below.
1) When a change is made in the Multi-Configuration Editor, the change will not be reflected in
the Lens Data Editor because the system is not updated, which includes processing the Multi-
Configuration Editor to overwrite system values.
2) On the other hand, when making a change in the Lens Data Editor the change will be
reflected in the Multi-Configuration Editor. This is not to 'hide' changes that have been made
to the system from the interface.
The “Update” setting will cause an update to be performed whenever new data is typed in to
the lens data or multi-configuration editors.
“Update All” causes all windows to be updated whenever new data is typed in the editors.
Reload Surface
Reload external surface data (e.g. UDA, gradient, non-sequential component), if applicable.
Tilt/Decenter Elements
Add tilt and decenter to the specific range of surfaces.
The feature inserts coordinate break and dummy surfaces as required to tilt and/or decenter a
single surface or a range of surfaces. For more information on coordinate breaks, see
Coordinate Break.
The number of coordinate breaks and dummy surfaces inserted when using this tool depends
on the specific tilt and decenter required.
Settings:
First Surface This is the first surface of the lens group to be tilted/decentered.
Pivot X, Y, Z The X, Y, and Z coordinates in lens units of the point of rotation. This point is
either in local or global coordinates as controlled by the Global Coordinates checkbox.
Pivot Color Select the spreadsheet display row color for the inserted dummy surface or
coordinate breaks required to locate to the point of rotation. If the point of rotation is (0, 0, 0)
in local coordinates then no pivot surfaces are inserted. For a description of row color, see Type
(Surface Properties).
Pivot Comment The comment string for the inserted coordinate break surfaces required to
locate the point of rotation. If the point of rotation is (0, 0, 0) in local coordinates then no pivot
surfaces are inserted.
Coordinate Break Color Selects the spreadsheet display row color for the inserted coordinate
breaks required to create the tilt. For a description of row color, see Type (Surface Properties).
Coordinate Break Comment The comment string for the inserted coordinate break surfaces
required to create the tilt .
Hide Trailing Dummy Surface If checked, any trailing dummy surface inserted as part of the
tilt and decenter tool modifications will be checked with the options “Skip Rays To This
Surface” and “Do Not Draw This Surface”. For more information, see Draw (Surface Properties).
Note that the Tilt/Decenter Elements tool will restore the coordinate system after “Last
Surface” to the original coordinate system prior to “First Surface”. If the coordinate system
does not need to be returned to preceding coordinate system, then the Tilt/Decenter Elements
tool is not recommended. Instead, insert a Coordinate Break surface where the coordinate
change is needed. Then, an additional a Coordinate Break surface can be inserted later in the
system, and the Coordinate Return can be used return to the coordinate system of any prior
surface. For more information see “Using the Coordinate Return" in Tilt/Decenter .
Local To Global
Switch from local to global coordinate system.
Settings:
First/Last Surface The range of surfaces to modify. The first surface must precede the last
surface. Neither of these surfaces may be a coordinate break.
Reference Surface The surface number to which the coordinates and rotations are referenced.
This surface must precede the First Surface.
This feature automates the process of placing surfaces in a common reference coordinate
system. A group of surfaces is defined by any number of surfaces bounded by a coordinate
break or the image surface. Each group is then positioned relative to the reference surface by
three coordinate break surfaces. The first coordinate break returns the coordinate system to
the reference surface. The second coordinate break positions the group using the decenter x,
decenter y, and thickness (z coordinate) relative to the reference surface. Finally, the third
coordinate break rotates the group into the correct orientation. Each set of three coordinate
breaks precedes each group of surfaces in the system, within the defined surface range. The
primary application of this tool is to place all groups of surfaces relative to a common
reference for tolerancing or perturbation analysis.
This feature is not supported if any surface thickness, ignored surfaces, or any coordinate
break properties within the range are controlled by the multi-configuration editor.
Solve Removal Mode removes solves when adding Coordinate Breaks to the LDE:
l Positions & rotations on selected surfaces: thickness solves are removed for all surfaces.
Tilt/decenter/order solves are removed for all Coordinate Breaks. This only applies to
surfaces in the selected range.
l All solves on all surfaces: removes Glass, Conic, Semi-Diameter, Chip Zone, Curvature,
TCE, Thickness, and Parameters for all surfaces in the LDE. If the Semi-Diameter is not
set to “fixed” already, then it is converted to “automatic” for all surfaces in Lens Data
Editor.
l All solves on selected surfaces: if the surface is a Coordinate Break or there is a Surface
Tilt/Decenter After, the solve is removed for all surfaces in the selected range.
This feature combines all consecutive coordinate breaks into single coordinate breaks. When
multiple coordinate breaks are placed on consecutive surfaces, they can be combined into a
single coordinate break with the same result. The original position of the surfaces is not
modified, only the coordinate decenters and rotations are modified. Each group of surfaces
will be referenced to the previous group’s local coordinates. The combination of consecutive
coordinate breaks can also be used to reverse the process performed by the Local To Global
tool. See also “Local To Global”.
This feature is not supported if any coordinate break properties within the range are controlled
by the multi-configuration editor.
Settings:
First/Last Surface The range of surfaces to modify. The first surface must precede the last
surface. Neither of these surfaces may be a coordinate break.
This feature inserts two dummy surfaces, one before and one after the selected fold surface.
The fold surface then becomes a mirror, and the two newly inserted adjacent surfaces are set
to be coordinate breaks with the appropriate tilt angles. The second tilt angle is set as a pickup
from the first tilt angle. Finally, all subsequent surface thicknesses and curvatures are changed
sign to account for the new mirror.
This feature may not provide useful or even correct alterations if the selected fold surface is
not a plane, standard type dummy surface in air. The dummy surface should be located at the
desired fold mirror position before using this feature. For example, to insert a fold mirror
midway between two lenses 100 mm apart, a dummy surface should be inserted between the
two lenses, with the thickness before and after the dummy being set to 50 mm. The dummy
surface then should be used as the fold surface.
This feature may not work properly for lenses with multi-configuration operands that alter any
parameter or glass data for any surfaces from the fold surface onward.
Fold surface Selects which surface will become the fold mirror. The selected surface should be
a dummy surface already located at the desired fold position.
Reflect angle The angle between the incident and reflected beam.
After inserting a mirror, all subsequent surfaces must be reversed in the sense that +z becomes
-z for the rays to trace the same. For most OpticStudio surfaces, this means changing the sign
of the radius of curvature, or any other parameters that determine the sign of the surface sag.
For user defined surfaces, OpticStudio cannot automatically make this adjustment. For non-
sequential component (NSC) surfaces, it may not be possible. OpticStudio attempts to reverse
NSC surfaces by changing the sign of the Z coordinate of the exit port, and rotating all
components around the y axis 180 degrees. However, this method fails if the objects inside the
NSC are not symmetric in their local XZ and YZ planes. Because the z parity of the objects must
be modified, there is no general way to do this for all NSC objects.
This feature deletes a fold mirror. If the mirror surface is preceded by a coordinate break with
zero thickness, the coordinate break will be deleted. If the mirror surface is followed by a
coordinate break, and the mirror surface has zero thickness, the following coordinate break will
be deleted. The thicknesses of all deleted surfaces will be added to preceding surfaces as
required. All following surfaces and thicknesses will be automatically reversed as required to
follow the correct sign convention. See “Add Fold Mirror” for more details on the limitations of
reversing surfaces following the fold mirror. This feature may not provide useful or even
correct alterations if the selected surface is not a plane, standard type mirror surface in air.
Activate all Composite Add-on surfaces defined in the Lens Data Editor by automatically
unchecking their “Ignore This Surface” flag under Type property. The sag of active Composite
Add-On surfaces are added to the sag of their respective Base.
Ignores all Composite Add-on surfaces defined in the Lens Data Editor by automatically
checking their “Ignore This Surface” flag under Type property. The sag of ignored Composite
Add-On surfaces are no longer added to the sag of their respective Base.
The feature may not work correctly in all cases if mirrors, coordinate breaks, multi-
configuration controlled data, surface tilts and decenters, or non-standard surfaces are
included in the range of surfaces. Solves on data affected by the reversal are removed by this
feature. Composite Surfaces are supported. Check the reversed system results carefully to
verify that the desired result was achieved.
Settings:
First Surface This is the first surface of the lens group to be reversed.
Make Focal
Make focal length is similar to scale lens, except the desired focal length is typed in directly.
The entire lens is then scaled to make the focal length the specified value.
This feature creates a double pass system by reflecting the system about any surface, copying
all preceding surface data with pick-up solves as appropriate. The “Reflect At Surface”
becomes a mirror. All surface data beyond this surface is lost, all data preceding this surface is
reflected and copied with pick-up solves to create a double pass system.
Reflect At Surface The surface at which to insert a mirror and create the reflected system.
Discussion
This feature may not work correctly for systems which contain coordinate breaks or some
special surface types such as the Non-sequential Component surface or any gradient index
surface. Multiple configurations are not supported.
Make TrueFreeForm™
This feature is only available in the Premium and Enterprise editions of Ansys Zemax
OpticStudio.
This tool converts an existing surface to a TrueFreeForm™ surface type while conserving any
standard, aspheric, polynomial, biconic, or Zernike terms on top of a grid of sag points for
surfaces with full parametric support (see “List of Supported Surfaces”). Supported surfaces
without full parametric support are instead sampled as a grid of sag points during conversion.
Limit to clear aperture If checked, the conversion will be limited to inside of the clear semi-
diameter of the selected surface. This is useful for surfaces where the geometry is undefined or
pathological outside of the clear aperture (such as in some Zernike and Asphere surfaces) since
hard jumps in surface sag at the edge of the clear aperture can cause unwanted spline artifacts.
If unchecked, the conversion is not limited to the area within the clear semi-diameter. This is
useful for surfaces where the sag is well defined out to the edge of a square region with a side
length equal to twice the surface semi-diameter.
l Standard
l Biconic X
l Biconic Zernike
l Even Asphere
l Extended Even Asphere
l Extended Polynomial
l Polynomial
l Zernike Standard Sag
This feature displays the grid of sag points defining the TrueFreeForm™ surface. The Grid Point
Selector tool allows access to and manipulation of the TrueFreeForm™ sag grid, without the
need to interact with an external text file of sag data (although the data-import functionality
for grid sag data is still supported). In the display area, the sag points are displayed as grey
dots. Overlaid on this grid, surface sag data or ray footprint data can also be displayed. This
tool can also be used to resample or scale the sag grid.
Surface Grid:
Variable Selection:
Min X, Min Y, Max X, Max Y: Reports the corner coordinates of the selected variable subset
of grid points. These values update automatically as the user chooses a new subset of the grid
to use as variables. The reported values are grid point positions (the values are unitless).
Remove Variables: Removes all active variables from Grid Point Selector.
Grid Scaling:
Scale Grid Spacing: Enables automatic grid spacing scaling as the surface Clear Semi-
Diameter changes.
Reference Value: The grid spacing is scaled according to the Clear Semi-Diameter to
Reference Value ratio. For example, if the Clear Semi-Diameter is 2.2 mm and the Reference
Value is 2 mm, the grid spacing will be expanded by a factor of 2.2/2 = 1.1, i.e. +10%. Changes
will not be visible in the Plot Area until the changes are accepted (the "Rescale" button is
pressed). This setting is useful for situations where the TrueFreeForm surface has a floating
aperture and the grid needs to expand or contract to avoid under- and overfilling the clear
aperture.
Current Clear Semi-Diameter: Populates the "Reference Value" field with the Clear Semi-
Diameter value of the TrueFreeForm surface in the Lens Data Editor.
Grid Symmetry:
Symmetry: Grid Symmetry maintains symmetry of the grid points during optimization. There
are 4 options for Grid Symmetry. None, Left-Right, Up-Down, Fourfold. When Grid Symmetry is
selected, the symmetric points will appear in red.
Data Type: Determines what data is overlaid onto the sag grid plot. The default option is
surface sag, with which the full sag profile of the TrueFreeForm surface (including both the
parametric and the grid-based sag contributions) is shown. Alternatively, a footprint diagram
can be displayed.
Other Options: If “none” is selected for Data Type, then no other options are displayed.
Depending on the type of data selected, additional options determine how this data is
calculated. For more information on the Surface Sag additional settings, please refer to the
help file section entitled “Surface Sag”. For more information on the Footprint Diagram
additional settings, please refer to the help file section entitled “Footprint Diagram”.
Displays the current sag values at each data point in the sag grid. These values will differ from
the original values once optimization on the variable grid points has been performed.
Export: Saves the current grid sag data to a .DAT file in OpticStudio’s grid data format. If saved
to the grid files directory (by default, …\Zemax\Objects\Grid Files\) this file could subsequently
be read-in via Surface Properties > Import.
Reset Current Grid Values: Resets the entire data grid back to the original values (the values
generated by the Make TrueFreeForm tool, or in the imported grid file). This option becomes
available after some optimization has been performed on the variable grid.
Displays the original sag values in the data grid. If the TrueFreeForm sag grid was imported via
Surface Properties > Import, then this tab shows the sag values in that imported .dat file. If the
TrueFreeForm grid sag was generated via the Make TrueFreeForm tool, then this tab shows the
values generated by that tool in the initial surface conversion.
Export: Save the current grid sag data to a .DAT file in OpticStudio’s grid data format. If saved
to the grid files directory (by default, …\Zemax\Objects\Grid Files\) this file could subsequently
be read-in via Surface Properties > Import.
Apertures
Put Apertures on surfaces.
The following tools are available through the drop-down menu of the Apertures Toolbar
Button.
Turns off all surface apertures. All surface aperture types are set to “none” by this tool. Note
floating apertures are added automatically to surfaces with power that have user defined clear
semi-diameter or semi-diameter values, and so these apertures cannot be deleted; see “Semi-
diameters” for more information.
Converts all surfaces without surface apertures to fixed clear semi-diameter or semi-diameters
with circular apertures set to the clear semi-diameter or semi-diameter value. Also converts all
surfaces with a pickup solve on the clear semi-diameter or semi-diameter and a floating
aperture to fixed clear semi-diameter or semi-diameters with circular apertures set to the clear
semi-diameter or semi-diameter value.
The primary purpose of this feature is to simplify the analysis of vignetting effects. For most
optical designs, it is best to use vignetting factors during optimization. However, vignetting
factors are an approximation. This feature converts all clear semi-diameter or semi-diameters
to surface apertures. The vignetting factors may then be deleted (this is not done automatically
by this feature) and the pupil can be overfilled to see where the rays really make it through the
system.
Converts all surfaces without surface apertures to floating apertures which vignette at the clear
semi-diameter or semi-diameter value. This feature is very similar to “Convert Semi-Diameters
to Circular Apertures” except floating apertures are used instead of fixed circular apertures.
Floating apertures leave the clear semi-diameter or semi-diameter value of the surface in
Converts all surfaces without surface apertures to clear semi-diameter or semi-diameters set to
the maximum required value to pass all rays without vignetting in all configurations. The
primary purpose of this feature is to set adequate apertures on all surfaces in zoom lens
systems. See “Clear Semi-Diameter or Semi-Diameter Solves” for more information on the
maximum solve.
Turns off vignetting factors and places surface apertures. This tool uses the identical algorithm
as many OpticStudio analysis features do to replace vignetting factors with surface apertures.
Analysis features that need to trace rays from field points in between defined field points need
to do this because vignetting is only defined for discrete field points. This tool is useful as a
check that OpticStudio does this conversion properly; and is also handy for removing
vignetting factors.
Adds any specified coating to all surfaces with air-glass boundaries. When selected, this tool
will prompt for the name of the coating to apply. Any defined coating name may be selected,
Settings:
Coating Select the coating to be applied to all surfaces with air-glass boundaries.
Go to Surface
Use this tool to find and jump to a specific surface type, number, comment, or bookmark.
Type in all or part of the surface name, comment, or surface number, and then use the
Previous, Next, First, or Last buttons to jump to different sections of the editor:
Note, a * symbol should be added after the input in the dialog box if the comment you search
for contains only numbers.
Go to a surface bookmark
Bookmarks are an organizational tool for fast navigation in the editors. The list of defined
bookmarks is displayed in the Go To dialog. Select one of the bookmarks in the list and use the
Go To button to jump to the specified section of the editor:
This tool toggles Express View on and off. For more information, see the Express View section.
Automatic Width
Size the width of each column individually to fully show its content and header.
The Non-sequential Component (NSC) Editor button is available in the Editors section of the
Setup tab.
The NSC Editor is very similar to the Lens Data Editor in sequential mode, but is used for
defining 3D objects instead of surfaces. The NSC Editor is used in non-sequential mode for
inserting and deleting objects, selecting object types and properties, and setting solves and
variables. See Program Mode for more information about changing the UI mode. The NSC
Editor can also be used in mixed mode with the Non-sequential Component surface type in
the sequential Lens Data Editor.
The following screenshot was taken with the OpticStudio non-sequential miscellaneous
sample file “Demo 1.ZMX”:
A right-click on a selected cell or row will reveal a menu with the following options: Copy Cell
(s), Paste Cell(s), Create Cell Pickup, Cut, Copy, Paste Object, Insert, Insert Field After, Delete
Object, Hide/Unhide, Freeze Column To Left and Edit Bookmark. Most of these operations can
be carried out on selections of multiple cells or rows.
Non-sequential Overview
The following sections are an overview of non-sequential ray tracing in OpticStudio.
However, there are times when a non-sequential ray trace is required. Non-sequential means
that the rays trace in the actual physical order they hit various objects and surfaces, which may
not be in the sequential order that the surfaces are defined. Rays in a non-sequential trace may
hit the same object repeatedly, and entirely miss other objects. The order in which rays hit the
objects can be different for each ray, and depends upon the object geometry and the angle
and position of the rays. Objects which benefit from non-sequential ray tracing include prisms,
light pipes, lens arrays, reflectors, and Fresnel lenses. Certain types of analysis, such as stray or
scattered light effects, can only be performed with non-sequential ray traces.
Non-sequential ray traces require a more general and comprehensive method for object
definition than sequential ray traces. A list of sequential surfaces does not adequately describe
most optical components. For example, lenses not only have a front and back surface, they
also have edges and perhaps flattened outer faces for mounting. Light may intercept, and then
refract or reflect from these additional surfaces, and the resulting non-sequential ray paths are
not considered in sequential surface ray tracing. As another example, complex prisms, such as
a dove or roof prism, contain many faces, and the rays may intersect these faces in a complex
order depending upon the input angle and position of the ray.
To support these types of components in a very general and accurate way requires the use of
full 3D solid object models instead of just 2D surfaces. OpticStudio calls these 3D objects Non-
sequential Component (NSC) groups. Ray tracing through NSC groups (also called NSC ray
tracing) supports all of the following:
The following sections include more information on setting up a NSC group, defining objects
in the NSC group, and tracing rays through NSC groups.
1. Tracing rays through an NSC group that is part of an otherwise sequential system. This
is ray tracing in mixed mode, and requires entry and exit ports.
2. Tracing rays through an NSC group that contains all the objects of interest. This is ray
tracing in non-sequential mode, and does not require ports.
Although the method of defining and placing objects within a NSC group is the same for both
methods, the details of how rays are launched, what analysis may be performed, how energy
distributions are determined, and what types of systems are best modeled by each method,
are considerably different. NSC with and NSC without ports are described below.
Overview of NSC ray tracing in mixed mode (with entry and exit ports)
This is tracing rays through an NSC group that is part of an otherwise sequential system.
NSC ray tracing in mixed mode is generally the best approach to use when complex objects
are part of an otherwise sequential system. An example of this system where source rays follow
a sequential path through one or more conventional lenses, then follow a non-sequential path
through a prism or light pipe before illuminating the image surface.
This NSC ray tracing method requires the use of ports for rays to enter and leave the NSC
group. Ports are described in detail in the following section about how to use NSC ray tracing
in mixed mode. When using ports, rays are launched from defined field positions on the object
surface, and these rays ignore source and detector objects within the NSC group. Rays must
leave the NSC group via the exit port; then continue through the remainder of the sequential
system.
When using analysis features such as ray fans, spot diagrams, and MTF, only rays which enter
and leave the NSC group through ports are considered. All the usual sequential OpticStudio
system data, such as field positions and pupil sizes, determine the properties of rays entering
the NSC group. All normal OpticStudio analysis, such as ray fans and spot diagrams, are still
available (although the data may be meaningless depending upon the properties of the NSC
system).
This is tracing rays through an NSC group that contains all the objects of interest.
Some systems have no sequential paths or portions at all; such as headlamp reflectors,
complex light pipes, or general illumination systems. It is also possible to analyze ghost, stray,
and scattered light properties of nominally sequential systems (such as a camera lens or
telescope) by placing the entire system in a non-sequential group and performing non-
sequential ray tracing on the entire model. These types of systems and analysis are better
suited to NSC ray tracing in non-sequential mode, which does not require the ports used in
mixed mode.
Since rays launched from sources within the NSC group cannot leave through the exit port; the
only available analysis is the ray distribution and energy as determined using detector objects.
Although the method of defining and placing objects within a NSC group is the same for with
and without ports, the details of how rays are launched, what analysis may be performed, how
energy distributions are determined, and what types of systems are best modeled by each
method, are considerably different. NSC with and NSC without ports are described below.
There is no paraxial mode for NSC ray tracing. If paraxial rays are traced to a Non-sequential
Component surface, then the equivalent real rays are traced instead. Nearly all paraxial data,
such as focal length and F/#, are meaningless for non-sequential systems. Some NSC systems
are well behaved in the sense that real rays close to the axis behave much as idealized paraxial
rays would. However, NSC systems with obscurations or objects only partially in the path of the
beam will not be able to correctly predict any paraxial data, and paraxial data should be
considered meaningless for these systems.
The 3D Layout and Shaded Model analysis features are all capable of simultaneously
displaying BOTH rays coming from the sequential entry port as well as any sources defined in
the NSC Editor. Rays entering from the entry port do not interact with any NSC detectors; and
rays launched from NSC sources do not interact with the entry port, the exit port, or any optics
defined outside the NSC group.
There are times when showing the sequential rays coming from the entry port (defined by the
system aperture, wavelengths, and fields in the System Explorer) and non-sequential rays
(defined by sources in the NSC Editor) on the same plot is useful, especially when placing
baffles in a stray light analysis. However, you can also set the number of layout rays to zero for
the sources in the NSC Editor. Therefore, only the sequential rays will be drawn in the 3D
Layout and Shaded Model analyses. Alternatively, there is an NSC 3D Layout feature which
only shows objects and rays defined within a single NSC group.
1) A Non-sequential Component surface is inserted in the Lens Data Editor. This surface
becomes the entry port for the non-sequential group.
2) The Non-sequential Component surface parameters are used to define the location of the
exit port for the non-sequential group.
3) Objects in the non-sequential group are defined in a Non-sequential Component Editor that
is associated with the Non-sequential Component surface.
4) OpticStudio traces a ray sequentially to the entry port, then non-sequentially within the
non-sequential group, until the ray strikes the exit port.
5) Rays entering the non-sequential group through the entry port cannot split. Note that ray
splitting is required to trace the ordinary and extraordinary rays for birefringence in non-
sequential mode. If a birefringent material is defined in non-sequential group, rays will always
follow the ordinary path, regardless of the mode setting on the birefringent object.
The Non-sequential Component surface has parameters which determine where the rays will
exit the NSC group as described below.
The Non-sequential Component surface acts like a plane, sphere, or conic aspheric surface
whose location is determined by the previous surfaces in the Lens Data Editor, in the usual way.
The surface shape may be hyperhemispheric to allow acceptance of rays over a full 4π
steradians. The Non-sequential Component surface is the entry port into a group of objects
which will be traced non-sequentially. The entry port is how rays get into the NSC group. No
objects should be placed as to touch or surround the entrance port. If objects touch or
surround the entrance port, consider using the Back Propagation Distance.
There are 9 parameters used in the definition of the Non-sequential Component surface:
Draw Ports? If 0, no ports are drawn, if 1, draw entry, 2, draw exit, 3 draw both.
Exit Location X The x position of the exit port relative to the entry port.
Exit Location Y The y position of the exit port relative to the entry port.
Exit Tilt About X The rotation about the local X axis of the exit port.
Exit Tilt About Y The rotation about the local Y axis of the exit port.
Exit Tilt About Z The rotation about the local Z axis of the exit port.
Order If the order flag is zero, then the above locations and tilts are done in the following
order: decenter x, decenter y, decenter z, rotate around global z, rotate around global y, rotate
around global x. If the flag is any value other than zero, then the order is reversed. This follows
the same convention as the sequential coordinate break surface when using order flag = 0.
Reverse Rays If this flag is 0, then OpticStudio assumes the non-sequential group acts like a
refractive lens. If this flag is 1, then OpticStudio assumes the non-sequential group acts like a
mirror. For example, if rays entering the non-sequential group travel in a positive direction with
respect to the local z axis, and leave the exit port still traveling in the positive local z direction,
the flag should be zero. If the rays reverse direction relative to the incoming direction, then the
reverse rays flag should be 1.
Back Propagation Distance If that distance is greater than zero, then the rays back-
propagate before entering the Non-sequential Component. A positive value for the Back
Propagation Distance propagates in the reverse direction of the actual ray path. Only positive
inputs are permitted.
That distance can be useful when working in mixed mode with a Boolean Native Object. See
Boolean Native.
Exit Port Diameter This is in lens units. The diameter of the circular exit port is defined by the
clear semi-diameter or semi-diameter of the surface following the Non-sequential Component
surface. Note any additional aperture may be placed on the exit surface if another aperture
shape is required.
These parameters define the location and size of the exit port relative to the entry port. If the
exit port is located exactly at the entry port, then rays will immediately exit the non-sequential
group without striking any objects. This generally means the exit location z parameter must
not be zero.
The glass column of the Non-sequential Component surface is also used to define the
"background" material and index of refraction of the media in which NSC objects are placed.
The surface after the Non-sequential Component surface acts like a Standard plane surface
oriented in the coordinate system after the decenters and tilts have been applied.
Note the exit port position is the same as the surface following the Non-sequential
Component surface, and its location in 3D space is determined by the parameters of the Non-
sequential Component surface. The thickness of the Non-sequential Component surface is not
used; only the location and tilt parameter values. The exit port should not be placed at the
Ray Tracing
Getting Rays In
A ray leaves the object surface, and traces through the lens in the usual sequential fashion until
it reaches the Non-sequential Component surface. The ray is then sent into the group of
components associated with that surface, and the non-sequential tracing begins.
Once inside the NSC group, 3 things can happen to a ray:
If the ray hits the exit port, the ray coordinates and the direction cosines are computed on the
exit port, and the ray then traces sequentially again through the remaining surfaces of the lens.
If the ray hits nothing at all, then the ray tracing is terminated, and the ray trace function
returns a "ray missed" error on the following surface (since the ray never struck the exit port,
which is always the next surface in the sequential portion of the ray trace).
If the ray strikes an object in the NSC group, then the ray will either reflect, refract, total
internal reflect (TIR), or be absorbed, depending upon the properties of the object struck. Rays
entering the NSC group through the entry port cannot split. If the ray is absorbed, the ray trace
is terminated and a ray miss error is returned, otherwise the new ray coordinates and direction
cosines are computed, and the process repeats until one of the following conditions is met:
4) The ray has intercepted more than the maximum allowed number of objects (see “Maximum
Intersections Per Ray”).
Cases 1, 2, and 3 are handled exactly as described above. In case 4, even though the ray
technically still can be traced, it is terminated to prevent infinite loops from occurring. In this
case, the ray trace returns a ray miss error.
1. Change the program mode to Non-sequential UI mode in the Setup Tab. See “Non-
sequential Mode” for more information.
2. Insert sources, objects, and detectors in the Non-sequential Component Editor.
There are no entry and exit ports in non-sequential mode, and the Lens Data Editor is not used.
The NSC Editor includes almost all the information needed to define the system, though some
information is defined in the System Explorer:
l The wavelengths to be used for ray tracing (in the Wavelengths section of the System
Explorer)
l The material catalogs to be used (in the Material Catalogs section of the System
Explorer)
l The coating file to be used (in the Files section of the System Explorer)
To trace rays through the NSC group, add one or more source objects to the NSC Editor.
OpticStudio supports point, rectangular, elliptical, user defined, and other source models. Each
source object includes the following parameters:
# Layout Rays Defines how many random rays to launch from the source when creating
layout plots.
# Analysis Rays Defines how many random rays to launch from the source when performing
analysis.
Power (units) Power is the total power over the defined range of the source. The power units
are specified by the system source units. See “Units” for more information on source units.
Note multiple sources may be superimposed with different powers and wavenumbers to
create correct polychromatic sources. Sources may be placed anywhere without restriction
(even inside objects). Once the ray is launched, non-sequential tracing begins.
1. It can hit nothing at all. If the ray hits nothing at all, then the ray tracing for this ray is
terminated.
2. It can hit one of the objects within the group. If the ray strikes an object, then the ray
will either reflect, refract, total internal reflect (TIR), scatter, split, diffract, or be
absorbed; or a combination of these, depending upon the properties of the object
struck.
Detecting Rays
If the ray strikes a detector object; the pixel which the ray struck is determined, and the total
pixel energy is incremented by the ray energy. Detectors may be absorbing, reflecting,
transmissive, or refractive.
The limitations on number of objects, ray segments, and ray energy are defined in the “Non-
Sequential” section of the System Explorer. Cases 1 and 2 are handled exactly as described
above. In case 3, 4, and 5, even though the ray technically still can be traced, it is terminated to
prevent infinite loops from occurring. Rays may be launched, and detectors reset, from the
Detectors, Ray Trace/Detector Control.
Rays may be launched, and detectors reset, from the Detectors, Ray Trace/Detector Control.
Object Placement
For more information, see the sections on Non-sequential Objects, Non-sequential Sources,
and Non-sequential Detectors
Coordinate System
Each object’s position is defined by 6 parameters: the x, y, and z coordinates, and the rotation
about the x, y, and z axes. OpticStudio first decenters in x, y, and z (decenters are orthogonal so
the order does not matter). Then OpticStudio tilts about the local x axis (which rotates the y
and z axes to new orientations), then tilts about the new y axis (which rotates the x and z axes),
then finally tilts about the new z axis. This is the same convention as for the coordinate break
surface when using order flag = 0. The conversion from object local coordinates to global
coordinates can be written in equation form as
where the g subscript indicates the global coordinate, o is the offset, and l is the local object
coordinate. The matrix R is the rotation matrix, which relates the orientation of local and global
coordinates. These equations can be written more compactly as G = O + RL, where G is the
global coordinate vector, O is the offset vector, R is the rotation matrix, and L is the local
coordinate vector. For more information on properties of the rotation matrix, see “Global
Coordinate Reference Surface”. The order of rotations may also be reversed, see “Use Global
XYZ Rotation Order” under the Type section of the Object Properties.
Reference Objects
It is often useful to reference an object’s position and rotation relative to another object. This is
useful especially when placing related objects in a group, and then decentering or tilting the
entire group.
The object to which the coordinates are relative to is the “reference object”. The default
reference object is object 0, which is the vertex of the Non-sequential Component surface. If a
If the reference object number is negative, then the reference object is determined by adding
the current object number to the negative reference object number. This is a “relative”
reference object. For example, if the reference object is -3 on object 8, the reference object will
be 5 because 8 - 3 = 5. Relative reference objects are particularly useful when copying and
pasting groups of objects; this is easiest if all the objects in the group use relative references to
the first object in the group.
When a reference object is used, the rotation and offset matrices then become:
Any number of coordinate reference nesting is supported; so that object 9 could be placed in
the coordinate frame of object 5 which in turn is placed in the frame of object 3. The only
restriction is that the reference object must precede in the object list the object whose
coordinates are being referenced. To modify the reference object without the need to
manually recompute the object coordinates and angles, see the “Modify Reference Objects”.
Placing sources within other objects, and the use of absolute and relative values for the “Inside
Of” column are described in “Placing sources inside objects”.
Objects can be combined to make more complex objects, by placing one object inside of,
adjacent to, or overlapping another object. What determines the ray tracing properties of such
a compound object depends upon the position and type of the various objects and whether or
not they touch or overlap. Here the word touch means that one or more points on the
boundary surface of one object is in the same location in 3D space as a point on a boundary
surface of another object. Mirror objects may be placed anywhere, even in contact with or
partially or fully inside any other object without restriction. Rays will always reflect from mirror
surfaces back into the medium the rays had been traveling through.
When two NSC objects are placed in contact, such as a lens touching one face of a prism,
numerical roundoff will cause the ray tracing algorithm to sometimes detect a very tiny
distance between the two objects. This can also occur when objects are rotated in 3D space
The glue distance is the distance below which the objects are considered in contact. It is
important that objects not be separated by distances very close to the glue distance. If it is
intended that two objects be in contact, then the maximum spacing between the objects
should be several times smaller than the glue distance. If it is intended that the objects be
separated, then the distance between the object should be several times larger than the glue
distance. Object spacings very close to the glue distance will yield inconsistent ray tracing or
geometry errors. This should be avoided by adjusting either the object spacing or the glue
distance.
The glue distance also determines the minimum propagation length for ray tracing. If a ray-
object intersection is less than the glue distance away from the previous intercept, the
intercept is ignored.
The glue distance is also used in the tolerance associated with ray tracing to general curved
surfaces. OpticStudio will iterate until the error in the ray-surface intercept solution is less than
one-fifth of the glue distance.
In the majority of cases, no adjustment should be made to the glue distance parameter. The
glue distance must be no smaller than 1.0E-10 and no larger than 1.0E-03.
There is a user defined limit on the maximum number of nested objects. This defines an upper
limit on how many objects can be placed inside each other. For example, if the maximum
number of nested objects is 3, then object 3 may be placed inside of 2 which is placed inside of
object 1. There may be any number of groups of objects each nested 3 deep in this case. The
limit applies to the total nesting in any one collection of objects, however, there may be any
number of such collections within the NSC group. The maximum number of nested objects is
set on the Non-sequential section of the System Explorer. Setting the nesting limit no higher
than required for the system being modeled conserves memory usage, although the minimum
setting is 4.
Nesting volumes
Volumes of refracting material are more complicated, because OpticStudio must keep track of
the index of refraction through which the ray is propagating. The rule to remember is: if a ray
strikes more than one object at the exact same point in space; the last object listed in the NSC
Editor determines the properties of the surface or volume at that point.
If a ray strikes more than one object at the exact same point in space; the last object
listed in the NSC Editor determines the properties of the surface or volume at that
point.
This allows defining objects with “holes” and other compound objects. Objects may be
touching at one or more faces, nested or not, or may partially overlap, to create a wide range
of compound solid shapes.
Nesting surfaces
The nesting rules defined above apply to solid volumes of refractive or reflective material.
Some special surfaces may also be “nested” in the sense that more than one surface may exist
at the same point in space. The rules are similar to those that apply to volumes, but surfaces
cannot be refracting.
The same rule applies to surfaces as does for solids: if a ray strikes more than one object at the
exact same point in space; the last object listed in the NSC Editor determines the properties of
the surface at that point.
If a ray strikes more than one object at the exact same point in space; the last object
listed in the NSC Editor determines the properties of the surface at that point.
For surfaces, there are a few rules to consider when more than one surface exists at the ray
intercept point:
1. The last surface listed will determine the properties of the surface.
2. If the last surface listed is a mirror, the ray will reflect.
3. If the last surface listed is an absorber, the ray will be absorbed.
4. If the last surface listed is neither a mirror nor an absorber, the ray will ignore the sur-
face.
No material defined
Blank materials are assumed to indicate an index of unity, which may or may not be the
background index of the non-sequential space (which is set by the index of the NSC surface on
the Lens Data Editor).
MIRROR or ABSORB
A material of MIRROR indicates the object reflects all incident rays. A material of ABSORB
indicates the object absorbs all incident rays. Note that a material of ABSORB absorbs all
incident rays even if a reflective coating is applied to the face of the NSC object.
If a surface or object has the material type MIRROR, and no coating is specified, then the
surface is assumed to be coated with a thick layer of aluminum, with an index of refraction 0.7 -
7.0i. The aluminum layer is assumed to be thick enough that no light propagates past the layer.
This means that an uncoated mirror surface has a reflectivity of less than 1, though the exact
value will depend on the polarization of the rays.
Homogeneous glasses are defined in the glass catalogs. For more information, see “Specifying
which glass catalogs to use”.
A 6 digit MIL number, such as 517642, may be used to define an approximate material model.
For more information on MIL number glasses, see “Using MIL number glasses”.
The glass model uses 3 independent terms to define a typical dispersion curve. The model
glass is more flexible and accurate than the MIL glass, but not as good as actual measured
data. For more information see “Using model glasses”.
Object
Material is blank or glass Material is "MIRROR" Material is "ABSORB"
Type
Volume All faces are refractive.
All faces are reflective. All faces are absorbing.
Surface Object is ignored.
If a face in the POB file
If a face in the POB file is If a face in the POB file
is marked as
marked as reflective or is marked as reflective,
Polygon absorbing, then the
absorbing, then the face then the face remains
Object face remains
remains reflective or reflective. All other
(volume) absorbing. All other
absorbing. Refractive faces faces become
faces become
remain refractive. absorbing.
reflective.
If a face in the POB file
If a face in the POB file
is marked as
is marked as reflective,
Polygon absorbing, then the
then the face remains
Object Object is ignored. face remains
reflective. All other
(surface) absorbing. All other
faces become
faces become
absorbing.
reflective.
Reflective objects are usually surfaces rather than volumes. Hollow light pipes can also be
modeled as a group of flat reflectors. Some reflectors do enclose a volume; the interior of
which no ray will ever see. Examples include rectangular and spherical volumes with all
Refractors must always enclose a volume. Volume refractors include lenses, prisms, and solid
light pipes. Absorbers may be surfaces or volumes with the material name set to “ABSORB”.
Polygon Objects are composed of faces, and each individual faces may be refractive, reflective,
or absorptive.
If two surfaces are in contact, such as two 45-45-90 prisms placed so that one face of each
prism is in contact with the other, then a coating may be applied “between” the surfaces in
contact.
This is accomplished using the same convention described above in the section “Object
Placement”. The rule is: the LAST object listed in the NSC Editor determines the properties of
the interface between two objects.
For example, to place a thin metal coating on the interface between two prisms arranged to
form a beam splitter, the first prism object listed should have the contact surface “uncoated”,
while the second object listed should have the contact surface coated with the appropriate
thin film coating. Rays striking this interface from either side will see the correct coating, and
the ray transmission and/or reflection will be correctly computed. Note prisms modeled as
POB objects can have different coatings applied to different faces, so some faces may be anti-
reflection coated while others are coated with a reflective coating.
The settings described in the following sections are found in the Coat/Scatter and Scatter To
sections of the NSC Object Properties.
If a scattering model other than “No scattering”, “ABg”, or “ABg File” is selected, the “Fraction
to Scatter” must be defined. This fraction must be between 0.0 (no rays will be scattered) and
1.0 (every ray will be scattered). For the ABg and ABg File scattering models, the fraction to
scatter is determined by the ABg parameters, see “Defining ABg data”.
If ray splitting is off, the decision to scatter or not to scatter is made by the generation of a
single random number between 0.0 and 1.0. If this random number is larger than the fraction
to scatter, the ray will not scatter, otherwise, the ray will scatter. For example, if the fraction to
scatter is 1.0, the ray always scatters. If the fraction to scatter is 0.0, the ray will never scatter. If
the fraction to scatter is 0.25, then on average one out of four rays will scatter. All of the energy
of the ray follows the randomly generated scatter path. The number of scatter rays has no
affect if ray splitting is off.
If ray splitting is on, then OpticStudio will split the specular ray into one or more scattered rays,
while still possibly tracing the specular ray. The specular ray will receive a fraction of the
original energy equal to (1.0 - f) where f is the fraction to scatter. The remaining energy will be
divided equally among the one or more scattered rays. The number of scatter rays determines
how many scatter rays will be generated. For example, if the fraction to scatter is 1.0, then the
specular ray will receive zero energy and will no longer be traced; and all the energy will be
divided equally among the scattered rays. If the fraction to scatter is 0.0, no scattered rays will
be traced, and the specular ray retains all the original energy. If the fraction to scatter is 0.25
and the number of scatter rays is 5, then the specular ray will receive a relative energy of 0.75,
and each of the 5 scattered rays will have a relative energy of 0.05. If the number of scatter rays
is set to zero, then the fraction to scatter is ignored and no scattering occurs. The maximum
number of scatter rays is 300, although much smaller values are typically used.
Scatter Models
l N is the normal vector that defines the orientation of the surface at the ray-surface
interception point
The specular ray vector may be either the reflected or the refracted ray vector. The figure
shows this ray as the reflected ray vector for simplicity.
The projection of the specular and scattered ray vectors down to the surface are denoted by β0
and β, respectively. These projections are not unit vectors. The vector β0 has a magnitude
equal to sinθr, while β has a magnitude of sinθS , where θr and θS denote the angle between
the normal vector and the specular and scattered ray angles, respectively.
The maximum magnitude for the vectors β0 and β is 1.0. However because these vectors do
not generally point in the same direction, the maximum possible magnitude for the vector X is
2.0. The vector X must also result in a vector β that lies within the unit circle of the projected
plane.
The Bi-Directional Scatter Distribution Function (BSDF) is defined as the scattered radiance per
unit incident irradiance, or
where θ is measured from the normal, and φ is the azimuthal angle, and the subscripts i and s
refer to incident and scattered directions, respectively. Note BSDF has units of inverse
steradians. The BSDF may also be defined as a function of the vector x rather than the polar
coordinates θ and φ . In general, the BSDF is a function of the incident angle and wavelength.
The term BSDF can refer to two separate functions, the BRDF and BTDF, for reflective and
transmitted distributions, respectively.
The integral of the BSDF over all possible scatter angles (a hemisphere) is called the Total
Integrated Scatter (TIS) and is defined by
where the i indicates the incident direction. For all scatter models other than ABg, the BSDF is
normalized to yield a TIS equal to the “fraction to scatter” parameter. For the ABg model, the
TIS must be less than 1.0, and the TIS indicates the total fraction of energy that scatters. All
remaining energy is assumed to be specular.
No Scattering
No modification to the specular ray is made, the BSDF is zero and the magnitude of the vector
is zero.
Lambertian Scattering
For Lambertian scatter, the scattered ray projection vector has equal probability anywhere
in the unit circle, and the BSDF is just 1/π .
Note Lambertian scattering is independent of the ray incident angle. Most diffuse surfaces are
nearly Lambertian.
Gaussian scattering
The ABg scattering model is a widely used method for defining the BSDF. This scattering
model is generally a good model to use when the scattering is mainly due to random isotropic
surface roughness, and the scale of the roughness is small compared to wavelength of light
being scattered. These assumptions are generally valid for polished optical surfaces. The ABg
BSDF is given by
A must be greater than or equal to 0.0, and B must be greater than 1E-12 unless g = 0.0.
If g is 0.0 (note g may be any value, positive or negative, but it typically is between 0.0 and 3.0),
then the BSDF is constant:
For highly polished surfaces (especially when g >> 1.5 and B << 1E-8), the amount of power
scattering into diffuse angles will be negligible in comparison to the specular power. The
consequence of this is that OpticStudio will not accurately resolve the scattered power at large
angles. This is due to a numerical limitation for systems with very highly polished surfaces.
If A, B, and g are set to provide a relatively flat BSDF curve, it is far faster numerically to use the
Lambertian model instead.
A typical ABg BSDF curve is shown below for the parameters A = 0.002, B = 0.0005, g = 2.0.
When the BSDF curve flattens out to a value of A/B as goes to zero.
When the BSDF becomes a straight line on the log-log plot, with a slope of -g.
The transition point between the flat and sloped parts of the curve occurs at
where
It is frequently the case where the same ABg data will be applied to many objects in the optical
system. To avoid the need to type in the same data redundantly, and to simplify the task of
editing the ABg data, OpticStudio provides an ABg data catalog. The catalog may be edited
directly in OpticStudio; see “ABg Scatter Data Catalogs”. Note the ABg data defined must
integrate over all possible scatter angles to a total value of less than 1.0 to conserve energy.
OpticStudio allows definition of separate ABg data for reflection and refraction. If the specular
ray reflects or refracts, the ray is subsequently scattered using the appropriate coefficients. The
ABg data names which appear in the dialog box control are those defined by the ABg scatter
data file. The ABg data file to be used is selected from the “Files” section of the System
Explorer.
For important information on using scatter models with a source defined by a Source Color
spectrum, see “Wavelength scaling of ABg data”.
The ABg File scattering model allows a sum of ABg profiles to be used to define the scattering
properties of a surface. The profiles to use are specified in a text file. The text file must have a
.ABGF extension and must be located in the <data>\ABg_Data folder (see “Folders”). All of the
profiles specified in the ABGF file must be defined in the currently loaded ABg Data File (see
“ABg Data File”), and all profiles must be specified using upper case letters (regardless of
capitalization of the profile name in the ABg Data File).
The first line of the file should contain either 1 or 2 numbers: the first defining the number of
ABg profiles contained in the ABGF file, and the second (optional value) defining a flag that
indicates whether the weights provided for each profile are relative or absolute. If this flag is
omitted or set to zero, the profile weights are taken to be relative; otherwise the profile
weights are taken to be absolute. In either case, the BSDF values for each profile are multiplied
by the corresponding profile weight and then added together. If the profile weights are taken
to be relative, the sum of BSDF values is divided by the sum of the weights, and the resulting
scatter distribution corresponds to a weighted sum of the defined profiles. Conversely, if the
profile weights are taken to be absolute, the sum of the BSDF values is not normalized, and the
resulting scattering distribution corresponds to an absolute sum of the profiles. In this latter
case, it is up to the user to confirm that the TIS resulting from an absolute sum of the specified
ABg profiles does not exceed unity for any wavelength or any angle of incidence.
The remaining lines of the file simply contain the name of each ABg profile to sum and the
corresponding weight. The name of the profile should be entered exactly as it appears in the
ABg Scatter Data Catalog (see “ABg Scatter Data Catalogs”). Each of the profiles is treated as it
would be under the ABg scatter model (see “ABg model scattering”). Thus, ABg data for each
profile will be scaled with wavelength if a reference wavelength is defined in the ABg Scatter
Data Catalog for that profile, and the ABg data for each profile will be interpolated between
The maximum number of profiles which may be specified in an ABGF file is 20. Please contact
OpticStudio technical support if you require this limit to be increased.
BSDF Scattering
The BSDF scattering model allows the use of tabular BSDF data for defining the scattering
properties of a surface. Data are provided via text files. Files must follow the BSDF Data
Interchange file format described in the Knowledgebase article BSDF Data Interchange File
format specification.
OpticStudio allows definition of separate BSDF data for reflection and refraction. If the specular
ray reflects or refracts, the ray is subsequently scattered using data from the appropriate input
file. For a file to be available for use in this scatter model, it must have a .BSDF extension (as
indicated in the article describing the file format), and be located in the <data>\Scatterdata
folder (see “Folders”). The maximum number of characters that the file name can contain
(including the .BSDF extension) is 60.
A full description of the model and its use is provided in the Knowledge Base article entitled
“How to Use Tabular Data to Define the Surface Scattering Distribution” also available on the
OpticStudio web site.
Completely general surface scattering may be defined via an external program called a
Dynamic Link Library (DLL). Sample DLLs are provided with OpticStudio with source code. New
DLLs may be easily created with a suitable compiler. See also “Comments about DLLs”.
To make an object use a DLL defined scatter function, choose the “User Defined” scattering
type from the object properties dialog box, then select from the available DLL scatter functions
listed in the “DLL Name” box.
To check the input and output data for each DLL, check: Data[] values for Bulk Scatter,
Diffraction, Surface Scatter DLLs.
DLL parameters
l UserScatterDefinition
l UserParamNames
When a ray is scattered, OpticStudio passes to the UserScatterDefinition function the local x, y,
and z coordinates on the surface, the local normal vector, the local specular ray vector,
polarization data, and other parameter data as defined by the user.
These values are returned to OpticStudio and are used to continue the trace.
If the new electric field vector is provided, OpticStudio will do an additional check. It will check
if the total post-scattering intensity is within 10^-10 of unity. If it is, then OpticStudio considers
that this value has been normalized. So OpticStudio will do an adjustment. It will look at the
intensity pre-scattering and multiplies each electric field component by the square root of that
value in order to un-normalize. This "step" ensures that the electric fields are physical as the
intensity can never be that close to 1.
The function UserParamNames is used to define the names of all used parameters. These
names appear in the Coating/Scattering tab of the object properties dialog box. Surface
scattering DLLs must be placed in the <data>\DLL\SurfaceScatter folder. See “Folders”.
Note that the “Fraction to scatter” control is active when User Defined scatter is selected. Only
the fraction of energy which is allowed to scatter is sent to the DLL for possible scattering.
However, the DLL may choose to not scatter the ray (see for example the sample DLL in the
next section).
More details can be found in the source code of the sample surface scattering DLL files
provided with OpticStudio.
The surface scattering sample K-correlation.DLL supports a scatter model which follows the K-
correlation distribution, as described in the paper “K-correlation power spectral density &
surface scatter model” by Michael G. Dittman (Proc. of SPIE Vol. 6291, 62910R, 2006). The
inputs to the DLL include the surface roughness (in micrometers), the characteristic surface
wavelength (multiplied by 2π ), and the logarithmic slope of the BSDF. More details are
provided in the article entitled “How to Model Surface Scattering via the K-correlation
Distribution” in the OpticStudio Knowledge Base. The source code K-correlation.c is provided
with OpticStudio as a sample file.
The sample RI_BSDF.DLL supports a model in which tabular data are used to define the
scattering properties of a surface. This DLL is considered obsolete. Any users wishing to define
scattering via tabular input data should use the built-in BSDF scatter model (see “BSDF
scattering”).
When this option is selected, rays will only scatter in reflection upon entering a scattering
volume (i.e. when entering the window from air) and will only scatter in transmission when
exiting the volume (i.e. when exiting the window into air); otherwise rays will follow the
specular ray path. This option is generally used when modeling a thin scattering volume in
which the scatter data were measured, i.e. in which the BSDF scatter model is selected.
When measuring scattering in reflection or transmission from a thin volume, the reflected
(BRDF) and transmitted (BTDF) measurements encompass all of the scatter paths in the
volume. Since each single set of data (BRDF or BTDF) encompass all real scatter paths, all of
these paths need to be consolidated when modeling scatter in OpticStudio. Thus, with
selection of the Thin Window Scattering option, scattering only happens once in reflection and
in transmission from the volume.
A very large number of rays may need to be traced to find a relatively small number of
scattered rays that strike an object of interest, such as a detector. There are two ways to
improve the efficiency of the scattering analysis.
The first method is to scatter a ray according to the scatter distribution, but only trace the ray if
the ray propagates towards an object of interest. This method may be implemented by
defining a “Scatter To” list of objects. The Scatter To method works well for wide angle scatter
(such as Lambertian scatter) and when the object of interest subtends a relatively large angle
as seen from the scattering surface.
The second method is to always scatter the ray towards the object of interest, and then to
normalize the energy the ray carries to account for the probability the ray would have actually
scattered in that direction. This method is called “Importance Sampling”. Importance Sampling
is generally superior to the Scatter To method if the scatter is narrow angle or the object of
interest subtends a relatively small angle as seen from the scattering surface.
The Scatter To feature speeds up scattering analysis by ignoring scattered rays which do not
propagate directly towards an object of interest. The Scatter To list is very similar to the
Consider Objects list (see “Defining paths using the Consider Objects list”). The Scatter To list is
a string of integer object numbers separated by spaces. A scattered ray will only be traced if
the ray intersects one of the objects listed or the object that scattered the ray. For example,
suppose object 2 defines the Scatter To list as “3 4". If a ray scatters off object 2, it will only be
traced if the ray will intersect objects 2, 3, or 4. Note that any other objects are ignored, so
scattered rays will miss any object not explicitly listed (or the scattering object itself), even if
that object lies directly in the path between the scatter point and the listed scatter to object.
Choosing an object on the Scatter To list does not guarantee that a scattered ray will be traced
to that object. The scattered rays are generated based upon the scattering properties of the
object the incident ray strikes (see the “Scatter To” section of the Object Properties).
OpticStudio will generate the scattered rays, then ignore those rays that do not intersect any of
the listed objects. This method does not ensure that a ray will scatter toward a listed object.
However, the number of scattered rays (see “Fraction to scatter and number of scatter rays”)
may be made large so that it is more probable some of them will head in the desired
directions.
Importance Sampling
Importance Sampling speeds up scattering analysis by always choosing scattered rays that will
propagate in a desired direction. To determine the direction for the scattered ray, a target
sphere is defined. The target sphere is defined by position, size, and limit. The target sphere
position is defined by the selection of an object number. The target sphere will then be placed
at the origin of the selected object. Any object type may be used, including Null objects. The
size parameter defines the radius in lens units of the target sphere. The limit parameter is used
to define the maximum solid angle in Steradians of the target sphere as seen from the scatter
point. If the solid angle of the target sphere as seen from the scatter point exceeds the limit
value, Importance Sampling will not be used for that scattered ray. The purpose of this feature
will be discussed below.
When the ray scatters from the surface, the direction and subtended solid angle of the target
sphere as seen from the scatter point are computed. A ray direction is randomly selected from
within this solid angle cone with uniform probability. This will be the scattered ray direction.
Note that the direction is not dependent upon the BSDF of the surface.
Because the ray direction is determined without consideration of the BSDF, the energy the ray
carries must be modified to get correct ray tracing results. The amount of energy the scattered
ray will carry depends upon the BSDF and TIS of the surface as follows:
where E is the energy allocated to the scattered ray before importance sampling is applied, E’
is the amount of energy in the ray traced towards the target sphere, Ω is the solid angle of the
target sphere as seen from the scatter point, θ is the angle between the local normal and the
scattered ray, and BSDF and TIS are the usual scattering function and total integrated scatter
(see “Bi-Directional Scatter Distribution Function”). Note this energy renormalization is only
accurate if the BSDF is reasonably uniform over the solid angle of the target sphere. If Ω
becomes large compared to the variation of the BSDF, the energy normalization will not be
accurate. For this reason, a limit value may be defined. If the target sphere is close enough to
the scatter point so that Ω exceeds the limit, then Importance Sampling is not used for that
scattered ray.
Bulk scattering
The object bulk scattering method is set in the “Bulk Scatter” section of the Object Properties
window. Bulk (volumetric) scattering models random scattering of rays while propagating
through a solid object. OpticStudio supports 3 modes for the bulk scattering of a solid object:
No Bulk Scattering, Angle Scattering, and DLL Defined Scattering.
No Bulk Scattering
If no bulk scattering is selected, rays will propagate through the solid without scattering.
Angle Scattering
Angle scattering uses a simple model for scattering within a solid. Rays traveling a distance x
within the media have an integrated probability of having been scattered given by
, where
and the symbol M is the mean free path in lens units. Note that as x increases, the probability
that the ray has scattered asymptotically approaches 1.0. Setting this expression to a randomly
Once the position is determined, the scattering is modeled by a new ray direction being
chosen. For angle scattering, a random angle is chosen so that the new ray direction lies
uniformly distributed within a cone that makes an angle with respect to the current ray
direction. The semi-angle of the cone is one of the parameters to the model, and this
parameter should be set to between 0.0 and 180 degrees. The latter value will scatter the ray
randomly in any direction. Once the ray scatters, OpticStudio automatically will adjust the
polarization vector and randomize the phase of the scattered ray.
If the angle scattering model is not sufficient, more complex bulk scattering functions may be
defined via an external program called a Dynamic Link Library (DLL). Sample DLLs are provided
with OpticStudio with source code. New DLLs may be easily created with a suitable compiler.
See also “Comments about DLLs”.
To make an object use a DLL defined bulk scatter function, choose the Bulk Scattering tab from
the object properties dialog box, then select Model: “DLL Defined Scattering”. The available
DLL functions are then listed in the “DLL:” control.
To check the input and output data for each DLL, check: Data[] values for Bulk Scatter,
Diffraction, Surface Scatter DLLs.
DLL parameters
Each DLL may use between zero and 16 user defined data values as parameters in the
computation of the media properties. These values are defined by the DLL and are only used
by the DLL.
l UserBulkDefinition
l UserParamNames
While ray tracing through a solid using DLL defined bulk scattering, OpticStudio passes to the
UserBulkDefinition function the current propagation length along the ray, various ray data
values, and other parameter data as defined by the user. UserBulkDefinition then is required to
The position at which the ray will scatter the new direction cosines of the ray the attenuation of
the ray, if any Optionally the new electric field vector (if this is not provided OpticStudio will
make a reasonable guess)
These values are returned to OpticStudio and are used to continue the trace. The function
UserParamNames is used to define the names of all used parameters. These names appear in
the Bulk Scatter tab of the object properties dialog box. Bulk scattering DLLs must be placed in
the <data>\DLL\BulkScatter folder. See “Folders”.
The sample bulk scattering file poly_bulk_scat defines the scatter probability as follows:
where θ is the polar angle of the scattered ray with respect to the unscattered ray direction.
The source code file poly_bulk_scat.c is provided with OpticStudio as a sample file.
The Henyey-Greenstein bulk scatter model defines the scatter probability as follows:
where θ is the polar angle of the scattered ray with respect to the unscattered ray direction.
The parameter g can be any value from -1 to 0.9999. If the input value for g is less than -1, g is
set to -1. If the input value for g is greater than 0.9999, then g is set to 0.9999. If the input value
for |g| is less than 1.0e-4, then g is set to 1.0e-4. The source code file Henyey-Greenstein-bulk.c
is provided with OpticStudio as a sample file.
where θ is the polar angle of the scattered ray with respect to the unscattered ray direction and
λ is the wavelength. The inputs to the DLL are the Reference Wavelength (i.e. the wavelength
associated with the input value for the Mean Path) and the Transmission (which allows for
energy to be lost during each scattering event). More details are provided in the article entitled
“Bulk Scattering with the Rayleigh Model” in the OpticStudio Knowledge Base. The source
code file Rayleigh.c is provided with OpticStudio as a sample file.
The Mie bulk scattering model defines the scatter probability according to Mie theory. The
algorithm used in OpticStudio was taken from the book “Absorption and Scattering of Light by
Small Particles” by Craig F. Bohren and Donald R. Huffman (John Wiley & Sons, 1983). The
inputs to the DLL include the particle index, the particle size (in micrometers), and the particle
density (in cm-3). More details are provided in the article entitled “How to Simulate
Atmospheric Scattering using a Mie model” in the OpticStudio Knowledge Base. The source
code file is not distributed with OpticStudio.
The Phosphor bulk scattering model is meant to represent a phosphor material in which both
fluoresce and scattering can occur. Light in a particular wavelength range (defined as “blue”)
enters the medium in which the DLL is applied, and that light can either be converted to
another wavelength (i.e. undergo fluorescence) or simply bulk scatter. When the input light
undergoes fluorescence, the resultant light is emitted into a 180 degree cone angle with equal
probability (i.e. the input light “scatters” according to the Angle Scattering model). When the
input light scatters with fluorescing, it does so according to the Mie distribution. The
fluoresced light (or any other input light not in the “blue” wavelength range) may also scatter
according to the Mie distribution. The inputs to the DLL include the mean-free path for
fluorescence, the wavelength range defining the “blue” wavelength range, and the particle
parameters associated with the Mie distribution. More details are provided in the article
entitled “Modeling a White Light Source using a Phosphor” in the OpticStudio Knowledge
Base. The source code file is not distributed with OpticStudio.
All diffractive NSC objects support a parameter to defined the “order” for diffraction from the
object. This order is called the “primary” diffraction order. Sequential rays which enter the non-
sequential group through the entry port will diffract only along the primary order.
Rays which originate from a non-sequential source will diffract only along the primary order if
ray splitting is off. If ray splitting is on, then the diffraction may be optionally controlled by the
settings on the “Diffraction” tab of the Object Properties dialog box. This tab includes optional
settings which will split the ray by order; allowing more than one diffraction order to be
simultaneously traced.
Note that the polarization ray tracing algorithm generally does not return correct results for
certain types of surfaces, such as paraxial surfaces, diffraction gratings, binary optics, or Fresnel
surfaces. See "Limitations of Polarization Analysis" for more information.
The current model does not allow the efficiency of each order to be calculated within the
software. The efficiencies can be defined according to the settings in the Diffraction section of
the Object Properties. These efficiencies should include any Fresnel losses that occur at the
diffracting face of this NSC object, to the extent that such losses are present in the system.
For more information on diffraction, see the “Diffraction” section of the “Object Properties”.
Using this expression, it is easy to compute the variation of optical path length (phase) as the
ray propagates.
for purposes of computing the optical path and thus the phase. OpticStudio chooses the
random wavelength with a uniform distribution. The greater the path difference between two
rays from the same source, the greater the difference in phase between the rays will be; which
means coherent effects such as fringe visibility will be reduced.
OpticStudio actually traces the ray using the central wavelength. The randomized wavelength
is only used to compute the effects of coherence length on the phase. Therefore, only coherent
computations will exhibit the phase degradation. To turn off coherence degradation, either set
the coherence length to a very large number or to zero. To make sources completely
incoherent, set the coherence length to a small but non-zero number.
To make an object media by of a gradient index material, choose the GRIN tab from the object
properties dialog box, then select “Use DLL defined GRIN media”. The available gradient index
materials are then listed in the “DLL:” control.
The maximum step size determines the tradeoff between ray tracing speed and accuracy. The
exact value required depends upon the rate at which the index of refraction changes and the
desired accuracy of the computations. If the maximum step size is too large, the ray trace
results will have large errors, and some rays will miss objects they would otherwise hit, or vice-
a-versa.
Each DLL may use between zero and 12 user defined data values as parameters in the
computation of the media properties. These values are defined by the DLL and are only used
by the DLL.
While ray tracing through a GRIN media, OpticStudio passes to the UserGrinDefinition function
the current x, y, and z location of the ray (in the objects local coordinate system), the
wavelength, and other parameter data as defined by the user. UserGrinDefinition then is
required to compute the following four values:
These four values are returned to OpticStudio and are used to trace the ray through the grin
media.
The function UserParamNames is used to define the names of all used parameters. These
names appear in the GRIN tab of the object properties dialog box. GRIN DLLs must be placed
in the <data>\DLL\GradientIndex folder. See “Folders”.
The Grid_Gradient DLL is based on a three dimensional array of index data, and it is essential
that the object to which this GRIN type is applied shares the same coordinate system. This is
particularly important for CAD objects; it is highly recommended that the origin of the CAD
object be on the front face. It should also be noted that the accuracy of the CAD
representation is the limiting factor in the accuracy of the ray tracing; native OpticStudio
objects are recommended where possible.
To check the input and output data for each DLL, check: Data[] values for Gradient Index DLLs.
GRIN1 similar to the sequential Gradient1 surface type.This sample DLL also supports
array dx and array dy values to specify a grin variation which is periodic over
the specified intervals. This option is used for arrays of gradient index lenslets.
If both the array dx and array dy values are zero, the gradient is not periodic.
GRIN2
similar to the sequential Gradient2 surface type.
GRIN3
similar to the sequential Gradient3 surface type.
GRIN4
GRIN5
similar, but not identical to, the sequential Gradient5 surface type. Note there
is no dispersion in this grin model (no dependence on wavelength).
, where
GRIN6
, for all three values of
GRIN9
where ya = |y| and the || symbols indicate the absolute value. This form of
GRIN10
gradient has a discontinuity at the plane y = 0, and the gradient is bisymmetric
about the y = 0 plane. This is similar to the sequential Gradient10 surface type,
but without the dispersion model.
GRADIUM This is similar to the sequential GRADIUM surface type. This sample DLL
requires that the dispersion data are always in a file named SGRIN.DAT, and
that the axial profile data are always in a file named PROFILE.GRD, and that
both of these files are always located in the <Glass> folder (see “Folders”).
Defines a GRIN media based on data provided in a text file with a GGD
extension, similar to the sequential Grid Gradient surface type. Note this DLL
require higher sampling than the sequential equivalent. If the result given by
this DDL is different compared to the same system in sequential mode,
decrease the value of maximum step size first. If smaller step size doesn’t
resolve the discrepancy, increase the sampling rate and number of points
Grid_
defined in the GGD file until the simulation results are equivalent.
Gradient
If the error message “Invalid Gradient index media” arises, the calculated index
is non-sensical, for example, the index is negative. This may occur when the
number of data points in the GGD file is too sparse. In this case, increase the
sampling rate and number of data points in GGD file.
See “Grid Gradient” for more information about format of GGD file.
where t is the distance from an axis of rotation defining the toroidal symmetry
TORUS
of the gradient index. The torus radius is one of the defining parameters. The
torus radius is measured from the coordinate z = 0.0 on the object to the
location of the axis of rotation defining the torus.
To make a diffractive object use the DLL, choose the Diffraction tab from the object properties
dialog box, then select “Split by DLL function”. The available DLLs are then listed in the “DLL:”
control.
Each DLL may use between zero and 12 user defined data values as parameters in the
computation of the diffractive surface properties. These values are defined by the DLL and are
only used by the DLL.
UserDiffraction
UserParamNames
While ray tracing through a diffractive surface, OpticStudio passes to the UserDiffraction
function the current x, y, and z location of the ray (in the objects local coordinate system), the
wavelength, the present order being traced, and other ray specific data and parameter data as
defined by the user. UserDiffraction then is required to compute the relative energy in the
specified order, and return this value to OpticStudio. OpticStudio will refract or reflect the ray
into the specified diffraction order and give the resulting ray the specified fraction of the input
ray energy computed by the DLL. If the new child ray has sufficient energy, the ray is traced.
The Diffraction DLL format also supports as an option for the DLL to compute ALL output
properties of the ray; including direction cosines, electric field polarization vector, and
transmitted energy. If the DLL also computes these properties, the DLL must set a flag
indicating the values were passed back to OpticStudio for further ray tracing. See the sample
DLLs for documentation on this feature.
To check the input and output data for each DLL, check: Data[] values for Bulk Scatter,
Diffraction, Surface Scatter DLLs.
The function UserParamNames is used to define the names of all used parameters. These
names appear in the Diffract tab of the object properties dialog box. See the sample DLLs for
the use of this feature. Diffraction DLLs must be placed in the <data>\DLL\Difractive folder.
See “Folders”.
The following DLLs come with the installation located in {Zemax}\DLL\Diffractive\. Their
function is described as below:
diff_samp_1.dll This comes with the source code diff_samp_1.cpp. It provides an example with
creating a simple 1D grating.
Diff2DSample.dll This comes with the source code Diff2DSample.cpp. It provides an example
with creating a simple 2D grating.
lumerical-sub-wavelength.dll This DLL can correctly simulate the intensity and polarization
state of the output diffraction rays. Users can find more details about how to export this .JSON
file and import it into Zemax OpticStudio in the article “Speos Lumerical Sub-wavelength
Model” on the Ansys Optics website. This DLL requires a Professional, Premium or Enterprise
license for Ansys Zemax OpticStudio. Note legacy Zemax OpticStudio is not supported.
Ray Splitting
Generally, when a ray strikes a surface, part of the energy will be reflected, part will be
transmitted, and depending upon the surface properties, part may be absorbed. Ray splitting
refers to the ability of OpticStudio to compute both the reflected and refracted paths, and then
continue to trace both rays. OpticStudio also supports an option to randomly choose either
the reflected or the refracted path rather than both, see “Simple Ray Splitting”. Rays reflected
from otherwise refractive interfaces are commonly called ghost reflections.
Once a ray splits, each of the “child” rays will in general strike another object, and the rays may
split again and again. After many ray-object intersections, the total number of rays can
There are several ways to restrict the amount of ray splitting that occurs:
Maximum number of ray-object intersections: This control defines how many times a ray along
any path, from the original source parent ray to the final ray-object intersection, may intersect
another object.
Maximum number of ray segments: A ray segment is that portion of a ray path from one
intersection to the next. When a ray is launched from the source, it travels to the first object.
That is 1 segment. If the ray then splits into 2 rays, each of those are another segment (for a
total of 3). If each of those rays split again, there will be 7 segments. Generally, the number of
ray segments grows far faster, and needs to be set much larger, than the number of ray-object
intersections does.
Minimum relative ray intensity: As each ray splits, the energy decreases. The relative ray
intensity is a lower limit on how much energy the ray can carry and still be traced. This
parameter is a fraction, such as 0.001, relative to the starting ray intensity from the source.
Once a child ray falls below this relative energy, the ray is terminated.
Minimum absolute ray intensity: This parameter is very similar to the minimum relative ray
intensity, except it is absolute in system source units rather than relative to the starting
intensity. If this is zero, the absolute ray intensity threshold is ignored. The initial intensity of
each ray is always given by the source intensity divided by the total number of analysis rays for
that source. The number of layout rays is not used to determine the initial intensity of rays,
even for those rays drawn on layout plots. Source units are defined on the Units tab of the
System, General dialog box. See “Source Units” for details.
All of these settings are defined on the Non-sequential (system explorer) section of the System
Explorer.
Ray splitting can be turned off, and in this case the transmitted path is always taken at a
refractive interface unless the ray TIRs; the reflected path is of course always taken if the
surface is a mirror.
The following figure shows some of the ray paths possible when rays are split. There is only 1
input ray drawn.
When using ray splitting, the number of rays being traced can become enormous if the
minimum relative ray energy is set too low. For example, for rays traced inside a cube of glass
with 50% coatings on all surfaces, a relative ray intensity of 0.01 will yield about 256 ray
Because the total number of rays gets so large, the 3D Layout plots can become very cluttered.
One way to reduce the amount of rays drawn is to use the “filter” string to suppress drawing of
some of the rays, see “The filter string”.
Otherwise,
1. If ray splitting is on, the reflected and the refracted path are both determined.
2. If ray splitting is off, the refracted path is chosen.
3. The ray(s) are scattered if scattering is enabled.
4. The ray(s) intensity and polarization vectors are adjusted.
5. The ray(s) continue on to the next object interface.
On 3D Layouts and other analysis features which draw NSC objects and rays, the effects of
sources, ray splitting, and scattering may be seen from the randomly generated rays on these
plots. Both ray splitting and ray scattering may be selected on or off on these plots to isolate
their effects. The layout plots are extremely useful for qualitatively seeing the effects of
sources, objects, scattering, and ghost or other reflections.
For more information, see the “Ray Trace” tool in the Analyze Tab in-help file.
OpticStudio supports three different ZRD file formats, each of which offers various
combinations of file size, compression, and data content. The ZRD file formats are binary to
keep the file as compact as possible.
All ZRD formats use the same file extension “ZRD”. The three letter format names are
only used to distinguish the formats in the documentation, and are not used as file
extensions.
Uncompressed Full Data (UFD) - All data from the ray trace in an uncompressed format. This is
the format to use if you have an external program that reads or writes ZRD files. UFD format
makes the largest files, and is also the slowest to read and write. For a detailed description of
the UFD format see “The ZRD Uncompressed Full Data Format (UFD)”.
Compressed Basic Data (CBD) - This format stores a subset of the full data, including only
status, level, hit object, parent, xybin, lmbin, x, y, z, and intensity. The ray coordinates and
intensity are stored only to floating point (32 bit) rather than the usual double (64 bit) precision
to save disk space. Although direction cosine data is not explicitly stored in the file, the cosines
are automatically recreated from the x, y, and z coordinate data during the file read. CBD files
are dynamically compressed in a way that makes the file unsuitable for read/write operations
outside of OpticStudio. CBD results in the smallest file size and fastest writing. Generally a file
in CBD format will be about 10% as large as the UFD format. Note that data missing from this
format is not available for subsequent analysis when reading the ZRD file.
Compressed Full Data (CFD) - All data from the ray trace in a compressed format. All double
precision numbers are converted to floating point precision to save space, but in all other
respects this format contains all the data from the ray trace, including polarization, index,
Please note that saving in both Compressed Basic Data and Compressed Full Data can only be
done for a ray set having a maximum of 65536 segments per ray. If this limit is exceeded, an
error message will be displayed. In such case, saving can only be done in Uncompressed Full
Data format.
ZRD files contain a version number and format number. OpticStudio will check these numbers
when reading the file. Older version files are automatically converted by OpticStudio into the
current version upon reading. The current version number is 2002. The format number is 0 for
UFD format, 10000 for CBD format, and 20000 for CFD format. The version and format
numbers are added together and stored in the first integer record in the file, thus the first
integer will be 2002 for UFD format, 12002 for CBD format, and 22002 for CFD format ZRD
files.
The first record in the file is a single 32-bit integer indicating the version and format number of
the ZRD file. The second record in the file is a single 32-bit integer indicating the maximum
possible number of segments in the remaining records. The actual number of segments will
always be less than or equal to this number.
The remainder of the file consists of a 32-bit integer indicating the number of segments that
follows, then that many segments, then another 32-bit integer indicating the number of
segments in the next record, and so on until the end of the file. A single ray segment is
described by a “C” structure with the following format:
typedef struct
{
unsigned int status;
int level;
int hit_object;
int hit_face;
int unused;
int in_object;
int parent;
status: bitwise flags indicating the status of the ray. The flags (in integer notation) are:
terminated: 1, reflected: 2, refracted: 4, scattered: 8, diffracted: 16, ghost: 32, diffracted from
previous object: 64, scattered from previous object: 128, ray segment had fatal error: 256, bulk
scattered: 512.
level: The number of ray segments between the ray segment and the original source. This is
the number of ray-object intercepts the ray has accumulated.
hit_object: The object number the ray intercepted. If zero, the ray did not hit anything. For the
zero segment, this value will be the source segment object number.
hit_face: The face number the ray intercepted. Valid only if hit_object is not zero.
in_object: The object number the ray is propagating inside of. This generally determines the
index of refraction the ray is traveling through. A value of zero means inside the “background
media”.
parent: The (prior) ray segment from which the ray originated. If zero, the ray came from the
original source point. Note more than 1 child ray may have the same parent; but each ray has
only one parent. The parent segment number will always be less than the child rays segment
number.
storage: A temporary buffer used by OpticStudio for indexing. For segment 0 only, this integer
is the ray wavelength number. See nx below for the actual wavelength value. Other segments
may contain meaningless data.
xybin, lmbin: The pixel number on a detector object which the ray struck. The xybin is for
spatial data, the lmbin is for angular (intensity) data.
index: the index of refraction of the media. Not an adequate description for gradient index
media. starting_phase: the initial optical path length the ray starts with. This is usually the
contribution from diffraction ratings when rays are split off.
nx, ny, nz: the global normal vector of the object at the intercept point. For segment 0 only, the
nx value stores the wavelength of the ray being launched.
path_to:e physical (not optical) path length of the ray segment. Note this value is sometimes
different to the "Path To" shown in the Ray Database Viewer. The Path To in Ray Database
Viewer is always the physical path length of the ray segment. The path_to data in ZRD file is
not the physical path length when the segment is generated from bulk scattering and does not
hit any object at its end, where both "Hit" and "Face" of the segment are 0. If the physical path
length of the segment is desired in this case, users can either check it in the Ray Database
Viewer or directly calculate it from the (x,y,z) position data of the segment and its parent
segment.
phase_of: the phase of the object. This is the optical phase path length equivalent in lens units
added by gratings, holograms, and other phase modifying surfaces.
phase_at: the accumulated total phase of the ray (modulo 2*pi). This value includes
accumulated phase due to propagation as well as phase introduced by objects that impart
phase (i.e. gratings, etc.). The phase introduced by coatings is not included in this value and is
generally considered a “phase aberration”. This value is only computed at detector surfaces.
Note the phase reported here is adjusted to account for offset from the center of the pixel
where the ray lands. In some cases the plane wave, namely the ray, needs to propagate
forward a bit to hit the pixel center, in others it needs to propagate backward a bit to hit the
pixel center.
exr, exi, eyr, eyi, ezr, ezi: the electric field in the global x, y, and z coordinates, real and
imaginary parts. These values will all be zero if the ray trace did not use polarization.
The ZRD UFD format is subject to change, however, OpticStudio will automatically convert
older formats to the current format. Note the structure size is 208 bytes for each ray segment.
If 100,000 rays are traced with an average of 50 segments each, the resulting file will be about
100,000 x 50 x 208 bytes = 1Gb in size. The file sizes can quickly become enormous, so great
care must be taken to limit the number of segments before deciding to save the ray data to a
file. Use of a filter string to limit the saved data to the rays of interest may substantially reduce
the amount of data written to the file.
The ZRD file consists of alternating blocks of data. For example, if three rays are traced, with 5,
7, and 9 segments each, then the ZRD file will be formatted as follows:
4 bytes: version
4 bytes: maximum number of segments possible, will be 9 or larger
in this example
4 bytes: 5 (the number of segments in ray 1)
208 bytes x 5 (the segment data for ray 1)
For information on what OpticStudio can do with ZRD files, see “The Ray Database Viewer”.
Note that typical “C” structures in Windows are packed on 8 byte boundaries. This packing
means that 2-byte members are aligned on a memory address that is an integer multiple of 2,
4-byte members are aligned on multiples of 4, and 8-byte members are aligned on multiples
of 8. This packing speeds memory access but can create some small gaps in the structures.
That is why structure sizes can be slightly larger than the sum of the byte sizes of all the
members.
For more information, see the “Lightning Trace” tool in the Analyze Tab in-help file.
For more information, see the “Ray Database Viewer” analysis tool in the Analyze Tab in-help
file.
For more information, see the “Detector Viewer” tool in the Analyze Tab in-help file.
Flag Description
Limit the ray set to the first [n1] rays that pass the condition defined by
(Complex Filter String).
{#n1} (Complex Note that (Complex Filter String) can be any standard filter string and is
Filter String) optional; if omitted, the first [n1] rays will be selected.
Note that (Complex Filter String) can be any standard filter string and is
optional; if omitted, rays [n1] to [n2] will be selected.
{#n1-n2}
(Complex Filter Note that {#1-n2} (Complex Filter String) is the same as {#n2} (Complex
String) Filter String).
[n1] can be any positive whole value, and [n2] can be any positive whole
value greater than or equal to [n1].
This filter can only be applied when using Ray Trace Control with the PAF
file. The PAF file is chosen by using the Save Path Data option.
(Complex Filter
Note that (Complex Filter String) can be any standard filter string and is
String)
optional; if omitted, the first [n1] rays will be selected.
Optionally, the filter may be terminated with the # symbol, which indicates
any segment that initially follows this path is selected. This allows rays
which hit different objects, or no objects at all, after the last object listed
are still selected.
X_GHOST does not consider ghost ray segments that end in a TIR
condition; although rays that TIR are considered ghosts. For example, if a
third generation ghost ray leaves one surface, strikes another surface, and
X_GHOST(n,b) then TIR’s from this second surface, X_GHOST(0, 3) will not include this
segment because the segment ended in a TIR and not a ray termination
(the ray reflected and continued). This same segment will however be
included in the filter X_GHOST(0, 4) because the ray ghosted a fourth time
(at the TIR point). This is an artifact of how OpticStudio defines segments
and counts ghost rays. In all cases, all ghost rays can be found if sufficiently
high values of b are tested. Note rays which TIR from refractive surfaces are
considered ghosts, but rays reflected from mirror surfaces are not.
All flags except the O, G, E, and F flag indicate what happened at the end of the ray segment, at
the point where the segment intercepted the object indicated by the “n” value. The G, E, and F
flags indicate that the ray segment’s parent struck object “n” and then launched a child ray that
was a ghost, diffracted, or scattered segment, respectively. The O flag indicates the ray
originated from source object “n”. The W flag indicates the ray is of wavelength number “n”.
The flags of the form X_***(n,v) require two numerical arguments within the parentheses
separated by a comma, or a syntax error will be issued.
Each flag is evaluated for each ray traced, and the flag is assigned a status of TRUE or FALSE.
The flags may be used alone, or may be combined using logical operands. Logical operands
generally act on two other logical flags (the exception is the NOT operand which acts only on
the flag to the right of the operand). The supported logical operands are:
^ Exclusive OR (XOR). If either of the flags are TRUE, but not both, XOR returns TRUE.
! Logical NOT. Returns TRUE if the flag to the right was FALSE and vice-a -versa.
To select only rays that hit object 7, the filter string would be:
H7
To select only rays that hit both objects 7 and 9, the filter string would be:
H7 & H9
To select rays that must have either a) hit object 7 and object 9, but did not reflect off object 6,
or b) missed object 15, the filter string would be:
If only ghost rays generated by striking object 3, 4, or 7 are desired, the filter string would be:
G3 | G4 | G7
To select only rays incident at an angle of less than 10 degrees on a flat object number 5
whose normal vector points along local +z, the filter string would be (note cos(10) = 0.984808):
X_NGT(5, 0.984808)
Note only rays which hit the specified object in the X_NGT flag can possibly make the flag true.
To select only the first 50 rays that hit object 5 and missed object 6, the filter string would be:
To select from the 10th ray through the 20th ray that hit object 5 and missed object 6, the filter
string would be:
The filter string is checked for basic syntax errors, such as mismatched parentheses, but not all
possible syntax errors are checked and reported. The number of rays which meet the filter
string test may be very small, and perhaps even zero. OpticStudio still traces the number of
rays defined for the source (by the # of layout rays parameter), but only that fraction of these
rays which pass the filter will actually be saved, displayed, or drawn. The filter string may also
be applied to ray data base files as the ray data is being saved, see The Ray Trace Control.
Because filter strings are used with both dynamic and static windows, OpticStudio does not
automatically renumber the filter string arguments when objects are inserted or deleted.
Discussion:
The filter string is limited to 260 characters in length. Note that this is the limit for the
‘expanded’ filter string that includes all named filters inline.
For instance, if you enter a filter string of “(_1) OR (_2)”, the path analysis strings are inserted in
place which may cause it to be truncated.
Detector data files store energy data for Detector Rectangle, Color, Polar, and Volume objects.
The expected file extension for these different detector types is DDR, DDC, DDP, and DDV,
respectively. The binary file format for all file types consists of a single header structure,
followed by a 32-bit integer indicating how the data was generated, followed by one data
block for each pixel in the detector.
Note that when reading detector data files in other programs, there is a gap of 4 bytes that
appears between the last int member (i_data) and the first double member (d_data). See
“Comments on Data Structure Memory Packing” section of "The ZRD Uncompressed Full Data
Format (UFD)" for more details.
version: Currently 1004. Future versions of OpticStudio may use different version numbers as
the format changes, but OpticStudio will recognize older versions and convert automatically
when loading data. Any undefined data values in the format are reserved for future expansion
of the format and may be ignored.
type: 1, 2, 3, or 4 for Detector Rectangle, Color, Polar, and Volume objects, respectively.
source_multiplier: 0 through 9 for source unit multipliers femto through Tera, respectively.
i_data[2], i_data[3]: number of rays striking the spatial detector, number of rays striking the
angular detector.
d_data[0], d_data[1]: x half width of the detector, the y half width of the detector.
d_data[0], d_data[1]: maximum angle of the detector, radial size of the detector.
d_data[0] - d_data[2]: half width of the detector in the x, y, and z directions, respectively.
A 32-bit integer between the header and the ray data block, which defines the source of the
ray trace data. Values have meaning as follows:
0: Not Set. This indicates that the file was generated in a version of OpticStudio pre-dating
Detector File Version 1004.
1: Lightning Trace
-1: No Data
After the header data is defined and written to the file, the data structures are written. One
data block is written for each pixel on the detector. The file formats for the data structures
depends upon the detector type as follows.
These are the incoherent flux in position space, the incoherent flux in angle space, and the
coherent real, imaginary, and summed amplitude in position space, respectively.
The first four are the position space power, tristimulus X, Y, and Z values, and the same 4 values
for angle space.
These are the incoherent incident flux, the absorbed flux, and three unused values,
respectively.
Pixel Ordering
For Detector Rectangle and Color objects, pixel #1 is in the (-x, -y) lower left corner and the
subsequent pixels move first across the columns in the +x direction, then up through the rows.
For Detector Polar objects, pixel #1 starts at a polar angle of zero, and subsequent pixels go
along the radial arm at zero degrees to the +x axis to the maximum polar angle. The next pixel
starts again at polar angle of zero and continues along the radial arm at the first azimuthal
angle increment. The pattern repeats for each angular arm along the azimuthal direction.
For Detector Volume objects, pixel #1 is in the (-x, -y) lower left corner of the first plane on the
-Z side of the detector, and subsequent pixels move first across the columns in the +x
direction, then up through the rows to (+x, +y) of the first plane. The next pixel as at the (-x, -y)
corner of the next Z plane, and the pattern continues through all the Z planes.
The most common difficulty is tracing rays through a roof prism, corner cube, or faceted
Fresnel lens where one of the common edges is placed exactly along the x or y axis of the
incoming beam. Since the rays hit exactly on the edge of two facets, each with a different
normal vector, the reflection or refraction properties become ambiguous.
Physically, infinitely sharp edges cannot exist. Therefore, the solution OpticStudio uses is to
absorb any ray which strikes within the glue distance of an edge of a facet that borders
For sequential ray tracing, offset the object axis a very small amount in the X or Y directions; so
the rays will “see” one facet at a time. An offset of about 1e-6 lens units (which is only 1
nanometer if the lens units are mm) is generally sufficient.
For non-sequential ray tracing, either offset the object as for sequential ray tracing, or use
sources with random ray distributions. Occasionally a ray will strike within the glue distance of
the facet edge, and the ray energy will be absorbed; but the total amount of energy should be
very small.
Generally, using randomly generated ray sets, such as those in the image analysis or dithered
spot diagram, will eliminate this problem.
Note that any real roof prism or corner will physically not “correctly” reflect or refract rays
within very small distances of the edge due to manufacturing limitations and physical optics
interference.
To create a user defined DLL source, a suitable compiler or development tool that can
generate 64-bit Windows compatible DLLs is required. It is also assumed that the user can
write the required code, and most importantly, ensure that the code is reliable and bug-free.
To maximize speed, OpticStudio performs very little error checking on data returned by the
DLL, and so buggy DLLs are quite capable of bringing OpticStudio to a crash.
For this reason, technical support on the implementation of DLLs is strictly limited to
illustrating that the provided sample files work correctly.
Non-Sequential DLLs make use of a data structure (data[]) which allows us to pass specific
values back and forth between the DLL and OpticStudio. Examples of items passed via the data
[] structure are: wavelength, E-field information, direction cosine values, and more.
The best way to learn the use of the various DLL types is to study an existing DLL. The sample
DLLs provided with OpticStudio include extensive documentation and comments on the data
format; see any of the sample source code files for examples.
The table below lists the data[] available for Non-Sequential Bulk Scatter, Diffraction and
SurfaceScatter DLLs:
Bulk Scat-
SurfaceScatter Diffraction
tering
the total num- the total num-
ber of ber of
the total number of (double) values in the (double) val- (double) val-
data[0]
passed data array ues in the ues in the
passed data passed data
array array
data[1] x position of specular ray x position x position
data[2] y position of specular ray y position y position
data[3] z position of specular ray z position z position
x cosine of specular ray, on output it is the
data[4] x cosine x cosine
scattered ray
y cosine of specular ray, on output it is the
data[5] y cosine y cosine
scattered ray
z cosine of specular ray, on output it is the
data[6] z cosine z cosine
scattered ray
x cosine sur- wavelength in
data[7] x normal
face normal µm
y cosine sur- index of
data[8] y normal
face normal refraction
z cosine sur- Unscattered
data[9] z normal
face normal path length
if data[9] is
longer than
the randomly
The table below lists the data[] available for Gradient Index DLLs:
GradientIndex
the total number of (double) values in the passed data
data[0]
array
data[1] x position of specular ray
data[2] y position of specular ray
data[3] z position of specular ray
data[4] wavelength in µm
millimeters per unit length (1.0 for mm, 25.4 for inches,
data[5]
10.0 for cm and 1000.0 for meters)
data[6] n (to be computed by the dll and returned)
data[7] n * dn/dx (to be computed by the dll and returned)
data[8] n * dn/dy (to be computed by the dll and returned)
data[9] n * dn/dz (to be computed by the dll and returned)
data[10] parameter 1 from user input
data[11] parameter 2 from user input
etc... up to data[maxdata] where
maxdata = int(data[0])
The table below lists the data[] available for Source DLLs:
Source
the total number of (double) values in the passed data
data[ 0]
array
To get a general overview on DLLs, see the Knowledgebase article Custom DLLs in OpticStudio:
An overview of user-defined surfaces, objects, and other DLL types.
To compile a DLL for user-defined code, see the Knowledgebase article How to compile a
User-Defined DLL.
To debug a user-defined DLL, see the Knowledgebase article How to debug a DLL or EXE.
As Zemax Support does not offer DLL debugging services, it may be useful to connect with
other users on this topic. For that purpose, see our DLL forum: DLLs | Zemax Community.
The list of DLLS included with the OpticStudio installation that use the Mersenne Twister
algorithm are:
Bulk Scattering
l bulk_samp_1.dll
l Mie.dll
l Phosphor.dll
l poly_bulk_scat.dll
l Rayleigh.dll
Diffractive
l diff_samp_1.dll
Source File
l fiber1.dll
Surface Scattering
l Gaussian_XY.dll
l K-correlation.dll
l Lambertian.dll
l TwoGaussian.dll
We strongly recommend that anyone creating their own DLL for use in non-sequential mode
which requires the use of random numbers simply adopt our implementation of the Mersenne
Twister algorithm, or write their own 32-bit random number generator, rather than using the
standard Windows API function rand. That is because the rand function is 16-bit, meaning that
it can only be used to generate 2^16 = 65,536 unique random numbers. Thus, in NSC – when it
is common to trace millions of rays – the use of the rand function can result in the generation
of many repeated numbers, leading to “clumping” of data.
For details on reflective, refractive, and absorptive properties, see the sections called “Using
Material Catalogs” and “Polarization (system explorer)”.
Each NSC object type is described in the following summary table, and in greater detail in the
following sections. Note these basic objects may be combined to form more complex objects.
See the “Object Placement” section of the “Non-sequential Overview” for information on
placing objects inside or adjacent to one another.
For information on sources and detectors, please see the sections “Non-sequential Sources”
and “Non-sequential Detectors”.
If an object type is required that is not listed, please email technical support to suggest the
new object type be added to OpticStudio.
Object Description
Annular
An annular volume with an aspheric surface on one face.
Aspheric Lens
Annular Axial An annular lens formed by sweeping an aspheric cross section about a
Lens decentered Z axis.
Annular Volume A volume formed by two tilted, elliptical annular planar faces.
Annulus A planar ellipse with an elliptical hole in the middle.
This object creates a 3D parallelogram array of objects based upon a
Array
master object.
Array Ring This object creates a ring array of objects based upon a master object.
A surface with a conic substrate plus even and odd radial polynomial
Aspheric Surface
power aspheric terms.
Aspheric Surface Identical to the Aspheric Surface, with support for more complex aperture
2 types.
Axicon Surface An axicon formed by rotating a spherical arc around the z axis.
A circular or rectangular lens with separate curvature and conic in the X
Biconic Lens
and Y directions on both front and back faces.
Each NSC object type is described in the following summary list, and in greater detail in the
following sections. Note these basic objects may be combined to form more complex objects.
See “Object Placement” for information on placing objects inside or adjacent to one another.
If an object type is required that is not listed, please contact technical support to suggest the
new object type be added to OpticStudio.
The annular shape is defined by a min and max radial aperture which may be different on the
front and back faces. The aspheric rear face is offset from the front by a thickness measured at
a specified radial aperture, which may be zero.
That thickness is called “Thickness Aperture” and it tells the radial distance at which the object
thickness is defined.
For example, the below picture shows two cross-sections of an Annular Aspheric Lens where
Maximum Front Radial Aperture = Maximum Back Radial Aperture = 20 mm and Minimum
Front Radial Aperture = Minimum Back Radial Aperture = 10 mm.
l If the Thickness Aperture = 10 mm, then the object thickness is defined at a radial dis-
tance of 10mm.
For backward compatibility with the original definition of this object, the back face parameters
are listed before the front surface parameters.
The following restrictions apply: all apertures must be positive, maximum apertures on each
face must be larger than the minimum aperture on that face, and if one face has zero for a
minimum aperture the other face must also have a zero minimum aperture.
Face Numbers: Outside face connecting the "maximum" apertures Face 0, front face Face 1,
back face Face 2, inside face connecting the "minimum" apertures on the front and back Face
3.
The annular axial lens is defined by sweeping the cross section of a bi-aspheric lens around a
decentered axis parallel to the axis of symmetry of the cross section. The cross section consists
of two aspheric faces, each of which is a polynomial asphere. The cross section has the same
Face Numbers: Outside face connecting the "maximum" apertures Face 0, front face Face 1,
back face Face 2, inside face connecting the "minimum" apertures on the front and back Face
3.
Annular Volume
Face Numbers: Outside face connecting the "maximum" apertures Face 0, front face Face 1,
back face Face 2, inside face connecting the "minimum" apertures on the front and back Face
3.
Annulus
The annulus resides entirely within the local XY plane. If the minimum half widths are set to
zero, then no "hole" exists and rays will hit anywhere within the maximum half widths. In this
case, the annulus is identical to the ellipse.
The reference coordinate is the center of the annulus. Face Numbers: All faces Face 0.
21 Draw Boundary NA NA
The non-linear spacing coefficients, see the discussion
22-30 NA NA
below.
The maximum dimensions of the array in the X’, Y’, and Z’
directions. These values are not set by the user. The values
are computed based upon the spacing coefficients and
the number of elements defined. The optimization
operands NPGT, NPLT, and NPVA may be used to
31-33 constrain the overall size of the array while optimizing the NA NA
non-linear spacing coefficients. The maximum dimensions
reported in these parameter values is the center-to-center
spacing from the first to the last array element in each
direction, and does not consider the size of the individual
array elements.
The parent object may be any object type, except for a source, detector, or another array
object. If the parent object has the “Object Is A Detector” box checked, this property will be
ignored in the array elements. To create an array of sources, see the “Sources” settings in the
Object Properties.
The array elements are arranged on a 3D grid where the grid axes are not necessarily the usual
orthogonal XYZ axes. The X’, Y’ and Z’ axes default to the normal orthogonal local axes,
however, any non-parallel orientation for the axes may be defined by specification of the
direction cosines for the primed axes. The array positions are computed for the element with
index ijk (i for X’, j for Y’, k for Z’) according to the following expression:
, where
and the Xx, Xy, Xz values are cosines defining the X’ axis (parameters 8, 9, and 10), and similarly
for Y’ and Z’, and the Δ1 values are the element spacings along the axes (parameters 5, 6, and
7). Note that the direction cosine vectors are always normalized automatically. Once the array
element is located, the local rotation about the X, Y, and Z axis is performed, in a manner
identical to the usual coordinate rotations (see “Object Placement”).
The Δ1 values in the three directions are used to define a uniform spacing of the array
elements. However, a non-uniform spacing may also be defined using parameters 22-30. The
position of the array elements along the X’ direction is in general defined as
where Δ1 is the uniform spacing (defined by parameters 5, 6, and 7 for X’, Y’, and Z’,
respectively), the index "i" goes from 0 to nx-1 (nx is the number of elements in the X’
direction), and the Δk coefficients are the kth order terms measured in lens units. If any of the
Most properties of the Array object are defined by the parent object. The exceptions, which
may be distinct for the array object and the parent object, are the “Rays Ignore This Object”
and the “Do Not Draw Object” settings. All other properties, including face definition, material,
coatings, scattering, diffraction, or gradient index proper- ties, are as defined for the parent
object, and the array object settings will be ignored. If the parent object is not needed, use the
“Rays Ignore This Object” and “Do Not Draw Object” settings on the parent object (See “Type
tab” and “Draw tab”). The array will still be created and ray traced even if the parent object is
not drawn or ray traced. Note that rays striking an array object will report hitting the parent
object number, not the array object number. For this reason, when using ZRD files,
optimization operands, or filter strings, the object number used to refer to ray data should be
the parent object number.
When nesting array objects inside or outside other objects, the usual nesting rules apply. For
more information see “Nesting volumes”. However, it is the placement of the parent object in
the NSC Editor, and not the array object, that determines the nesting rules. Specifically, if an
array object is to be nested inside of another, outermost object, the parent object must follow
the outermost object in the editor.
Array Ring
The number of array elements may in principle be any number, however, very large arrays may
require excessive computation time or computer memory to ray trace or render.
The array elements are arranged on a ring (or arc). There are two ways to define the positions
of the array elements, defined by the mode flag. Mode 0 results in a ring of objects in a plane.
Mode 1 creates a ring of objects on a reference sphere. The method for placing each array
elements is as follows for each mode:
Mode 0: The sketches for this mode are based on the sample file"Zemax\Samples\Non-
sequential\Geometry Creation\Ring Array Example 2- Spiral of Archimedes.ZMX"
The parent object is first placed at the vertex of the Array Ring.
The object is then rotated around the array local +Z axis by the angle α.
Note that the following image demonstrates a γ value of 35 degrees, whereas the sample file
"Ring Array Example 2- Spiral of Archimedes.ZMX" has a γ value of 0 degrees. The difference is
for the purpose of demonstration.
Subsequent array elements are further rotated around the array local Z axis by an angle ẟ /N.
The angular position of the array element “k” is given by θ = γ + k* ẟ /N, where k varies from 0
to N-1. For a complete ring, ẟ should be 360. Mode 0 may also be used to form a Spiral of
Archimedes, where R is replaced by R + k* β * ẟ /N and β is interpreted to be in lens units per
degree. The value ε in lens units may also be used to define a step change in R every time the
angle given by k* ẟ /N passes 360 degrees. Ray tracing will generally be much slower when
either β or ε are not zero, since the symmetry of the array is broken.
Mode 1: The sketches for this mode are based on the sample file "Zemax\Samples\Non-
sequential\Geometry Creation\Ring Array Example 1- Fly's Eye Array.ZMX"
The parent object is first placed at the vertex of the Array Ring.
Note that the following image demonstrates a γ value of 30 degrees, whereas the sample file
"Ring Array Example 1- Fly's Eye Array.ZMX" has a γ value of 0 degrees. The difference is for the
purpose of demonstration.
The position of the individual elements in the array can be calculated with the following
equations:
For all modes, to form a complete ring, ẟ should be 360. Smaller values of ẟ will form an arc of
objects. Larger values of ẟ may cause elements to overlap, which may create an invalid
geometry. The angle γ “clocks” the starting point of the ring or arc around Z.
Most properties of the Array Ring object are defined by the parent object. The exceptions,
which may be distinct for the Array ring object and the parent object, are the “Rays Ignore This
Object” and the “Do Not Draw Object” settings. All other properties, including face definition,
material, coatings, scattering, diffraction, or gradient index properties, are as defined for the
parent object, and the array object settings will be ignored. If the parent object is not needed,
When nesting array objects inside or outside other objects, the usual nesting rules apply. For
more information see “Nesting volumes”. However, it is the placement of the parent object in
the NSC Editor, and not the array object, that determines the nesting rules. Specifically, if an
array object is to be nested inside of another, outermost object, the parent object must follow
the outermost object in the editor.
Aspheric Surface
This object supports user defined apertures, see “User defined apertures”. For other aperture
shape options, see “Aspheric Surface 2”.
This surface is similar to the Aspheric Surface above, with added support for elliptical or
rectangular decentered annular apertures. The following parameters are used to define the
aspheric surface:
Axicon Surface
The Axicon Surface object uses a different method for defining the object shape. The Axicon
surface is defined by a section of a circle (an arc) that lies in the YZ plane. The arc is defined by
three points. The start of the arc is at (z=0, y=0). The center of the arc is at the user defined
coordinates (cz, cy). The end of the arc is at the point where z = L, where L is a user defined
parameter corresponding to the length of the axicon along the Z axis. The surface is formed by
revolving the arc around the Z axis. If cz is positive, the negative of the absolute value of cy is
taken, and the portion of the circle lying in the first quadrant is used to define the surface. If cz
is negative, the absolute value of cy is taken, and the portion of the circle lying in the first
quadrant is used to define the surface.
A biconic lens is similar to a toroidal lens, except the conic constant and base radius may be
different in the X and Y directions. The biconic lens allows specification of Rx, Ry, Kx, and Ky for
the front and back surfaces independently. The sag of a biconic surface is given by:
Where
Face Numbers: Front face Face 1, back face Face 2, all other faces Face 0.
Where
Rx and Ry are the radius of curvature values in the x and y directions, kx and ky are the conic
constants in the x and y directions, the α terms are the x aspheric coefficients, the β terms are
the y aspheric coefficients, N is the number of Zernike coefficients in the series, Ai is the
coefficient on the ith Zernike Standard polynomial, r is the radial coordinate in lens units, ρ is
the normalized radial coordinate, and is the angular coordinate. The Zernike Standard
polynomials are defined in the table given in “Zernike Standard Coefficients”.
The following parameters are used to define the Biconic Zernike Lens:
Biconic Surface
A biconic surface is similar to a toroidal surface, except the conic constant and base radius may
be different in the X and Y directions. The biconic surface allows specification of Rx, Ry, Kx, and
Ky directly. The sag of a biconic is given by:
Where
The biconic surface can also be used to make a hyperhemispheric cylinder surface, but only
under these conditions:
2) The "Is Rectangle?" flag is set to 1 (that is, the surface boundary is a rectangle).
For a surface that is hyperhemispheric on the top half, set the maximum Y aperture to a
positive value and set the "Is Top Hyper?" flag to unity.
The surface may be hyperhemispheric in both the top and bottom portions at once, but
currently only for the case of Rx = 0.0. If either the top or bottom is hyperhemispheric, the
actual maximum Y aperture is given by
Where
and
Rx and Ry are the radius of curvature values in the x and y directions, kx and ky are the conic
constants in the x and y directions, the α terms are the x aspheric coefficients, the β terms are
the y aspheric coefficients, N is the number of Zernike coefficients in the series, Ai is the
coefficient on the ith Zernike Standard polynomial, r is the radial coordinate in lens units, ρ is
the normalized radial coordinate, and is the angular coordinate. The Zernike Standard
polynomials are defined in the table given in Zernike Standard Coefficients.
This surface also supports optional X and Y decenters on the Biconic and Zernike terms
separately. The biconic decenters are applied to the biconic sag and individual x and y aspheric
coefficients, while the Zernike decenters are applied only to the Zernike terms.
The following parameters are used to define the Biconic Zernike Surface:
where N is the number of polynomial coefficients in the series, M is the diffraction order, and
Ai is the coefficient on the ith extended polynomial term. The polynomials are a power series in
the normalized coordinates x and y, as described in “Extended Odd Asphere Lens”. The
coefficients Ai units of radians (2π radians is one wave).
This object does not diffract rays correctly if the front surface is made hyperhemispheric. See
also the Binary 2 object.
For important information on diffractive objects, see “Diffraction from NSC objects".
Face Numbers: Front face is Face 1, back face is Face 2, side face is Face 0.
where N is the number of polynomial coefficients in the series, Ai is the coefficient on the 2ith
power of ρ, which is the normalized radial aperture coordinate. The coefficients Ai all have
units of radians ( 2π radians is one wave).
This object does not diffract rays correctly if the front surface is made hyperhemispheric. See
also the Binary 1 object.
For important information on diffractive objects, see “Diffraction from NSC objects”.
Face Numbers: Front face is Face 1, back face is Face 2, and all other faces are Face 0.
Binary 2A
The Binary 2A object has an even polynomial aspheric front and back face, with a diffractive
optic phase profile similar to the Binary 2 surface type on the front face. The even aspheric sag
formula is:
The Binary 2A phase profile is placed on the front face, and adds phase to a ray according to
the following polynomial expansion:
See also the Binary 1 and Binary 2 objects. For important information on diffractive objects, see
“Diffraction from NSC objects”. The reference coordinate is the center of the front face.
Face Numbers: Front face Face 1, back face Face 2, all other faces Face 0.
Boolean CAD
For Boolean operations of native objects in OpticStudio, see the Boolean Native object. Unless
the parent objects are imported CAD parts, ray tracing with the Boolean Native object is up to
10x more efficient than the Boolean CAD object.
The Boolean operations are performed by converting each component object into a NURBS
based representation, and then a series of Boolean trimming and combining operations are
performed to yield the resulting object. For this reason, Boolean CAD objects have the same
considerations that Imported objects do; see “CAD Part: STEP/IGES/SAT” for more comments
about imported objects. Some loss of precision is possible when converting from OpticStudio
native objects with high precision representations to NURBS representations; this is not a
limitation of OpticStudio but is inherent in the NURBS representation of arbitrary surfaces.
Generally, precision can be increased as desired using the Spline and Tolerance parameters
The Boolean CAD object is defined by 22 parameters and a string defining the desired Boolean
operations:
Parameters 13-22 are used to define which “parent” objects will be combined. Parameter 13 is
used to define which object is Object A, parameter 14 defines which object is Object B, etc.
There is no need to define more objects than are required for the desired Boolean operation. If
only two objects are to be combined, then only Object A and B need to be defined. Any
unused objects may be left with an object number of zero. All defined objects must precede
the Boolean CAD object in the NSC Editor. The list of defined objects should always start at
Object A, then continue with Object B, etc., e.g. it is not valid to set the object number to zero
for Object A and then have a non-zero object number defined later in the list. Parent objects
may not be sources or detectors.
Boolean operations
Once all the parent objects are defined, the Boolean operation is defined by a “Control String”
placed in the “Comments” column of the form:
The "object" argument is a single letter, such as A, B, or C; which corresponds to the desired
object. The "oper" is a single character operator. The following operators (between objects A
and B in the logical example) are supported:
- Subtracts the second object from the first (logical A AND NOT B).
& Computes the intersection of the two objects (logical A AND B).
^ Yields the portion of the object that is part of one or the other, but not both objects (logical
A XOR B).
$ Subtracts the first object from the second (logical NOT A AND B). Here are some example
Control Strings:
A+B
E+A-B-C
F+B&E-A
Object placement
The local coordinate system of the resulting object will be the same as the local coordinate
system of the first object listed in the Control String. The global object position and orientation
is set by the object position and tilt parameters in the same manner as all NSC objects.
If the parent objects are not needed, use the “Rays Ignore This Object” and “Do Not Draw
Object” settings on the parent object (See "Type Tab" and "Draw Tab” ). The Boolean CAD
object will still be created even if the parent objects are not drawn or ray traced.
The Face numbers and properties of the Boolean CAD object are defined by the face numbers
and properties of the parent objects. All face properties from the parent objects are copied to
the corresponding faces of the Boolean CAD object. To view each face on any object, use the
NSC Object Viewer (See “NSC Object Viewer” ). There is a limit to the total number of unique
faces on any single object; for details see “Object faces” .
One significant advantage of the Boolean CAD object is that the resulting volume is still
parametrically defined by the parent objects. Changing any of the parent object parameters
will change the Boolean CAD object as well. If this capability is not needed, the Boolean CAD
object may be exported as a IGES or STEP file (see “CAD Files” for more information on CAD
export) and then imported using the CAD Part: STEP/IGES/SAT object (see “CAD Part:
STEP/IGES/SAT”), and then the parent objects may be deleted.
The Boolean Native object is similar to the Boolean CAD object, but it uses a more efficient ray-
tracing algorithm. See "Boolean CAD” for more information about defining parent objects,
Boolean operations, and object placement. Unlike the Boolean CAD object, the Boolean Native
object doesn’t convert each component object into a NURBS-based surface representation,
and instead uses the parent objects’ native geometry. For this reason, ray tracing with the
Boolean Native object is typically much faster (up to 10x faster) and more accurate than the
Boolean CAD object.
When a ray is traced towards a Boolean Native object, the ray is traced to the parent objects
and the software performs a Boolean logic on the ray trace. It first looks for a “close first guess”
of the ray-object intercept using a faceted representation of the parent objects (i.e. triangles
generated using the Drawing Resolution under Object properties > Draw). Then it iterates to
the exact solution.
It means that the ray-tracing depends on the ray-tracing through the parent objects. If rays do
not properly trace through the parent objects or miss them, rays will not trace properly
through the Boolean Native object. For more information on the Drawing Resolution, see
Rendering:
The rendering of the Boolean Native object is done by converted the Boolean Native to a
NURBS format. But this is not used by the ray tracing. The Boolean Native object uses the
native parent geometry for ray tracing.
The Boolean Native object will not ray trace faster than Boolean CAD object if the parent
objects are CAD objects or are not native objects in OpticStudio.
In addition, if a Boolean Native object is built with a large number of parent objects, then the
ray tracing speed may not be faster than ray tracing with the Boolean CAD object. This is
because the rays still need to trace through all the parent objects and consider the Boolean
geometry operations. Therefore, if many objects need to be combined, nesting the objects will
likely ray trace faster than using the Boolean Native object. See “Object Placement” for more
information on nested objects.
Sources can be placed inside of the Boolean Native object using the “Inside Of” parameter.
Unlike the Boolean CAD object, however, the locations of the parent objects must be
considered. This is because the Boolean Native object uses the parent objects’ native geometry
instead of converting each component into a NURBS-based surface representation.
If a source starts inside a Boolean Native object, the rays will trace through the geometry of the
parent objects, placed relative to the local coordinates of the Boolean Native object. Therefore,
if a ray starts inside the region of a parent object, the Inside Of parameter should be set to the
Boolean Native object number (and not the parent object number). This also applies to
negative space. For example, see the following images showing objects A and object B, and the
Boolean operation A – B:
The full geometry of Object B must be considered, even if the parent objects are not located in
the same local coordinate system as the Boolean Native object. This is because the parent
object geometries are recreated relative to the local coordinate system of the Boolean Native
object. For example, see the following image, showing the placement of a source that does not
consider the full geometry of object B:
The source object does not have the Inside Of value set correctly, and as a result, the rays are
incorrectly segmented in a region that should be considered air.
With the Inside Of value set to the Boolean Native object number, the rays correctly propagate
through the hexagonal opening, without the segments shown in the previous picture.
To ensure that sources are placed correctly within Boolean Native objects, we recommend
using the same global coordinate system for the parent objects and the Boolean Native object.
Once the sources are positioned and the system is defined, the parent objects may be moved
to a different area outside the region of interest, or hidden and ignored. See “Editor Windows
Operations” for a right-click option to ignore and hide objects. Also see “Object Properties
>Type > Ray Trace Settings” for more information on ignoring objects, and “Object Properties
> Draw” for more information on hiding objects.
Working in mixed-mode
When working in mixed-mode with a Boolean Native object, the locations of the parent
objects must be considered. If the parent objects touch or surround the entrance port, then the
Back Propagation Distance has to be used so that rays do not start inside the parent objects.
The following parameters are used to define the Boolean Native object:
Parameter Face
Description Face #
# Name
The number of points to use for fitting splines to aspheric
1 NA NA
surfaces during the conversion from OpticStudio format
These objects provide a dynamic link to an assembly defined in Autodesk Inventor and Creo
Parametric respectively. Autodesk Inventor must be installed to use the CAD Assembly:
Autodesk Inventor object, which dynamically links to an Autodesk Inventor assembly file
(*.iam). Creo Parametric must be installed to use the CAD Part: Creo Parametric object, which
dynamically links to a Creo Parametric assembly file (*.asm). All assembly files, along with all of
the individual part files (Autodesk Inventor: *.ipt; Creo Parametric: *.prt) that make up each
assembly, must be stored in the appropriate folders, which may be user defined; see “Folders” .
By default, the assembly file will be read in as a single object, and thus all of the parts in the
assembly may only be assigned a single set of optical properties. These optical properties may
already be defined in the file, if the file had been used in a previous OpticStudio design and the
“Save CAD Assembly/Part Properties” option had been used to save the optical properties in
that previous design (see “Save CAD Assembly/Part Properties” under “Edit” ). If this is the case,
those properties may be read in from the file and assigned to the object in new design.
However, this is not mandatory, and new optical properties can be assigned to the file in the
new design if desired. The option to read OpticStudio optical properties from the file will be
presented when the file is first loaded, at which point the user may decide the appropriate
course of action.
OpticStudio supports the ability to explode the assembly back into its constituent parts,
allowing optical properties to be assigned to each of the individual parts of the assembly. The
option to explode the assembly file into individual parts will also be offered when the file is
first loaded into OpticStudio. If this option is not selected upon first load, it may be
subsequently selected by choosing either “Explode Autodesk Inventor Assembly” or “Explode
Creo Parametric Assembly” (depending on the object selected) under the Tools menu of the
Non-sequential Component Editor. In order for the appropriate tool to be activated, the cursor
must be somewhere on the row containing the CAD Assembly object. For more information
see “Explode Autodesk Inventor Assembly”or “Explode Creo Parametric Assembly”.
When the assembly file is exploded, the constituent parts that are created are each in the form
of the CAD Part: STEP/IGES/SAT object (see “CAD Part: STEP/IGES/SAT” ). Thus, the individual
parts of the assembly file cannot be modified inside of OpticStudio. If modification of the
individual parts is desired, each part should be read into OpticStudio using the corresponding
CAD Part object (see “CAD Part: AutoDesk Inventor” and “CAD Part: Creo Parametric”” ).
The only parameter associated with the CAD Assembly objects is the “Explode?” flag
(parameter 1). Note that manual modification of the “Explode?” parameter does not actually
change the behavior of the object. The parameter is there for reference only so OpticStudio
knows when to look for the exploded constituent parts already extracted by the appropriate
tool and referenced in the editor. The flag is 0 if the assembly has not been exploded, and is
set to 1 if the assembly has been exploded. Once the flag has been set to 1 by the appropriate
tool, there is no way to recombine the assembly, other than manually deleting the objects
corresponding to the constituent parts. To explode an assembly which has not already been
exploded, use the tool described in “Explode Autodesk Inventor Assembly” or “Explode Creo
Parametric Assembly”.
Once read in, this object may have optical properties such as coatings, glass, and scattering
functions applied, and then be ray traced like any other optical component.
Optical properties for the object may already be defined in the file, if the file had been used in
a previous OpticStudio design and the “Save CAD Assembly/Part Properties” option had been
used to save the optical properties in that previous design (see “Save CAD Assembly/Part
Properties” under “Edit” ). If this is the case, those properties may be read in from the file and
assigned to the object in new design. However, this is not mandatory, and new optical
properties can be assigned to the file in the new design if desired. The option to read
OpticStudio optical properties from the file will be presented when the file is first loaded, at
which point the user may decide the appropriate course of action.
Dimensions for the part will be read in by OpticStudio, and may be displayed directly in the
Non-sequential Component Editor (NSCE) under the parameter columns. The user determines
which dimensions to display in the NSCE by selecting those dimensions from either the
Autodesk Inventor or Creo Parametric tab of the Object Properties dialog box, depending on
the part selected (see “Autodesk Inventor Part tab”and “Creo Parametric Part Tab” ). For the
CAD Part: Creo Parametric object, the listed dimensions include both global (i.e. model-level)
and feature-level parameters defined for the part, i.e. all parameters which are used to define
the part geometry analytically.
OpticStudio will determine the system units used when creating the part in either Autodesk
Inventor or Creo Parametric (“the creating program”), and will issue a warning if the lens units
in OpticStudio differ from these system units. OpticStudio will then scale the input part to be
the correct size in the given lens units. However, the dimension values associated with the part
- i.e. those values that are displayed in the NSCE - will not be scaled, but will always remain in
the system units of the creating program. To avoid potential confusion and error, it is strongly
recommended that the user set the OpticStudio lens units and the system units of the creating
program to be the same whenever possible.
No dimensions will be displayed when the part is first loaded into OpticStudio. Any dimensions
which are subsequently chosen for display in the NSCE (via the Part tab for the creating
program in the Object Properties dialog box) may be modified in OpticStudio, analogous to
modification of a built-in OpticStudio object. The modified part may then be saved into a file
with the format of the creating program (i.e. *.ipt or*.prt) if desired. The saved file may be given
the same name as the original part (thus overwriting the original file) or may be given a new
name.
Dimension values associated with the part can be defined as optimization variables, may be
placed under multi-configuration control, and can be perturbed or used as compensators
during tolerance analysis, just like any other parameter of a built-in OpticStudio object. The
position and tilt of the part may also be optimized and toleranced in the usual manner.
Use of CAD Part: Creo Parametric and CAD Part: Autodesk Inventor objects does not require
any special action from the user: OpticStudio will automatically open the corresponding
creating program in silent mode, meaning that the application will not appear anywhere on
the user's monitor but a process will be visible in the user's Task Manager listing. This process
should be allowed to run as long as OpticStudio is running, in order to ensure that
communication is always available between OpticStudio and the creating program. The
creating program running in silent mode will be closed automatically once OpticStudio itself is
closed.
Note that when loading a CAD Part: Creo Parametric object in OpticStudio, the part should not
be open in any other applications.
In all cases, constant communication between OpticStudio and the creating program is
necessary to allow modification of the part inside of OpticStudio.
To import an object, set the object type to “CAD Part: STEP/IGES/SAT” and select the file name
from the drop-down box, or place the file name in the comment column. The file must reside
in the <objects>\CAD Files folder (see “Folders” ) and end in the extension IGS, IGES, SAT, STP,
STEP, or SAB. The extension must be included with the file name on the comment column.
The following parameters are used by the CAD Part object type.
When importing CAD objects from IGES, STEP, or other format files, the data must be
translated into the OpticStudio internal object representation. This conversion need only be
done once, and thereafter the converted file can be used. This greatly speeds up the loading of
imported objects. The converted file name is the original file name with the extension SAB
appended. For example, if the original imported file was MyObject.IGS, the SAB file created will
be MyObject.IGS.SAB. The name of the file used by the imported object will be changed to the
converted file name. OpticStudio will automatically convert imported files to SAB format files if
the original file requires more than 2.0 seconds to read and convert, and if the scale factor is
1.0. If the scale factor needs to be something other than 1.0, first set the scale factor to 1.0,
then after the file has been converted to SAB format, the scale factor may be adjusted to the
desired value. This restriction prevents unexpected scaling of the SAB object when more than
one ZMX file is using the same SAB object.
It is recommended that the original CAD file be retained, even though the SAB file will be used
by OpticStudio. This allows regeneration of the SAB file should that be required. This feature
may be disabled, see “Convert Imported Files To SAB” under “Type tab” .
The advantage to using imported objects is that solids of any shape may be ray traced within
OpticStudio. There are no limits on the shape, complexity, or number of objects that may be
imported and ray traced. Multiple objects may be imported in a single file. The disadvantage to
using imported objects is ray tracing speed, and in some cases, ray tracing accuracy. See the
discussion below for important considerations regarding imported objects. An alternative to
imported objects exists, see “User Defined Object” .
This problem often arises when a high optical precision surface is modeled in OpticStudio,
then exported as a CAD file, then imported as an CAD file for subsequent ray tracing. The
optical precision of the part is lost upon exporting the native OpticStudio asphere as a CAD
spline. See “Limitations of exported data” for more information.
For non-imaging optics, the precision of the CAD representation is usually adequate, but for
imaging systems, great care must be taken to verify that the imported CAD part is a suitably
accurate description of the desired shape. Note OpticStudio uses a relative internal optical
precision of about 1E-12 for ray tracing. Most CAD representations of objects are many orders
of magnitude more coarse.
Simple objects such as spherical lenses typically ray trace slower when imported in CAD format
than the native OpticStudio object of identical shape. Ray tracing speed for imported objects is
critically dependent upon the efficient representation of the solid shape within the imported
file. The identical object may be represented in a nearly infinite number of ways using the
various solid and surface entity types supported by the CAD formats OpticStudio can import.
For example, an efficient representation of an object may use only a few spline surfaces; while
an inefficient representation of the object may use hundreds of smaller spline surfaces.
Although from a mechanical modeling perspective the two representations may both be valid
and the resulting solids identical, the represen- tation with the larger number of spline surfaces
will ray trace dramatically slower. The only remedy is to return to the source of the CAD file and
see if a more efficient representation may be generated.
Not all possible valid CAD format files may be imported, as OpticStudio may only import
solids. No lines or surfaces are allowed. Shells must be converted to thin solids before being
imported into OpticStudio. Solids must be simply closed with a continuous exterior surface
without holes or gaps. No internal surfaces or faces are allowed. Solids composed of multiple
l Not all possible valid CAD format files may be imported, as OpticStudio may only
import solids.
l Shells must be converted to thin solids before being imported into OpticStudio.
l Solids must be simply closed with a continuous exterior surface without holes or gaps.
l Solids with dimensions larger than approximately 1×104 are not supported by the
Parasolid libraries. This can be avoided by changing the lens units. For example change
the lens units from millimeters to meters.
l Files containing valid solids which do not import may be sent to technical support for
review; however no guarantee is offered that OpticStudio can be made to
accommodate all possible CAD format entity types and files.
The STL file name is referenced in the “comments” column of the STL Object row. For example,
if the STL file myobject.STL is placed in the <objects>\CAD Files folder (see “Folders” ), then
specify “myobject.STL” in the comment column of the STL Object type row in the NSC Editor.
The reference coordinate is locally (0, 0, 0), and the polygons that compose the object may be
placed anywhere relative to the reference point. Some STL export implementations only allow
objects to be placed such that all vertex coordinates are positive. OpticStudio does not require
this to be the case, and will import triangle vertices anywhere in 3D space.
Using an STL object as a detector is supported, see “Objects as detectors” . When the STL
object is used as a detector, If “Fast Ray Trace” (see “Type tab” ) is checked, OpticStudio will
alter the order of the triangles defined in the STL file to speed up the ray trace. If “Fast Ray
Trace” is unchecked, the order of the triangles is unmodified, which slows the ray tracing but
preserves the original order of the triangles defined in the STL file.
The STL format is commonly supported by mechanical CAD programs to describe arbitrary
objects. Objects are modeled as a collection of triangles, and the global vertices of the
triangles are written out to a file. STL is a good format for faceted objects. For smoothly curved
objects, such as lenses, STL is an approximation which may be of acceptable accuracy for some
non-imaging systems.
There are binary and text formats for STL files; and OpticStudio supports both formats.
To use an STL object, choose the object type to be an “STL Object” and enter the name of the
file (without the STL extension) in the comments column of the STL Object row. The STL file
must be placed in the folder <objects>\CAD Files (see “Folders” ).
There is upper limit on the number of triangles an STL object may contain.That is 2.5 million
triangles. If your computer has small RAM, the limit is determined by the amount of real or
virtual RAM the computer has available. Each triangle takes up about 100 bytes of memory.
However, OpticStudio often maintains multiple copies of the lens data simultaneously, and so
a good rule of thumb is that OpticStudio will need 500 bytes of RAM for each triangle. A 2000
triangle object will require about 1 Mb of free RAM. A more practical limit is computer speed;
OpticStudio will slow down noticeably if the number of triangles becomes very large.
Exporting to 3D Printers
The STL (STereolithography Language) is particularly useful for sending OpticStudio designs to
3D printing manufacturers. Some manufacturers can also accept STEP export files.
A Part Designer Object is a solid volume created using the OpticStudio Part Designer. A wide
variety of complex parametric parts may be created using the Part Designer. A Part Designer
Object’s only parameters are those exposed by that part.
Prior to using a Part Designer Object, please load the file in Part Designer to ensure there are
no errors. In order to maximize performance, limited error checking is performed when the
part is used in the editor.
Note that for exposed sketch points, any tangent points are converted to offsets from the
curve point. For a complete description of Part Designer see the program documentation for
the Part Designer.
Compound Lens
The Compound Lens object is based on two parent surface objects. The parent surface objects
include: Standard Surface, Aspheric Surface, Q-type Asphere Surface, Toroidal Surface,
0, Side Faces: The side of the lens. If the aperture shape is circular but has different sizes for the
front and back surfaces, the edge will be tapered. Note that tapered edges are not supported
with rectangular apertures.
3, Front Chip Zone: The chip zone of the font surface. See “Chip Zone” for more information.
4, Front Flat: The flat mechanical zone of the front surface. See “Mechanical Semi Diameter” for
more information. This face is not supported if the aperture shape is rectangular.
6, Back Flat: The flat mechanical zone of back surface. This face is not supported if the aperture
shape is rectangular.
The Compound Lens needs a strict validation on its parameters, namely Semi-Diameters, in
order to make sure it is valid.
If the front or rear surface is not rotationally-symmetric, it doesn't support tapered edges.
The Compound Lens object supports tapered edges when the apertures are circular (Is
Rectangular = 0) and when the surfaces on the front and back faces are rotationally symmetric.
The Standard Surface and Aspheric Surface types are currently supported.
To try to keep the validation rules as simple as possible, all parameter validation goes from left
to right across the editor columns.
For example, the Front Clear will drive validation of the Front Clear + Chip and Front Edge,
while the Front Clear + Chip will drive validation for the Front Edge and all Back parameters.
Comments on using a Grid Sag Surface object as one of the parent objects
When one of the parent objects of the Compound Lens is a Grid Sag Surface object, the
aperture size of the Compound Lens will be automatically scaled so that it is not larger than
the size of that grid file.
l Both the chip zone and the flat mechanical zone are not supported in CAD export.
These zones will be combined with the front or back faces.
l To define circular apertures with mechanical flat zones, set the Front/Back Edge Radius
to be larger than the Front/Back Chip Radius. The resulting flat zones are modeled with
uniformly sampled spline curves. Note that in some extreme cases, the spline curve
may not accurately capture the transition from the chip zone to the flat mechanical
zone. This will result in some erroneous artifacts in the representation in Shaded Model
as well as in any exported CAD files.
There are some limitations to the Compound Lens object when using it as a parent object for
the Boolean CAD or Boolean Native objects. See “CAD Files” and “Boolean CAD” for more
information about these use cases. The limitations include the following:
l If a Compound Lens object is used as one of the parent objects for a Boolean CAD
object, there is no way to specify different Coat/Scatter properties for the chip zone
and the mechanical flat zone. See “Coat/Scatter” for more information on these prop-
erties.
Note: This limitation does not apply to the Boolean Native object. The Boolean Native
object retains the chip zone and the mechanical flat zone Coat/Scatter properties.
l If a Compound Lens object is used as one of the parent objects for a Boolean CAD
object or a Boolean Native object, the Object Viewer will not display the Coat/Scatter
properties of the chip zone and the mechanical flat zone.
Note: For Boolean Native objects, however, the rays will correctly account for the
Coat/Scatter properties of the chip zone and the mechanical flat zone.
The following parameters are used to define the Compound Lens object:
Face
Parameter # Description Face #
Name
Front/Back Surface #: The parent object number to be
used as front and back surfaces. Note that the parent All All
1-2
object number must precede the Compound Lens object Faces Faces
number in the non-sequential component editor.
3 Thickness: The center thickness of the Compound Lens. Side 0
Is Rectangular?: A flag to indicate if the Compound Lens
4 has a circular or rectangular aperture shape. Use 0 for Side 0
circular, 1 for rectangular.
When the aperture shape is circular (Is Rectangular? = 0), the parameters are:
Face
Parameter # Description Face #
Name
Front
Face,
Front Clear: The clear semi-diameter aperture of the front
5 Front 1, 3
face.
Chip
Zone
Front
Front Chip: The chip zone semi-diameter of the front face. Chip
6 This parameter should be larger or equal than Front Clear Zone, 3, 4
Semi-Diameter. Front
Flat
Front Edge: The mechanical flat semi-diameter of the front
Front
7 face. This parameter should be larger or equal than Front 4
Flat
Chip Semi-Diameter.
Back
Face,
Rear Clear: The clear semi-diameter aperture of the back
8 Back 2, 5
face.
Chip
Zone
Back
Rear Chip: The chip zone semi-diameter of the back face. Chip
9 This parameter should be larger or equal than Back Clear Zone, 5, 6
Semi-Diameter. Back
Flat
Rear Edge: The mechanical flat semi-diameter of the back
Back
10 face. This parameter should be larger or equal than Back 6
Flat
Chip Semi-Diameter.
11-14 Unused NA NA
Mirror Space?: A flag to indicate whether the lens is defined
in mirror space. When Mirror Space? is 1, the lens grows in
local -z direction. This is the same as how the lens would be
15 defined after an odd number of mirrors in sequential mode. NA NA
This flag is used when converting from sequential to non-
sequential mode and does not normally need to be used in
objects that are manually defined by the user.
Face
Parameter # Description Face #
Name
X Half Width, Y Half Width: The half width from the lens Front
center to its outmost edge in x and y direction. Tapered Flat,
5-6 3, 5
edges are not supported for rectangular apertures, so this Back
setting applies to the front and back face. Flat
Front
Front X Clear, Front Y Clear: The chip zone half width from Face,
7-8 the lens center of the front face. This parameter should be Front 1, 3
smaller or equal than Half Width X/Y. Chip
Zone
9-10 Unused
Back
Rear X Clear, Rear Y Clear: The chip zone half width from the Face,
11-12 lens center of the back face. This parameter should be Front 2, 5
smaller or equal than Half Width X/Y. Chip
Zone
13-14 Unused NA NA
Mirror Space?: A flag to indicate whether the lens is defined
in mirror space. When Mirror Space? is 1, the lens grows in
15 NA NA
local -z direction. This is the same as how the lens would be
defined after an odd number of mirrors in sequential mode.
A CPC is used to concentrate light entering one end of the CPC to the other end. Only rays that
make an angle less than the acceptance angle with respect to the local Z axis will pass through
the CPC; other rays will reflect back out. This type of CPC is the "Basic CPC" as described in
detail in "High Collection Nonimaging Optics" by W. T. Welford and R Winston, Academic
Press (1989).
If the “Is Volume?” flag is zero, then the object is a hollow shell. Otherwise, the object is a
closed solid volume. If the CPC is a closed volume, it may be made of a refractive material. The
reference index of the material can be entered for parameter 7.
is given by:
Where
This refracted acceptance angle will be used to determine the CPC shape and maximum
length. This means that the volume index controls the shape of the CPC.
The volume index does not automatically pick up from the index of the material used for the
CPC. It’s the material index that determines the index that the rays see. In most cases, the user
will want to select a wavelength and determine the index of the CPC material at that
wavelength. That index can be entered as the “Volume Index” for the CPC. The shape and
acceptance angle of the CPC will then be correctly matched to the material used to model the
CPC.
Longer lengths will be truncated to this value. The radial coordinate of points on the CPC as a
function of the z coordinate along the axis is given by the positive real root of this quadratic
equation:
The acceptance angle must be between 0.0 and 89.0 degrees, inclusive. Face Numbers: Front
face Face 1, rear face Face 2, outer faces Face 0.
CPC Rectangular
This object is similar to the CPC (see “Compound Parabolic Concentrator (CPC)” ), but with
rectangular rather than radial symmetry. See that object description for detailed equations
defining the CPC.
Face
Parameter # Description Face #
Name
1 The x direction semi-aperture at z = 0. Side Faces 0
The maximum x-direction acceptance angle in
2 Side Faces 0
degrees.
3 The y direction semi-aperture at z = 0. Side Faces 0
The maximum y-direction acceptance angle in
4 Side Faces 0
degrees.
5 The length along the local Z axis. Side Faces 0
6 The “Is Volume?” flag. Side Faces 0
7 The volume index of refraction. Side Faces 0
The acceptance angles must be between 0.0 and 89.0 degrees, inclusive.
Face Numbers: Front face Face 1, rear face Face 2, outer faces Face 0.
Cone
The line segment defined by the points is rotated about the z axis to form a section of a cone.
This object can be used to make an annular or circular shape (if the two z coordinates are
identical) or a cylindrical shape (if the two r coordinates are identical). In this sense the cone is
The reference coordinate is locally (0, 0, 0), and the points that define the cone may be placed
anywhere relative to the referencepoint. Face Numbers: All faces Face 0.
Cylinder Pipe
This object is normally used to define a reflective light pipe. The reference coordinate is the
center of the front aperture Face Numbers: All faces Face 0
Cylinder Volume
This object is very similar to the cylinder pipe, except the front and rear faces are included to
make the shape a closed volume. Because the object is a closed volume, it may be reflective,
refractive, or absorbing.
The reference coordinate is the center of the front aperture. Face Numbers: Front face Face 1,
back face Face 2, all other faces Face 0.
Cylinder 2 Pipe
The reference coordinate is the center of the front face. Face Numbers: All faces Face 0.
Cylinder 2 Volume
This object is very similar to the cylinder 2 pipe, except the front and rear faces are included to
make the shape a closed volume. Because the object is a closed volume, it may be reflective,
refractive, or absorbing. The reference coordinate is the center of the front aperture. Face
Numbers: Front face Face 1, back face Face 2, all other faces Face 0.
The diffraction grating is a Standard Lens with a diffraction grating on one face. For a
rectangular diffraction grating, see “Lenslet Array 1” .
Parameters 1-9 are the same as for the “Standard Lens” object:
where t0 is defined by parameter 10 and the other coefficients are defined by parameters 13-
16.
The grating is assumed to consist of lines parallel to the local x axis. The grating frequency is
the lines per micrometer along the y direction; projected down on to the surface.
Face Numbers: Front face Face 1, back face Face 2, all other faces Face 0.
Note that both reflected and transmitted electric fields must remain orthogonal to the
respective ray vectors, and so for some combinations of incident angle, polarization state, and
coefficient values, energy in the transmitted and/or reflected rays may not be conserved. If the
transmitted or reflected energy is greater than the incident energy, OpticStudio will scale the
energy to the incident intensity. In rare cases the sum of the transmitted and reflected energy
may not obey energy conservation. The 6 parameters used to define this object are:
The ellipse resides entirely within the local XY plane. This object is a special case of the more
general annulus. The reference coordinate is the center of the ellipse.
An elliptical volume is a tapered volume or surface with an elliptical cross section defined by
these parameters:
The reference coordinate is the center of the front face. Face Numbers: Front face Face 1, back
face Face 2,all other faces Face 0.
which is exactly the same sag formula as for the Even Asphere surface.
The reference point is the center of the front face of the lens.
*Face Numbers:
Face 0 = all other faces (lens edges, and regions between the clear aperture and the edge
aperture)
The Extended Odd asphere surface shape is defined by the following equation:
where N is the number of polynomial coefficients in the series and αi is the coefficient on the
ith extended polynomial term. The normalized radial coordinate ρ is used so that the
The Extended Odd Asphere Lens object is composed of two of these faces, separated by a
thickness. The object shape is defined by the following parameters:
Face Numbers: Front face Face 1, back face Face 2, all other faces Face 0.
where N is the number of polynomial coefficients in the series, and Ai is the coefficient on the
ith extended polynomial term. The polynomials are a power series in x and y. The first term is x,
then y, then x*x, x*y, y*y, etc. There are 2 terms of order 1, 3 terms of order 2, 4 terms of order
3, etc. The maximum order is 20, which makes a maximum of 230 polynomial aspheric
coefficients. The position values x and y are divided by a normalization radius so the
polynomial coefficients are dimensionless.
The Extended Polynomial sequential surface is converted to the Extended Polynomial Lens
object using the Convert to NSC Group tool if the following conditions are met:
l The Extended Polynomial sequential surface must have the Material as MIRROR with a
thickness specified.
l The aperture must be circular, elliptical, rectangular, or a user-defined aperture (UDA).
The reference coordinate is the center of the front face. Face Numbers: Front face Face 1, back
face Face 2, all other faces Face 0.
The reference coordinate is the center of the surface. Face Numbers: All faces Face 0.
Extruded
An Extruded object is a User Defined Aperture extruded to form a solid volume. Any User
Defined Aperture file may be used to create the Extruded object. For information on User
Defined Apertures see “User defined apertures and obscurations” .
The extrusion is along the Z axis, and the front and rear faces of the object may be
independently and anamorphically scaled. The rear face may also be decentered relative to the
front face.
The reference coordinate is the origin of the front face. Face Numbers: Front face Face 1, back
face Face 2, all other faces Face 0.
Faceted Surface
Freeform Z
A Freeform Z object is formed by drawing a cubic spline curve through a series of points in the
YZ plane, and then sweeping this curve around the Z axis to form either a solid volume or shell.
The Freeform Z object is defined by two parameters and a user selectable number of defining
points:
The Z coordinate of the first point must be zero. No Z value may be less than or equal to the Z
value of the preceding point. The absolute value of the Y values is always taken when creating
the spline curve.
A tool is available that greatly simplifies inserting and deleting points in the spline curve; see
“Freeform Z Tools” in the Non-sequential Component Editor toolbar.
The reference point is the center of the front face of the lens. Face Numbers: Front face Face 1,
back face Face 2, all other faces Face 0.
Fresnel 1
The substrate shape is a flat disk (if radial) or a rectangle (if cylindrical). One face of the
substrate consists of radial or rectangular faces defining the profile of the Fresnel that yields
optical power. The profile is constructed of radially flat faces (or a series of flat faces if
subsegments are used) whose endpoints are defined by a sag expression identical to the Even
Asphere surface:
However, to make a Fresnel lens, each face is offset just enough along the z axis so all faces
start at the same z coordinate as the center vertex point. This yields a lens that is “collapsed”
into a relatively small volume. The Fresnel faces are automatically generated by OpticStudio
using these 16 parameters:
The reference coordinate is the center vertex of the side of the lens with the Fresnel faces. If
the radius or aspheric terms yield negative sag values, then it is important to offset the
position of the Fresnel such that the entire solid resides inside the non-sequential group. If the
entry port is placed inside the lens; incorrect ray tracing will result.
Note that when the depth parameter is used to generate each groove, the final pitch back to
the reference plane happens after the end of the groove such that the desired depth is always
reached. When the frequency parameter is used instead, the pitch starts at the required point
in the groove such that the total groove width matches the desired frequency. Additionally, the
pitch is not used on the outermost groove. In other words, there will never be an “inactive”
face at the outer edge of the Fresnel lens.
Face Numbers: Front face Face 1, back face Face 2, all other faces Face 0.
Fresnel 2
The substrate shape is either a flat disk or a rectangle. The front face of the substrate consists
of a radial or cylindrical Fresnel lens. The radial profile is defined by a sag expression identical
to the Even Asphere surface:
If the Fresnel surface is cylindrical, then the profile is described by an identical expression in the
y coordinate alone:
The reference coordinate is the center vertex of the side of the lens with the Fresnel faces. Face
Numbers: Front face Face 1, back face Face 2, all other faces Face 0.
If the x and y half widths are zero, the lens shape is rectangular and the size is defined by the
data in the GRD file. If the x half width is zero, and the absolute value of the y-half width is not
zero but is less than the size of the data in the GRD file, then the part is square (if the y half
width is greater than zero) or circular (if the y half width is less than zero). If both the x half
width and the y half width are not zero, and the absolute values of both half widths are less
than the size of the data in the GRD file, then the part is rectangular (if both half widths are
positive) or elliptical (if either half width is negative).
The actual point by point sag data is defined by placing the data in a properly formatted file
ending in the extension GRD. The file format is defined in “Importing grid data” . The grid data
file must be placed in the folder <objects>\Grid Files (see “Folders” ). The file name, without
the path, is then placed in the comment column of the NSC Editor.
The reference coordinate is the center of the front face. Face Numbers: Side faces Face 0, front
face Face 1, back face Face 2.
If the x and y half widths are zero, the lens shape is rectangular and the size is defined by the
data in the GRD file. If the x half width is zero, and the absolute value of the y-half width is not
zero but is less than the size of the data in the GRD file, then the part is square (if the y half
width is greater than zero) or circular (if the y half width is less than zero). If both the x half
width and the y half width are not zero, and the absolute values of both half widths are less
than the size of the data in the GRD file, then the part is rectangular (if both half widths are
positive) or elliptical (if either half width is negative).
The actual point by point sag data is defined by placing the data in a properly formatted files
ending in the extension GRD. The file format is defined in the “Importing grid data” section of
the “Grid Sag” sequential surface section of the Help Files. The grid data files must be placed in
the folder <objects>\Grid Files. The file names, without the path, are specified via combo
boxes on the NSC Object Properties dialog box.
The reference coordinate is the center of the front face. Face Numbers: Side faces Face 0, front
face Face 1, back face Face 2.
In constructing Grid Sag Lens 2 objects, some care should be taken to avoid creating
geometries where the front and back surfaces overlap. Because of the complex combination of
the thickness parameter, the front/rear substrate geometries, and the front/rear sag grids,
OpticStudio may not generate a warning message for some invalid geometries. In these cases,
errors may only be detected during a ray trace.
The actual point by point sag data is defined by placing the data in a properly formatted file
ending in the extension GRD. The file format is defined in “Importing grid data” . The grid data
file must be placed in the <objects>\Grid Files folder (see “Folders” ). The file name, without
the path, is then placed in the comment column of the NSC Editor.
The hexagonal lenslet array object models a rectangular volume with a front face consisting of
a hexagonal array of even aspheric lenslets. To make the part rectangular, partial hexagonal
The reference coordinate is the center of the front face. Face Numbers: Side faces Face 0, front
face Face 1, back face Face 2.
Hologram Lens
This object can also be used as a volume hologram by setting the Volume Hologram?
parameter to 1. This does not affect the deviation of rays but it is used in the calculation of
efficiency. Similarly, the Hologram Thickness parameter of the object does not effect the
geometric shape of the object, only the efficiency.
For the efficiency of the volume hologram to be calculated, Use Polarization must be selected
in the Ray Trace Control. If Split NSC Rays is selected, the Diff Order parameter is ignored and
efficiency is calculated from both the 0 and 1st order.
The Hologram object is defined using the following parameters (Parameters 20-27 are only
available when Parameter 19 = 1):
Because the object is a closed volume, it may be air, reflective, refractive, or absorbing. If the
order is zero or if the ray totally internally reflects at the hologram boundary, no hologram
diffraction is computed.
For important information on diffractive objects, see Diffraction from NSC objects.
The reference coordinate is the center of the front face. Face Numbers: Front face Face 1, back
face Face 2, all other faces Face 0.
Hologram Surface
This object can also be used as a volume hologram by setting the Volume Hologram?
parameter to 1. This does not affect the deviation of rays but it is used in the calculation of
efficiency. Similarly, the Hologram Thickness parameter of the object does not effect the
geometric shape of the object, only the efficiency. For a full description of non-sequential
volume hologram objects, see Hologram Lens.
The following parameters are used to define the hologram surface (Par 18-25 are only
available when Par 17 = 1):
Face Numbers: All faces Face 0. This object supports User Defined Apertures.
The Jones Matrix is a plane elliptical surface whose shape is defined by 2 parameters, and
polarization transmission/reflection properties by 8 “ABCD” parameters:
The Jones Matrix may be used to model neutral density filters, polarizers, and rotators. For a
description of the Jones Matrix parameters, see “Defining polarizing components” .
The reference coordinate is the center of the ellipse. Face Numbers: All faces Face 0. This object
supports user defined apertures, see “User defined apertures” .
Lenslet Array 1
The array aspects of this object are provided for back compatibility with older versions of
OpticStudio. A more efficient method that ray-traces more quickly is to make a single lenslet
and then create an array using the Array Object - see “Array” for details.
A Lenslet Array 1 object consists of an array of rectangular volumes, each with a flat front face
and a curved back face. The back face may be plane, sphere, conic, or polynomial asphere; or a
spherical, conic, or polynomial aspheric toroid. The shape may be decentered with respect to
the center of the lenslet. A toroidal surface is defined by a curve in the YZ plane which is then
If the back face is rotationally symmetric, the radial profile is defined by a sag expression
identical to the Even Asphere surface:
If the back face is a toric, then the profile is described by an identical expression in the y
coordinate alone:
Either the front or the back surface may be a diffraction grating. The grating is assumed to
consist of equally spaced lines parallel to the local x axis. The grating frequency is the lines per
micrometer along the y direction; projected down on to the surface.
Note a cylinder lens results if the radius of rotation is set to zero. The reference coordinate is
the center of the front face. Face Numbers: Outside edge side faces are Face 0, flat front face
Face 1, curved back face Face 2, inside side faces Face 3 (these are the side faces formed in the
interior of an array of lenslets when decentered lens faces meet).
Lenslet Array 2
A Lenslet Array 2 object consists of an array of rectangular volumes, each with curved front and
back faces. The faces may be plane, sphere, or conic asphere.
The reference coordinate is the center of the front face. Face Numbers: Front face Face 1, back
face Face 2, all other faces Face 0.
Elements in the MEMS object are numbered starting in the bottom left corner (in the (-X, -Y)
quadrant of the local coordinate system of the MEMS object) with pixel # 1. Pixels increment
first in the +X direction along the columns, and then in the +Y direction along the rows.
Each element in the MEMS device can be set to Angle 0, Angle 1, or Angle 2. The element,
then, can be in state 0, 1, or 2.
The state of each element is set in the parameter columns. Parameter 10 controls elements 1 -
15. Parameter 11 controls elements 16 - 30, etc.
After the number of elements and the P-Flag values have been specified, the headings of the
parameter columns will change. Parameter 10 will be labeled “Pixels 1-15.” Parameter 11 will
be labeled “Pixels 16-30,” etc., until the total number of elements in the MEMS device is
reached.
A single number is entered into each parameter column that specifies the state of each
element.
To generate the number used to control the states of the elements, list the desired state for
each element (0, 1, or 2). Then, treat that list as a number in base 3. Convert the number to
base 10, and enter that value in the appropriate parameter column. In equation form:
For example, suppose that a MEMS device has 1 x 5 pixels. The P-Flag is set to 2, so that the
individual pixels are addressed. Angle 0 = 0°, Angle 1 = 5°, and Angle 2 = -5°, corresponding
to states 0, 1, and 2.
The pixels are numbered starting from the -Y pixel, in this case. So the pixel numbers, from top
to bottom, are:
( 5, 4, 3, 2, 1 )
Suppose we want the “top” pixels (in the +Y direction) to have tilts of +5°, and the “bottom”
pixels (in the –Y direction) to have tilts of -5°. Then the tilt values are:
( +5°, +5°, 0°, -5°, -5° ) The state of the pixels will be: ( 1, 1, 0, 2, 2 )
= 11610
And enter the value 116 in the parameter 10 column (labeled “Pixels 1-15”).
The pixels, starting from the +Y pixel and moving down, will then take on the angles
Because of the way OpticStudio addresses the elements, the total number of addressable
elements cannot exceed approximately 3750. If P-Flag = 0, the MEMS device is limited to 3750
Null Object
This is a non-existent object. It can be used as a place holder or a reference point for other
objects. The reference coordinate is locally (0, 0, 0).
The reference coordinate is the center of the front face. Face Numbers: Front face Face 1, back
face Face 2, all other faces Face 0.
Off-axis Mirror
The Off-axis Mirror is a mirror with an off-axis rectangular or elliptical aperture. The front
surface of the object is an off-axis conic surface equivalent to the Off-Axis Conic Freeform
sequential surface. The rear surface is conic with the same offset as the front surface.
The Off-axis offset parameter defines the distance Y0. This is the distance from the vertex of
the parent shape, with axes y and z, to the vertex of the off-axis object, with axes y' and z'. The
distance Y0is measured along the y axis.
Freeform terms are added to the shape of the front surface in the same way as for the Off-Axis
Conic Freeform surface. See Off-Axis Conic Freeform for more information on freeform terms
and their calculation.
The Off-Axis Conic Freeform sequential surface is converted to the Off-axis Mirror object using
the Convert to NSC Group tool if the following conditions are met:
l The Off-Axis Conic Freeform sequential surface must have the Material as MIRROR with
a thickness specified.
l The aperture must be circular, elliptical, rectangular, or a user-defined aperture (UDA).
The following parameters are used to define the Off-axis Mirror object:
The reference coordinate is the center of the front surface. Face Numbers: Side faces Face 0,
Front face Face 1, Back face Face 2
The Paraxial Lens is an ideal thin lens surface with separate X and Y focal lengths. The defining
parameters are:
This object may be placed in air, or be fully or partially immersed within a homogeneous or
gradient index medium. No adjustment of the optical path length or phase of the ray is made
during refraction, so no attempt at estimating the correct phase of the ray is made. No attempt
is made to compute the polarization effects of refraction through this idealized part. If
polarization effects are important, this object should be used with caution, especially if the ray
angles on either side of the lens are large with respect to the normal.
Polygon Object
There are no fixed limits to the total number of vertices or polygons. The POB file name is
referenced in the “comments” column of the Polygon Object row. For example, if the POB file
myobject.POB is placed in the <objects>\Polygon Objects folder (see “Folders” ), then specify
“myobject.POB” in the comment column of the Polygon Object type row in the NSC Editor.
Polygon objects require two parameters:
See “Special considerations for faceted objects” for information on limitations of ray tracing
through faceted objects. A tool for creating POB files for use as detectors is described in
“Create Polygon Object” .
The reference coordinate is locally (0, 0, 0), and the polygons that compose the object may be
placed anywhere relative to the reference point. Face Numbers: Each face has a face number as
defined in the POB file, see below for details.
Polygon objects are user-defined objects that are composed of a collection of triangles in 3D
space. The triangles are defined in a text file ending in the extension POB (for polygon object).
Each face, or a group of faces, on the polygon may be assigned a unique face number if
desired. There is a limit to the total number of unique faces on any single object; for details see
“Object faces” .
Polygon objects that form closed volumes must not contain any interior faces. Every face must
lie on the exterior of the object, defining the boundary between the inside and the outside of
the volume. To make an object that has a cemented boundary, such as a beam splitter, use two
or more separate polygon objects and then place them in contact. For more information on
placing objects in contact, see “Placing objects inside of, adjacent to, or overlapping other
objects” .
The file format may be created and edited with any text editor. The file consists of a series of
rows of data. Each row begins with a single letter or symbol, followed by data for that symbol.
The supported symbols and their meanings are defined as follows.
Syntax:
Example:
! A dove prism
Syntax:
Example:
C 0 “All faces”
The face names are used to display in the object dialog box the names for the various faces of
an object. Note the name must be in quotes. This command is optional.
Lines which connect vertices that are not to be drawn (such as lines between two adjacent
triangles that lie in the same plane) can be marked as invisible. To mark two vertices as
invisible, use the symbol “I” followed by the two vertex numbers. Any line connecting the
marked vertices will not be drawn.
This only affects the 3D Layout plot, and is strictly a cosmetic enhancement to the drawing of
polygon objects.
Syntax:
I v1 v2
Example:
I79
Note the vertex numbers must be integers. The numbers are separated by spaces. The I
command must precede any triangles or rectangles that reference the invisible vertices.
Vertices are defined by the symbol “V” followed by the vertex number and the x, y, and z
coordinates of the vertex.
Syntax:
V number x y z
Example:
Note the vertex number must be an integer, and the x, y, and z coordinates are floating point
numbers. The numbers are separated by spaces.
Syntax:
The vertex numbers must be integer vertices previously defined in the file. The “isreflective”
flag is -1 if the surface absorbs, 1 if the surface reflects, or 0 if the surface refracts. Using this
flag allows some triangles to be reflective, and others to be refractive or absorptive, within the
same Polygon Object or face. However, the isreflective flag is not considered in the object
produced by Boolean operations with the Polygon Object.
The value for face defines which face the triangle belongs to. If the face number is omitted;
face 0 is assumed.
Example:
T12302
This would define a refractive triangle connecting vertices 1, 2, and 3, belonging to face 2.
Rectangles are defined by the connection of 4 vertices, otherwise, they are very similar to
triangles. Internally, OpticStudio converts rectangles into 2 triangles.
Syntax:
The vertex numbers must be integer vertices previously defined in the file. The order of the
vertices is not arbitrary, they must be listed in a continuously clockwise or counter clockwise
order, not a “bow tie” order. Not all four vertex polygons form a closed rectangle; for more
complex shapes use multiple triangle commands instead. The “isreflective” flag is -1 if the
surface absorbs, 1 if the surface reflects, or 0 if the surface refracts. Using this flag allows some
rectangles to be reflective, and others to be refractive or absorptive, within the same Polygon
Object or face. However, the isreflective flag is not considered in the object produced by
Boolean operations with the Polygon Object.
The value for face defines which face the rectangle belongs to. If the face number is omitted;
face 0 is assumed.
Example:
R123410
This would define a reflective rectangle connecting vertices 1, 2, 3, and 4, belonging to face 0.
There is no fixed upper limit on the number of triangles a polygon object may contain. The
ultimate limit is determined by the amount of real or virtual RAM the computer has available.
Each triangle takes up about 100 bytes of memory. However, OpticStudio often maintains
multiple copies of the lens data simultaneously, and so a good rule of thumb is that
OpticStudio will need 500 bytes of RAM for each triangle. A 2000 triangle object will require
about 1 Mb of free RAM. A more practical limit is computer speed; OpticStudio will slow down
noticeably if the number of triangles becomes very large.
Here is the complete text of a POB file defining a cube of refractive material. The file is included
as the example
! A cube
! front face vertices
V 1 -1 -1 0
V 2 1 -1 0
V 3 1 1 0
V 4 -1 1 0
! back face vertices
V 5 -1 -1 2
V 6 1 -1 2
V 7 1 1 2
V 8 -1 1 2
! Front
R 1 2 3 4 0 0
! Back
R 5 6 7 8 0 0
! Top
R 4 3 7 8 0 0
! Bottom
R 1 2 6 5 0 0
! Left side
R 1 4 8 5 0 0
! Right side
R 2 3 7 6 0 0
The 8 “V” commands define the vertex coordinates of the 8 corners of the cube. The 6 “R”
commands define each of the 6 faces of the cube. Note the width of the faces is 2 units, and
the z coordinates of the back face vertices is defined to be 2 units; so the shape is a perfect
cube. All the coordinates are relative to the object reference point; which in this case will be the
V 1 -1 -1 -1
V 2 1 -1 -1
V 3 1 1 -1
V 4 -1 1 -1
V 5 -1 -1 1
V 6 1 -1 1
V7111
V 8 -1 1 1
For more examples see the POB files provided with OpticStudio in the <objects>\Polygon
Objects folder (see “Folders”).
The #Terms and Surface Type parameters cannot be set as variables for Optimization. If either
of these parameters are set as Variable they will be changed to Fixed when the local
optimization tool (Optimize!) is opened.
The following parameters are used to define the Q-type Asphere Surface:
The reference coordinate is the center of the surface. Face Numbers: All faces Face 0
Ray Rotator
The Ray Rotator is an imaginary device that rotates all incident rays. The object is a plane
surface with either an elliptical or a rectangular shape. At the point a ray intersects the rotator,
a "ray" coordinate system is created. The X, Y, and Z directions of this ray coordinate system
The incident ray direction cosines are then rotated around the Z axis of the ray coordinate
system. The rotation direction uses the right hand rule. This Z rotation also rotates the ray
coordinate Y axis by the same angle. The rays are then rotated around the new ray coordinate
Y axis resulting from the first Z direction rotation. If the rays are polarized, the polarization
vector is also rotated. Note the ray’s position is never modified; only the ray direction cosines.
The rotator object will not refract, absorb, attenuate, alter optical path or phase, or otherwise
modify any property of the ray other than its direction and the direction of any associated
electric field data. If the material is set to MIRROR, this object will reflect rays, and the rotation
is applied after the reflection. Because the phase and optical path length are not modified,
wavefront phase is not preserved by this object and thus only incoherent computations may
be meaningful on the beam subsequent to the ray rotation.
Rectangular Corner
Rectangular corners are composed of 3 squares which meet at 90 degrees. The squares are
aligned in the positive XY, XZ, and YZ planes. Each square is of dimension X by X.
The reference point is the point where all 3 squares touch. Face Numbers: All faces Face 0.
Rectangle
Rectangles are flat and reside entirely within the local XY plane and are placed at the local Z =
0 coordinate.
The reference point is the center of the rectangle. Face Numbers: All faces Face 0.
Rectangular Pipe
Rectangular pipes are 4 sided boxes. The front and rear faces are open. This object is typically
used as a rectangular light pipe. The reference point is the center of the front open face. Face
Numbers: All faces Face 0.
Also, see “Comment about tilted faces” in the Rectangular Volume object.
The grating consists of equally spaced lines perpendicular to the local z axis, lying on each of
the four faces. The grating frequency is the lines per micrometer along the z direction;
projected down on to either the XZ or YZ plane. Note the grating exists on all four sides of the
pipe. The reference point is the center of the front open face.
For important information on diffractive objects, see “Diffraction from NSC objects”. Face
Numbers: All faces Face 0.
Rectangular Roof
The reference point is the midpoint of the line joining the two rectangles. Face Numbers: All
faces Face 0.
0 ≤ θ1 ≤ θ2 ≤ 360
There is also the restriction that Rout > Rin > 0 and Ty > 0. The reference coordinate is the
center of the axis of rotation. Face Numbers: All faces Face 0.
Face Numbers: Start angle end cap Face 1, stop angle end cap Face 2, all other faces Face 0.
Rectangular Volume
Rectangular volumes are usually 6 sided solids. However, shapes such as pyramids and wedges
may be created by setting one or more of the parameters to zero.
where θx and θy are tilt angles X and Y, n is the normal vector of the front or rear face, x, y, z are
the unit vectors of local XYZ axes of the Rectangular Volume object.
In OpticStudio, the parameters 6 and 8, Front X Angle and Rear X angle, respectively tilt the
surface about the Y axis resulting in an angle between the X axis and the surface. The
parameters 7 and 9, Front Y Angle and Rear Y angle, respectively tilt the surface about the X
axis resulting in an angle between the Y axis and the surface. The pivot point for the tilts is at
the surface vertex, as depicted in the scheme below.
The grating consists of equally spaced lines perpendicular to the local z axis, lying on each of
the four faces. The grating frequency is the lines per micrometer along the z direction;
projected down on to either the XZ or YZ plane. Note the grating exists on all four sides of the
volume. The reference point is the center of the front face.
For important information on diffractive objects, see “Diffraction from NSC objects”. Face
Numbers: Front face Face 1, back face Face 2, all other faces Face 0.
Slides are color RGB transparencies defined by either a BMP, JPG, or PNG format graphics file.
This object can be used to model radiant scenes by placing a source behind the slide. For
example, to make a Lambertian radiant scene, place a collimated rectangular source (see
“Source Rectangle” ) behind the slide, then set the slide to have a Lambertian scattering
property (see “Scattering” ).
The transmission of the slide uses the same algorithm as described in “Slide”. Face Numbers:
All faces Face 0.
When imaging a Slide Object onto a Detector, care must be taken to sample the graphic file
adequately. According to the Sampling theorem, at least 2 Detector pixels must compose 1
graphic file pixel.
Limitation:
There are no limits in the code on the image size. However, be aware that a large image may
cause issues namely in terms of memory allocation (for example during optimization, multiple
copies of the system are done and that will require a large amount of free memory). The slide
image can be seen in the Shaded Model but the number of pixels displayed are limited and
large slide images may not draw correctly.
This object can be used to model bubbles by placing a sphere within a glass volume and
setting the material type to blank (air) or the name of a defined glass which describes a gas.
Standard Lens
The standard lens is a lens composed of standard OpticStudio surfaces. Standard surfaces may
be planes, spheres, conic aspheres, or hyperhemispheres. The standard lens is composed of 5
separate sections:
The reference point is the center of the front face of the lens. Face Numbers: Front face Face 1,
back face Face 2, all other faces Face 0.
Standard Surface
If the radius is negative, then the surface is concave towards the negative z axis. If the radius is
positive, the surface is concave towards the positive z axis.
If the clear semi-diameter is negative, then the surface will become hyper-hemispheric, with
the radial aperture of the open end equal to the absolute value of the clear semi-diameter.
The reference point is the center of the surface. Face Numbers: All faces Face 0. This object
supports user defined apertures, see “User defined apertures” .
For a similar surface shape with more complex aperture shapes supported, see “Aspheric
Surface 2” .
Swept Object
A swept object uses nine parameters to define two vectors and one center point. A schematic
diagram for graphically explaining the geometry is shown below.
The TOB file format is two columns of data separated by either one or more spaces or one or
more tab char- acters. A sample TOB file might look like this:
1.5 3.5
2.2 4.5
3.0 5.5
3.0 6.0
0.0 6.0
The first number of each pair is the local Y coordinate. This value must be zero or positive. The
second value is the local Z coordinate. Each pair of values after the first pair represent a “zone”.
If there are 6 pairs of numbers, then there are 5 zones to the object. There is a maximum of 246
zones per object. Multiple objects may be used if more zones are required. The last line must
have the syntax “0.0 n” where n is the last listed z-coordinate. In the above example, this is the
“0.0 6.0” line.
The number of facets generated over this angular range can be specified independently for
each zone; so there may be 40 facets in the first zone, 80 in the second, 50 in the third, etc. If
the number of facets changes from zone to zone, small gaps in the part may form and these
gaps will generate geometry errors. If the gaps are small, the rays which trigger these errors
may be ignored; see “The Ray Trace Control” for more information.
If the "Is Volume" flag is set, the TOB file must define an object that will be a closed volume
upon rotation. This requires that the object be rotated fully around 360.0 degrees. Fully closed
volumes defined by TOB files may be used to model faceted approximations to true Fresnel
lenses.
A tabulated object is based upon coordinates defined in a file. The file must reside in the
<objects>\Tabulated Objects folder (see “Folders” ) and end in the extension TOB. The
coordinates represent the starting and ending points of facets. A figure of rotation is
generated by replicating a specified number of facets over some angular range. The axis of
rotation is an axis parallel to the local Y axis offset by a specified radius. If the radius is set to
zero, then a surface with cylindrical symmetry is generated instead of a torus.
The TOB file format is two columns of data separated by either one or more spaces or one or
more tab characters. A sample TOB file might look like this:
1.5 3.5
2.2 4.5
The first number of each pair is the local Y coordinate. This value may be negative, zero, or
positive. The second value is the local Z coordinate. Each pair of values after the first pair
represent a “zone”. If there are 6 pairs of numbers, then there are 5 zones to the object. There
is a maximum of 246 zones per object. Multiple objects may be used if more zones are
required.
OpticStudio will generate facets which approximate a smooth surface for each zone. The facets
can cover any fraction of a full circle, defined by a start and stop angle. To make a full figure of
revolution, the start angle should be set to -180.0 degrees, and the stop angle to 180.0
degrees. Both angles must have an absolute value less than or equal to 180.0 degrees.
The number of facets generated over this angular range can be specified independently for
each zone; so there may be 40 facets in the first zone, 80 in the second, 50 in the third, etc.
See “Tabulated Faceted Radial” for a description of this type of object and the tabulated object
file format. Face Numbers: All faces Face 0.
The hologram on the front face is defined in a manner similar to the Hologram 1 and
Hologram 2 sequential surfaces.
This object can also be used as a volume hologram by setting the Volume Hologram?
parameter to 1. This does not affect the deviation of rays but it is used in the calculation of
efficiency. Similarly, the Hologram Thickness parameter of the object does not effect the
geometric shape of the object, only the efficiency. For a full description of non-sequential
volume hologram objects, see Hologram Lens.
To make any of the 4 radii flat; use a value of zero. Note a cylinder lens results if the radius of
rotation is set to zero. If the order is zero or if the ray totally internally reflects at the hologram
boundary, no hologram diffraction is computed.
For important information on diffractive objects, see Diffraction from NSC objects.
The reference coordinate is the center of the front face. Face Numbers: Front face Face 1, back
face Face 2, all other faces Face 0.
Toroidal Lens
To make either the radius of rotation or radius of curvature flat; use a value of zero. Note a
cylindrical surface results if the radius of rotation is set to zero.
The reference coordinate is the center of the front face. Face Numbers: Face Numbers: Front
face Face 1, back face Face 2, Side faces Face 0.
A toroidal surface consists of a rectangular surface with a possibly aspheric toroidal shape. A
toroidal surface is defined by a curve in the YZ plane which is then rotated about an axis
parallel to the Y axis but displaced by a distance R; the radius of rotation. The curve in the YZ
plane is defined by:
To make either the radius of rotation or radius of curvature flat; use a value of zero. Note a
cylindrical surface results if the radius of rotation is set to zero.
The reference coordinate is the center of the front face. Face Numbers: All faces Face 0.
A toroidal odd asphere surface consist of a rectangular surface with a possibly aspheric
toroidal shape. This is similar to a toroidal surface but includes odd asphere terms and only
includes terms up to y8. The surface is defined by a curve in the YZ plane which is then rotated
about an axis parallel to the Y axis but displaced by a distance R; the radius of rotation. The
curve in the YZ plane for this surface is defined by:
To make either the radius of rotation or radius of curvature flat; use a value of zero. Note a
cylindrical surface results if the radius of rotation is set to zero.
The reference coordinate is the center of the front face. Face Numbers: All faces Face 0.
A torus is a circle rotated about a displaced axis. The rotation about the displaced axis may be
over a full 360 degrees; or just some subset of that angular range. This object can be used to
model optical fibers or curved light pipes. See also the discussion of the Torus Volume for
modeling refractive solid torus shapes.
0 ≤ θ1 ≤ θ2 ≤ 360
There is also the restriction that R > r; otherwise, a closed volume or a smooth surface will not
result. The reference coordinate is the center of the axis of rotation. Face Numbers: All faces
Face 0.
Torus Volume
This object is essentially identical to the Torus Surface, except the ends of the torus are closed
to make a solid volume. This allows the object to made of a refractive material. See the
description of the Torus Surface for details. Face Numbers: Start angle end cap Face 1, stop
angle end cap Face 2, all other faces Face 0.
Triangular Corner
Triangular corners are defined by 3 triangles which meet at 90 degrees. The triangles are
aligned in the positive XY, XZ, and YZ planes. Each surface is a 45-45-90 triangle, where the two
short sides are of a length specified by parameter 1.
The reference point is the point where all 3 triangles touch. Face Numbers: All faces Face 0.
Triangle
The reference point is the (0, 0, 0) coordinate, which may not be part of the triangle at all;
depending upon the values give for the vertex points. Face Numbers: All faces Face 0.
The method of creating a user defined object described in this section involves the use of an
external, user supplied program called a Dynamic Link Library or DLL. The advantages to
defining an object using a DLL, rather than the other methods listed above, are:
l DLL defined objects generally ray trace much faster, and with much higher numerical
precision, than objects imported from CAD programs.
l Any number of complex curved shapes may be combined in a single object, unlike the
polygon object which only has flat faces.
l Objects may have a mixture of reflective and refractive curved faces, with user definable
face names.
l The DLL description is inherently parametric, which means the object is dynamically
regenerated when any defining property is modified. This allows interactive design,
modification, and even optimization.
l User defined coating data, including detailed control over the complex amplitude
reflection and transmission coefficients is supported. Coating data may be ray position,
cosine, or object coordinate dependent.
The entire definition for the object is contained within the DLL. The DLL computes the
following data:
l The computation of basic data about the object, such as whether it is a solid volume or
a hollow shell, and the names of all the used parameters.
l The determination of a list of triangles which approximate the shape of the object.
These triangles are used to render the object as well as provide a "close first guess" for
ray tracing purposes.
l The exact computation of the ray-surface intercept. Most of this code is actually inside
OpticStudio; the DLL only needs to find the exact ray-surface intercept point given a
very close guess. OpticStudio handles all the logic for non-sequential tracing, nesting,
refraction, reflection, diffraction, optical path, scattering, etc.
l The user defined coating data used by the object, if any. The DLL or OpticStudio can
compute coating data.
l The starting "safe" data to use for the various free parameters when the object is first
created.
l UserObjectDefinition
l UserParamNames
The UserObjectDefinition function is called to create a list of triangles which approximate the
shape of the object. OpticStudio traces rays non-sequentially to the triangles to determine
close intercepts, if any. Once a potential close intercept is found, the UserObjectDefinition
function is called again to determine the exact intercept. This is implemented using an iterative
routine provided in any of the sample object DLL source files. A single object may contain
multiple complex curved faces, each with its own defining function and iteration routines.
The best way to learn the use of Object DLLs is to study an existing DLL and modify it as
needed. The sample DLLs provided with OpticStudio include extensive documentation and
comments on the data formats and DLL functions; see any of the sample object code files for
examples.
If you require a User Defined Object DLL, but do not wish to write the DLL yourself, contact
OpticStudio Technical Support.
The following sample object DLLs and source code are included with OpticStudio.
EllipticalVolume An elliptical solid volume, with user definable dimensions in x, y, and z. This
DLL demonstrates the creation of a list of triangles to approximate the object shape, naming
object faces, and exact ray-surface iteration to arbitrary surface description functions.
DiffractionGrating A rectangular volume with a simple linear grating on the front face, with
user definable dimensions in x, y and length. This DLL shows how to define a diffractive object.
Any ray traced to the front face will call the associated diffraction DLL defined under Object
Properties > Diffraction (see for example "diff_samp_1.DLL").
Wolter Surface
The Wolter Surface is a radial symmetric shell object defined by the following parameters:
Parameter Face
Description Face #
# Name
1 The length along the Z axis. All Faces 0
2 The radial aperture at z = 0, R0. All Faces 0
A Wolter Surface is commonly used in X-Ray telescope optics. The surface is a hollow shell and
may be nested within other shells. The shell has a radius that is a function of the z coordinate
given by the following expression:
Zernike Surface
where c is the curvature of the surface, k is the conic constant, the α terms are aspheric
coefficients, N is the number of Zernike coefficients in the series, Ai is the coefficient on the i
Zernike Standard polynomial, r is the radial coordinate in lens units, ρ is the (optionally
decentered) normalized radial coordinate, and ϕ is the (optionally decentered) angular
coordinate. The Zernike Standard polynomials are defined in the table given in “Zernike
Standard Coefficients”. The surface supports specification of both a minimum and a maximum
radial aperture; so annular surfaces may be defined.
Face Numbers: All faces Face 0. This object supports user defined apertures, see “User defined
apertures”.
Non-sequential Sources
Sources include points, ellipses, rectangles, volumes, data files, and user defined types. Any
source may be placed inside of any object, or not in any object, but not both (a source may not
straddle an object boundary).
Source Dif-
A source with the far-field diffraction pattern of a defined UDA.
fractive
Source Diode An array of diodes with separate X/Y distributions
Source DLL A source defined by an external user supplied program.
Source Ellipse An elliptical surface that emits light from a virtual source point.
Source
A source defined by lamp data in an EULUMDAT format file.
EULUMDAT File
Source Fil-
A source in the shape of a helical filament.
ament
Source File A user defined source whose rays are listed in a file.
Source Gaus-
A source with a Gaussian distribution.
sian
Source IESNA
A source defined by lamp data in an IESNA format file.
File
Source Impor-
A source defined by the shape of an imported object.
ted
Source Object A source defined by the shape of another object.
A point source that radiates into a cone. The cone may be of zero width
Source Point
or be extended up to a full sphere if desired.
A radial symmetric source based upon a spline fit of arbitrary intensity vs.
Source Radial
angle data.
Source Ray A point source aligned with direction cosines.
Source Rect-
A rectangular surface that emits light from a virtual source point.
angle
Source Tube A source in the shape of a cylindrical tube.
Source Two A rectangular or elliptical surface that emits light into a cone with distinct
Angle angles in the X and Y directions.
Source Volume
A volume source in the shape of a cylinder with an elliptical cross section.
Cylinder
Source Volume
A source in the shape of an elliptical volume.
Ellipse
Source Volume
A volume source in the shape of a rectangle.
Rectangle
Parameter
Definition
#
# Layout Rays: Defines how many random rays to launch from the source
1
when creating layout plots.
# Analysis Rays: Defines how many random rays to launch from the source
2
when performing analysis.
Power (units): Power is the total power over the defined range of the source.
3 The power units are specified by the system source units. See “Source Units”
for details.
Wavenumber: The wavenumber to use when tracing random rays. Zero
4 means polychromatic; which chooses ray wavelengths randomly with the
weighting defined on the wavelength data editor.
Color #: The pen color to use when drawing rays from this source. If zero, the
5 default color will be chosen. The other parameters have source type specific
meanings as described in the follow sections.
1) The source location and size must be correctly set such that all rays initiate from inside the
object. This means the source cannot extend outside of the object in which it is placed.
2) The object in which the source is placed must be defined using the "Inside Of" data column
of the source. There are two ways to define the object in which the source is placed: either by
absolute or relative reference.
If a positive number greater than zero is specified in the Inside Of column, then the source is
inside the specified object. This is an "absolute" reference. If the "Inside Of" object number is
negative, then the source is inside of the object whose number is determined by adding the
For example, if the "Inside Of" value is -3 on source object 8, the source must be placed inside
of object 5 because 8 - 3 = 5. Relative references are particularly useful when copying and
pasting groups of sources and objects; this is easiest if all the sources and objects in the group
use relative references to the first object in the group.
If the source is placed inside of an object which is inside of a second object; then the first
object must define the second object number in the "Inside Of" data column for the first
object. If there are more levels of nested objects, each object must define the object it has
been placed inside of on the "Inside Of" data column. All of these nested definitions may be
absolute, relative, or a mixture of both.
The source must be listed after all objects that the source is placed inside of in the NSCE.
Source Diffractive
The source diffractive calculates the wavefront in an aperture using Fraunhofer diffraction
theory, this wavefront is then used to provide a set of direction cosines for the rays it
generates. The spatial distribution of ray starting coordinates is randomly assigned within the
aperture. All rays are assigned the same intensity value. The sum of these values is normalized
to the power on the source, which is defined by parameter 3. The aperture is defined by a UDA
file which is selected in the Type tab of the Object Properties window; any scaling of the
aperture is also defined here.
Parameter Definition
Fraunhofer Diffraction
For a short description on Fraunhofer diffraction theory see Fraunhofer Diffraction. For a more
detailed discussion of this source, see the Knowledgebase article The Source Diffractive object.
For important information about sampling issues see “Discussion of the FFT method and
sampling issues” .
For most objects, you can edit the pixel size by clicking Object Property > Draw > Drawing
Resolution. For a STEP/IGES/SAT CAD file, the pixel size is controlled by the Chord Tolerance
parameter in Object Properties > CAD (see "Chord Tolerance" for more information). For an
STL file, the pixels are determined by the triangles defined in the file and cannot be changed.
Source Diode
The source diode model can be used to define one diode, a 1D array of diodes, or a 2D array of
diodes.
where
l θx is measured in the XZ plane as the angle the projected ray vector makes with respect
to the z-axis. θx is an angle in degrees.
l θy is measured respectively in the YZ plane as the angle the projected ray vector makes
with respect to the z-axis. θy is an angle in degrees.
Most laser diode manufacturers specify the far field divergence angles as the full width of the
distribution between the half power points, θfwhm .
Or
For example, a diode with a θfwhm in the x direction of 10 degrees, the value for αx would be
8.493218 degrees. A similar conversion applies in the y direction.
Note that the range of angles that can be drawn from the theoretical distribution used in this
model is infinite. Since polar angles greater than 90-degrees are not meaningful, OpticStudio
will resample values until a physically plausible angle is found. This can lead to noticeable
discrepancies from an azimuthally symmetric distribution when the Gaussian parameters
specifying the angle width become large.
Spatial Distribution
If the astigmatism term is zero, the rays may emanate from a point, or from a line, or from a
rectangular region.
where
The spatial distribution terms are all ignored if the astigmatism term is not zero.
If an astigmatism term is defined, the spatial distribution terms are all ignored. This value must
be positive, and represents the distance along the local Z axis from which the XZ distribution is
measured. At the local XY plane at Z = 0, the resulting ray pattern is a line oriented along the
local X axis.
If more than 1 diode is desired, the number x, number y, delta x, and delta y spacings may be
defined. The diodes will be symmetrically placed in the x and y directions about the local
coordinate origin.
Parameter
Definition
#
1-5 See “Parameters common to all source objects” .
6 Astigmatism: The distance to offset the XZ distribution in lens units.
7 X divergence in degrees ( αx ).
8 X supergaussian factor ( Gx ).
9 Y divergence in degrees ( αy ).
10 Y supergaussian factor ( Gy ).
11-12 Number of diodes in X/Y.
13-14 Spacing of diodes in X/Y in lens units.
15 The X half width of the rectangular region from which the rays emanate in
The angular distribution of the source is calculated using the X and Y divergence angles for the
source (parameters 7, 9) and the X and Y super Gaussian factors (parameters 8, 20). The size
and spatial distribution of the source is neglected. As such, the following input parameters
have no impact on the LightningTrace results: astigmatism (parameter 6); X and Y half widths
for the source (parameters 15, 18); X and Y Gaussian widths for the spatial distribution
(parameters 16, 19); X and Y spatial distribution super Gaussian factors (parameters 17, 20). In
addition, the array parameters for this source (parameters 11-14) are not accounted for by
LightningTrace; regardless of the array parameter values, the source defaults to a single diode
(unless otherwise defined under the Sources tab). If an array of diodes must be modeled, the
array should be defined via the Array Type option under the Sources tab of the Object
Properties dialog box.
Source DLL
Although many types of built-in sources are included with OpticStudio, there are times when
the best way to model a source is to define an algorithm to generate rays with the desired
properties.
OpticStudio also supports user-defined sources as tables of rays; see the Source File discussion
.
To define a source using a program, the algorithm which generates random rays must be
written and compiled into a Windows Dynamic Link Library, or DLL. Numerous DLLs are
provided with OpticStudio with source code. New DLLs may be easily created with a suitable
compiler. See also “Comments about DLLs” .
When launching a ray from a source modeled by a DLL, OpticStudio passes to the
UserSourceDefinition function the source parameters, the wavelength, and other data. The
UserSourceDefinition function then is required to compute the following values:
i: the initial relative intensity of the ray (see "Comments on Source DLL relative intensity"
below)
These values are returned to OpticStudio and are used to initiate the ray trace. The function
UserParamNames is used to define the names of all used parameters. These names appear in
the parameter columns of the source DLL object in the NSC Editor.
To check the input and output data for each DLL, check: Data[] values for Source DLLs.
The best way to learn the use of Source DLLs is to study an existing DLL and modify it as
needed. The sample DLLs provided with OpticStudio include extensive documentation and
comments on the data format; see any of the sample source code files for examples.
When OpticStudio traces a ray generated by a DLL, the initial power of the ray is given by the
source total power, divided by the number of analysis rays, scaled by the relative weight. For
this reason, the relative intensity of the ray as computed by the DLL must be set so that the
average of all the relative intensities of all the analysis rays requested is 1.0. Note the number
of analysis rays is passed as a parameter to the DLL. This condition is required because
OpticStudio cannot normalize the entire collection of analysis rays to be traced without
generating all the rays before tracing any.
An alternate way is to use non unity ray weights. This method requires that the DLL compute
all the desired rays first, then internally normalize the rays to yield an average weight of 1.0.
This method is conceptually simpler but is usually less efficient.
The following sample source DLLs and source code are included with OpticStudio
The DLL and source code (if provided) are in the <Zemax\DLL\Sources> folder.
CONE.DLL
Description User-defined parameters
This DLL is similar to the Lambertian_Overfill DLL with
two major differences: 1) both uniform and cosine
l Source Width, Height: defines
(Lambertian) angular distributions are properly taken
the elliptical or rectangular area
into account for all regions in both the source &
over which rays are emitted.
angular distribution and 2) the user can specify a l Source Rectangular?
region of interest based on inner & outer cone angles l 0 for elliptical
and start & stop clock angles. When specifying a l ≠0 for rectangular
region of interest, the DLL will scale the intensity of the l Distribution:
rays launched into the region while preserving the l 0 for lambertian
sphere of rays was launched. This allows a user to l Inner and Outer Cone Angle: 0 -
efficiently trace either a uniform or Lambertian 90 degrees
distribution of rays to small regions far off the source’s l Clock Start and End Angle: 0 -
normal axis. There are 2 distributions to choose from 360 degrees
(controlled by the Distribution column): l Scale Factor
l Lambertian (data = 0)
FIBER1.DLL
Description User-defined parameters
A planar fiber model.
I(r) = A + Br2 + C r4 ,
where
GaussianSource.dll
Description User-defined parameters
l Waist (Radius): fundamental
This DLL simulates a Gaussian beam. It defines the
waist radius
spatial and angular distribution of the rays using the
l Position: ZSourceDLL - Zwaist in the
beam waist, the beam position and the M^2 factor.
Source DLL local coordinate.
The real waist is defined as
l Position<0 if ZSourceDLL < Zwaist
l Position=0 if ZSourceDLL = Zwaist
l Position>0 if ZSourceDLL > Zwaist
LAMBERTIAN_OVERFILL.DLL
Description User-defined parameters
This DLL allows the user to launch a Lambertian l Source Width, Height: defines
distribution of rays towards – and overfill – a virtual the elliptical or rectangular area
circular aperture. over which rays are emitted.
l Source Rectangular?
Rays originate from a uniform spatial distribution l 0 for elliptical
circular right cone is fit around the virtual target l Target Diameter: diameter of the
aperture, with the apex at some location within the target
source area. l Target Distance: distance from
the Source DLL to the virtual aper-
The ray direction is chosen from a uniform angular
ture
distribution within the cone, with an intensity
l Distribution Type:
SkewRaysCircular.dll
Description User-defined parameters
Definition?: can be 1, 2 or 3.
This DLL sends skew rays to model Gaussian Beam Depending on the flag value 1, 2 or
Propagation in non-sequential mode. Skew rays are an 3, it would use one of the
efficient and accurate representation of Gaussian definitions below. If Definition? is
beams and can be used to quickly optimize for best not 1, 2 or 3, it will be set to 1.
focus or to minimize aberrations. It is the non-
sequential equivalent of Paul Colbourne's user defined If Definition? = 1
surfaces: Using skew rays to model Gaussian beams. l 1.Waist (Radius) in lens units
If Definition? = 3
Source Ellipse
The Source Ellipse is a flat elliptical (and optionally annular) surface which emits rays. Although
the origin of each ray launched lies on the surface of the ellipse with a uniform distribution, the
distribution of the ray directions may be any one of these:
where the exponent Cn may be any value between zero and 100, including non-integer values,
and θ is the angle measured from the local surface normal. The larger Cn, the narrower the
distribution becomes. If Cn = 1.0, the distribution is Lambertian.
where l and m are the direction cosines of the ray in the X and Y axis directions and Gx and Gy
are constants. This form may be used to define a far field pattern that is different in the X or Y
directions. The larger Gx and Gy are, the narrower the distribution becomes in the respective
directions.
The nature of the ray distribution is defined by the parameter values. If Cn, Gx, and Gy, are all
zero, then all rays will appear to emit from a virtual point source. If Cn is 1.0 or greater, then the
cosine distribution will result (no matter how the source distance or Gx or Gy are set). If Cn is
zero, but either Gx and Gy is non-zero, then a Gaussian distribution will result.
Parameter
Definition
#
1-5 See “Parameters common to all source objects” .
6 X Half Width: The x half width in lens units.
7 Y Half Width: The y half width in lens units.
8 Source Distance: The distance along the local z axis from the apparent source
If the source is modeled as an imaging point source, then the X and Y Half Widths (parameters
6, 7) and the Source X and Source Y values (parameters 12, 13) contribute to the calculation of
the angular distribution for the source; otherwise these parameters have no impact on the
LightningTrace results. The size and spatial distribution of the source is neglected, and thus the
Min Half Widths in X and Y (parameters 14, 15) are treated as zero by LightningTrace. Note that
collimated input beams cannot be modeled by LightningTrace; Lightning- Trace will return
zero flux for the beam if the Source Distance (parameter 8), Cosine Exponent (parameter 9),
and Gaussian terms in X and Y (parameters 10, 11) are all zero.
Parameter # Definition
1-5 See “Parameters common to all source objects” .
Source Filament
The Source Filament can be thought of as a thin wire coiled in a helix shape. The wire turns "N"
times along the full Z coordinate length given by "L". The radius of the turns is defined by "R".
Rays emanate from a randomly chosen point along the helix in a random direction.
Parameter
Definition
#
1-5 See “Parameters common to all source objects” .
6 Length "L" in lens units.
7 Radius "R" in lens units.
Number of turns "N" (dimensionless). N may be fractional or even negative to
8
reverse the rotation direction of the helix.
The axis of the helix, and the length L, are oriented along the Z axis.
Source File
The Source File is a source whose ray coordinates, cosines, and intensity are defined in a user
supplied file. The name of the file containing the ray data must be placed in the comment
column of the object. The file extension may be either DAT or SDF and the file must be placed
in the <data>\Objects\Sources\Source Files folder (see “Folders” ). The extension SDF is
recommended and DAT is supported only for backward compatibility. The file format may be
either text or binary, both formats are described below.
Critical Raysets with an extension CRS can also be used as Source File objects. See the
discussion in the Critical Rayset Generator for details.
Parameter
Definition
#
1-5 See “Parameters common to all source objects” .
Randomize?: If set to zero, the rays will normally be traced in the order listed
in the file. If non-zero, then the ray order is randomized once, when the file is
read or any parameter in the NSC Editor changes for the source object and
the source is updated. The randomize feature is only available if the total
number of rays in the file is less than the maximum number of source rays to
6
hold in memory. Files with more than the maximum number of source rays to
hold in memory are too large to hold in memory and cannot be randomized.
These large files are partially read as required as described below. The
maximum number of source rays to hold in memory is a user definable
parameter; see “Maximum Source File Rays In Memory."
For parameters 7, 8, and 9, the data presented is based only open the
number of analysis rays read from the source file, which may be less
than the total number of rays in the file.
Power/Lumens In File: The value for this parameter is for reference, and is set
by OpticStudio upon reading the file and should not be altered or set by the
7
user. The behavior of this field is different for “flux only” and “spectral color”
The maximum number of rays currently allowed for text files is 1,000,000. If there are more
than 1,000,000 rays defined in a text source file, OpticStudio will offer to convert the file to
binary format automatically. The original file will be renamed with the “.OLD” extension, and
the new binary SDF file will be created using the same name as the original file. After the
conversion is complete, an option will be presented to save or delete the old file. This
conversion is done to save disk space (binary files are about 30% as large as equivalent text
files), load time (binary files read about 20x faster than text files), and system memory (large
binary files can be left on disk and thus require very little RAM) even if billions of rays are being
traced.
There are restrictions on the values for the number of layout and analysis rays when using the
Source File:
- The number of analysis rays must be equal to or larger than the number of layout rays. The
number of analysis rays will be set to the larger of the two numbers entered in the NSC Editor.
- The number of analysis and layout rays may not exceed the number of rays defined in the file.
The data types float, int, and unsigned int are all 32 bit types. Identifier defines the file format,
currently 1010. Older formats normally can be read by OpticStudio as well, although
The maximum valid number of rays in the file as defined by NbrRays is 4 billion (4,000,000,000
rays). Exceeding this number may cause problems with the reading of the data file by
OpticStudio. The ray_format_type must be either 0 for flux only format, or 2 for the spectral
color format (both are defined below). Other format types are not supported. If and only if the
ray_format_type is 0, then the flux_type is 0 for watts, and 1 for lumens. For the spectral color
format, the flux must be in watts, and the wavelength in micrometers. The flux and wavelength
values and units are used in the ray structures defined below.
Note that when the spectral color format is used, OpticStudio will always trace rays at
the wavelengths defined in the file, no matter what system wavelengths are defined
After the header follow NbrRays ray structures. The ray structure format depends upon the ray
format type. For the flux only format, the ray structure is:
typedef struct
{
float x, y, z;
float l, m, n;
float flux;
} FLUX_ONLY;
For the color spectral color format, the ray structure is:
typedef struct
{
float x, y, z;
float l, m, n;
float flux, wavelength;
} SPECTRAL_COLOR;
OpticStudio can read either the flux only or the spectral color format. The spectral color format
only is used by OpticStudio when generating source files from ray trace data (see the
discussion of “Save Rays on Object n” in the section “The Ray Database Viewer” ).
The text Source File consists of a single line of header data with just two integer numbers of
the form:
number_of_rays dimension_flag
x y z l m n intensity wavelength
Any line starting with the “!” symbol is assumed to be a comment line and is ignored. Any
number of rays may be defined in a single file using this text format. However, if the number of
rays exceeds 1,000,000, the file will automatically be converted to binary format by OpticStudio
the first time the file is opened for a source file object. For a discussion of this conversion see
“Text vs. binary format files” . The wavelength argument is optional, however, if present, the ray
will always be traced at the defined wavelength in micrometers, and the source file will be
treated as described by the spectral color format in the discussion on binary file formats.
Each ray may have a different relative intensity. If the relative intensity value is not 1.0 for each
ray, then normalization occurs as described below.
When the source file is first loaded into memory, the intensity of each ray is summed and then
normalized to the average intensity. If the total flux of the source is then defined to be some
number of watts, a subset of the rays can be traced and their intensities will yield
approximately, but not exactly, the total flux. Normalization is required for an arbitrary subset
of the rays to yield approximately the total desired power.
The angular distribution of the source is determined by creating a far-field map for the source
upon first reading of the file. This map is stored in an FFD file located in the same folder as the
source file. The map is created using all rays in the source, and thus the Randomize? value
(parameter 6) has no effect on the LightningTrace results. The size and spatial distribution of
the source is neglected.
Source Gaussian
The Source Gaussian has a Gaussian distribution of rays which appear to emanate from a point
source.
Parameter # Definition
1-5 See “Parameters common to all source objects” .
Beam Size: The beam radius at the 1 over e^2 point in intensity in lens
6
units.
Position: The distance from the apparent point of divergence of the rays
to the source plane location. If zero, the rays are collimated. A positive
7
Position value means that the apparent point of divergence is located in
the negative Z direction relative to the vertex of the source plane.
The angular distribution of the source is determined using the Beam Size (parameter 6) and
Position (parameter 7) to calculate the far-field divergence angle of the source. However, the
physical size of the beam as given by the Beam Size is not used, as the size and spatial
distribution of the source is neglected.
When reading .IES files, OpticStudio has a limit of 1000 radial pixel points (vertical angles in the
IES convention) and 999 angular pixel points (horizontal angles in the IES convention). If an .IES
file with a resolution higher than these limits is loaded, OpticStudio will return an error.
Parameter # Definition
1-5 See “Parameters common to all source objects” .
Source Imported
This source has a shape defined by an imported data file, in either IGES, STEP, or SAT format.
The source volume has no properties other than to define the starting location and orientation
of the rays. Rays are spatially distributed uniformly in area over the object. The angular
distribution of the rays is given by
where θ is the angle measured from the local surface normal pointing outside the volume, and
x is a user defined parameter between 0.0 and 400.0. If x = 0.0, the rays emanate in a
hemisphere with equal probability in all directions. If x = 1.0, the distribution is Lambertian. If x
>= 400.0, the rays are always normal to the surface.
Parameter
Definition
#
1-5 See “Parameters common to all source objects” .
Scale. This dimensionless parameter scales the entire imported solid. Upon
import, OpticStudio will automatically attempt to scale the dimensions of the
6
imported solid to match the current dimensions in OpticStudio; this scale
factor is applied after that conversion.
7 Unused.
8 Cosine Factor: The cosine power exponent “x” described above
Source Object
Ansys Zemax OpticStudio 2023 R2 The Setup Tab 771
The source object creates a source with a size and shape based upon any other "parent"
object. Any prior object in the NSC Editor may be used to define the shape of the Source
Object, including User Defined and Boolean objects. Any changes in the properties of the
parent object will dynamically affect the distribution of the rays on the Source Object. The
parent object shape is used to determine the starting location and orientation of the rays. Rays
are spatially distributed uniformly in area over the object. The angular distribution of the rays is
given by
where θ is the angle measured from the local surface normal pointing outside the volume, and
x is a user defined parameter between 0.0 and 400.0. If x = 0.0, the rays emanate in a
hemisphere with equal probability in all directions. If x = 1.0, the distribution is Lambertian. If x
>= 400.0, the rays are always normal to the surface.
For best results, the parent object should be a solid volume. If the parent object is a surface,
the rays may radiate from either one or both sides of the surface, depending upon exactly how
the parent object is defined.
There are two ways to prevent rays leaving the source from immediately striking the parent
object. The first way is to set the Source Object to ignore the parent object from which it is
defined. This will allow the ray to ignore the parent object until after the ray leaves the source
(See “Defining an Ignore Objects list” ). The second way is to define a pre-propagation distance
that is large compared to the chord tolerance but small compared to the distance the ray
might legitimately travel before it interacts with the source itself (See “Sources tab” ). This latter
method is useful if the interaction of the rays with the source body is desired and the source is
hollow or concave so that rays leaving one part of the object may strike another part before
striking any other object.
The Source Object may be placed independently from the parent object. To superimpose the
Source Object on the parent object, set the reference object of the Source Object to the parent
object (see “Reference objects” ) and leave the position and tilt values at zero.
Parameter
Definition
#
1-5 See “Parameters common to all source objects” .
6 Parent Object #. The integer object number of the object used to define the
Source Point
The Source Point is a point which emits rays into a cone. The cone angle may be any value
between 0 and 180 degrees (which would radiate into a full sphere).
Parameter # Definition
1-5 See “Parameters common to all source objects” .
6 Cone angle: The semi-cone angle in degrees.
Source Radial
However, note that the spline fit can be a poor representation of the source in regions where
the intensity is varying sharply if enough input data points are not supplied to describe the
variation in these regions. A common example is near the angular boundaries of the source
(i.e. at the Minimum and Maximum Angle values) if the relative intensity at either of those
boundaries is a large fraction of the maximum intensity for the source; since the intensity just
outside of the boundaries is zero, this leads to a large discontinuity in the source intensity at
the boundaries that the spline fit will not be able to adequately represent.
Parameter
Definition
#
1-5 See “Parameters common to all source objects” .
X Half Width: The x half width in lens units. If less than zero, the emitting
6
region will be elliptical.
Y Half Width: The y half width in lens units. If less than zero, the emitting
7
region will be elliptical.
8 Minimum Angle in degrees. The value must be between 0.0 and 89.9.
Maximum Angle in degrees. The value must be between the minimum angle
9
plus 0.1 and 90.0.
10 The number of points, must be between 5 and 181, inclusive.
11+ The relative intensity data at each angle from the normal.
The angular distribution of the source is taken for the input data (parameters 8, 9, 10, 11+). The
size and spatial distribution of the source is neglected, and thus the X and Y Half Widths
(parameters 6, 7) have no effect on the LightningTrace results.
Parameter
Definition
#
1-5 See “Parameters common to all source objects” .
Cosines: The local X, Y, and Z direction cosines of the ray. These are
6-8
automatically normalized.
Random Seed: If not zero, the random number generator is reseeded with the
specified value. This allows identical rays to be generated which subsequently
9
have random but reproducible properties, such as when bulk or surface
scattering is on.
Source Rectangle
The Source Rectangle is a flat rectangular surface which emits rays from a virtual source point.
The parameters are identical to the Source Ellipse, but the shape of the source is a rectangle
rather than an ellipse.
Source Tube
Parameter # Definition
1-5 See “Parameters common to all source objects” .
6 Length "L" in lens units.
7 Radius "R" in lens units.
The axis of the tube, and the length L, are oriented along the Z axis.
The local origin of the Source Tube is at the center of the front face of the tube.
The angular distribution of the source is uniform, i.e. it is identical to that for a point source.
The size and spatial distribution of the source is neglected. As such, the Radius value
(parameter 7) has no impact on the LightningTrace results, and the only effect that the Length
of the tube (parameter 6) has on the results is to position the center of the LightningTrace
mesh at the axial center of the tube.
Using just two orthogonal angles to describe a source distribution under-constrains the
possible energy distribution, since there is no clear definition of what happens at intermediate
azimuthal angles. For this reason, this source model should only be used at angles less than
roughly 60 degrees, and only when the aspect ratio between the X and Y angles is no more
than about 4 to 1. It is a good idea to test the resulting energy distribution using a polar
detector to confirm the approximations used in this model yield the desired distribution.
Parameter
Definition
#
1-5 See “Parameters common to all source objects” .
6 X Half Width: The x half width in lens units.
7 Y Half Width: The y half width in lens units.
X Half Angle in degrees: The half angle of the cone of rays in the XZ plane.
8
Maximum 89 degrees.
Y Half Angle in degrees: The half angle of the cone of rays in the YZ plane.
9
Maximum 89 degrees.
10 Spatial Shape: Use 0 for rectangular, 1 for elliptical.
11 Angular Shape: Use 0 for rectangular, 1 for elliptical.
Uniform Angle: Use 0 for uniform irradiance on a distant projected plane, or 1
12
for uniform in angle space.
The angular distribution of the source is determined from the X and Y Half Angle values
(parameters 8, 9), the Angular Shape value (parameter 11), and the Uniform Angle value
(parameter 12). The size and spatial distribution of the source is neglected. As such, the X and Y
Half Width values (parameters 6, 7) and the Spatial Shape value (parameter 10) have no impact
on the LightningTrace results.
Parameter # Definition
1-5 See “Parameters common to all source objects” .
6 X Half Width: The x half width in lens units.
7 Y Half Width: The y half width in lens units.
8 Z Half Width The z half width in lens units.
The angular distribution of the source is uniform, i.e. it is identical to that for a point source.
The size and spatial distribution of the source is neglected. As such, the X, Y, and Z Half Width
values (parameters 6-8) have no effect on the LightningTrace results, other than to position the
center of the LightningTrace mesh at the center of the cylindrical volume.
The parameters are otherwise identical to that for the Source Volume Cylinder.
The angular distribution of the source is uniform, i.e. it is identical to that for a point source.
The size and spatial distribution of the source is neglected. As such, the X, Y, and Z Half Width
The parameters are otherwise identical to that for the Source Volume Cylinder.
The angular distribution of the source is uniform, i.e. it is identical to that for a point source.
The size and spatial distribution of the source is neglected. As such, the X, Y, and Z Half Width
values (parameters 6-8) have no effect on the LightningTrace results, other than to position the
center of the LightningTrace mesh at the center of the rectangular
Non-sequential Detectors
The available types of detectors in OpticStudio are described in this section.
Detector A flat rectangular detector with an arbitrary number of pixels. This detector
Color can record and display incoherent illumination data defined by tristimulus
For more information, see the following detailed descriptions of these detector types.
The Detector Color object stores power and tristimulus (visual light color) data from NSC
source rays that strike it. The resulting data distributions may be viewed for incoherent light in
spatial or angular domains. This object may optionally store the spectral distribution for all
NSC source rays that strike it (see the description for “Record spectral data” given under the
“Type tab” ). Detector Color objects may be reflective, transparent, or absorbing if the material
is set to “MIRROR”, blank, or “ABSORB”, respectively.
Parameters 5-9 are only used to define how the detector is displayed on shaded model plots:
The information stored on any detector may be viewed by selecting Detectors, Detector
Viewer on the NSC Editor, or when the program mode is Non-sequential, on the Analysis
menu. The Detector Viewer also has an option for displaying data from any previously saved
ray data base. If “none” is selected for the ray database, then the data currently stored in the
detector will be displayed, otherwise, the data stored in the selected ray database will be used
to regenerate the displayed image. For more information see “The Detector Viewer” . The
maximum number of either X or Y pixels is 5000 for 32-bit versions of OpticStudio, and 6000
for 64-bit versions of OpticStudio.
For more information on the definitions and units for the terms irradiance, intensity, and flux,
see “Analysis Units”.
For the Detector Color, the pixel numbers start at 1 in the lower left (-x, -y) corner of the
rectangle. The pixel numbers increase along the +x direction first, and then move up one row
in the +y direction, and start over at the -x edge. For a detector with nx by ny pixels, the pixel
numbers are 1 through nx on the bottom row, and then nx+1 through 2nx on the next row
above the bottom, until the last pixel (number nx*ny) is reached in the upper right (+x, +y)
corner. Another way of stating the pixel numbering is that the x index changes the fastest, and
then the y index.
LightningTrace may be used to view the irradiance distribution on this detector, but not the
intensity distribution. When using LightningTrace, the intensity distribution may be obtained
only via the Detector Polar object (see “Detector Polar object” ). LightningTrace does not
account for polarization (thus parameter 16, the Polarization flag, is not used) and cannot be
used to exploit symmetry in the incident rays (thus parameter 17, the Mirroring flag, is not
used). The interpolation algorithm used by LightningTrace does not depend on the option to
“Use Pixel Interpolation” found under the Type tab of the Object Properties dialog box, and
thus this option has no effect on the LightningTrace results.
The Detector Polar object stores power and tristimulus (visual light color) data from NSC
source rays that strike it. The resulting data distributions may be viewed for incoherent light in
the angular domains. Detector Polar objects may be reflective, transparent, or absorbing if the
material is set to “MIRROR”, blank, or “ABSORB”, respectively.
The object shape is a faceted approximation to a portion of a sphere centered on the object
coordinates. Although the detector only records angular data, the detector must be large
enough to encompass all the rays of interest, and the size of the detector is a user-definable
parameter. The polar object spans an angular region, with the zero polar angle centered
around the object local Z axis. The polar angle may span any angle between 1 and 180 degrees
(which would form a complete sphere). The detector only considers the angle the ray striking
the detector makes, and not the position the ray strikes the detector. The azimuthal angle is
defined by
where the zero angle is along the +x axis and the angle increases in a counter-clockwise
direction all the way to 360 degrees. The azimuthal angle always spans 360 degrees. The
defining parameters are:
The information stored on any detector may be viewed by selecting Detectors, Detector
Viewer on the NSC Editor, or when the program mode is Non-sequential, on the Analysis
menu. The Detector Viewer also has an option for displaying data from any previously saved
ray data base. If “none” is selected for the ray database, then the data currently stored in the
detector will be displayed, otherwise, the data stored in the selected ray database will be used
to regenerate the displayed image. For more information see “The Detector Viewer” .
For more information on the definitions and units for the terms irradiance, intensity, and flux,
see “Analysis Units”.
Intensity data stored on a Detector Polar maybe exported to a source file. See “Export Polar
Detector Data as Source File” .
The first pixel, along the azimuthal angle of zero, has a radial size going from 0 degree to
.5*increment degree where the increment is <# Radial Pixels>/<Radial Size>.
As a result, the first and the last radial pixels are half the angle size of the other pixels.
For example, for a max angle of 1.5 degrees, and 10 radial pixels, the increment is 1.5/9=1.667
.......
LightningTrace cannot be used to exploit symmetry in the incident rays, and thus parameter 5,
the Mirroring flag, is not used. The interpolation algorithm used by LightningTrace does not
depend on the option to “Use Pixel Interpolation” found under the Type tab of the Object
Properties dialog box, and thus this option has no effect on the LightningTrace results. Finally,
to avoid aliasing, any intensity data near the 180 degree radial boundary of the detector is
neglected when the LightningTrace results are used to illuminate this detector.
Parameters 5-9 are only used to define how the detector is displayed on shaded model plots:
The information stored on any detector may be viewed by selecting Detectors, Detector
Viewer on the NSC Editor, or when the program mode is Non-sequential, on the Analysis
menu. The Detector Viewer also has an option for displaying data from any previously saved
ray data base. If “none” is selected for the ray database, then the data currently stored in the
Four data items are stored for every ray that strikes the detector:
The incoherent intensity of the ray. This energy is stored by incrementing the counter
corresponding to the pixel the ray struck. The sum of the ray intensity divided by the pixel area
yields the irradiance in flux per area.
The incoherent intensity of the ray in angular space. This energy is stored by incrementing the
counter corresponding to the pixel the ray struck in angle space. The sum of the ray intensity
divided by the solid angle the pixel represents yields the intensity in flux per solid angle.
The coherent real and imaginary amplitudes of the ray. The amplitude is the square root of the
ray intensity, while the phase is determined by the total optical path length from the source
referenced to the center of the spatially distributed pixel. By separating the real and imaginary
parts of the ray, interference between many rays may be simulated. Phase due to polarization
effects is also considered if the polarization flag is 1, 2, or 3; see the discussion for parameter
16 above.
For more information on the definitions and units for the terms irradiance, intensity, and flux,
see “Analysis Units”.
The propagation and interference of light generally has properties of both particles and waves.
Rays can be thought of as the particle representation, and diffraction interference (such as for
a diffraction PSF) can be thought of as a wave representation.
For NSC analysis, OpticStudio uses ray tracing to determine optical paths and energy
distributions. OpticStudio accounts for the phase along the ray, and this allows for
computation of some interference and diffraction effects. However, it is important that the user
understand what assumptions the model makes and how these assumptions affect the
accuracy of the results.
When a ray strikes a detector, OpticStudio computes the real and imaginary parts of the
electric field by using the intensity and phase of the ray referenced to the center of the pixel
struck. The real and imaginary parts may then be summed for many rays that strike the same
pixel. OpticStudio also sums the intensity (amplitude squared) for each pixel.
Because the phase is accounted for, some rays will constructively interfere with other rays
while other rays will destructively interfere. This allows OpticStudio to simulate effects such as
If there is only one pixel defined for the detector, or if the Normalize Coherent Power checkbox
is off, then the coherent irradiance for each pixel is computed by summing the real and
imaginary parts of every ray incident upon that pixel, computing the magnitude of this sum,
dividing by the square of the sum of the amplitude of all incident rays upon that pixel, then
finally multiplying this ratio by the incoherent irradiance on the pixel.
When not normalizing, the coherent irradiance Icoh on a pixel with N incident rays can be
written as
This method allows the computed coherent irradiance to vary between a value of zero and the
incoherent irradiance. However, there is no way to accurately determine the true coherent
irradiance in this case because of the limitation of the ray model in the presence of
constructive and destructive interference as described above. Specifically, it is unknowable
where energy lost in this computation would have propagated to.
If there is more than one pixel in the detector, and the Normalize Coherent Power checkbox is
on, then the coherent irradiance is computed from the ray data by squaring and summing the
real and imaginary parts of the amplitude pixel by pixel, and then re-normalizing the total
coherent irradiance for the entire detector to be equal to the incoherent irradiance incident
upon the detector.
With two methods available, the question naturally arises - which method is correct? If one or
the other method was always correct, there would be no need for the Normalize Coherent
Power switch. The general rule is simple. If all the incoherent power from one or more sources
falls on the same detector, then the Normalize Coherent Power switch should be checked on.
This is the default setting. This would be case, for example, of two plane waves interfering to
form a sinusoidal fringe pattern with many fringes across a detector. All of the energy is
present on the detector, but the wavefront interference causes ray energy that would have
landed in a dark fringe to be redirected to a neighboring bright fringe on the same detector.
Conversely, when two parallel, perfectly collimated beams are combined, yielding a single
bright or dark (or something in between) fringe, then the Normalize Coherent Power switch
should be checked off. This would be the case where an interferometer was set up to yield a
single dark fringe on one detector and a single bright fringe on another detector - physically
the energy never would propagate along the dark path, but the rays cannot know this in
advance. Note that in this case (even when using the recommended setting), the bright fringe
will only show half the actual power - the rays cannot create power, and the coherent power
computation is still capped at the incoherent energy. The energy lost in the dark fringe
physically would have been directed to the bright fringe, but again, the rays are incapable of
determining that. There may be cases where neither of these coherent power computation
methods yields the correct results. These cases are simply beyond the scope of the ray model,
and OpticStudio should not be used for critical analysis of the physical optics aspect of these
systems.
For the purposes of binning energy into angle space pixels, OpticStudio computes the X and Y
angles from polar coordinates. The polar coordinates are defined in the following way:
The radial angle of the ray is measured with respect to the object’s local z-axis, and is then
projected onto the object’s local XY-plane to compute the X and Y angles. The calculation of
the X and Y angles, in degrees, is shown below:
Note that these angles are slightly different than the Cartesian XZ and YZ angles used in some
other contexts, especially when using compound tilts. See “Field angles and heights” for an
example of the Cartesian angle methodology.
For the Detector Rectangle, the pixel numbers start at 1 in the lower left (-x, -y) corner of the
rectangle. The pixel numbers increase along the +x direction first, and then move up one row
in the +y direction, and start over at the -x edge. For a detector with nx by ny pixels, the pixel
numbers are 1 through nx on the bottom row, and then nx+1 through 2nx on the next row
above the bottom, until the last pixel (number nx*ny) is reached in the upper right (+x, +y)
corner. Another way of stating the pixel numbering is that the x index changes the fastest, and
then the y index.
See “Pixel Interpolation” under the Object Properties > Type tab.
LightningTrace may only be used to view the incoherent irradiance distribution on this
detector (as given by the “incoherent irradiance” and “radiance in position space” options for
the detector data type), but not the coherent irradiance or the intensity. When using
LightningTrace, the intensity distribution may be obtained only via the Detector Polar object
(see “Detector Polar object” ). LightningTrace does not account for polarization (thus
parameter 16, the Polarization flag, is not used) and cannot be used to exploit symmetry in the
incident rays (thus parameter 17, the Mirroring flag, is not used). The interpolation algorithm
used by Lightning- Trace does not depend on the option to “Use Pixel Interpolation” found
under the Type tab of the Object Properties dialog box (thus this option has no effect on the
LightningTrace results).
When a ray hits Detector Rectangle, we calculate the geometric phase based on the ray’s
optical path, which is the propagation distance multiplied by the refractive index of each
segment, and the additional phase added by some special components, such like gratings.
When calculating Coherent Irradiance result, we will use the intensity and this geometric phase
to do the interference calculation.
However, every ray in OpticStudio also has a data of electric field when Use Polarization is
checked in the Ray Trace dialog. When the parameter Polarization is not 0, we will instead use
the data from electric field for the intensity and phase. The following table shows how the
intensity of the ray and phase is considered with different settings.
The surface shape of a detector surface object is identical to the Aspheric Surface object. See
“Aspheric Surface” for information on the defining formulas for the surface shape.
Parameters 7-11 are only used to define the appearance of the Detector Surface on Shaded
Model Plots:
The information stored on any detector may be viewed by selecting Detectors, Detector
Viewer on the NSC Editor, or when the program mode is Non-sequential, on the Analysis
menu. The Detector Viewer also has an option for displaying data from any previously saved
ray data base. If “none” is selected for the ray database, then the data currently stored in the
detector will be displayed, otherwise, the data stored in the selected ray database will be used
to regenerate the displayed image. For more information see “The Detector Viewer”.
One data item is stored for every ray that strikes the detector: The incoherent intensity of the
ray. This energy is stored by incrementing the counter corresponding to the pixel the ray
For more information on the definitions and units for the terms irradiance, intensity, and flux,
see “Analysis Units”.
OpticStudio uses a collection of triangles to conform to the shape of the curved surface. There
are Nr radial zones, and Na angular zones. Together these two parameters define Nr * Na
polygonal regions. Each region is generally divided into two triangles, so the total number of
triangular pixels is 2 * Nr * Na. However, if the minimum aperture (parameter 4 above) is zero,
then the innermost radial zone has only Na triangles rather than 2 * Na. In this case the total
number of triangles is 2 * Nr * Na - Na. The algorithm that selects the triangle coordinates
attempts to make the area of each triangle approximately the same, however the area from
triangle to triangle can not be held exactly constant. The corners of each triangle will lie on the
aspheric surface defined by the radius, conic, and aspheric coefficients. The triangles are flat
and do not lie exactly on the surface if the surface is not flat.
The triangles are the individual pixels used to record irradiance and flux data. The pixels are
numbered in consecutive radial zones. Pixel 1 starts at angle zero in the innermost radial zone.
The first 2 * Na pixels (or just Na pixels if the minimum aperture is zero) are numbered going
counter clockwise around z to complete the first annular zone. The pixel numbering continues
at angle zero in the second radial zone for the next 2 * Na pixels, until all radial zones are
complete.
If “Fast Ray Trace” (see “Type tab” ) is checked, OpticStudio will alter the order of the triangles
to speed up the ray trace. If “Fast Ray Trace” is unchecked, the order of the triangles is
unmodified, which slows the ray tracing but preserves the ordering described above.
Detector Surface objects use a collection of triangles to approximate a curved surface that can
detect flux and irradiance. The display of the detected data requires conversion of the triangles
into square pixels. This conversion is done automatically when displaying the detector data as
a false color, grey scale, or cross section plot. The number of square pixels selected is adjusted
to provide a reasonable display resolution, and will vary depending upon the number of
triangles. For text listings of Detector Surface objects, the X, Y, Z, R, and Angle data will be
listed along with Flux and Irradiance values for each pixel. The X, Y, and Z values are the
The Detector Volume Object stores incident and absorbed energy data from NSC source rays
that pass through the individual voxels. The resulting data distributions may be viewed as
incident flux, absorbed flux, or absorbed flux per unit volume. Detector volumes may be
transparent, or be made of any valid material. Detector volumes may also be nested within or
straddle other objects. Objects within detector volumes may be refractive, reflective,
absorbing, gradient index, or have surface and or bulk scatter properties defined.
The shape of a Detector Volume Object is a rectangular solid. The defining parameters are:
Two data items are stored for every ray that passes through each voxel: The incident flux of the
ray in source units, and the absorbed flux in the voxel. The incident flux is the flux of the ray as
it enters the voxel. A ray segment that starts in a particular voxel will not increase the incident
flux in that voxel, because the incident flux is only incremented for rays entering the voxel. The
absorbed flux is a function of the path length of the ray through the voxel, as well as the
coefficient of absorption of the material the ray is passing through. Note that the total
absorbed flux only considers absorption in the object volume, and not at the object coating.
Detector volumes may be nested within other NSC object types. For example, to measure the
absorbed flux in a cylindrical glass rod, place the rod within the detector volume, and set the
glass type of the rod on the rod object. If the glass type has an absorption coefficient
associated with the material, the portion of the flux of rays passing through the glass rod will
be recorded by the detector volume.
For more information on the definitions and units for the terms irradiance, intensity, and flux,
see “Analysis Units”.
For the Detector Volume, the pixel numbers start at 1 in the lower left corner of the rectangle
formed by the first z-plane (on the -z side of the volume). The pixel numbers in this z-plane
increase along the +x direction first, and then move up one row in the +y direction, and start
over at the -x edge. For a detector with nx by ny by nz pixels, the pixel numbers in the first z-
plane are 1 through nx on the bottom row, and then nx+1 through 2nx on the next row above
the bottom, until the pixel nx*ny is reached in the upper right (+x, +y) corner. The numbering
then proceeds to the next z-plane, starting again at the bottom left corner. Another way of
stating the pixel numbering is that the x index changes the fastest, then the y index, and then
finally the z index.
To make any of these objects a detector, choose "Object Is A Detector" from the Type tab of
the Object Properties dialog box. Once the object is set to be a detector, the intensity detected
will be displayed on the Shaded Model display, and on the text listing of the Detector Viewer
window. The color scheme the detector will display on the Shaded Model may also be selected
on the Object Properties dialog box. By default the color chosen represent the Irradiance but
may also represent the total Flux.
Objects acting as detectors can only display incoherent intensity. Each individual triangle used
to draw the object becomes a single pixel. All rays which strike the pixel will be summed to
yield the total intensity. The object detectors are cleared whenever all detectors are cleared
from the detector control dialog box.
A tool for creating POB files for use as detectors is described in “Create Polygon Object”.
The pixels are numbered in the order the polygons are defined, and there is no general way to
describe the pixel ordering. For these objects, some experimentation may be required to
determine the exact pixel ordering method.
The format of text data shown in the Detector Viewer analysis for general objects as detectors
is same as the text data for the Detector Surface object. See “Comments on Detector Surface
text data” in the Detector Surface Object section.
For most of the objects, the pixel size can be changed in the Object Property > Draw >
Drawing Resolution. For a STEP/IGES/SAT CAD file, the pixel size is controlled by the parameter
The following screenshot was taken with the OpticStudio non-sequential scattering file
“Fluorescence Example.ZMX”.
General Settings
Type Used to select the general object type, for example, sphere, ellipse, rectangle, or other
type.
For more information on the different object types, see Non-sequential Objects, Non-
sequential Sources, and Non-sequential Detectors.
Data File If the object type is defined by an external file, such as a polygon object, the file
name may be selected here.
User Defined Aperture If selected, a user defined aperture (UDA) file will be used to define
the extent of the object. Not all objects support this feature. User defined apertures (UDA)
may be placed on some NSC surface objects. The UDA file must be placed in the
<objects>\Apertures folder (see “Folders”). UDA’s are defined exactly as described for
sequential surfaces, see “User defined apertures and obscurations”.
File If a user defined aperture is selected, the name of the aperture file may be selected from
this control.
UDA Scale The UDA Scale is a dimensionless multiplier that scales the aperture defined in the
UDA file.
Row Color This control chooses the color of the row in the NSC Editor for the object. By
default, objects made of glass, “MIRROR”, or “ABSORB” material, as well as sources and
detectors are color coded. Any object may use either no color, the default color, or a user
defined color. The coloring of rows may be disabled, see the “Editors” section of the
OpticStudio Preferences.
Use Global XYZ Rotation Order If checked, the rotation convention for object tilts is to first
rotate about the X axis, then the Y axis, then the Z axis. If unchecked, the rotations are done
about the Z axis, then the Y axis, then the X axis. This latter ZYX convention is what a sequential
coordinate break surface does if the order flag is zero. Note that rotating using the ZYX
convention is exactly the same as rotating about the X axis, then rotating about the “new” Y
axis, then finally the “new” Z axis. See also, the “Coordinate system” explanation in the Object
Placement section.
Consider Objects It is often the case that rays propagating within an NSC group follow a
reasonably well defined path. For example, when several lenses are mounted in a tube, rays
striking lens #5 will either hit lens #4 or lens #6 next; or possibly the tube itself. If the list of
possible objects to intersect is known, and the number of objects on this list is small compared
to the total number of objects; then significant ray tracing speed gains may be made by telling
OpticStudio to only consider the subset of objects the ray may hit.
If the “Consider Objects” field is left blank (the default), then rays leaving this object may strike
any object, and OpticStudio will use its own internal algorithms for determining which object is
actually hit.
To specify the subset of objects the ray may hit when leaving an object, list the object numbers
separated by a space. For example, to specify that rays leaving an object may hit objects 4, 6, or
23, enter the string “4 6 23" on the Consider Objects data field. Note the object’s own object
number should normally be included in the list. OpticStudio will automatically update this
table as new objects are inserted or deleted. The maximum number of objects that may be
listed is 10. If a ray may hit more than 10 different objects; leave this field blank. Use zero for
the object number of the exit port.
Note that it makes no sense to define both a “Consider Objects” and an “Ignore Objects” list.
The Consider Objects list takes precedence over the Ignore Objects list if both lists are defined.
Ignore Objects The Ignore Objects list allows definition of objects that should be ignored
when a ray leaves any object. A common application of this feature is for Source Objects to
ignore the object from which they were defined, so that the ray does not immediately interact
with object located where the ray starts.
If the “Ignore Objects” field is left blank (the default), then rays leaving this object may strike
any object, and OpticStudio will use its own internal algorithms for determining which object is
actually hit.
To specify the objects the ray may NOT hit when leaving an object, list the object numbers
separated by a space. For example, to specify that rays leaving an object should ignore objects
5 and 7, enter the string “5 7" on the Ignore Objects data field. Note the object’s own object
number should normally not be included in the list. OpticStudio will automatically update this
table as new objects are inserted or deleted. The maximum number of objects that may be
listed is 10. Use zero for the object number of the exit port.
Note that it makes no sense to define both a “Consider Objects” and an “Ignore Objects” list.
The Consider Objects list takes precedence over the Ignore Objects list if both lists are defined.
Rays Ignore Object There are three available settings for this control: Never, Always, and On
Launch.
l Never: The object is never ignored, and the rays will always interact with the object.
l Always: Rays will never interact with the object. If an object is included for rendering or
reference purposes only, ray tracing will be faster if this box is checked, as OpticStudio
will not bother to check if the ray intercepts the object. Choosing this option can cause
Use Consider/Ignore Objects When Splitting If checked, then when rays are split the child
rays will only look for intersections with the objects listed on the Consider Objects list, or only
ignore objects on the Ignore Objects list. If unchecked, all possible object intersections will be
checked. See “Defining paths using the Consider Objects list”.
Fast Ray Trace (Slow Update) There is a trade-off between ray trace speed and the time it
takes to create the internal representation of certain objects. These objects include most non-
radially symmetric aspheres, toroids, user defined objects, and other object types for which no
radial symmetry and no exact ray trace solution exists. The default for this setting is checked
on, which means the object will ray trace faster but update more slowly. For many aspheric
lenses, rays will trace 10 to 50 times faster with Fast Trace checked on. The only reason to turn
off Fast Trace is if editing the object parameters in the NSC Editor becomes tedious due to the
slower update setting. The switch can be turned off while editing the parameters, and then
checked on again after editing is complete. Note that this switch only affects objects types that
are described above.
Detector Settings
Object Is A Detector If checked, then rays striking the object will increment a detector
associated with the object. Note that when ‘Object is Detector’ is selected, the option to turn
smooth shading on or off in the Shaded Model has no effect. See “Object as Detectors”.
Show As This control selects the color scheme used to represent objects that are detectors on
the shaded model plot. Color by flux will color according to the total power incident on each
area of the object. Color by irradiance will color each area by the power per area. Only objects
that are detectors use this feature.
Use Pixel Interpolation If checked (the recommended setting), the energy from rays striking a
pixel on the Detector Rectangle will be apportioned among the neighboring pixels. The
amount of energy allocated to each pixel depends upon the position the ray strikes within the
pixel. Rays striking the exact center of the pixel will have 100% of their energy allocated to that
Normalize Coherent Power When a ray strikes a detector, OpticStudio computes the real and
imaginary parts of the electric field by using the intensity and phase of the ray referenced to
the center of the pixel struck. The real and imaginary parts may then be summed for many rays
that strike the same pixel. OpticStudio also sums the intensity (amplitude squared) for each
pixel.
Because the phase is accounted for, some rays will constructively interfere with other rays
while other rays will destructively interfere. This allows OpticStudio to simulate effects such as
fringes in interferometers (shearing or otherwise) or interference from various orders of a
diffraction grating. However, computing the coherent irradiance involves some assumptions.
Physically, destructive interference means the energy would have propagated somewhere
other than where the ray went. In a similar way, when constructive interference occurs, the
squaring of the amplitude sum of many rays artificially and non-physically increases the energy
in the beam. OpticStudio cannot determine where the energy went (or came from), and
therefore cannot account for conservation of energy in coherent irradiance calculations
without making assumptions.
OpticStudio can make one of two different assumptions: either to normalize the coherent
power on the detector to match the incoherent power, or to determine the coherent power
using the incoherent power on each pixel and scaling by the degree of coherence of rays
landing on each pixel.
If all the incoherent power from one or more sources falls on the same detector, then the
Normalize Coherent Power switch should be checked on. This is the default setting. This would
be case, for example, of two plane waves interfering to form a sinusoidal fringe pattern with
many fringes across a detector. All of the energy is present on the detector, but the wavefront
interference causes ray energy that would have landed in a dark fringe to be redirected to a
neighboring bright fringe on the same detector. Conversely, when two parallel, perfectly
collimated beams are combined, yielding a single bright or dark (or something in between)
fringe, then the Normalize Coherent Power switch should be checked off.
Record Pixel Spectral Data This option is only available when Record Spectral Data is
selected. If checked, the spectral distribution for every pixel will be recorded into bins. The
bins' number and size are specified by Record Spectral Data section. Once the spectral
distribution of every pixel is recorded, Centroid X/Y and RMS radius/X/Y may be able to be
calculated and can be displayed in Beam Info tab of Detector Viewer or be obtained in merit
function by using NSDE operand.
Do Not Draw Object If checked, then the object will not be drawn on layout plots. Rays will
still act as though the object were there. This control is useful to remove from the layout an
object that encloses other objects, so the inner objects may be seen more easily.
Draw Local Axis If checked, the local x, y, and z axis will be drawn on the 3d Layout plot. The
length of the x and y axis drawn is half that of the “missed ray draw distance”, see “Missed Ray
Draw Distance in Lens Units”. The z axis is twice this length. The vertex of the coordinate
indicator is at the local vertex.
Drawing Resolution Choose Standard, Medium, High, Presentation, or Custom. The options
increase the resolution of the drawing at the expense of computation time. Different objects
Increase Resolution On Shaded Model Plots If checked, the drawing resolution will be
temporarily increased when generating Shaded Model plots. Although this produces much
better looking graphics, it does take more time and memory. To save time and memory,
disable this option.
Make All Objects Draw Like This One Pressing this button will copy the drawing settings to
all objects.
Opacity: If the opacity is set at 100%, then the object will be rendered on the shaded model
plot as a solid color, and the object may fully obscure other objects from view. If the opacity is
less than 100%, then the object is partially transparent, which allows other objects to be visible
through the partially opaque surface.
Object Color This control is used to select the color the object will be drawn with on the
shaded model display.
Export As Triangles If checked, the object will be exported to CAD format files as a
tessellation rather than a smooth object. This feature is only intended as a work around if the
CAD format export feature fails to work properly. The recommended setting is not checked.
OpticStudio uses the drawing resolution settings to create a “boundary region” around each
object. This region is used to quickly determine if a ray comes close enough to an object to
possibly intercept the object. If the ray does not cross the boundary region, OpticStudio
assumes the ray will not hit the object. For this reason, it is possible for rays to miss an object if
the drawing resolution is set too low. For these rare cases, increase the drawing resolution to
ensure the ray strikes the object.
Do not set the drawing resolution needlessly high as this will slow down ray tracing and
rendering without increasing accuracy!
For CAD objects, including the Boolean CAD object and other non-native objects, the drawing
resolution is a different setting called “chord tolerance” in the Object Properties>CAD settings.
See “Object Properties > CAD” for more information about the chord tolerance. For more
information on the difference between native and non-native objects, see the “Native Object”
definition.
Sources
Object source options are set in the Source section of the Object Properties window. The
Object Properties can be reached by clicking the down arrow in the Object Properties bar
above the NSC Editor.
Sources section is used to define properties of source objects, including polarization state,
coherence length, and initial phase, position, and direction of rays of light emanating from
NSC sources. For important information see “Defining the initial polarization”. The tab
supports the following controls:
Polarization
Initial Phase The initial phase of the ray in degrees, with 360 degrees being equal to one wave
of optical path. This setting only affects coherent ray computations which depend upon the
phase of the ray.
Coherence Length The length of ray propagation in lens units over which the phase is known.
For details on Coherence Length effects see “Coherence length modeling”.
Jx, Jy The magnitude of the electric field in the local x and y directions, respectively.
X-Phase, Y-Phase The phase in degrees of the electric field in the local x and y directions,
respectively.
Ray Trace
Reverse Rays Checking this option will reverse the direction cosines of every ray. This is useful
for reversing the initial direction of rays from the source. Reverse rays is done after the Pre-
Propagation distance is considered, if any.
Pre-Propagation The distance in lens units the ray is propagated before beginning the actual
ray trace through NSC objects. Pre propagation moves the starting point of rays forward or
backward along the ray direction cosines. This feature is useful for defining rays at one position
but beginning the ray trace at a different position along the ray path; such as prior to or after
an object near the source. The Pre-Propagation distance will alter the initial phase and electric
field of the ray to account for the propagation length. Pre-Propagation occurs before reversing
the rays if the reverse rays option is selected.
Bulk Scatter Normally, if a ray travels through an object with a bulk scattering media, the rays
may scatter multiple times within the media. This is the default “Many” option. If “Once” is
selected, each branch of a ray can only bulk scatter once. Note that if a ray splits before
scattering, each of the child rays may scatter, since each child’s branch is scattering for the first
time. If “Never” is selected, then no bulk scattering will occur for rays from this source. This
control is useful for modeling fluorescence. See also the “Bulk Scatter” section of the Object
Properties.
Sampling Method The available options are random and Sobol. Once the parameters of a
source model are defined, rays are generated randomly to model the light leaving the source.
However, truly random values are not always desirable. The reason is that random numbers
tend to not uniformly sample parameter space if the number of samples is small. Random
numbers may group together, leaving relatively large gaps in sampling space. In practice, this
means that it takes a great many rays to get sufficient sampling to produce smoothly varying
results. Sobol sampling is a widely used sampling algorithm which looks qualitatively random,
but is in fact a carefully selected distribution that optimally “fills in” previously unsampled
Array
Array Type This feature creates an array of identical sources, all with the same properties as
the “parent” source. Depending upon the Array Type, additional parameters become available
on the Source tab to define the number of array elements and the size of the array. The array
types supported are:
Rectangular: This array can be used to make a 1D line or 2D array of sources with uniform
spacing in the local X and Y directions. The options available include the number of sources in
X and Y, and the source to-source spacing in lens units along each direction. The minimum
number of sources in either direction is 1, the maximum is 2000. The sources are numbered
starting from 1 in the first (x) column and first (y) row at the location of the parent object. Each
subsequent source is numbered across the columns along the first row, until the number of x
direction sources is reached. The next source will be placed at the next row in the first column,
and then numbering continues across the columns again, until all sources are placed.
Circular: This array is a single circle of sources centered on the parent coordinate. The sources
are equally spaced in angle at the specified radial coordinate in lens units. The first source is at
0 degrees on the XY plane, and the sources continue counter-clockwise (looking down the -Z
axis) around the circle until all sources are placed.
Hexapolar. This array consists of equally spaced rings of sources. The first “ring” is at the
location of the parent, and the first source is placed there. The second ring contains 6 sources,
equally spaced in angle, starting at source number 2 at +90 degrees on the XY plane, and the
sources continue counter-clockwise (looking down the -Z axis) around the circle until all 6
sources (source numbers 2-7) are placed. The third ring contains 12 sources, the fourth ring 18,
and the pattern repeats until the last ring is reached. A maximum of 20 rings is supported. The
spacing parameter is the radial spacing between adjacent rings.
Hexagonal. This type forms an array with hexagonal symmetry. The first “ring” contains one
source at the location of the parent source. The second “ring” contains 6 sources, placed
around the center source in hexagonal fashion. The third “ring” consists of 12 sources placed
outside of the second ring, and the pattern repeats until the last ring is reached. A maximum of
20 rings is supported. The spacing parameter is the full height of the hexagonal region, which
is the vertical spacing between sources in the same column. The numbering convention for this
array starts at 1 at the bottom (-y coordinate) of the leftmost (-x coordinate) column, and then
goes up the leftmost column, then starts at the bottom of the next column to the right, and
For all arrays of sources, if the total number of sources exceeds 10,000, the source objects will
not be drawn. The parameter settings for the source, such as number of layout rays, number of
analysis rays, and power apply to each source in the array. For example, a 3 x 3 array of 1 watt
sources will produce 9 watts.
Color/Spectrum
Source Color, Spectrum, and Wavelengths From/To These settings choose the method for
generating the spectral model for the source. There are a number of ways to model the
spectral content of a source. Sources may be either monochromatic, or may cover some region
of the visible spectrum to represent a composite color, such as orange or white. The available
source color models are described below.
System Wavelength: If this option is selected, then the monochromatic wavelengths defined
on the system wavelength dialog box are used. The system wavelengths are described in
“Wavelengths”. Once the system wavelengths are defined, the wavelength used for ray tracing
is defined by the wavenumber used by the source. The wavenumber is one of the NSC Editor
parameters used by all sources. See “Parameters common to all source objects” for a full
description. This is the default setting for Source Color and is the only setting that uses the
system wavelengths.
CIE 1931 Tristimulus XYZ: This source color model defines the color of the source using the
three CIE tristimulus values commonly given the names X, Y, and Z. See “The spectrum fitting
algorithm” for important information on the spectrum generated to represent the desired
color. Note that although the Y value normally represents the overall brightness of the source
in lumens, OpticStudio does not use the Y value for this purpose when defining the source
color. The power or brightness of the source is set independently; see “Parameters common to
all source objects” for a full description. Internally, OpticStudio will normalize the XYZ values to
1 lumen for purposes of computing the spectrum.
CIE 1931 Chromaticity xy: This source color model is essentially identical to the XYZ model
above, except the normalized chromaticity coordinates are used instead. OpticStudio converts
the xy values to XYZ and then follows the procedure described in “The spectrum fitting
algorithm”.
CIE 1931 RGB (Saturated): RGB values are converted to CIE XYZ coordinates, and the method
for computing the spectrum is then the same as for CIE 1931 Tristimulus values. Note the RGB
color is the fully saturated RGB color, which means colors such as grey on a 8 bit scale (128,
Uniform Power Spectrum: This creates a uniform power spectrum over the specified
wavelength range at the number of discrete wavelengths defined.
D65 White: Defines X = 0.9505, Y = 1.0000, Z = 1.0890, which is the D65 white color on
computer monitors.
Color Temperature: Based upon the temperature in Kelvin, the XYZ tristimulus values are
computed to yield the same color as a black body of the specified temperature, and the
spectrum is computed as described for the CIE 1931 Tristimulus values. Note this is not a true
black body spectrum, but a spectrum fit to yield the same color as the blackbody of that
temperature.
Black Body Spectrum: Based upon the temperature in Kelvin, this yields a true blackbody
spectrum over the specified wavelength range. This color model is not limited to the visible
spectrum.
Spectrum File: This color model reads the wavelength values and weights from a file. For
details on the file format, see “Defining a spectrum file”.
CIE 1976 Chromaticity u’ v’: This source color model is essentially identical to the XYZ model
above, except the normalized u’ and v’ chromaticity coordinates are used instead. OpticStudio
converts the u’ and v’ values to XYZ and then follows the procedure described in “The
spectrum fitting algorithm”.
Note that for all Source Color settings other than System Wavelengths, Uniform Power
Spectrum, Black Body Spectrum, and Spectrum File, a spectrum must be fit to represent the
selected color. See “The spectrum fitting algorithm”.
Once the parameters of a source model are defined, rays are generated randomly to model the
light leaving the source. This process involves generating random numbers which are scaled to
represent values of the starting coordinates and direction cosines of the rays. Note the starting
coordinates describe the near-field source properties, and the direction cosines represent the
far-field properties.
A solution is to use a sampling method which looks qualitatively random, but is in fact a
carefully selected distribution that optimally “fills in” previously unsampled space. A widely
used algorithm is a pseudo-random sequence called Sobol sampling. For a good discussion of
this algorithm see Press, Flannery, Teukolsky, and Vetterling, Numerical Recipes, Cambridge
Press.
The following graphs show the near-field ray patterns from two rectangular sources. The first
ray pattern shown here uses random sampling. Note the distribution has no obvious periodic
artifacts.
Some of the rays are very close to one another, while other relatively large areas contain no
rays at all. In practice, this will yield a “noisy” irradiance distribution on a detector, since some
pixels will contain one or two rays, while other pixels will contain no rays, even though the
source is uniform for this sample case.
For random rays, the Signal-to-Noise Ratio (SNR) is approximately given by N / sqrt(N) = sqrt
(N) where N is the number of rays per pixel. For large detectors with many pixels, a very large
number of rays may be required to obtain a high SNR. For example, a detector with 10,000
pixels would require roughly 100 million rays to achieve a SNR of 100, assuming the best-case
scenario of a uniform source. For more practical and realistic optical systems, lower light levels
would have much lower SNR.
The graph below shows the same number of rays traced to an identical detector using the
Sobol pseudo-sampling grid. Note the rays are much more uniformly distributed, with
relatively fewer gaps and fewer rays exceedingly close to one another. As additional rays are
traced, the rays are always selected to lie between rays already traced, creating an ever finer
and more uniform distribution. For reasons which are beyond the scope of this discussion, the
SNR using the Sobol sampling goes as approximately N, rather than sqrt(N). For the previous
There are two disadvantages of the Sobol algorithm. First, there are sometimes subtle artifacts
in the ray distribution perceptible to the human eye.
For some optical systems, if the sampling is too low, these artifacts can show up in the
detected irradiance as false pseudo-periodic structures. Second, the rays generated with the
Sobol algorithm are always the same.
Tracing M rays, and then tracing M more rays, will yield the exact same results as the first set of
M rays; whereas tracing 2M rays would yield a different result. This is why sources using Sobol
sampling as drawn on layout plots will always trace the exact same rays. The only way to get
different rays is to trace at one time a larger number of rays. Nonetheless, using Sobol
sampling will generally produce faster convergence with fewer rays than random sampling.
Not all source models require or support Sobol sampling. If a source model does not support
Sobol sampling, this control will be greyed out. Some source models only support Sobol
sampling for part of the ray generation, such as the ray starting coordinates, and not for other
parts, such as the ray starting direction cosines. For any source which supports Sobol sampling
(whether it be for part or all of the ray generation), this method will be the default sampling
method for the source (as given in the Sources tab) when it is first added to the system.
OpticStudio cannot trace a non-monochromatic “ray”. Every ray traced must have a unique
wavelength, so that the index of refraction, reflection, transmission, bulk absorption,
diffraction, and other effects can be computed accurately. For this reason, sources that are not
monochromatic must be represented by a spectrum of discrete wavelengths.
It is important to grasp that for a given composite color of light, such as light blue, the
underlying monochromatic spectrum is not unique. There are an infinite number of weighted
There are 3 inputs that allow user control over the spectrum generation: the minimum
wavelength, the maximum wavelength, and the number of wavelengths. OpticStudio will
create a spectrum of evenly spaced monochromatic wavelengths that span the defined range.
For example, if the minimum wavelength is 0.500, the maximum is 0.700, and 5 wavelengths
are used, then the wavelengths chosen will be 0.500, 0.550, 0.600, 0.650, and 0.700 (all
wavelengths in OpticStudio are in micrometers). OpticStudio will the compute the XYZ
response at each of these wavelengths, and determine the optimal weighting at each
wavelength to yield the total desired XYZ color. The resulting “best fit” tristimulus XYZ values
are displayed underneath the spectrum input. Additionally, the RGB equivalent of the best fit
color is displayed for reference. When using the fitting to produce a desired XYZ color, the
minimum and maximum wavelengths must be between 0.380 and 0.830 micrometers, which is
the practical extent of the visible range of light and the tristimulus Y response is non zero.
Note that the best fit XYZ values may differ from the desired value. This can happen if there are
two few wavelengths in the spectrum, or if the wavelength range is not sufficiently broad, or if
the desired XYZ values cannot be represented. In the latter case, this is usually because the XYZ
values are non-physical and do not lie within the visible region on the CIE chromaticity chart -
for example, the tristimulus values (1, 1, 18) do not correspond to any visible color.
Once the spectrum is determined, OpticStudio randomly chooses wavelengths to trace from
among the spectrum values, weighted according to the relative weights determined by the
fitting process. To see the wavelengths and weights actually used in the fit, use the prescription
report described in “Prescription Data”.
Spectrum files are in text format, end in the extension *.SPCD, and are placed in the
<objects>\Sources\Spectrum Files folder (see “Folders”). The files are used to describe a user-
defined spectrum for source color modeling. The file format is pairs of numbers in the
following format:
# comment <optional>
wavelength1 weight1
wavelength2 weight2
etc...
Once a spectrum is defined, OpticStudio will randomly choose wavelengths from the spectrum
based upon the relative weight of each wavelength. A wavelength with twice the relative
weight as another wavelength will trace twice as often, and therefore twice as many rays of
that wavelength will be traced. If a wavelength has a low relative weight, fewer rays of that
wavelength will be traced, and this may lead to undersampling (more noise) in data associated
with that wavelength.
If the source units are in Watts or Joules, every ray has equal power (or energy), and the total
power of all the rays traced will exactly equal the total power of the source. However, if the
source units are Lumens, this will not be precisely true. To correctly compute the true color of
the detected light, OpticStudio must scale the ray units from Lumens to Watts based on the
spectral distribution of the source. Each ray is then assigned an equal wattage and is traced
through the system. When a given ray then hits a detector, the power of that ray is converted
back to Lumens using the ray’s wavelength. Since the number of rays is fixed, and the ray
wavelengths are randomly chosen, the total power in Lumens will not be exactly the same
value as that specified for the source. Generally speaking, if a reasonable number of rays is
traced, the total Lumens will be very close to the defined source Lumens value.
For important information on ABg coefficient scaling, see "Wavelength scaling of ABg data".
Coat/Scatter
Object coating and scattering options are set in the Coat/Scatter section of the Object
Properties window. The Object Properties can be reached by clicking the down arrow in the
Object Properties bar above the NSC Editor.
Face The face to which the properties will be applied. For imported CAD objects, see the “CAD”
section of the Object Properties. A face is a collection of one or more surfaces on an object
upon which the same optical properties are applied. For example, for a singlet lens, there are 3
faces: the front face, the back face, and all remaining faces (which include the edges and
squared faces around the edges). In this case, 3 different coatings may be applied; one to each
face group, if all faces of the lens are coated. Note that more than one surface may be grouped
together in a single face number, and all surfaces in the same face group have the same optical
properties. The valid face numbers are 0 through 50, although most objects have less than 4
faces.
Profile A profile is a collection of settings related to the thin film coatings and scattering
model data applied to an object face. Suppose that many objects in an optical system are all
composed of the same material and have the same coating and scattering properties. Rather
than type this identical data in for each object and face; the data may be typed in once, then
saved to a profile. Once saved, any other object face may use the same profile. Profiles are
stored in the file whose name is specified on the Files section of the System Explorer; see
“Scatter Profile” for details. If unique settings for this object are desired, then choose “Use
definitions below” to edit the scattering parameters. If a profile is selected; then the coating
and scattering data boxes will be disabled, as this data is defined by the selected profile.
However, the settings will be displayed.
Save Saves the current scattering settings as a new profile. Pressing this button will prompt for
the name of the new profile.
Face Is This setting controls whether the face is refractive, reflective, or absorbing. The
following options are available:
l “Object Default” means the face is either refractive, reflective, or absorbing, depending
upon the material type defined in the NSC Editor.
l “Reflective” means the face is always reflective. The transmitted part of the light is
ignored. “Reflective” assumes the surface is coated with a thick layer of aluminum, with
an index of refraction of 0.7-7.0i (at 0.55um). The layer is assumed to be thick enough
that no light propagates past the layer.
Coating The name of the coating to apply to the surfaces with the selected face number.
Coatings are defined in the system coating file. For more information, see Defining Coatings.
Rays traced through non-sequential components may be done while accounting for
polarization effects, or polarization may be ignored. The initial polarization state for a ray is
determined by the source properties, see the “Sources” section of the Object Properties. If
polarization ray tracing is being used, transmission, reflection, and absorption of optical
energy is accounted for at all surfaces. Bulk absorption is also accounted for. Thin film coatings
significantly affect transmission and reflection properties of optical surfaces. Surfaces are
initially uncoated, but coatings may be applied to surfaces or group of surfaces.
If two surfaces are in contact, such as two 45-45-90 prisms placed so that one face of each
prism is in contact with the other, then a coating may be applied “between” the surfaces in
contact.
This is accomplished using the same convention described above in the section “Object
Placement”. The rule is: the LAST object listed in the NSC Editor determines the properties of
the interface between two objects.
For example, to place a thin metal coating on the interface between two prisms arranged to
form a beam splitter, the first prism object listed should have the contact surface “uncoated”,
while the second object listed should have the contact surface coated with the appropriate
thin film coating. Rays striking this interface from either side will see the correct coating, and
the ray transmission and/or reflection will be correctly computed. Note prisms modeled as
POB objects can have different coatings applied to different faces, so some faces may be anti-
reflection coated while others are coated with a reflective coating.
Scatter models are defined in terms of a probability distribution function. When OpticStudio
scatters a ray, a new direction of propagation is chosen. The direction is chosen using a
probability function and one or more random numbers. The net effect is that if many rays are
traced, the resulting scattered ray distribution would approach the probability distribution
function. There are seven scattering models available: none, Lambertian, Gaussian, ABg, ABg
File, BSDF, and user defined. Each available scatter model is summarized below, but see
Scattering for the detailed technical descriptions.
No Scattering The default scatter model is “No Scattering”, which means no scattering will
occur. The resulting ray is called the unscattered or the “specular” ray (even if the surface is not
actually reflective). The Bi-Directional Scatter Distribution Function (BSDF), which is the
scattered radiance per unit incident irradiance, is zero.
Lambertian In the Lambertian scattering model, the scattered ray projection vector has equal
probability anywhere in the unit circle, and the BSDF is just 1/π. The scattered intensity is
proportional to the cosine of the angle between the normal vector and the scattered ray angle.
Note Lambertian scattering is independent of the ray incident angle. Most diffuse surfaces are
nearly Lambertian. Although Lambertian is a valid option on the sequential surface dialog, rays
which scatter using this model may go in any forward direction, which may cause rays to
scatter at large enough angles so that they do not correctly propagate through the rest of the
optical system.
Gaussian In the Gaussian scattering model, the scattering distribution is rotationally symmetric
in direction cosine space, no matter what angle the specular ray makes with respect to the
surface normal. The BSDF expression (see “Scattering”) contains a dimensionless value σ,
which determines the width of the Gaussian distribution on the projected plane. Values of σ
greater than about 5.0 yield a BSDF that is nearly Lambertian. For this reason, the maximum
allowed value of σ is 5.0.
ABg The ABg scattering model is a widely used method for defining the BSDF. This scattering
model is generally a good model to use when the scattering is mainly due to random isotropic
surface roughness, and the scale of the roughness is small compared to wavelength of light
being scattered. These assumptions are generally valid for polished optical surfaces. See
Scattering for a detailed technical description.
ABg File The ABg File scattering model allows a sum of ABg profiles to be used to define the
scattering properties of a surface. The profiles to use are specified in a text file. The text file
must have a .ABGF extension and must be located in the <data>\ABg_Data folder (see
“Folders”). All of the profiles specified in the ABGF file must be defined in the currently loaded
ABg Data File (see “ABg Data File”), and all profiles must be specified using upper case letters
(regardless of capitalization of the profile name in the ABg Data File).
User defined scattering Completely general surface scattering may be defined via an external
program called a Dynamic Link Library (DLL). Sample DLLs are provided with OpticStudio with
source code. New DLLs may be easily created with a suitable compiler. See also Comments
about DLLs.
If a scattering model other than “No scattering”, “ABg”, or “ABg File” is selected, the “Fraction
to Scatter” must be defined. This fraction must be between 0.0 (no rays will be scattered) and
1.0 (every ray will be scattered). For the ABg and ABg File scattering models, the fraction to
scatter is determined by the ABg parameters, see “Defining ABg data”.
If ray splitting is off, the decision to scatter or not to scatter is made by the generation of a
single random number between 0.0 and 1.0. If this random number is larger than the fraction
to scatter, the ray will not scatter, otherwise, the ray will scatter. For example, if the fraction to
scatter is 1.0, the ray always scatters. If the fraction to scatter is 0.0, the ray will never scatter. If
the fraction to scatter is 0.25, then on average one out of four rays will scatter. All of the energy
of the ray follows the randomly generated scatter path. The number of scatter rays has no
affect if ray splitting is off.
If ray splitting is on, then OpticStudio will split the specular ray into one or more scattered rays,
while still possibly tracing the specular ray. The specular ray will receive a fraction of the
original energy equal to (1.0 - f) where f is the fraction to scatter. The remaining energy will be
divided equally among the one or more scattered rays. The number of scatter rays determines
how many scatter rays will be generated. For example, if the fraction to scatter is 1.0, then the
specular ray will receive zero energy and will no longer be traced; and all the energy will be
divided equally among the scattered rays. If the fraction to scatter is 0.0, no scattered rays will
be traced, and the specular ray retains all the original energy. If the fraction to scatter is 0.25
and the number of scatter rays is 5, then the specular ray will receive a relative energy of 0.75,
and each of the 5 scattered rays will have a relative energy of 0.05. If the number of scatter rays
When this option is selected, rays will only scatter in reflection upon entering a scattering
volume (i.e. when entering the window from air) and will only scatter in transmission when
exiting the volume (i.e. when exiting the window into air); otherwise rays will follow the
specular ray path. This option is generally used when modeling a thin scattering volume in
which the scatter data were measured, i.e. in which the BSDF scatter model is selected.
When measuring scattering in reflection or transmission from a thin volume, the reflected
(BRDF) and transmitted (BTDF) measurements encompass all of the scatter paths in the
volume. Since each single set of data (BRDF or BTDF) encompass all real scatter paths, all of
these paths need to be consolidated when modeling scatter in OpticStudio. Thus, with
selection of the Thin Window Scattering option, scattering only happens once in reflection and
in transmission from the volume.
Scatter To
Object “Scatter To” method is set in the Scatter To section of the Object Properties window.
The Object Properties can be reached by clicking the down arrow in the Object Properties bar
above the NSC Editor.
The first method is to scatter a ray according to the scatter distribution, but only trace the ray if
the ray propagates towards an object of interest. This method may be implemented by
defining a “Scatter To” list of objects. The Scatter To method works well for wide angle scatter
(such as Lambertian scatter) and when the object of interest subtends a relatively large angle
as seen from the scattering surface.
The second method is to always scatter the ray towards the object of interest, and then to
normalize the energy the ray carries to account for the probability the ray would have actually
scattered in that direction. This method is called “Importance Sampling”. Importance Sampling
is generally superior to the Scatter To method if the scatter is narrow angle or the object of
interest subtends a relatively small angle as seen from the scattering surface.
The Scatter To feature speeds up scattering analysis by ignoring scattered rays which do not
propagate directly towards an object of interest. The Scatter To list is very similar to the
Consider Objects list (see “Defining paths using the Consider Objects list”). The Scatter To list is
a string of integer object numbers separated by spaces. A scattered ray will only be traced if
Choosing an object on the Scatter To list does not guarantee that a scattered ray will be traced
to that object. The scattered rays are generated based upon the scattering properties of the
object the incident ray strikes (see “Scattering”). OpticStudio will generate the scattered rays,
then ignore those rays that do not intersect any of the listed objects. This method does not
ensure that a ray will scatter toward a listed object. However, the number of scattered rays (see
“Fraction to scatter and number of scatter rays”) may be made large so that it is more probable
some of them will head in the desired directions.
To turn off the Scatter To feature, leave the list blank. In this case, all scattered rays will be
traced. The key difference between the Scatter To list and the Consider Object list is that the
Scatter To list only applies to scattered rays, while the Consider Object list applies to both
specular and scattered rays.
Importance Sampling
Importance Sampling speeds up scattering analysis by always choosing scattered rays that will
propagate in a desired direction. To determine the direction for the scattered ray, a target
sphere is defined. The target sphere is defined by position, size, and limit. The target sphere
position is defined by the selection of an object number. The target sphere will then be placed
at the origin of the selected object. Any object type may be used, including Null objects. The
size parameter defines the radius in lens units of the target sphere. The limit parameter is used
to define the maximum solid angle in Steradians of the target sphere as seen from the scatter
point. If the solid angle of the target sphere as seen from the scatter point exceeds the limit
value, Importance Sampling will not be used for that scattered ray. The purpose of this feature
will be discussed below.
When the ray scatters from the surface, the direction and subtended solid angle of the target
sphere as seen from the scatter point are computed. A ray direction is randomly selected from
within this solid angle cone with uniform probability. This will be the scattered ray direction.
Note that the direction is not dependent upon the BSDF of the surface.
Because the ray direction is determined without consideration of the BSDF, the energy the ray
carries must be modified to get correct ray tracing results. The amount of energy the scattered
ray will carry depends upon the BSDF and TIS of the surface as follows:
Up to 6 independent target spheres may be defined for each object. If one scatter ray is
selected, the first target sphere is used. If two scatter rays are selected, then the first two target
spheres are used, and so on up to 6 scattered rays. If more than 6 scattered rays are selected,
the seventh and subsequent rays scatter according to the BSDF and Importance Sampling is
not used. Energy normalization is complex and somewhat prone to statistical errors when the
number of scattered rays is not equal to the number of target spheres. For the fastest, most
accurate results, use a number of scattered rays that is exactly equal to the number of target
spheres.
While Importance Sampling can be used with User Defined Scatter Models, it has to be
specified within the User Defined Scatter Model. This is demonstrated in the sample User
Defined Scatter Models Lambertian.DLL, and K-correlation.DLL. The other User Defined Scatter
Models Gaussian_XY.DLL, and TwoGaussian.DLL do not support Importance Sampling.
Volume Physics
The object bulk scattering method, wavelength shift, and phosphors/fluorescence settings are
defined in the “Volume Physics” section of the Object Properties window. The Object
Properties can be reached by clicking the down arrow in the Object Properties bar above the
NSC Editor. To set whether a ray from a given source can bulk scatter once or multiple times,
see the “Sources” section of the Object Properties.
The following screenshot was taken with the OpticStudio non-sequential scattering sample file
“Bulk Scatter.ZMX”:
None
This means that no bulk scattering is selected, and rays will propagate through the solid
without scattering.
Angle Scattering
Mean path: The mean path between scatter events, measured in lens units.
Angle: The angular cone in which the rays scatter, measured in degrees.
For more information on the angle scattering model, please see “Bulk scattering” in the “Non-
sequential Overview” section of the Help Files.
Mean path: The mean path between scatter events, measured in lens units.
DLL: The name of the DLL which defines the scattering function.
Other parameter values: These are used to define the parameters to be passed to the DLL. To
make these parameters variable or under multi-configuration control, use the NPRO operand;
for details see the “NPRO” operand in the “Optimization Overview” section of the Help Files.
For more information and examples of DLL scattering models, please see “Bulk scattering” in
the “Non-sequential Overview” section of the Help Files.
Wavelength Shift
The wavelength shift control allows definition of wavelength transitions during bulk scatter
events. This feature is primarily used for modeling fluorescence. To control how many times a
ray can bulk scatter, see the “Sources” section of the Object Properties.
The syntax is “in, out, prob” where “in” is the input wavelength number, “out” is the output
wavelength number, “prob” is the relative probability that this shift will occur when tracing the
in wavelength. Multiple transitions may be defined using a semi colon separator. The
probability values are only relative to other wavelength shifts defined for the same input
wavelength. Also, wavelength shifting is not supported when using Source Color models other
than the System Wavelengths.
l Example 1. A single input wavelength (#1) will shift to another single wavelength (#2):
“1,2,1.0”.
This feature is only available in the Premium and Enterprise editions of Ansys Zemax
OpticStudio.
Standard model
The settings are split into two sections, governing the photoluminescence and Mie scattering
behaviors of the volume.
Photoluminescence Data
Absorption Spectrum, Emission Spectrum, and Quantum Yield Spectrum: See ‘Spectrum files’
subsection below.
Extinction Coefficient: the extinction coefficient at the designated extinction wavelength. Used
as a scale factor to convert the absorption spectrum in arbitrary units to a wavelength
dependent extinction coefficient. Has units of Molar-1cm-1 (L*mol-1*cm-1).
Density: The density of photoluminescent particles, in units of cm-3. The particle type (dye
molecules, quantum dots, etc.) should be the same as the type used to define a mole in the
Extinction Coefficient.
Mean Free Path at Extinction Wavelength: the photoluminescence mean free path at the user
specified extinction wavelength, as calculated based on the input parameter values and
absorption spectrum, in lens units.
The photoluminescence mean free path with respect to wavelength is determined through the
extinction coefficient, , which is in turn dependent on the absorption spectrum,
Where is the extinction wavelength. The mean free path, , is calculated for any
incident wavelength according to:
where is the extinction coefficient, and c is the molar concentration of phosphors (mol/L),
converted from the user-supplied density.
Spectrum files
A spectrum file must be set for both the Absorption Spectrum and Emission Spectrum drop
downs. In addition, a spectrum file must be set for the Quantum Yield Spectrum.
Absorption Spectrum
The absorption spectrum, represents the likelihood that a photon is absorbed. It relates
the input intensity and the transmitted intensity according to:
The file header specifies the number of data pairs in the file and a wavelength unit flag (0 for
microns and 1 for nanometers). Absorption spectra must contain at least five wavelengths. If
the wavelength of a ray falls outside the absorption spectrum range then it will not be
absorbed and will just Mie scatter.
Emission Spectrum
The emission spectrum is the photon spectral radiant flux of the photoluminescent emission in
units of photon counts/second. This spectrum is used to calculate a probability spectrum for
the wavelength of an emitted ray. From this spectrum, any down-converted rays are
probabilistically assigned a new wavelength.
Note that some sources use units of spectral radiant flux to define emission spectra, while
some use photon flux. OpticStudio uses the latter. When using emission files, ensure that the
units are counts/second.
If five or fewer incident wavelengths are defined then intermediate values will be linearly
interpolated. If more than five incident wavelengths then cubic spline interpolation will be
used. If only one incident wavelength is used then those values are used for all incident
wavelengths.
A ray will only be shifted to a longer wavelength than its original value.
Note that if only one efficiency value is listed in the ZQE file, then it is used for all wavelengths.
Excitation Spectrum
As of OpticStudio Version 18.9, for clarity and improved agreement with industry standards,
the Excitation Spectrum option of the model has been deprecated in favor of the Quantum
Yield spectrum. The documentation on Excitation Spectrum is provided here, as well as in the
rest of this page, for completeness.
The excitation spectrum is similar to the quantum yield spectrum, except that it includes the
effect that changing the wavelength has on ray intensity. It is an efficiency spectrum that is
used to define a wavelength dependent efficiency factor F:
In versions of OpticStudio prior to 18.9, either an excitation or a quantum yield spectrum must
be provided. Note that OpticStudio’s definition of excitation spectrum differs from some other
resources, which may treat excitation spectrum and absorption spectrum interchangeably.
If only one efficiency value is listed in the ZEX file then it is used for all wavelengths.
All efficiency values should be 1 or less. Setting efficiency values greater than one will lead to
energy not being conserved within the system.
If a ray is absorbed, but its wavelength is outside the range of the excitation spectrum its flux
will be set to zero and it will be terminated.
Mie Scattering
Particle Index, Particle Radius, Threshold and Particle Density are the same parameters defined
for the Mie.dll scatter algorithm. For more information, see the Knowledgebase article How to
simulate atmospheric scattering using a Mie model.
Mean Free Path: The mean path between Mie scatter events, measured in lens units. This
parameter can be used to directly enter a Mie scattering mean free path as an alternative to
calculating the Mie mean free path from the Particle Density value.
Scattering Calculation
The combination of the Photoluminescence and Mie scatter parameters allows detailed
modeling of phosphors and fluorophores embedded in scattering (or non-scattering) hosts.
There are four possible outcomes when a ray travels through a photoluminescent material. It
can Mie scatter, undergo photoluminescence, be absorbed without being reemitted, or no
change may occur. Which outcome actually occurs is given by the following flow chart:
and Ltot is the total mean free path, LMie is the Mie mean free path, and LPL is the
Photoluminescence mean free path. The scatter type is chosen by drawing a random number,
r, evenly distributed between 0 and 1. If r < Ltot/ LPL then the ray undergoes
photoluminescence. Otherwise it Mie scatters. A photon will re-emit if the quantum yield for
the input wavelength is non-zero. In this case, a wavelength is probabilistically drawn from the
emission spectrum. Otherwise, the photon is lost through non-radiative channels. In this case,
the ray is terminated.
Basic model
The basic model is included for backwards compatibility and users are encouraged to use the
Standard Model, since the Standard Model uses a separate mean free path for Mie scattering
and photoluminescence.
The settings for the Basic model are similar to the Standard model with the exception that
there is no separate Photoluminescence mean free path calculation. The probability that a ray
will undergo Photoluminescence in the Basic model is determined entirely by the Mie scatter
parameters. If the wavelength of the ray is within the range of the Absorption Spectrum and it
bulk scatters, then it will always undergo Photoluminescence and there is no possibility for it to
experience Mie scatter.
In addition, the implementation of the Absorption Spectrum, in the Basic Model differs
from that in the Standard Model. It is defined to be the probability that an incoming photon is
absorbed. This is included in the basic model as a scale factor to emitted intensity. So, when
using a Quantum Yield spectrum in the Basic model, the intensity of a down converted ray is
Notes
A single ray may undergo multiple photoluminescent wavelength shifts so long as each event
satisfies the criteria above.
The photoluminescent model is only applicable to sources whose spectrum is defined by the
System Wavelengths dialogue. Sources whose spectrum is defined using another method
(blackbody, tristimulus data, etc.) will not undergo wavelength shift.
In general, photoluminescence has a depolarizing effect on light and this model will randomly
polarize rays after a scattering event. Certain fluorescent molecules display fluorescent
anisotropy, where the result of a fluorescent interaction is to partially polarize light. This is not
currently supported however. If this is an important phenomenon in your modeling work
please submit a feature request to support@zemax.com.
While the up-conversion of photons is physically possible this model it was not designed
simulate such effect. If this phenomenon is important to your work please submit a feature
request to support@zemax.com.
This section is used to define the index type for objects made of isotropic, birefringent, or
gradient index materials.
Isotropic Types
Birefringence is ignored, and the object is modeled as an isotropic media whose index is
defined by the material associated with the volume.
Birefringent Types
The birefringent type is used to define birefringent properties of solids made from uniaxial
anisotropic materials, such as calcite.
Mode This control allows selection of which rays are actually traced. The distribution of energy
does not change with this setting, and energy assigned to rays that are not traced are placed in
the “lost energy (thresholds)” sum. Either ordinary or extraordinary rays, or both, may be
traced. Waveplate Mode traces the energy along the path of the ordinary ray, however, the
extraordinary electric field is also propagated with the ray, and the total electric field will be
phase rotated by the differential index in the ordinary and extraordinary directions.
Ax/Ay/Az The dimensionless components of the uniaxial crystal orientation vector in object
local coordinates. These coordinates define the orientation of the axis of symmetry for the
media. Internally, the coordinates are normalized to a magnitude of unity. If all three terms are
zero, the orientation used is (0, 0, 1).
Axis Length The length in lens units of the crystal axis drawn on layout plots. Use a value of
zero to not draw the crystal axis.
Birefringence is ignored unless both polarization and ray splitting are on. If birefringence is
ignored, the media acts like an isotropic media whose index is defined by the material
associated with the volume. If birefringence is considered, the material associated with the
object defines the “ordinary” refractive index. The “extraordinary” refractive index is defined by
the material whose name is determined by appending “-E” to the ordinary material name. For
example, if the object material name is CALCITE, then the extraordinary material must be
named CALCITE-E. If both material names are not found in the current glass catalogs, an error
is issued. If the material is defined as either a table or model glass, the extraordinary and
ordinary indices are set to the same value and the media is effectively not birefringent.
When a ray strikes a boundary where either the incident or substrate media (or both) is
anisotropic, as many as four separate rays are computed - two for ghost reflection and two for
refraction. In each direction, there may be a separate ordinary and extraordinary ray. The
ordinary ray carries the portion of the electric field that lies orthogonal to the plane that
contains the direction of propagation and the crystal axis vector, while the extraordinary ray
carries the electric field that lies in that same plane. If the media the rays are traveling in is
isotropic (such as the ghost reflection off of a birefringent object) then the ordinary and
extraordinary rays are combined into a single ray for convenience, as the energy propagates
along the same path in this case.
Although there are important differences between the non-sequential and the sequential
model for birefringent media in OpticStudio, most of the discussion about the birefringent
media itself is common to both models. This discussion is found in “Birefringent In and
Birefringent Out”.
Birefringent media may not also be gradient index or use bulk scattering, and may not be
diffractive or scatter rays at the media boundaries. Simple ray splitting is not supported for
birefringent media. Sources may not be placed inside birefringent media.
Note that birefringence in non-sequential mode needs ray splitting turned on to work, which is
not allowed in mixed/hybrid mode. If a birefringent material is defined in NSC group in a
mixed mode system, rays will always follow the ordinary path no matter what mode is chosen
for the birefringent object.
The GRIN type is used to define the properties of solids made of a gradient index material.
Settings:
DLL The name of the DLL to use. All gradient index materials used by non-sequential objects
are defined in a separate program called a Dynamic Link Library (DLL). Numerous DLLs are
provided with OpticStudio with source code. New DLLs may be easily created with a suitable
compiler.
Maximum Step Size The maximum step size to use during piecewise ray tracing. The
maximum step size determines the trade-off between ray tracing speed and accuracy. The
exact value required depends upon the rate at which the index of refraction changes and the
desired accuracy of the computations. If the maximum step size is too large, the ray trace
Remaining controls Each DLL may use between zero and 12 user defined data values as
parameters in the computation of the media properties. These values are defined by the DLL
and are only used by the DLL.
To make these parameters variable or under multi-configuration control, use the NPRO
operand. See Multi-Configuration Operands for more information.
See Defining GRIN Media for Non-sequential Ray Tracing for information on defining GRIN
media.
Settings:
Don’t split by order The rays will not split at the surface. Only the order defined by the object
parameters will be traced, and all the transmitted energy goes into this one order.
Split by table below A user defined number of rays will be traced over a range of integral
orders. The fraction of energy given to each order for reflected and transmitted (if any) rays is
defined by the user in a table. The sum of all the defined fractions should not exceed 1.0 to
properly conserve energy. The Start/Stop order are the beginning and ending order number.
These numbers determine how many cells in the table are active. The order limits must be to ±
300 orders, inclusive. 40 orders at a time can be displayed.
Split by DLL function Any diffractive surface may split rays that started at a non-sequential
source, by order, to allow for simultaneous tracing of multiple diffracted orders. How many
rays split, and how much energy is in each order, may be defined externally in a separate
program called a Dynamic Link Library (DLL). Numerous DLLs are provided with OpticStudio
with source code. New DLLs may be easily created with a suitable compiler.
The remaining controls are used to define the parameters to be passed to the DLL. See
“Creating a new Diffraction DLL”. DLL may use between zero and 40 user defined data values
as parameters in the computation of the diffractive surface properties. These values are
defined by the DLL and are only used by the DLL. To make these parameters variable or under
multi-configuration control, use the NPRO operand; for details see “NPRO”.
CAD
The imported CAD objects, the Source Imported, the Boolean CAD object, the Boolean Native,
and the Swept object use the CAD section of the Object Properties dialog. The Object
Properties can be reached by clicking the down arrow in the Object Properties bar above the
NSC Editor.
Note that when the “Use Parasolid Libraries” option is un-checked in OpticStudio Preferences
> General, face number assignments are instead stored in a file may vary. This is because the
number and order of the faces can be different depending on the CAD Libraries used.
The following logic is used when new ZEN/ZAN files are created:
All new ZEN/ZAN files are created with Surface 0 through Surface 50 having Face 0 through
Face 50 and then Surfaces greater than 50 are all defaulted to Face 0
l If a ZEN exists but no ZAN, the ZEN is copied into the newly created ZAN
l If a ZAN exists but no ZEN (when choosing to downgrade to the older CAD libraries),
then the ZAN is copied into the newly created ZEN
l If the ZEN file has the option of “Use single surface” in the Surface Mode, then when
the ZAN is created, all Surfaces will be defaulted to one Face
Object Surface #, Face # This control selects the desired surface number. Changing the
selection in this control will update the NSC Object Viewer if the viewer is opened from the
“View Object” button at the bottom of the tab. The screenshot below is of sample part “LB_
T67C_190608_GEOMETRY.STEP” with Face 0 selected in the Object Viewer. Note more than
one surface may be selected at one time. This allows groups of surfaces to be selected and
renumbered together using the “Change To->” button. An alternate method to select surfaces
is to click on the surface in the NSC Object Viewer.
Reset All Automatically renumbers all surfaces to the default. The default is to assign each
surface a unique Face number starting at 0 through the maximum number of Faces supported.
All remaining surfaces are assigned Face number 0.
Viewer Highlights Sets the NSC Object Viewer to highlight in red all selected surfaces or all
selected faces. Note if multiple surfaces are assigned the same face number, then highlighting
by face will show all surfaces with the same face number.
Model Parameters
Chord Tolerance: This setting affects the rendering of the object. It performs a very similar
function to the Drawing Resolution for OpticStudio native objects. To render the object,
OpticStudio generates a list of triangles which approximate the object shape. The tolerance is
the maximum allowed distance in lens units between a single triangle and the actual surface of
the object. More triangles are added if the tolerance is set smaller which yields more accurate
rendering, at the expense of speed and a larger memory requirement.
This setting is also used to provide a “first guess” as to the location of the ray-object intercept
point. So the smaller the triangle the closer the initial guess is to the correct solution and the
more likely OpticStudio will converge to the correct intersection.
The default value of zero will use a chord tolerance related to the size of the object sufficient to
generate a coarse approximation of the object shape that will render quickly.
The Chord Tolerance value used to draw object shapes in the Shaded Model and 3D Viewer is
100 times larger than the Chord Tolerance value specified in the Model Parameters that is used
for ray tracing. This allows for more accurate ray tracing with better performance in the layout
windows. Adjust the Maximum edge increase the resolution in the display windows.
Maximum edge length: Maximum length of any side for each triangle.
Trace mode:
l Flat – rays are traced to the triangles only and reflected/refracted based on the normal
of the triangles plane.
l Shaded – rays are traced to the triangles only and reflected/refracted based on an
interpolated normal from the vertices of the triangle (this is similar to how lighting is
calculated in the shaded model using normal interpolation).
l Kernel – uses the ray tracer built in to the Parasolid library. Note that this method is
extremely slow, but highly accurate and can serve as a reference. This is the only mode
that does not rely on the faceting of the object.
By default, OpticStudio will use the Parasolid libraries. This setting can be found under
Setup...Project Preferences...General...Use Parasolid Libraries.
If this setting is un-checked, OpticStudio will use ACIS libraries and some settings will be
different in the Model Parameters section. That section will not include these two settings:
Maximum edge length and Trace mode. Instead it will include the following settings:
Surface Tolerance: This parameter is similar to Chord Tolerance in that it is an input used by
the modeling library when trying to fit its internal representation of 3D objects and surfaces to
the definition in the CAD file. However, where chord tolerance is simply the maximum allowed
delta between the surface of a triangle and the curved surface. Surface Tolerance has different
meanings for different types of surface representations. If OpticStudio fails to read a CAD
model, try changing the Surface Tolerance to different integer values from 1 to 4. The default
value for this input is 0, and in many cases this should be fine – control of this value is only
needed for specific parts. Changing the value to 1, 2, or 3 decreases the tolerance by 1, 2, or 3
orders of magnitude, which may potentially provide more accuracy to the import.
For example, the Boolean CAD object uses the surface tolerance parameter to set the
maximum surface deviation between the actual object and the NURBS representation during
creation of the object. In this specific example, the allowed input values are 0, 1, 2 or 3
corresponding to the maximum deviation being 1.0E-4, 1.0E-5, 1.0E-6, and 1.0E-7 lens units,
respectively. Setting the tolerance integer too high (and the corresponding length tolerance
too low) may cause the Boolean CAD object to be malformed. The Boolean Native uses the
CAD settings; the Chord Tolerance and Surface Tolerance settings for layouts and export. It
doesn't use them for ray tracing.
Surface Mode: The Surface Mode setting determines how OpticStudio assigns face numbers
to the various surfaces on the imported object. Some CAD programs create data files that have
many more small surfaces than is useful for optical analysis. For example, a simple cylinder may
be described in the CAD file by hundreds of small surfaces, while for optical analysis only two
or three different optical properties are applied to the entire object. Rather than assign optical
properties to each of the many surfaces, it is usually more convenient to group surfaces by
assigning a single face number to all surfaces that form a continuous smooth portion of the
object. The following Surface Modes are supported to automate this numbering:
l Use single surface: Use a single surface for the entire object. All surfaces are assigned
face number 0.
l Use angles of normal vectors: All portions of the object whose edges meet along a
non-zero length curve, and whose normal vectors along the curve of contact are par-
allel within a user defined angle tolerance are assigned a common surface number. The
angle tolerance is defined by the Face Angle. This mode allows control over how finely
the surfaces are numbered. If the Face Angle is set to a large value (such as 180) then all
surfaces that touch will share a common number. Larger Face Angles yield fewer
unique surfaces.
l Use all surfaces: All surfaces defined the object are uniquely numbered. This mode
yields the largest number of unique surfaces.
l Use previously defined surfaces: Retains the surface numbers defined in the imported
file. Some CAD files, such as those created by OpticStudio, have surface numbers
already defined. If OpticStudio recognizes the surface numbers, they will be used. If
OpticStudio does not detect the surface numbers, the surfaces will be numbered as for
Surface Mode = ‘Use angles of normal vectors’.
l Use single surface per object: All portions of each separate object defined in the CAD
file are assigned a common surface number. This option is useful for applying one prop-
erty to all parts of each object when more than one object is defined with a single CAD
file.
l In all cases, the number of unique face numbers cannot exceed the maximum number
of faces OpticStudio supports, which is currently 51. Any faces which exceed the max-
imum limit will be renumbered to be face 0. For visual confirmation of the face num-
bering, see “NSC Object Viewer”.
Face Angle: The angle in degrees used by “Use angles of normal vectors” described above.
Settings:
Inventor Part Dimension Name This control selects the desired dimension. Note that more
than one dimension may be selected at one time. Once a group of dimensions have been
selected, they can all be exposed to OpticStudio (for potential modification) or not exposed
(and thus locked). Once a dimension is exposed to OpticStudio, the phrase “EXPOSED:” will
appear in front of the dimension name.
iPartFactory Number This control determines which iPart of an Autodesk Inventor Part (.IPT)
file will be read in by OpticStudio.
Expose Expose the selected dimensions to OpticStudio. Values for these dimensions will then
appear in the parameter columns of the Non-sequential Component Editor (NSCE).
Do Not Expose Do not expose the selected dimensions to OpticStudio. Any previously
exposed dimensions will no longer be exposed.
The controls in this section are used to determine which dimensions in a Creo Parametric part
should be displayed (exposed) to OpticStudio for potential modification; dimensions include
parameters which are used to define the part geometry analytically. Only Creo parts (see “CAD
Part: Creo Parametric”) use this tool.
Settings:
Creo Part Dimension Name This control selects the desired dimension. Note that more than
one dimension may be selected at one time. Once a group of dimensions have been selected,
they can all be exposed to OpticStudio (for potential modification) or not exposed (and thus
locked). Once a dimension is exposed to OpticStudio, the phrase “EXPOSED:” will appear in
front of the dimension name.
Expose Expose the selected dimensions to OpticStudio. Values for these dimensions will then
appear in the parameter columns of the Non-sequential Component Editor (NSCE).
Solve Settings:
Variable To make a parameter variable for optimization, click on the small cell to the right of
parameter, and select Variable in the drop down Solve Type menu. Alternatively, click on the
parameter and press Ctrl-Z on the keyboard. Ctrl-Z also removes the variable status, and acts
like a toggle.
Pickup The pickup solve uses a value from another object and column as the value on the
target object. Pickup solves on parameters are only allowed if the source object is a preceding
ZPL Macro ZPL Macro solves call a user defined ZPL Macro to determine the solve value. Any
numerical value that can be computed in a macro can be returned to the editor calling the
solve macro. For information about the ZPL Macro language, see “An Overview of ZPL” and
“Using ZPL Macro solves”.
The buttons in the Non-sequential Component Editor Toolbar are listed below.
Reload Object
Reload the data file that defines the current object. Only certain objects use data files.
This reloads and recreates an object that was defined by an external data file that was changed
since the lens file was last loaded. Typically this option is used to refresh a POB or STL object if
another application has modified the defining data file.
This reloads and recreates all objects listed in the editor. Also see "Reload Object".
This tool works by computing the x, y, and z position and the tilt about the x, y, and z axes
relative to the desired reference object to maintain each objects global position. Because of
the finite precision of the computer, some small amount of error may be induced from
multiple changes in the reference position.
First/Last Object The first and last object defining the range of objects to be modified. All
objects within the specified range will be modified.
Refer To Defines the new reference object. All the objects within the range defined by the first
and last object settings will be modified to use the new reference object. The selected
reference object must precede the first object selected.
If the object is defined by an ASCII text file, such as a Polygon Object (POB), then this menu
option will be available. If selected, a text editor will be invoked so that the defining data file
may be edited. After editing and saving the file; choose Reload Object to update the new
information in OpticStudio.
This analysis window is a simplified version of the NSC Shaded Model, and is for viewing one
object at a time. The title bar will update with the currently selected face number. Different
faces can be selected by clicking directly on the object face. Once the face is selected, it will be
Replicate Object
Replicate the selected object on x, y, and z arrays.
Settings:
Number X, Y, Z The total number of objects in the array in the X, Y, and Z directions.
Add Pickup Solves If checked, all replicated objects will pickup parameter data from the
original object.
Relative References If checked, all replicated objects will use relative references to the original
object, otherwise, absolute references are used See “Reference objects”.
Combine Objects
Perform Boolean operations such as AND, OR, and XOR on any two objects.
The Boolean operations are performed by converting each component object into a NURBS
based representation, and then a series of Boolean trimming and combining operations are
performed to yield the resulting object. For this reason, Boolean CAD objects have the same
considerations that imported CAD objects do; see “Comments about imported CAD objects”
for a discussion. Some loss of precision is possible when converting from OpticStudio native,
high precision representations to NURBS representations; this is not a limitation of OpticStudio
but is inherent in the NURBS representation of arbitrary surfaces. Generally, precision can be
increased as desired using the Spline and Tolerance parameters described above. When
extreme optical precision is required, the user should verify that the Boolean CAD object traces
to a suitable accuracy.
When the maximum possible ray trace accuracy is required, an alternative to combining
objects is to create a User Defined Object. For more information, see “User Defined Object”.
Either, But not both objects: The region contained by either but not both objects.
Spline This setting defines the number of spline points to use for each aspheric face. A larger
number of spline points generally produces more accurate results at the expense of larger files,
slower ray tracing, and slower object creation. This setting has no effect on objects which are
not aspheric.
Ref. Coordinate This setting defines the coordinate system used by the combined object. If
Global is selected, the object will be position relative to the origin of the NSC system. If Object
A or B is selected, then the object will be positioned relative to the local coordinate frame of
Object A or B respectively.
Tolerance The dimensional tolerance in lens units. Some formats use a tolerance parameter to
define the accuracy of the representation. Smaller tolerance values generally produce more
accurate results at the expense of larger files, slower ray tracing, and slower object creation.
Preview Object If pressed, this button will present a Shaded Model display of the object that
would be created with the specified settings. This Shaded Model display may be rotated and
zoomed to visually verify the correct shape will be created.
Creating simple shapes as POB files is generally straightforward using a text editor. However it
is often useful to make a detector object with a large number of facets, such as a cube with
hundreds of facets on each side. When the object has many facets, it is easier to create the
POB using this tool.
To create the POB file, choose the object type from the list, set the appropriate parameters,
enter the name of the file to create, and then click OK. Note the file name should not include a
path, but should include the extension POB. The tool will automatically place the POB file in the
<objects>\Polygon Objects folder (see “Folders), ready to use by the NSC editor.
In any polygon object the number of facets along a certain direction can be set by the user.
This parameter can be adjusted to avoid geometry errors, control the drawing resolution as
well as the number of pixels when the polygon object is used as a detector.
For information on POB objects, see “Polygon Object”. For information on using objects as
detectors, see “Objects as detectors”. For information on the POB format, see “Defining
Polygon Objects”. To create objects using Boolean operations between existing OpticStudio
objects, see “Combine Objects”.
CAD Tools
Various tools for handling objects created in mechanical CAD packages.
The following tools are listed in the drop-down menu of the CAD toolbar button. The
availability of the feature depends on the objects in the NSC Editor.
This allows an object that was originally created by a specific external program to be saved
back into the format of the creating program. The specific programs that are supported by this
option are Autodesk Inventor (for the “CAD Part: Autodesk Inventor” object), Creo Parametric
(for the “CAD Part: Creo Parametric” object), and OpticStudio Part Designer (for the “CAD Part:
OpticStudio Part Designer” object).
Generally, saving the object back into the format of the creating program is only necessary if
the original object was subsequently modified in OpticStudio. Thus, for Autodesk Inventor and
Creo Parametric, this option is only available for part files (*.IPT, *.PRT, and *.SLDPRT files,
respectively). The modified object may be saved into the same file name as the original object,
thus overwriting the original file, or into a new file.
This allows optical properties assigned in OpticStudio to an object that was originally created
by a specific external program to be saved back to the file in the format of the creating
In Autodesk Inventor optical properties are saved under the Custom tab of the iProperties
dialog box. In Creo Parametric optical properties are saved as Annotation Notes, which may be
found under the Model Tree for the part or assembly (as long as Display Annotations is
checked under the Model Tree Filters menu). In Autodesk Inventor, the name of the optical
property starts with the word “OpticStudio”, while in Creo Parametric the name of the
Annotation Note starts with the letter “Z” (in this latter case the full property is not given by the
note name but by the note text).
The information saved in the creating program will have no meaning to that program, but is
provided only for reference. However, if the same file is subsequently loaded into another
OpticStudio design, the property information from that file may be read in by OpticStudio, and
used to assign optical properties to that object in the new OpticStudio design.
This tool will explode an assembly file created in Autodesk Inventor into its individual,
constituent parts. The tool is functionally identical to the one described in “Explode Autodesk
Inventor Assembly” and accessible from the File Tab. However, this tool can only be used to
explode assembly files that are already loaded into the Non-sequential Component Editor
(NSCE) via the CAD Assembly: Autodesk Inventor object (see “CAD Assembly: Autodesk
Inventor”). In addition, once the assembly has been exploded, each of the part files will be
loaded into OpticStudio as a CAD object (see “CAD Part: STEP/IGES/SAT”).
If the “Delete CAD Assembly: Autodesk Inventor” checkbox is selected, then the parent
assembly file will be deleted from the NSCE, leaving only the individual part files (each part
represented by an imported CAD object) in the editor. Otherwise the parent assembly file will
remain in the editor, with its “Explode?” flag set to 1. However, in this case the parent assembly
file will be set not to draw (see “Draw tab”) and for rays to ignore the object (see Type (surface
properties). Thus, only the constituent parts will affect performance of design.
If the “Get OpticStudio Properties from all constituent parts” checkbox is selected, this option
will read in any optical properties that have previously been saved to the individual parts using
the “Save CAD Assembly/Part Properties” tool.
Once the part files have been loaded into OpticStudio, the optical properties of each may be
modified, just as with any built-in object. Thus, this tool allows an assembly to be appropriately
characterized in OpticStudio, should the different parts of the assembly have different
properties.
This tool will explode an assembly file created in Creo Parametric into its individual, constituent
parts. The tool is functionally identical to the one described in “Explode Creo Parametric
Assembly” and accessible from the File Tab. However, this tool can only be used to explode
assembly files that are already loaded into the Non-sequential Component Editor (NSCE) via
the CAD Assembly: Creo Parametric object (see “CAD Assembly: Creo Parametric”). In addition,
once the assembly has been exploded, each of the part files will be loaded into OpticStudio as
a CAD object (see “CAD Part: STEP/IGES/SAT”).
If the “Delete CAD Assembly: Creo Parametric” checkbox is selected, then the parent assembly
file will be deleted from the NSCE, leaving only the individual part files (each part represented
by a CAD Part: STEP/IGES/SAT object) in the editor. Otherwise the parent assembly file will
remain in the editor, with its “Explode?” flag set to 1. However, in this case the parent assembly
file will be set not to draw (see “Draw tab”) and for rays to ignore the object (see “Type tab”).
Thus, only the constituent parts will affect performance of design.
If the “Get OpticStudio Properties from all constituent parts” checkbox is selected, this option
will read in any optical properties that have previously been saved to the individual parts using
the “Save CAD Assembly/Part Properties” tool.
Once the part files have been loaded into OpticStudio, the optical properties of each may be
modified, just as with any built-in object. Thus, this tool allows an assembly to be appropriately
characterized in OpticStudio, should the different parts of the assembly have different
properties.
Since each of the part files are loaded into OpticStudio as CAD Part: STEP/IGES/SAT objects,
they cannot be modified inside of OpticStudio. If modification of the parts is required, each
part should be loaded into OpticStudio via the CAD Part: Creo Parametric object (see “CAD
Part: Creo Parametric”), rather than loading in the assembly file and then exploding it.
This tool will explode a CAD assembly file into its individual, constituent parts. The tool is
functionally identical to the one described in “Explode CAD Assembly” and accessible from the
If the “Delete Parent Object” checkbox is selected, then the parent assembly file will be deleted
from the NSCE, leaving only the individual part files (each part represented by an imported
CAD object) in the editor. Otherwise the parent assembly file will remain in the editor.
However, in this case the parent assembly file will be set not to draw (see “Draw tab”) and for
rays to ignore the object (see “Type tab”). Thus, only the constituent parts will affect
performance of design.
Once the part files have been loaded into OpticStudio, each of them may be assigned unique
optical properties, just as with any built-in object. Thus, this tool allows an assembly to be
appropriately characterized in OpticStudio, should the different parts of the assembly have
different properties.
Freeform Z Tools
Tools specific to the Freeform-Z object.
A Freeform Z object is formed by drawing a cubic spline curve through a series of points in the
YZ plane, and then sweeping this curve around the Z axis to form either a solid volume or shell.
The Freeform Z object is defined by two parameters and a user selectable number of defining
points:
1: The number of points. This is the number of coordinate pairs used to define the curve in the
YZ plane. The minimum is 5, the maximum is 124.
2: A flag to indicate if the resulting object is a solid volume or a hollow shell. If the “Is Volume?”
parameter is zero, then OpticStudio assumes the shape is hollow shell. No “end caps” are
added in this case. If the object is a solid volume, then flat “end caps” are added if the first or
last points do not have a y coordinate of zero to close the solid.
The following tools are listed in the drop-down menu of the Freeform Z toolbar button. The
availability of the feature depends on the objects in the NSC Editor.
These two tools either insert or delete a single point in the list of points that define the
Freeform Z object.
The insert tool defines the location of the point to be inserted by the Z coordinate entered on
the tool dialog box. The Z coordinate must be greater than 0, less than the current maximum Z
coordinate, and cannot be equal (within 1.0E-05 of the overall object length) to any existing Z
coordinate. The Y coordinate is computed automatically to fit the current object shape. This
tool will not insert a point if the total number of points would be more than the maximum
allowed.
The delete tool defines the point to be deleted by the Z coordinate entered on the tool dialog
box. The existing point closest to the entered Z coordinate is determined and deleted. This tool
will not delete a point if the total number of remaining points would be less than 5.
Go to Object
Use this tool to find and jump to a specific object type, number, comment, or bookmark. See
“Go to Surface” for more information.
This tool toggles Express View on and off. For more information, see the Express View section.
See Fields under the “System Explorer” section in “System Group (the Setup Tab)”.
The Multiple Configuration Editor button is available in the Editors section of the Setup tab,
and is very similar to the Lens Data Editor.
For more information see the Using Multiple Configurations help file
In the Multiple Configuration Editor (MCE), both configurations and operands can be inserted
and deleted. The insert and delete keys will also add or remove new operand rows. The data
entered on the MCE will be saved automatically whenever you save your lens file.
Settings:
Operand Type Operands are listed in rows. Cells in the first column list the operand type.
The operand can be changed by clicking the drop down arrow and selecting from the list of
multi-configuration operands or by typing the operand name into the cell. Operands are
inserted/deleted via the right click menu, or the insert/delete keys on the keyboard.
One application for the multi-configuration feature is to design systems that can be operated
with or without certain elements being present. This can easily be handled by using the “Ignore
This Surface” feature which uses the operand IGNR to ignore different surfaces in different
configurations.
Active Configuration The active configuration is indicated in the header of the first column.
The header of the column with the active configuration also lists a “*” next to the configuration
number. To set an active configuration, double click the column header at the top of the
configuration you wish to select. The active configuration is also changed via the
previous/next configuration arrows in the title bar, or with the shortcut keys Ctrl-A and Shift-
Ctrl-A.
Other Data To edit the contents of a cell, move the cursor to that cell and type in the new
data.
See Convert to NSC Group for more information about converting operands to non-sequential
mode.
Numbers
Type Description
1,2,3
Afocal Image Space mode. For more information, search the help
AFOC Ignored
files for “Afocal Image Space”.
Surface, iPartFactory Number for the Autodesk Inventor part. Search the
AICN
Object help files for “Autodesk Inventor Part” for details.
APDF Ignored System apodization factor. See also APDT.
System apodization type. Use 0 for none, 1 for Gaussian, 2 for
APDT Ignored
cosine cubed. See also APDF.
Surface aperture X- decenter. The surface must have a defined
APDX Surface #
aperture (NOT semi-diameter).
Surface aperture Y- decenter. The surface must have a defined
APDY Surface #
aperture (NOT semi-diameter).
System aperture value. If the system aperture type is float by stop
APER Ignored size this is the clear semi-diameter or semi-diameter of the stop
surface. See also SATP.
Surface aperture minimum value. The surface must have a defined
aperture (NOT semi-diameter). This same operand also works to
control the first parameter of all surface aperture types, such as the
APMN Surface # X-Half Width on rectangular and elliptical apertures. However, note
that that this operand does not work to control the UDA scale
when the surface aperture type is user aperture or user
obscuration.
Surface aperture maximum value. The surface must have a defined
aperture (NOT semi-diameter). This same operand also works to
APMX Surface #
control the second parameter of all surface aperture types, such as
the Y-Half Width on rectangular and elliptical apertures.
Surface aperture type. The integer values indicating the aperture
type are 0-10 for none, circular aperture, circular obscuration,
APTP Surface # spider, rectangular aperture, rectangular obscuration, elliptical
aperture, elliptical obscuration, user aperture, user obscuration,
and floating aperture; respectively.
481, 482 - Bulk scatter mean free path and angle arguments.
Row Color: Selects either default or none for the row color for each row in the spreadsheet.
Individual row colors may be set using the row color setting on the operand type dialog box.
Menu Options
The Multi-Configuration Menu Options are accessed by right clicking on the operand or cell.
Settings:
Paste Cells Paste cell from the Windows Clipboard to the current cell(s).
Using the mouse: Click on the first operand to be selected. Hold down the left mouse button,
and drag the mouse cursor to cover the range of operands desired. The selected operands will
be highlighted in inverse colors. To select only one operand, drag the mouse up or down from
the operand desired until two operands are selected, then move the mouse back to the
desired operand.
Using the keyboard: Move the cursor to any cell on the desired operand row. Then hold down
the shift key, while moving the cursor up or down until the desired range of operands is
selected. The selected operands will be highlighted in inverse colors. To select only one
operand, move the cursor up or down from the operand desired until two operands are
selected, then move the cursor back to the desired operand.
Copy Operands Copies all the data for a single operand or a range of operands to the
Windows Clipboard. To select a single operand or a range of operands, see the discussion
under "Cut Operands" above.
Paste Operands Copies all the data for a single operand or a range of operands from the
Windows Clipboard to the current cursor location in the Multi-Configuration Editor. The
operand data must first have been copied to the Windows Clipboard using either "Cut
Operands" or "Copy Operands" described above.
Insert Operand This inserts a new row in the spreadsheet at the current row. The new operand
type is "OFF" which means the operand is ignored. The Insert key is a shortcut for this menu
option.
Insert Operand After This inserts a new row in the spreadsheet after the current row. The new
operand type is "OFF" which means the operand is ignored. The Ctrl-Insert key combination is
a shortcut for this menu option.
Delete Operand This deletes the current row in the spreadsheet. The Delete key is a shortcut
for this menu option.
Solve Settings:
Fixed Turns solves off so the value in the MCE does not change.
Variable This applies to numerical value operands only. If the status is variable, then the
optimization algorithms may adjust the value during optimization.
Substitute This applies to material operands only. If the material status is set to substitute,
then the global optimization algorithms may choose another material. Optionally, a specific
glass catalog to use for substitution may be specified. The name of the optional catalog is
limited to 40 characters. For more information on glass substitution, see “Using glass
substitution”.
Pickup Suppose there are three configurations, and in two of the configurations the values for
one of the rows (say a THIC or GLSS) need to be the same value. A pick-up solve on one of the
configurations for that operand can be used to ensure they are always the same. To set a
Thermal Pickup This pickup solve is used to compute a new value for a multi-configuration
parameter based up on the temperature and pressure of the new configuration as compared
to the “reference” configuration. Thermal pickup solves only affect data for certain types of
multi-configuration values, including radius of curvature and thickness (THIC). See Thermal
Analysis for details.
ZPL Macro ZPL Macro solves call a user defined ZPL Macro to determine the solve value. Any
numerical value that can be computed in a macro can be returned to the editor calling the
solve macro. For information about the ZPL Macro language, see the An Overview of ZPL and
Using ZPL Macro solves
Insert Configuration
Insert a new configuration at the configuration indicated by the current position of the cursor.
Insert a new configuration at the configuration indicated by the current position of the cursor,
with pickup solves inserted to pick up values from the first configuration.
Delete Configuration
Delete the current configuration indicated by the current position of the cursor. This eliminates
the column and all the data it contained.
Delete all the multi-configuration data, leaving the lens as a single configuration system in
whatever configuration is active at the time this tool is used.
Make Thermal
Settings:
This tool is used to perform the bulk of the tedious work in setting up a multi-configuration
thermal analysis. A dialog box will appear which allows setting of the number of
configurations, as well as the minimum and maximum temperatures. There are also options to
delete or retain the existing multi-configuration data, and to sort the data by surfaces rather
than the default sort by operand type. Be sure to read and understand how the thermal
analysis works in OpticStudio. For more information, see “Thermal Analysis” and “Limitations of
thermal analysis”.
If the "Delete existing configuration data" option is selected, then 1 nominal configuration at
the current temperature and pressure will be created. Additional configurations are then
defined to cover the temperature range specified. If 3 configurations are requested, then there
will be 1 nominal configuration (configuration 1), and 3 configurations that span the specified
temperature range in equal increments, for a total of 4 configurations. The air pressure will be
assumed to be the same as the nominal pressure.
If the "Use existing n configurations as nominal" option is selected, then the existing MCE data
will be used to create the nominal configurations. The tool will automatically add new
operands for other data typically required for thermal modeling, such as glass curvature, clear
semi-diameter or semi-diameters, parameter, and extra data values. In this mode, the total
number of configurations will be determined by the number of nominal configurations times
the number of new configurations, plus the original nominal configurations.
Make Conjugate
Create a subset of the optical system which models imaging between any two conjugate
surfaces as a new configuration. This feature is useful for evaluating or optimizing the
performance of the optical system between any two surfaces of the design.
This tool will create a subset of the optical system which models imaging between any two
conjugate surfaces as a new configuration. This feature is useful for evaluating or optimizing
the performance of the optical system in between two surfaces which are not always the object
and image surfaces. The subset system is defined by the object, stop, and image surface
numbers as defined in a reference configuration. If no multi-configuration data exists, then two
configurations, the nominal and subset configurations, will be created. If multi-configuration
data already exists, then any configuration, or all configurations, may be used as the reference
configuration(s). If a single reference configuration is selected, then one new configuration will
be added. If all configurations are selected, then the total number of configurations will
double, as one subset configuration will be created for each existing configuration.
The system aperture is set to "float by stop size" and the semi-diameter of the new stop is set
to the currentsemi-diameter of the surface in the reference configuration.
The field type is set to object height, and the field values are set to the primary wavelength
chief ray coordinates on the specified object surface in the reference configuration.
The original object and image surfaces in the reference configuration are placed under the
control of multi-configuration operands to allow those surfaces to take on the correct shape of
the subset object and image surfaces. For this reason, currently the original and subset object
and image surfaces must all be Standard surface types.
These assumptions may not be correct in all cases. The resulting subset conjugate system
should be carefully checked for validity.
Add all data currently in the system, broken down by the type of data.
The Add Hologram Variables tool is visible when there is at least one Optically Fabricated
Hologram (OFH) surface in the Lens Data Editor. The file with the OFH surface is called the
playback file, and it requires two construction files. The Add Hologram Variables tool finds the
variables in the construction files, and adds them to the playback file as HLGV operands in the
Multi-Configuration Editor.
The variable solve on the HLGV operands can be turned on an off, so the construction optics
can be optimized simultaneously with the variables in the playback system.
Go to Operand
Use this tool to find and jump to a specific operand type, number, or bookmark. See “Go to
Surface” for more information.
This tool toggles Express View on and off. For more information, see the Express View section.
Open the Multi-Configuration Editor from the Setup Tab. The spreadsheet which appears is the
multi-configuration editor (MCE). Both configurations (columns) and operands (rows) can be
inserted and deleted. The insert and delete keys will add or remove new operand rows. The
data entered on the MCE will be saved automatically whenever you save your lens file.
See the Multiple Configuration Editor in the Editors section of the Setup Tab.
If an attempt is made to exceed this limit with the ZOSAPI using the Multi-Configuration Editor
functions InsertConfiguration() or AddConfiguration(), those functions will return a true
Boolean but the new configuration won't be added. In the latter case, we recommend
manually ensuring this limit is never breached by calling the NumberOfConfiguration property
of the Multi-Configuration Editor to keep track of the total number of configurations currently
defined within the system.
For example, suppose you want to enter in a multiple value for the thickness of surface 5.
Assume you want three different configurations. Insert 2 new configurations using the Insert
button in the toolbar. Click on the left most column in row 1. Select "THIC" from the drop-
down list of operand types. In the Operand Properties dialog, select "5" for the surface
number. Now in each configuration column, enter the desired thickness in that configuration.
Ignoring Surfaces
One application for the multi-configuration feature is to design systems that can be operated
with or without certain elements being present. This can easily be handled by using the “Ignore
This Surface” feature described in the “Type” section of the Surface Properties. The ignore
surface setting can be controlled by the multi-configuration operand IGNR to ignore different
surfaces in different configurations.
Changing Configurations
To select which (or all) configurations to optimize, open the Optimization Wizard from the
Merit Function Editor. Depending on the user selection, OpticStudio will build the appropriate
merit function for one or all of the available configurations. Optimization across configurations
is performed using the CONF operand. This special operand changes the current configuration
during the evaluation of the merit function. This means all operands defined after CONF will be
relevant to the new configuration. CONF may be used multiple times in the operand sequence
to evaluate various parameters.
The advantage to this system is that the entered operands, or their respective targets or
weights, may be different in each configuration. The disadvantage is the need to copy the
operands that apply in more than one configuration to each configuration.
CONF 2:
CONF 3:
...etc.
The other method is to build the default merit function, then add all the user operands at the
top of the merit function to keep them all in one place:
CONF 1
CONF 2
CONF 3
etc...
DMFS
CONF 1
CONF 2
CONF 3
etc...
Note that if you change the field angles, heights, or weights, or the wavelength values or
weights on the multi- configuration screen you should rebuild the default merit function.
When the default merit function is constructed, it uses the data for each configuration to
determine the rays traced, and the appropriate weighting.
See “Merit Function Editor (automatic optimization group)“ under the “Automatic
Optimization” section of “The Optimize Tab”
A right-click on a selected cell or row will reveal a menu with the following options: Copy Cell
(s), Paste Cell(s), Create Cell Pickup, Cut, Copy, Paste Operand, Insert, Insert Field After, Delete
Operand, Hide/Unhide and Edit Bookmark. Most of these operations can be carried out on
selections of multiple cells or rows.
The Tolerance Data editor is used to define, modify, and review the system tolerance values.
See the “Tolerance Data Editor” under the “The Tolerance Tab”.
The Object Editor has four separate sections: (1) the Object Properties pane, (2) the Object
Explorer tree, (3) the Object Viewer, and (4) the Face Properties windows:
The Object Properties are listed in a scrolling pane (see #1 in the screenshot above) on the left
side of the Object Editor. These are the same properties as in the NSC Editor > Object
Properties, but here they are arranged by category and face number. The fields in the Object
Properties pane depend on the heading selected in the Object Explorer Tree (see #2 in the
screenshot above).
The Object Explorer tree lists the object name and faces as separate headings. Selecting the
object name in the Object Explorer tree shows all properties associated with that object:
Multiple faces may be selected in the Object Viewer to show their common properties and
parameter. See the “Object Viewer” section for more information: Here is an example,
showing the properties of the front and back faces of the Lenslet Array:
Object Select an object to open in the Object Editor. The drop-down menu contains a list of
all the objects in the NSC editor. To change the selected object without expanding the settings,
use the keyboard keys Ctrl+left/right to scroll through the other object in the NSC editor.
Selected Faces This updates to show the currently selected face or faces in the Object
Viewer. To select an object face, left-click on the face in the Object Viewer. For more
information see the section Object Properties (non-sequential component editor).
Rotation About X The angle in degrees by which the lens appears to be rotated about the X
axis.
Rotation About Y The angle in degrees by which the lens appears to be rotated about the Y
axis.
Rotation About Z The angle in degrees by which the lens appears to be rotated about the Z
axis.
Opacity The options are to ignore, which ignores the opacity values and draws all surfaces
and objects as opaque; or consider, which draws partially transparent surfaces and objects as
defined in the Object Properties (non-sequential component editor).> Draw settings.
For more information on the toolbar buttons and functions, please see the Shaded Model
toolbar section in “Toolbar button functions”.
Press the “Tab” key on the keyboard to accept a setting and move focus to the next field.
When the Object Properties pane is visible (see above screenshot), the displayed properties
depend on the selection in the Object Explorer Tree. If the main heading in the Object Explorer
Tree is selected, then all the object’s properties will be displayed in the Object Properties pane.
Selecting sub-headings in the Object Explorer Tree limits the number of properties displayed,
so that only properties relevant to the selected heading are visible.
Under the Object name in the Object Explorer Tree (for example: “Object 1: Standard Lens”)
there are the following sub-headings:
l Position: The first section of columns in the NSC editor, including the object’s com-
ment, reference object, inside of flag, XYZ positions and XYZ tilts. For more information
on these fields, see the “Coordinate System” and “Reference Objects” sections in Object
Placement
l Type: The object type, any required data files, the raytrace settings, and any applicable
detector settings. For more information, see the “Type” section of the Object Prop-
erties (non-sequential component editor)
Here is a screenshot showing the Object 1: Standard Lens > Position settings. The settings in
the Object Properties pane are the same at the columns in the NSC Editor:
The headings under the object name were explained in the previous section called “Object
Properties,” but there are additional Coat/Scatter and Parameters headings under each face
heading.
The “Coat/Scatter” settings determine the coating and scattering profiles of the object faces.
For more information on these settings, see the “Coat/Scatter” section of the Object Properties
(non-sequential component editor).
Left-click the Coat/Scatter heading under Front Face (1) to show the coating and scattering
settings for Front Face (1).
For example, here is the parameter table for the Standard Lens object:
According to the table above, the Standard Lens parameters Radius 1, Conic 1, Clear 1, and
Edge 1 are associated with the Front Face (1) of the object. Therefore, if the Standard Lens is in
the Object Editor, left-clicking to select the Object Explorer Tree > Front Face (1) > Parameters
heading will show only the parameters associated with Front Face (1).
Some objects have faces without parameters, and those faces will not have a “Parameters”
heading. For example, the Inside Faces (3) of the Lenslet Array 1 do not have any parameters.
In addition, there are some parameters that are not associated with an object face, and these
fall under the heading “Non-Face Parameters.” Here is an example:
In addition, multiple faces may be selected in the Object Viewer (see the next section for
instructions) and this heading will update accordingly. For example, if the front and back faces
of the Standard Lens are selected, the heading will be “Selected Faces (1,2)”.
The “Selected Faces” heading is particularly useful, because the Coat/Scatter settings for all
selected faces and any common Parameters can be changed in one step. In the screenshot
shown below, the front and back radius of the Standard Lens were set to 4.
Object Viewer
The Object Viewer section of the Object Editor displays the currently selected object, and is
very similar to the Shaded Model. For more information on the toolbar buttons and functions,
please see the Shaded Model toolbar section in “Toolbar button functions”. This is where the
user can rotate and zoom into the object, and click on different faces to view their associated
properties.
Left click on a face – select that face only (any other faces will be deselected)
Ctrl+left click on a face – toggle face selection and select multiple faces (other face selections
will be unchanged)
Alt+left click on a face – select that face only, and jump to the face heading in the Object
Explorer Tree
Right click on a face – open a floating window that displays the face-specific parameters (see
“Face Properties”)
If the “Do Not Draw Object” setting is checked on in the Object Properties > Draw settings, the
object will be hidden from all layout plots, but it will still be visible in the Object Editor.
Note that Sources Objects are not supported in the Object Viewer, but the Source Object
properties will still be shown in the Object Properties pane and the Object Explorer tree.
Face Properties
Right clicking on a face in the Object Viewer opens a floating window that displays the face-
specific parameters:
Having the input focus means that any data typed on the keyboard will be sent to the active
cell. The exceptions are control commands such as cursor keys or control key combinations,
which are sent directly to the main window. To modify the data in the active cell, type in the
new data and press the Enter key when finished.
To add an incremental value to a cell, type a plus sign and then the increment, then Enter. For
example, to change a 12 to 17, type "+5" and Enter. The "*" multiply and "/" divide symbols
also work. To subtract a value, type a minus sign and a space followed by the value to subtract.
The space is required to distinguish between subtraction and entering a negative number.
To modify a portion of the contents of a cell without retyping the entire value, either double-
click the cell, or single click the cell and press the F2 function key. The left cursor, right cursor,
home, and end keys can then be used to navigate within the cell for editing. The mouse may
also be used to select and replace portions of text. Once changes have been made to the data
in the cell, pressing Enter will complete editing and leave the cursor on that cell. Pressing the
Up or Down arrow keys will also complete editing, and move the cursor accordingly. Pressing
Tab or Shift-Tab will complete editing and move the cursor right or left.
To copy (or paste) a cell value, either right-click and choose Copy Cell (or Paste Cell) from the
right-click menu, or use the Ctrl + C (or Ctrl + V) keyboard shortcut. This copies (or pastes) the
full precision of the cell value, even if only a few digits are displayed.
To select an entire row, either click on the row number, or use the keyboard shortcut and press
Shift + Right arrow key when any cell in the row selected. To select multiple rows, either click
and drag the mouse on the row number, or use the keyboard shortcut and press Shift + Up or
Down arrow keys when a row is selected. Entire rows may be copied and pasted in the same
manner as individual cells. Note that copying and pasting of rows is not supported between
different releases of OpticStudio.
The left, right, up and down cursor keys will move the cursor accordingly. Pressing the control
key and the left, right, up and down keys simultaneously will move the editor display one page
at a time in the appropriate direction. The Tab and Shift-Tab keys also move the cursor right
and left.
The page up and page down keys move the cursor one page at a time. Control-page up and
control-page down move the cursor to the top and bottom of the current column. The home
and end keys will move the cursor to the first column first row and first column last row,
respectively. Control-home and control-end will move the cursor to first and last row of the
last column, respectively.
All editors support adjustable column widths. To change the size of the column, place the
mouse pointer in the top row of the spreadsheet in the title area directly on one of the vertical
column separator lines. When the mouse pointer changes to the resize icon, press the left
mouse button and then drag the column width left or right to the desired size.
When selecting one or more lines in the Non-sequential Component Editor and right-clicking,
two options are available:
Consider and Show Object: sets "Rays Ignore Object" in the Type section of the Object
Properties to Never and unchecks "Do Not Draw Object" in the Draw section of the Object
Properties.
Ignore and Hide Object: sets "Rays Ignore Object" to Always and checks "Do Not Draw
Object".
Note that for sources, the "Rays Ignore Object" is disabled. Therefore, these two right-click
settings will only toggle the "Do Not Draw" checkbox.
Undo: None
If the Undo feature state is set to None, then no Undo capability is supported. Use this option
on computers which do not have sufficient system memory or disk space to support the Undo
feature.
OpticStudio stores a copy of the current lens in memory before and after every edit or
optimization. If Undo is selected, then the current lens is swapped with the previous lens. If
Redo is then selected, the lenses are swapped again, which results in the edit being restored.
Memory 1 Step Undo is useful for restoring a lens when an accidental edit is made, or for
restoring a lens to the prior state after an optimization. However, only a single Undo step is
supported. The advantage of this option is speed; the saving of the prior lens in memory is so
fast as to be unnoticeable.
OpticStudio stores a copy of the current lens in a ZMX file on disk after every edit or
optimization. These stored lens files are used to implement an infinite multi-step Undo feature,
which allows the reversal of any change or series of changes made to the lens. Undo is useful
for restoring a lens when an accidental edit is made, or for restoring a lens to the prior state
after an optimization, or even several changes.
To reverse the changes made to a lens, select Undo button from the main OpticStudio toolbar.
Any number of Undo's may be executed, back to the first edit made after loading the lens file.
The Redo function reverses the last Undo.
OpticStudio maintains a folder of Undo files within the <data>\Undo folder (see “Folders”).
The Undo files are automatically deleted whenever the file is saved, a new file is opened, or
OpticStudio is normally terminated. If OpticStudio abnormally terminates, the operating
system fails, the computer power is disrupted, or for any other reason the lens data is lost,
OpticStudio may be able to recover the lost data by restoring the last Undo file. When
OpticStudio starts, a check is made to see if any of the Undo files exist. Since these files are
deleted during a normal termination, the presence of Undo files indicates a previous abnormal
termination. OpticStudio will issue a warning message with the option of restoring the last
Undo file. If restored, this file should immediately be saved in a new file name, since the old file
name is not stored with the lens.
The Undo feature does slow down the operation of the Editors slightly, since every edit is
followed by a save operation. The save does not slow down ray tracing or optimization speed,
only lens data editing.
If more than one OpticStudio session is running simultaneously, each session will have its own
undo files. However, to recover from a crash or abnormal program termination, the same
number of OpticStudio sessions will need to be run to recover all the files. For example, if 2
sessions of OpticStudio are running, and the power fails, the first new session of OpticStudio
will be able to recover the former first session file. A second session of OpticStudio will need to
be launched to recover the former second session file.
Express View
The option to work in Express View is available for all primary editors (Lens Data Editor, Non-
Sequential Component Editor, Field Data Editor, Multi-Configuration Editor, Merit Function
Editor, Tolerance Data Editor). It can be activated using the “Toggle Express View” switch in the
editor toolbar. A global default preference can also be set in OpticStudio Preferences > Editors
> Default Editor View.
In general, the functionalities lacking in Express View are those involving the ‘dynamic’ aspects
of the editors. Some features which have been made unavailable or behave differently in
Express View are:
l Properties dialogs are modal, meaning that they open in front of the OpticStudio win-
dow and must be closed out in order to gain access to the rest of the interface.
l Dynamic highlighting of surfaces or objects in Layout Plots or 3D Viewers is not sup-
ported.
l Intelligent column display is disabled, meaning that all columns (parameter columns in
the LDE, for instance) are always visible. Neither columns nor rows can be hidden.
l Columns cannot be re-ordered. The “Reset Column Order” button in the toolbar is dis-
abled.
l Column widths cannot be automatically adjusted. The “Reset Column Widths” and
“Automatic Width” buttons in the toolbars are disabled.
l Auto-fill suggestions for string entries are disabled (for instance, auto-fill suggestions
for operand names in the Merit Function Editor).
l Bookmarks cannot be edited in Express View. However, you can still use the Go To tool
to jump to any row with a bookmark.
l The default merit function "Start At" row in the Optimization Wizard will not be
updated automatically when the operand number of DMFS is changed in Express View.
The Start At row will instead need to be specified manually.
Diagnostics Group
These are the Diagnostics Tools available in the Setup Tab (Sequential UI Mode):
These are the Diagnostics Tools available in the Setup Tab (Non-sequential UI Mode):
The System Check tool is available in the Diagnostics section of the Setup tab. This tool
generates a data about the lens system in a separate window.
The following system check was generated with the OpticStudio sequential objectives sample
file “Double Gauss 28 degree field.ZMX”:
Performance
The ray surfaces per second performance number is measured by tracing a large number of
random skew rays through the current optical system, and then dividing the number of rays
times the number of surfaces traced through by the elapsed time in seconds.
The system updates per second is calculated by performing many system updates and then
dividing the number of system updates performed by the elapsed time in seconds. System
updating includes recomputing the pupil positions, field data (such as ray aiming coordinates),
lens apertures, index of refraction, solves, and other fundamental checks on the lens that must
be performed prior to any ray tracing.
The speed will vary tremendously depending upon the system processor, clock speed, and lens
complexity.
If checked, ray trace errors that occur inside of a Non-sequential Group will not be reported if
detected. These errors involve possibly improper placement of objects in a non-sequential
group. However, in some systems it is possible to have properly defined object placement and
still occasionally an error message will be generated.
l Empty the
The ZRD files are Windows
saved temporarily temp folder
Failed to write ZRD file: the temp before saving per- l Change the
folder may be full! manently: before location of
the ZRD file is final- the Windows
Non-Sequen- ized, it is stored in temp folder
tial the standard Win- l Modify set-
dows temp folder. tings (Sys-
This message indic- tem Explorer
ates that the Win- > Non-
dows temp folder Sequential)
might be full. to reduce the
overall size
of the ZRD
file.
Object : Invalid direction cosines for That message
ray 1 in source file! appears when the Open the source
Non- direction for a file to
Sequential specific ray is troubleshoot the
incorrect in the issue
source file
That message
Error 10561
appears when a
Geometry error … detected : non- non-mirror surface
mirror surfaces cannot be placed in is in contact with a The solution is to
Non- contact with solids. solid object. The move the
Sequential software cannot surface or set it
define the as a mirror
properties of that
overlapping
surface correctly
That message can
GetRTObjectTesselation: returned appear for a A solution can
error code -1 number of be to uncheck
reasons: the "Convert
Non-Sequen-
Imported Files
tial 1. There is not To ZOF " under
enough memory Object prop-
or hard disk. erties > Type.
Check the status
2. The system
contains CAD
parts and an issue
occurred when
converting from
CAD parts to
OpticStudio
objects.
Open the source
file to
troubleshoot the
issue. A Python
script can be
Invalid Flux for ray... in source file! used to fix this
That message
issue. Login to
appears when the
access this code.
Non-Sequen- flux for a ray in the
Be careful as it
tial source file is incor-
may indicate
rect. It can be a
that the source
zero flux.
data is incorrect.
To learn more
about Python,
check our Get-
ting started with
Python article.
That message
appears if the limit
of 120 wavelength
Maximum wavelength-index points (dispersion) points Change the
Sequential / exceeded in coating file! per material in the definition of the
Non- coating file has material in the
sequential been reached. See coating file to
mode the ‘Limits on the not exceed the
Amount of limit
Coating Data’
section of the help
file.
This error message
Sequential
appears when
and Non- Invalid Gradient Index
there is a problem
Sequential
to calculate the
That geometry
error indicates
that there is a
section of the
Geometry Error: Run the NSC Ray design where
Trace tool for more information OpticStudio is
That message not sure how to
appears in mixed- trace the rays.
Mixed-mode
mode when ray For advice on
tracing locating
geometry errors,
see the
Knowledgebase
article How to
locate geometry
errors: part I.
It happens when
One reason can
0 exporting to CAD
be that the CAD
files. The “Error 0”
libraries are
CAD Export is a generic error
struggling with a
returned by the
small thickness
CAD libraries when
of an element
the export fails.
That message
appears when a
When tolerancing a system, the system is
perturbation should not be large toleranced using a The solution is to
enough to violate boundary merit function or a check the merit
constraints used for optimization of user script with a function and
the nominal design. We recommend merit function. The usually modify it.
that these boundary constraints are merit function The boundary
Tolerancing
removed prior to the tolerance contains boundary constraints are
analysis when possible. constraints like often not
MNEA, OPGT that applicable to
may give a lower tolerance
merit function for analysis.
a toleranced
system i.e. a
system that
- Create a merit
function that
evaluates the
criterion to try to
reproduce the
issue.
The Bring to Front Tool is available in the Window Control Section of the Setup Tab.
Selecting “Bring To Front” shows a drop down menu list of all the open windows. Any window
on the list may be selected, and brought to the front of the workspace.
The Window Options Button is available in the Window Control Section of the Setup Tab.
These are the window display options, which set the default options for how windows are
opened and positioned in the workspace.
Dock All Windows Dock all windows to the workspace. Note that this may create multiple
panes in the workspace.
Dock All Windows to Single Workspace Dock all windows in a single pane in the workspace.
Float all Windows Make all windows in the workspace float independently of each other.
Lock All Windows Prevent all open windows from being updated. Useful for generating
reference data.
Unlock All Windows Unlock all open windows so they can be updated.
Pane A pane is an area of the Workspace which includes one or more analyses/editor windows
as tabs.
Docked Docked means to have an analysis/editor window fixed to the Workspace or a pane. If
it is not docked, it is "floating". A floating window may not act as a pane, i.e., to include
multiple tabs.
Dock all windows to the workspace. Note that this may create multiple panes in the
workspace.
Prevent all open windows from being updated. Useful for generating reference data.
The Dock New Windows button is available in the Window Control Section of the Setup Tab.
Configuration Group
These are the Configuration Tools available in the Setup Tab (Sequential UI Mode):
These are the Configuration Tools available in the Setup Tab (Non-sequential UI Mode):
The Make Thermal button is available in the Configuration section of the Setup tab.
The Make Conjugate Button is available in the Configuration Section of the Setup Tab.
See the “Make Conjugate” button in the “Multi-Configuration Editor Toolbar” under “Multiple
Configuration Editor” located in the Editors section of the Setup Tab.
The Multiple Configuration Editor Button is available in the Configuration Section of the Setup
Tab.
Next/Previous Configuration
The Next Configuration and Previous Configuration Buttons are available in the Configuration
Section of the Setup Tab.
These Buttons change the Active Configuration to the Next or Previous Configuration defined
in the Multi-Configuration Editor.
See “Active Configuration” under “Multiple Configuration Editor” located in the Editors Section
of the Setup Tab.
This tab provides access to all of OpticStudio’s analysis features in Sequential Mode. Almost all
imaging system design is done in this mode. Analysis features provide detailed performance
data over a wide range of requirements. Analysis features never change the underlying design,
but provide diagnostic information on the design that is used to guide any required changes.
The System Viewers group gives access to the layout plots that are used to view the optical
system itself.
The Image Quality group provides access to all the analyses used in the design of imaging
and afocal systems, including ray trace data, aberration data, wavefront, Point Spread
Functions and more.
Lasers and Fibers group gives access to laser-system-specific features such as simple
Gaussian Beam Analysis, Physical Optics and fiber coupling calculations.
Universal Plots allow you to create your own analysis features if required.
If the lens uses multiple configurations, the Configuration group is also shown (see “The Setup
Tab”).
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 947
System Viewers Group (the
analyze tab, sequential ui mode)
Cross-Section
This is a YZ cross section through the lens. There are Graph view and Classic view available,
which can be toggled at the lower left corner if Classic view is turned on.
The Classic view can be turned on or off in the Setup tab > OpticStudio Preferences > Graphics
> Enable Classic View.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 948
This feature is not available if you use coordinate breaks, spider obscurations, obscuration
decenters, X angles, holograms, or other attributes which spoil the rotational symmetry of the
lens. Use the 3D layout instead. If rays miss a surface, then the rays will not be drawn to the
surface where the error occurred. If the ray is total internal reflected, then the ray will be drawn
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 949
up to but not past the surface where the error occurred. Ray failures can be evaluated in detail
by using “Ray Trace”.
Number of Rays The number of rays specifies the number of tangential rays to be drawn for
each defined field. The rays will be evenly distributed along the fan of the pupil, unless
apodization has been specified. This parameter may be set to zero.
Scale Bar (in Graph view) If Scale Bar is set to On, then a scale bar will be displayed at the
bottom of the window. The scale bar will be automatically adjusted when the layout is zoomed
in or out.
Scale Factor (in Classic view) If the scale factor is set to zero, then “Fill Frame” will be selected,
which will scale the range of surfaces drawn to fill the graphic page. If a numeric value is
entered, then the plot will be drawn in “real” scale, times the scale factor. For example, a scale
factor of 1.0 will plot the lens actual size on the printer (not the display). A factor of 0.5 will plot
the lens at half scale.
Y Stretch The relative exaggeration of the Y direction. This control is useful for drawing
systems with very large aspect ratios. Ignored if negative, zero, or unity.
Upper Pupil Limit The maximum pupil coordinate to draw rays to.
Lower Pupil Limit The minimum pupil coordinate to draw rays to.
Marginal and Chief Only Draws only the marginal and chief rays, overriding the other ray
settings.
Color Rays By Select “Field #” to use color to distinguish between each field position, or
“Wave #” to distinguish between each wavelength, “Config #” to distinguish between
configurations, and “Wavelength” to approximate the color of wavelengths in the visible
spectrum.
Suppress Frame Suppresses drawing of the frame on the bottom of the window, which leaves
more room for the layout plot itself. No scale bar, address block, or other data will be
displayed.
Delete Vignetted If checked, rays are not drawn if they will be vignetted by any surface.
Fletch Rays If checked, small arrows are drawn on each ray to indicate the direction of
propagation.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 950
3D Viewer
Draws 3D layout plots of the lens system. The algorithm draws a wireframe style representation
of the lens. There are Graph view and Classic view available, which can be toggled at the lower
left corner if Classic view is turned on. The Classic view can be turned on or off in the Setup tab
> OpticStudio Preferences > Graphics > Enable Classic View.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 951
First Surface The first surface to be drawn.
Number of Rays The number of rays specifies the number of rays to be drawn for each
selected field and wavelength. The rays will be evenly distributed along the fan of the pupil, or
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 952
around the perimeter if Ring is the selected Ray Pattern, or unless apodization has been
specified. This parameter may be set to zero. It is ignored if the Ray Pattern is set to List.
Ray Pattern Choose XY Fan, X Fan, Y Fan, Ring, List, Random, or Grid to indicate what the
pattern of rays to be traced should be. The List option indicates that the rays to be traced are
user defined and listed in a file, see the discussion below for information on the ray list format.
If List is selected the Number of Rays setting is ignored.
Scale Bar (in Graph view) If Scale Bar is set to On, then a scale bar will be displayed at the
bottom of the window. The scale bar will be automatically adjusted when the layout is zoomed
in or out.
Scale Factor (in Classic view) If the scale factor is set to zero, then "Fill Frame" will be selected,
which will scale the range of surfaces drawn to fill the graphic page. If a numeric value is
entered, then the plot will be drawn in "real" scale, times the scale factor. For example, a scale
factor of 1.0 will plot the lens actual size on the printer (not the display). A factor of 0.5 will plot
the lens at half scale.
Hide Lens Faces If checked, this option will suppress drawing of the lens faces, and only the
lens edges will be drawn. This is useful because some complicated systems look cluttered with
the faces drawn.
Hide Lens Edges If checked, this option will suppress drawing of the outer aperture of the
lens. This is useful for giving the 3D layout a 2D "cross section" appearance.
This option does not apply to the user-defined apertures and obscurations.
Hide X Bars If checked, this option will suppress drawing of the X portions of the lens faces.
This option is useful when "Hide Lens Edges" is checked and "Hide Lens Faces" is not checked.
Rotation About X The angle in degrees by which the lens appears to be rotated about the X
axis.
Rotation About Y The angle in degrees by which the lens appears to be rotated about the Y
axis.
Rotation About Z The angle in degrees by which the lens appears to be rotated about the Z
axis.
Color Rays By For sequential rays, "Field #" will use color to distinguish between each field
position, "Wave #" to distinguish between each wavelength, "Config #" to distinguish between
configurations, and "Wavelength" to approximate the color of wavelengths in the visible
spectrum. For non-sequential rays "Field #" will use color to distinguish between each source
number, unless a source has a user defined color assigned to that source.
Suppress Frame Suppresses drawing of the frame on the bottom of the window, which leaves
more room for the layout plot itself. No scale bar, address block, or other data will be
displayed.
Delete Vignetted If checked, rays are not drawn if they will be vignetted by any surface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 953
Configuration This option is activated when more than one configuration is used. Select "All"
to show all configurations, "Current" to show just the active configuration, or select any
combination of other configurations.
Offset X, Y, Z This option is activated when more than one configuration is used. The X, Y, and
Z direction offset between configurations in lens units. Only has an effect on the drawing if
"All" configurations are being drawn.
Fletch Rays If checked, small arrows are drawn on each ray to indicate the direction of
propagation.
Split NSC Rays If checked, rays from NSC sources will be statistically split at ray-surface
intercepts. Rays entering from the entry port are not affected by this setting.
Scatter NSC Rays If checked, rays from NSC sources will be statistically scattered at ray-
surface intercepts. Rays entering from the entry port are not affected by this setting.
Discussion
Pressing the left, right, up, down, Page Up, or Page Down keys will rotate the displayed image
for a different perspective.
The orientation indicator To create the layout, OpticStudio projects the 3D coordinates of
the rotated optical model onto the 2D plane of the plot. Conceptually, the optical model is first
rendered in an unrotated 3D space, with +z oriented to the right, +y up, and +x away from the
viewer into the page.
The coordinates and orientations of all surfaces and objects are defined by the Global
Coordinate Reference Surface (set in the Surface Properties Dialogue).
This 3D model is then rotated by the Rotation About X, Y, and Z values specified in the settings
(see "Graphics (OpticStudio Preferences)" for information about the rotation order).
The resulting 3D model is then projected onto a 2D plane by plotting the z coordinate along
the horizontal direction and the y coordinate along the vertical direction; the x coordinate is
ignored.
To help visually define the orientation of the model, an orientation indicator is shown in the
bottom left hand corner of the drawing. This indicator consists of 3 lines extending along the
directions of the +x, +y, and +z axes of the global coordinate reference surface. These 3 lines
rotate as the drawing is rotated. If the coordinates of the 3D orientation indicator lines lie in
the plane of the drawing, or would extend out (toward the viewer), they are drawn in black. If
the orientation indicator lines would extend in (away from the viewer) then the lines are drawn
in grey.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 954
Ray errors If rays miss a surface, then the rays will not be drawn to the surface where the error
occurred. If the ray is total internal reflected, then the ray will be drawn up to but not past the
surface where the error occurred. Ray failures can be evaluated in detail by using “Ray Trace”.
These comments only apply to rays from the sequential object surface, and not to rays from
NSC sources.
Configuration data When drawing all configurations, an offset may be added to each
configuration in the x, y, and z directions independently. The offsets may all be zero if desired.
If the offsets are zero, then all the configurations are superimposed; otherwise, the
configurations are all displaced from one another by the specified amount. Note that all offsets
are defined from the global coordinate reference surface position. The global coordinate
reference surface is defined in the Miscellaneous section of the System Explorer. If all offsets
are zero, the multiple configurations are all overlapped at the global coordinate reference
surface.
Raylist file format If List is chosen for the ray pattern, the rays to be traced are defined in a
file. The file must be called RAYLIST.TXT and be placed in the <data>\Miscellaneous folder.
The file format is ASCII, with two distinct methods for defining the rays supported, implicit and
explicit. The implicit format file consists of two numbers on each line, one for the px and one
for the py normalized pupil coordinates. The specified rays are traced at each defined field and
wavelength selected.
0.0 -1.0
0.0 1.0
-1.0 0.0
1.0 0.0
The explicit format file consists of the word EXPLICIT followed by the values x, y, z, l, m, n, and
wavenumber; where x, y, and z are the ray starting coordinates, l, m, and n are the direction
cosines, and wavenumber is an integer indicating the wavelength to use. All coordinates are in
object space. If the object thickness is infinity, then the spatial coordinates are relative to
surface 1. If the object is not at infinity, then the coordinates are relative to surface 0. In both
cases the ray itself is in the object space medium, prior to refraction into surface 1. If explicit
format is used, then the field and wavelength settings are ignored, and only those rays listed in
the file are traced.
Example: Three rays at wavelengths 1, 2, and 3 along the Y axis parallel to the Z axis are defined
as follows:
EXPLICIT
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 955
0.0 -5.0 0.0 0.0 0.0 1.0 1
Shaded Model
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 956
When rendering NSC detector objects with more than 1,200,000 pixels will not show individual
data for each pixel to keep the total amount of required computer memory reasonable.
See “Toolbar button functions” for more information on the Shaded Model toolbar.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 957
First Surface The first surface to be drawn.
Number of Rays The number of rays specifies the number of rays to be drawn for each
selected field and wavelength. The rays will be evenly distributed along the fan of the pupil, or
around the perimeter if Ring is the selected Ray Pattern, or unless apodization has been
specified. This parameter may be set to zero. It is ignored if the Ray Pattern is set to List.
Draw Section Select “Full” to draw each lens element completely. The 3/4, 1/2, and 1/4
options draw just that much of the element, yielding a cut away perspective of the lens interior.
This only affects sequential surface data, and not NSC objects.
Ray Pattern Choose XY Fan, X Fan, Y Fan, Ring, List, Random, or Grid to indicate what the
pattern of rays to be traced should be. The List option indicates that the rays to be traced are
user defined and listed in a file; see the discussion below for information on the ray list format.
If List is selected the Number of Rays setting is ignored.
Scale Bar The Scale Bar can be set to Black, White or Off. The scale bar will be automatically
adjusted when the Shaded Model is zoomed in or out.
Angular Segments The number of angular segments used to approximate the lens shapes.
Larger numbers require more processing time.
Radial Segments The number of radial segments used to approximate the lens shapes. Larger
numbers require more processing time.
Rotation About X The angle in degrees by which the lens appears to be rotated about the X
axis.
Rotation About Y The angle in degrees by which the lens appears to be rotated about the Y
axis.
Rotation About Z The angle in degrees by which the lens appears to be rotated about the Z
axis.
Color Rays By For sequential rays, “Field #” will use color to distinguish between each field
position, “Wave #” to distinguish between each wavelength, “Config #” to distinguish between
configurations, and “Wavelength” to approximate the color of wavelengths in the visible
spectrum.
For non-sequential rays “Field #” will use color to distinguish between each source number,
unless a source has a user defined color assigned to that source.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 958
Opacity The options are ignore, which ignores the opacity values and draws all surfaces and
objects as opaque; consider, which draws partially transparent surfaces and objects based on
settings in the surface and object properties settings dialog boxes; or All 50%, which overrides
the defined opacity and uses 50% for all objects.
Delete Vignetted If checked, rays are not drawn if they will be vignetted by any surface.
Configuration This option is activated when more than one configuration is used. Select “All”
to show all configurations, “Current” to show just the active configuration, or select any
combination of other configurations.
Offset X, Y, Z This option is activated when more than one configuration is used. The X, Y, and
Z direction offset between configurations in lens units. Only has an effect on the drawing if
“All” configurations are being drawn.
Fletch Rays If checked, small arrows are drawn on each ray to indicate the direction of
propagation.
Split NSC Rays If checked, rays from NSC sources will be statistically split at ray-surface
intercepts. Rays entering from the entry port are not affected by this setting.
Scatter NSC Rays If checked, rays from NSC sources will be statistically scattered at ray-
surface intercepts. Rays entering from the entry port are not affected by this setting.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 959
This feature creates a mechanical drawing of surface, singlet, cemented doublet, or cemented
triplet elements suitable for use in optical shop fabrication.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 960
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 961
Surface The first surface of the element to be drawn.
Scale Factor If the scale factor is set to zero, then "Fill Frame" will be selected, which will scale
the element to fill the right half of the element drawing. If a numeric value is entered, then the
plot will be drawn in "real" scale, times the scale factor. For example, a scale factorof 1.0 will
plot the element at actual size on the printer (not the display). A factor of 0.5 will plot the
element at half scale.
Decimals The number of decimals to use in numeric values. Press the "Reset all but surface,
show as, and titles" button to reformat all displayed numbers.
Reset from TDE reads the data from the Tolerance Data Editor for the specified surfaces
concerning the tolerances of Radius, Irregularity, and Thickness.
The data is read from the Tolerance Data Editor operands TRAD, TIRR, and TTHI, and take the
maximum absolute value between the min and max value of the tolerance.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 962
Note File Name The name of the ASCII file which contains the notes to be appended to the
notes section of the element drawing. Notes should always start at number 2, since number 1
is reserved for the units specification.
Edit Note File Clicking on this button will invoke the Windows NOTEPAD.EXE editor, which
can then be used to modify the selected note file.
Save As/Load From These two buttons allow saving and reloading of all settings displayed on
the element drawing settings box. The data is stored in a binary format with the extension ELE.
Reset all but... If selected, this button will reset all the default tolerances and apertures for the
specified surfaces, but the current surface, show as, and text titles will remain as they are.
Note Font Size Choose Standard, Medium, Small, or Fine. These are in order of decreasing
font size. The Note Font Size setting only affects the size of the note file that is annotated on
the drawing. Smaller fonts permit larger note files to be displayed.
Date If left blank, the default date format is used. If any text is supplied, the exact text is used.
Drawing Title This field is for any user defined text. The default is the lens title.
Drawing Name All of these fields are for user defined text. Any text may be entered. No
default value.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 963
Approved
Revision
Drawn By
Project
Discussion The element drawing settings may be stored for the specific lens file by pressing
the Save button. Unlike most analysis features, the element drawing feature saves all the
settings for each surface separately. For example, the notes and tolerances for surface 1 may
be saved, and then new notes and tolerances for surface 3 may be entered and then saved. To
recall the settings for any specific surface, change the surface number to the desired surface,
and then press the Load button. If a match is found with a previously saved surface, the
settings for that surface will be displayed. This feature makes it easy to regenerate complex
drawings for multiple element systems.
An important feature of the element drawing capability is the ability to load different note files
and place them on the drawing. The default note file “DEFAULT.NOT” is a generic set of notes
which will rarely be useful as is. However, the user can modify the note files (they are text files
which any word processor or text editor can modify) and store them under different names.
For example, you may want to have a .NOT file for each type of optic you design, and then load
the most appropriate note file when the element drawing is generated. The .NOT files must be
placed in the <data>\Miscellaneous folder (see “Folders”).
If the first line of the note files starts with the number 1, then OpticStudio will print the note file
as provided, with no default notes. If the note file starts with any other symbol, the first default
note will be "1) All dimensions in millimeters" or whatever the current lens units are. To use the
default note, start the user supplied notes at note number 2. The line breaks and spacings in
the note file will be replicated exactly on the element drawing.
Whenever a new element drawing is generated, or the “Reset” button is pressed, the default
settings will be regenerated. The default tolerances are taken from the tolerance data editor.
The maximum of the min/max tolerance range is used as the default. For example, if the TTHI
thickness tolerance is -.03, +.05, the tolerance value will be 0.05. Only TTHI, TRAD, and TIRR
tolerances are considered. If a suitable default cannot be generated, the tolerance is set to
zero. Note all tolerance fields are text; and may be edited to suit any requirement.
A handy conversion between radius tolerance and the power tolerance in fringes for a
Newton's rings type optical test against a test plate is given by
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 964
where ΔR is the radius error, λ is the test wavelength, ρ is the radial aperture, and R is the
radius of curvature. This formula is an approximation for shallow curvatures. For more
information, see Malacara, Optical Shop Testing, J. Wiley & Sons, Inc.
Special characters There are useful special characters that may be inserted and edited in the
text fields of the tolerances. The symbols are inserted by pressing and holding Alt on the
keyboard and typing a 4 digit number on the numeric keypad. Some common characters are ±
- Alt 0177, µ - Alt 0181, ® - Alt 0174, © - Alt 0169.
This feature creates an ISO 10110 type drawing of surface, singlet, or doublet elements suitable
for use in optical shop fabrication.
For more information, please see the “ISO Element Drawing (manufacturing drawings and data
group)” as explained in The Tolerance Tab
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 965
The "Show Option First" setting under Setup > OpticStudio Preferences > Graphics is disabled
for the ISO Element Drawing.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 966
CAD Part Viewer (system viewers
group, the analyze tab, sequential ui
mode)
This feature is only available in the Premium and Enterprise editions of Ansys Zemax
OpticStudio.
Draws a shaded solid model representation of a part or assembly as defined in a CAD format
file
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 967
File Name Selects the CAD part file to draw.
Opacity The options are to ignore, which draws all surfaces and objects as opaque, or all 50%,
which draws partially transparent objects.
Rotation About X The angle in degrees by which the lens appears to be rotated about the X
axis.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 968
Rotation About Y The angle in degrees by which the lens appears to be rotated about the Y
axis.
Rotation About Z The angle in degrees by which the lens appears to be rotated about the Z
axis.
Discussion
The object may be rotated with the mouse or the cursor keys to change the viewing angle.
When selecting a Autodesk Inventor (*.ipt, *.iam) or Creo Parametric (*.prt, *.asm) file, the file is
automatically converted to either a STEP or an IGES file for viewing.
These provide ways to analyze performance and image quality of lens designs.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 969
Group of analyses using geometric ray tracing of individual rays, fans of rays and bundles of
rays.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 970
Hx Normalized x-field coordinate. The value should be between -1 and 1. For a description of
normalized coordinates, see the chapter "Conventions and Definitions".
Field Select either a specific field or "Arbitrary" to enter in Hx and Hy. If a specific field is
selected; the Hx and Hy controls are grayed out.
Px Normalized x-pupil coordinate. The value should be between -1 and 1. For a description of
normalized coordinates, see the chapter "Conventions and Definitions".
Global Coordinates If checked, all ray trace data is given in global coordinates rather than
local coordinates, except tangent angles.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 971
l "Dir Cosines" to display the ray direction cosines at each surface. The direction cosine
value is the cosine of the angle the ray makes with respect to the specified axis (the x-
direction cosine is the cosine of the angle the ray makes with respect to the x-axis, etc.).
l "Tangent Ang" to display the tangent of the angle the ray makes at each surface. The
tangent angle is the ratio of the x (or y) direction cosine to the z direction cosine.
l "Ym,Um,Yc,Uc" to display the paraxial marginal and chief ray intercept/tangent angle.
The Hx, Hy, Px, Py, and Global Coordinates settings are ignored if the "Ym, Um, Yc, Uc"
option is selected.
Results:
The feature will display the real and paraxial ray coordinates at every surface.
l The first set of data presented is for a real ray. The values presented are the coordinates
(in the surface local or the global coordinate system) of the ray intercept point. The
direction cosines (or tangent angles) are the values of the ray in the surface after
refraction.
l The second set of data is just like the first set, except it is for a paraxial ray. Tangent
angles are always computed relative to the local Z axis; regardless of the Global
Coordinates setting.
Discussion:
If Type is "Dir Cosines", the Path Length and the Angle of Incidence will also be displayed.
l The Path Length represents the ray path length from the previous surface up to the
surface under consideration. Note that the path length may be negative.
For finite conjugates, the Path Length is measured along the ray starting at the object
point.
For infinite conjugates (Object at Infinity), the Path Length is measured from a plane
orthogonal to the local Z axis at the vertex of Surface 1.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 972
l The "Angle In" is the Angle of Incidence. Note that for a Coordinate Break surface, the
“Angle In” data is the incident angle of the ray with respect to the local XY plane before
any rotation is considered. On the other hand, the “X/Y/Z-normal” data is reported
after all rotations specified for the coordinate break are applied.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 973
Plot Scale Sets the maximum vertical scale for the plots. The maximum scale is in micrometers
for ray fans, waves for OPD plots, or percent for entrance pupil aberration plots. This overrides
the automatic selection of scale for the plots. Enter zero for automatic scaling.
Number of Rays This is the number of rays traced on each side of the origin of the plot.
Wavelength The wavelength number for which the calculation should be performed.
Field The field number for which the calculation should be performed.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 974
Tangential Selects which aberration component to plot for the tangential fan. Since tangential
fans are functions of the y pupil coordinate, the default is to plot the y component of the
aberration.
Sagittal Selects which aberration component to plot for the sagittal fan. Since sagittal fans are
functions of the x pupil coordinate, the default is to plot the x component of the aberration.
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves.
Check Apertures Specifies whether or not to check if rays pass all surface apertures. If this is
selected, rays which do not pass surface apertures will not be drawn. If not selected, an
additional horizontal line is drawn on the Z axis to show that apertures have not been checked
and rays pass through the entire area.
Vignetted Pupil If checked, the pupil axis will be scaled to the unvignetted pupil, in which case
the data will reflect the vignetting in the system. If unchecked, the pupil axis will be scaled to fit
the vignetted pupil.
Surface Selects the surface at which the fan is to be evaluated. This is useful for evaluating
intermediate images. See “Evaluating results at intermediate surfaces” below.
Discussion
The tangential fans show either the x or the y component of the transverse ray aberration as a
function of the y pupil coordinate of the ray. The default option is to plot the y component of
the aberration. However, since transverse ray aberrations are vectors, this is an incomplete
description of the aberration. When OpticStudio plots the y component, the plot is labeled EY,
when plotting the x component of the aberration, the plot is labeled EX.
The vertical axis scale is given at the bottom of the graph. The data being plotted is the
difference between the ray intercept coordinate and the chief ray intercept coordinate. The
tangential fan is the plot of the difference between the ray x or y coordinate and the chief ray x
or y coordinate at the primary wavelength, as a function of the y pupil coordinate. The sagittal
plot is the difference between the ray x or y coordinate and the chief ray x or y coordinate as a
function of the x pupil coordinate. The horizontal scale for each graph is the normalized
entrance pupil coordinate, either PX or PY.
If "All" wavelengths are shown, then the plot is referenced to the primary wavelength chief ray.
If monochromatic, then the chief ray for the selected wavelength is used as a reference. For this
reason, the data for non- primary wavelengths will in general change when switching between
monochromatic and polychromatic displays.
Because ray aberrations are vectors, with both an x and a y component, the ray aberration fan
is an incomplete description of the aberrations, especially when the image surface is rotated or
the system is otherwise non- rotationally symmetric. Also, the fans only indicate aberrations
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 975
along two "slices" through the pupil, rather than over the entire entrance pupil. The primary
purpose of the ray fan plot is to determine what aberrations are present in the system; it is not
a complete description of the system performance, especially for systems without rotational
symmetry.
OpticStudio can compute analysis results for surfaces other than the image surface by
applying assumptions. These assumptions work in most cases, however, there may be cases
where the methods described here for analyzing intermediate surfaces are not appropriate,
including systems which require ray aiming. All of the changes made to the lens described are
made on a copy of the original lens data made for analysis purposes so no changes are made
to the original lens data.
If the field type is either real or paraxial image height, the field type is changed to angle or
object height for infinite or finite conjugate systems, respectively. The angles and heights used
correspond to the primary wavelength chief ray angles and heights as computed for the
unaltered system.
If the selected surface precedes the stop surface, OpticStudio moves the stop surface to a
(possibly virtual) dummy space prior to the existing surface 1. Unless the system aperture is
object space numerical aperture or cone angle, the system aperture is changed to entrance
pupil diameter, and the aperture value is set equal to the original paraxial entrance pupil
diameter computed for the original stop position. Note this assumption might not be valid for
systems that require ray aiming. If the selected surface follows the stop surface, no changes are
made to the system aperture or stop definitions.
Surfaces which follow the selected surface are then deleted. The glass of the new image
surface is set to be the same as the selected surface.
Most analysis features that compute results for focal mode systems make more sense if the
rays are allowed to come to a focus after refraction from the desired surface. For example, the
OPD plot is generally a useful diagnostic only when the OPD is measured at the (possibly
virtual) focus of that surface. Other features which require a temporary image to be formed
include PSF, MTF, and diffraction encircled energy. For these features requiring a temporary
image, the new image surface is set to be a standard plane surface. A paraxial marginal ray
height solve is placed on the selected surface thickness to place the image surface at paraxial
focus for the selected surface. The analysis computation then proceeds at this newly created
intermediate image surface. Note the analysis occurs at the paraxial focus formed by the rays
after refracting through the selected surface. This shift to paraxial focus is not performed if the
intermediate system is in afocal mode.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 976
For more information on afocal mode see “Afocal Image Space” in the Aperture section of the
System Explorer.
Some analysis features make more sense if the data is evaluated directly on the surface itself,
without allowing the rays to focus to an image. These features include the various spot
diagrams, footprint analysis, geometric encircled energy, line/edge spread function, and
extended source encircled energy.
Traces bundles of rays through the system to the specific surface to show ray distributions.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 977
Pattern The pattern may be either hexapolar, square, or dithered. These terms refer to the
pattern of rays as they appear in a pupil plane. Defocus the lens significantly to see the pattern,
if desired. Dithered spot diagrams are generated by pseudo-random rays which eliminate the
symmetrical artifacts in the spot diagram typical of rectangular or hexapolar patterns. The
pattern is distorted to give the correct distribution of rays if pupil apodization is specified.
There is no “best” pattern to use; each shows a different character of the spot diagram.
Refer To The spot diagrams by default are referenced to the real chief ray. The RMS and GEO
spot radii listed at the bottom of the diagram (and defined in the discussion section) are
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 978
calculated assuming the chief ray is the "zero aberration" point. However, this option allows
selection of other reference points. The centroid is defined by the average position of the rays
traced. The middle is defined so that the maximum ray errors are equal in the plus and minus x
and y directions. The vertex is defined by the local coordinates 0,0 on the selected surface. If
the system is in afocal mode, the chief ray reference will be used instead of the vertex
reference.
Show Scale Scale bar is the default. Selecting "Square" will draw a box, centered on the
reference point, whose width is twice the distance from the reference point to the outermost
ray. Selecting "Cross" will draw a cross through the reference point location.
The "Circle" setting will draw a circle centered on the reference point.
Wavelength The wavelength number for which the calculation should be performed.
Field The field number for which the calculation should be performed.
Surface Selects the surface at which the spot diagram is to be evaluated. This is useful for
evaluating intermediate images or vignetting.
Plot Scale Sets the maximum scale size of the display in micrometers. A setting of zero will
generate a default scale.
Delta Focus The delta focus option is only used if through-focus spot diagrams are selected.
For focal systems, delta focus is the Z-axis spacing between the spot diagrams in micrometers.
For afocal systems, delta focus is the optical power spacing between the spot diagrams in
diopters.
Five spot diagrams will be shown for each field position. The defocus will be -2, -1, 0, 1, and 2
times the delta focus provided.
Ray Density The Ray Density specifies the number of Hexapolar Rings to be traced if a
Hexapolar or Dithered Pattern is selected, or the Number of Rays across the Width and Height
if a Rectangular Pattern is selected. The more Rays traced, the greater the accuracy of the RMS
Spot Radius, although the computation time increases. There are 6 Rays in the first Hexapolar
Ring, 12 in the second, 18 in the third, and so on. The Ray Density Minimum Value is 3.
Use Symbols If checked, this option will draw different symbols rather than dots for each
wavelength. This helps distinguish the various wavelengths.
Scatter Rays If checked, rays will be statistically scattered at ray-surface intercepts that have
defined scattering properties. See “Surface scattering settings”.
Airy Disk If checked, an elliptical ring around each spot showing the size of the Airy ellipse will
be drawn. The Airy disk radius is 1.22 times the wavelength (primary wavelength is used if
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 979
polychromatic) multiplied by the F/# of the system; which in general depends upon field
position, pupil orientation, and possibly vignetting of rays if the marginal rays cannot be
traced.
Direction Cosines If checked, the data presented will be the direction cosines of the rays
rather than the spatial coordinates of the rays. The x direction data will be the x direction
cosine of the ray, the y direction data will be the y direction cosine. The image coordinates will
also be given as the reference point direction cosines. Direction cosines are dimensionless.
Configuration Select "All" to show data for all configurations at once, or select the one
configuration to show, or select "Current" to show the active configuration. If "All" is selected,
and both focal and afocal mode configurations are defined, the Configuration setting will
automatically be reset to "Current".
Color Rays By Select "Field #" to use color to distinguish between each field position, or
"Wave #" to distinguish between each wavelength, or "Config #" to distinguish between
configurations, and "Wavelength" to approximate the color of wavelengths in the visible
spectrum.
Discussion
The ray density has a maximum value based upon the number of fields displayed, the number
of wavelengths defined, and available memory. Through-focus spot diagrams will trace half of
the maximum number of rays possible on standard spot diagrams.
The GEO spot radius listed on the plot for each field point is the distance from the reference
point (which is either the chief ray at the primary wavelength, the centroid of all the rays
traced, or the middle of the spot cluster) to the ray which is farthest away from the reference
point. In other words, the GEO spot radius is the radius of the circle centered at the reference
point which encloses all the rays.
The RMS spot radius is the root-mean-square radial size. The distance between each ray and
the reference point is squared, and averaged over all the rays, and then the square root is
taken. The RMS spot radius gives a rough idea of the spread of the rays, since it depends upon
every ray. The GEO spot radius only gives information about the one ray which is farthest from
the reference point.
For information on the X and Y RMS spot radii, see the "text" listing for the spot diagram.
The Airy disk radius is given by 1.22 times the wavelength (primary wavelength is used if
polychromatic) times the F/# of the beam, which in general depends upon field position and
pupil orientation. This is the radius to the first dark ring of the Airy disk for a circular, uniformly
illuminated entrance pupil. The Airy disk may be optionally drawn to give an idea of the scale
of the plot. For example, if all the rays are well within the Airy disk, then the system is often said
to be "diffraction limited". If the RMS spot radius is significantly larger than the Airy disk radius,
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 980
then the system is not diffraction limited. The threshold for diffraction limited performance
depends upon which criterion is used. There is no absolute boundary at which the system
becomes diffraction limited. The Airy disk shown is not an accurate representation of the
diffraction dark ring shape or size if the system does not have uniform illumination or if
vignetting is used to eliminate some of the rays. OpticStudio does not plot vignetted rays on
spot diagrams, nor are they used in computing the RMS or GEO spot radii.
OpticStudio generates grids of rays based upon the wavelength weighting factors and the
pupil apodization, if any. The wavelength with the largest weight uses the maximum grid size
set by the "Ray Density" option. Wavelengths with lower weights use grids with fewer rays to
maintain the correct representation in the diagram. Ray grids are also distorted to maintain the
correct ray distribution, if apodization is specified. The RMS spot radius stated on the spot
diagram considers the wavelength weighting and apodization factors. However, it is only an
estimate of the RMS spot radius based on the rays actually traced. It is not a very accurate
estimate for some systems.
The image surface intercept coordinates of the reference point are shown underneath each
spot diagram. If a surface other than the image surface is specified, then the coordinates are
the intercept coordinates of the reference point on that surface. Since the reference point may
be selected to be the centroid, this provides a convenient way of determining the centroid
coordinates. If the system is using afocal mode, the image coordinates are given in radians
with respect to the local Z axis.
For graphic windows, the left/right cursor keys will change the surface number and recompute
the data.
Footprint Diagram
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 981
Displays the footprint of the beam superimposed on any surface. Used for showing the effects
of vignetting and for checking surface apertures.
Ray Density Determines the number of rays traced across the half pupil; a setting of 10 will
trace a grid of 21 x 21 rays.
The "Ring" option will trace 360 marginal rays around the edge of the pupil at each field and
wavelength. The ring option will automatically determine the radial coordinate of the marginal
ray that is not vignetted to approximate the shape of the beam on any surface, but will yield
incorrect results if the beam is in a caustic.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 982
Wavelength The wavelength number to be used in the calculation.
Delete Vignetted If checked, then rays which are vignetted by subsequent surfaces will not be
drawn. Rays which are vignetted by prior surfaces are never drawn.
Use Symbols If checked, this option will draw different symbols rather than dots for each
wavelength. This helps distinguish the various wavelengths.
Configuration Select "All" to show all configurations, "Current" to show just the active
configuration, or select any combination of other configurations.
Color Rays By Select "Field #" to use color to distinguish between each field position, or
"Wave #" to distinguish between each wavelength, "Config #" to distinguish between
configurations, and "Wavelength" to approximate the color of wavelengths in the visible
spectrum.
Discussion
This feature will draw the shape of the surface, and then superimpose on that surface a grid of
rays. If there is no aperture on the surface, then a circular surface shape with a radial clear
aperture of the clear semi-diameter or semi-diameter value is shown. Otherwise, the shape of
the aperture is shown. The surface aperture is always shown as centered in the frame; even if
the aperture is decentered on the actual surface. If there is an obscuration on the surface, then
the obscuration will be drawn along with the circular aperture defined by the clear semi-
diameter or semi-diameter. If the surface aperture on the selected surface is modified between
different configurations, and more than one configuration is selected, the aperture for the first
configuration only will be drawn.
The ray grid size is specified by the ray density parameter, and rays may be from any or all
fields, at any or all wavelengths. Rays which are vignetted by surfaces prior to the surface
shown are not drawn. Rays which are vignetted by the surface or subsequent surfaces are not
drawn if "delete vignetted" is checked, otherwise, they are drawn. The ray set is apodized if any
system pupil apodization is selected. The number of rays shown divided by the total number of
rays launched is listed as the percentage of rays through if the Ray Density is not "ring".
For graphic windows, the left/right cursor keys will change the surface number and recompute
the data.
One should be careful when comparing these two values. There are several reasons that users
can find difference between the two values. The following are some possible reasons why the
difference is observed.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 983
1. In Geometric Image Analysis, transmission or reflection loss can be considered by
checking "Use Polarization", and this will never be considered in Footprint Diagram.
2. When rays cannot be launched in the Footprint Diagram, they are treated as loss and
Geometric Image Analysis will simply exclude those rays when calculating the effi-
ciency.
Note that "cannot launch" is different than "be vignetted".
There are several possible reasons rays cannot be launched. One possible reason is
when beams are caustic at the STOP surface. Another possible reason is when rays are
blocked by a Blackbox or Non-Sequential Component surface before hitting the STOP
surface while Ray-Aiming is turned on. It is also possible if rays cannot find interception
point on intermediate surfaces before hitting the STOP surface while Ray-Aiming is
turned on.
To check this, remove all surface apertures and use the Footprint Diagram to check the
STOP surface. Normally, the percentage of rays through should be 100% in this case. If
some rays cannot be launched, a value smaller than 100% will be observed.
3. Geometric Image Analysis launching rays randomly, so there will always be a slight dif-
ference. However, the difference should be very small when many rays are traced.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 984
Most of the options are identical to the Standard Spot Diagram.
Delta Focus: The delta focus option is only used if through-focus spot diagrams are selected.
For focal systems, delta focus is the Z-axis spacing between the spot diagrams in micrometers.
For afocal systems, delta focus is the optical power spacing between the spot diagrams in
diopters. Five spot diagrams will be shown for each field position. The defocus will be -2, -1, 0,
1, and 2 times the delta focus provided. The delta focus units are in microns. For some systems
the default delta focus may be too small to cause a change in the spot diagram structure.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 985
Discussion
The through focus spot diagrams are useful for estimating astigmatism, or for analyzing best
focus or depth of focus. The Direction Cosine option is not supported.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 986
Most of the options are identical to the Standard Spot diagram.
Exaggerate This dimensionless factor magnifies the transverse aberrations to make the spot
structure more apparent, although clearly there is an inherent distortion in using this feature. If
"chief ray" is selected as the reference point, then the chief ray for field position 1 will be used.
Discussion The "Full Field" spot diagram type is similar to the "Standard" type, except all of the
spots are plotted with respect to the same reference point, as opposed to a separate reference
point for each field position. This provides some idea of how the spot would look relative to
the other field points. For example, this can be used to determine if two closely spaced image
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 987
points can be resolved. The "Full Field" spot diagram type is less useful if the spot radius is
small compared to the total field size, because in this case the spots for each field will appear
very small compared to the distance between the spots. To increase the detail of the spots,
enter a factor for the Exaggerate setting.
Show spot diagram as a matrix of individual diagrams, with each field along a row and each
wavelength down a column.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 988
The options for the matrix spot diagram are similar to those for the standard spot diagram,
except for the addition of the following option.
Ignore Lateral Color If checked, this option will reference each spot diagram to the reference
point for each field and wavelength independently. This in effect ignores the effects of lateral
color which can displace the reference points for each wavelength.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 989
Configuration Matrix Spot Diagram
Show spot diagram as a matrix of individual diagrams, with each field along a row and each
configuration down a column.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 990
The options for the configuration matrix spot diagram are similar to those for the standard
spot diagram.
Discussion
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 991
Cardinal Points (rays and spots)
This feature lists for the selected range of surfaces and wavelengths the locations of the
principal, nodal, anti-nodal, and focal planes. The calculation is done for any defined
wavelength and either the X-Z or Y-Z orientation.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 992
First Surface The starting surface number of the group to compute the cardinal points for.
Last Surface The ending surface number of the group to compute the cardinal points for.
Orientation The orientation to use for computing the cardinal plane locations.
Discussion This feature may not return reliable results if coordinate breaks or non-centered
optics are included within the specified surface range.
Y-Ybar Drawing
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 993
The Y-Ybar diagram is a plot of marginal ray height as a function of chief ray height for a
paraxial skew ray at every surface in the lens.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 994
First Surface The first surface for which data will be plotted.
Last Surface The last surface for which data will be plotted.
Plot Scale Sets the maximum scale for the plot. The plot is always shown in a square box; the
default scale is the maximum transverse ray coordinate. Enter zero for automatic.
Vignetting Plot
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 995
Calculates fractional vignetting as a function of field angle. This feature is appropriate for
rotationally symmetric lenses and fields, as only positive y field angles at primary wavelength
are used in this calculation. This is a geometric calculation.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 996
Ray Density The Ray Density specifies the number of rays to be traced. The more rays traced,
the greater the accuracy, although the computation time increases. For a Ray Density of n,
OpticStudio traces a grid of (2n+1) x (2n + 1) Rays at each Field Point. The Ray Density
minimum value is 5.
Field Density The field density is the number of points between zero degrees and the
maximum field angle specified at which vignetting is calculated, intermediate values are
interpolated.
Remove Vignetting Factors If checked, vignetting factors are automatically removed. See
“Comment about vignetting factors”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 997
Discussion Fractional vignetting is the percentage of rays incident upon the entrance pupil
which pass all obscurations and apertures in the system and survive to the image surface,
normalized to relative pupil area. The graphic generated by this function shows fractional
vignetting as a function of field position. If too few rays are used, the results may be inaccurate.
This is especially true in systems with many apertures and large field angles.
Rays which cause errors such as missing a surface or those which are TIR are considered
vignetted.
Vignetting factors determine the size and shape of the pupil as seen from different field points
(see “Vignetting factors” for a full discussion). Because this analysis feature needs to trace rays
at arbitrary intermediate field points where no specific vignetting factors are defined, the use
of vignetting factors is not recommended. If "Remove Vignetting Factors" is checked on (the
default), any defined vignetting factors will automatically be replaced with surface apertures
for this computation. The surface aperture method is generally more accurate than the
vignetting factor method when the pupil is overfilled with light. The resulting data may be
different between the two methods. In some cases, particularly where the vignetting factors
are being used to define the shape of the source beam rather than the apertures of the optics,
it may be required to use the defined vignetting factors. In this case, check the "Remove
Vignetting Factors" box off. OpticStudio will then use the closest defined field to determine the
vignetting factors to use for an arbitrary field point.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 998
This feature computes the incident angle on the image surface of the lower marginal, chief,
and upper marginal rays as a function of image height.
Field Density The number of points in the field, from 0 to the maximum +y field coordinate.
Discussion This feature traces three rays: one at the bottom of the entrance pupil, the chief
ray, and another at the top of the entrance pupil. The (signed) angle of incidence on the image
surface (which is assumed to be flat) is computed for each of these three rays, as the field
coordinate changes from 0 to the maximum +y field. The image height based upon the chief
ray y-intercept coordinate is also computed. The feature then plots (or tabulates as text) the
three resulting angles as a function of the resulting image height.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 999
This feature is only intended to be used for rotationally symmetric systems with no vignetting,
and may not produce meaningful results for other types of systems.
Various views of the departure of the performance of the optical system from the predictions
of paraxial optics.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1000
Shows ray aberrations as a function of pupil coordinate.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1001
Plot Scale Sets the maximum vertical scale for the plots. The maximum scale is in micrometers
for ray fans, waves for OPD plots, or percent for entrance pupil aberration plots. This overrides
the automatic selection of scale for the plots. Enter zero for automatic scaling.
Number of Rays This is the number of rays traced on each side of the origin of the plot.
Wavelength The wavelength number for which the calculation should be performed.
Field The field number for which the calculation should be performed.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1002
Tangential Selects which aberration component to plot for the tangential fan. Since tangential
fans are functions of the y pupil coordinate, the default is to plot the y component of the
aberration.
Sagittal Selects which aberration component to plot for the sagittal fan. Since sagittal fans are
functions of the x pupil coordinate, the default is to plot the x component of the aberration.
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves.
Check Apertures Specifies whether or not to check if rays pass all surface apertures. If this is
selected, rays which do not pass surface apertures will not be drawn.
Vignetted Pupil If checked, the pupil axis will be scaled to the unvignetted pupil, in which case
the data will reflect the vignetting in the system. If unchecked, the pupil axis will be scaled to fit
the vignetted pupil.
Surface Selects the surface at which the fan is to be evaluated. This is useful for evaluating
intermediate images. See “Evaluating results at intermediate surfaces”.
Discussion
The tangential fans show either the x or the y component of the transverse ray aberration as a
function of the y pupil coordinate of the ray. The default option is to plot the y component of
the aberration. However, since transverse ray aberrations are vectors, this is an incomplete
description of the aberration. When OpticStudio plots the y component, the plot is labeled EY,
when plotting the x component of the aberration, the plot is labeled EX.
The vertical axis scale is given at the bottom of the graph. The data being plotted is the
difference between the ray intercept coordinate and the chief ray intercept coordinate. The
tangential fan is the plot of the difference between the ray x or y coordinate and the chief ray x
or y coordinate at the primary wavelength, as a function of the y pupil coordinate. The sagittal
plot is the difference between the ray x or y coordinate and the chief ray x or y coordinate as a
function of the x pupil coordinate. The horizontal scale for each graph is the normalized
entrance pupil coordinate, either PX or PY.
If "All" wavelengths are shown, then the plot is referenced to the primary wavelength chief ray.
If monochro- matic, then the chief ray for the selected wavelength is used as a reference. For
this reason, the data for non- primary wavelengths will in general change when switching
between monochromatic and polychromatic displays.
Because ray aberrations are vectors, with both an x and a y component, the ray aberration fan
is an incomplete description of the aberrations, especially when the image surface is rotated or
the system is otherwise non- rotationally symmetric. Also, the fans only indicate aberrations
along two "slices" through the pupil, rather than over the entire entrance pupil. The primary
purpose of the ray fan plot is to determine what aberrations are present in the system; it is not
a complete description of the system performance, especially for systems without rotational
symmetry.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1003
Evaluating results at intermediate surfaces
OpticStudio can compute analysis results for surfaces other than the image surface by
applying assumptions. These assumptions work in most cases, however, there may be cases
where the methods described here for analyzing intermediate surfaces are not appropriate,
including systems which require ray aiming. All of the changes made to the lens described are
made on a copy of the original lens data made for analysis purposes so no changes are made
to the original lens data.
If the field type is either real or paraxial image height, the field type is changed to angle or
object height for infinite or finite conjugate systems, respectively. The angles and heights used
correspond to the primary wavelength chief ray angles and heights as computed for the
unaltered system.
If the selected surface precedes the stop surface, OpticStudio moves the stop surface to a
(possibly virtual) dummy space prior to the existing surface 1. Unless the system aperture is
object space numerical aperture or cone angle, the system aperture is changed to entrance
pupil diameter, and the aperture value is set equal to the original paraxial entrance pupil
diameter computed for the original stop position. Note this assumption might not be valid for
systems that require ray aiming. If the selected surface follows the stop surface, no changes are
made to the system aperture or stop definitions.
Surfaces which follow the selected surface are then deleted. The glass of the new image
surface is set to be the same as the selected surface.
Most analysis features that compute results for focal mode systems make more sense if the
rays are allowed to come to a focus after refraction from the desired surface. For example, the
OPD plot is generally a useful diagnostic only when the OPD is measured at the (possibly
virtual) focus of that surface. Other features which require a temporary image to be formed
include PSF, MTF, and diffraction encircled energy. For these features requiring a temporary
image, the new image surface is set to be a standard plane surface. A paraxial marginal ray
height solve is placed on the selected surface thickness to place the image surface at paraxial
focus for the selected surface. The analysis computation then proceeds at this newly created
intermediate image surface. Note the analysis occurs at the paraxial focus formed by the rays
after refracting through the selected surface. This shift to paraxial focus is not performed if the
intermediate system is in afocal mode. For more information on afocal mode see “Afocal
Image Space”.
Some analysis features make more sense if the data is evaluated directly on the surface itself,
without allowing the rays to focus to an image. These features include the various spot
diagrams, footprint analysis, geometric encircled energy, line/edge spread function, and
extended source encircled energy.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1004
Optical Path Difference
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1005
The options are identical to those for ray aberration fans, except the only option for
"Tangential" and "Sagittal" is OPD, since OPD is a scalar quantity.
Discussion
The vertical axis scale is given at the bottom of the graph. The data being plotted is the optical
path difference, or OPD, which is the difference between the optical path length of the ray and
the optical path length of the chief ray. Usually, the calculation is referenced back to the
difference between the ray path lengths at the system exit pupil. For more information see
Reference OPD. The horizontal scale for each graph is the normalized entrance pupil
coordinate.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1006
If "All" wavelengths are shown, then the plot is referenced to the primary wavelength based
reference sphere and chief ray. The resulting OPD values, however, are in terms of waves of
each respective wavelength. If monochromatic, then the reference sphere and chief ray for the
selected wavelength is used as a reference. For this reason, the data for non-primary
wavelengths could change when switching between monochromatic and polychromatic
displays.
For infinite conjugates, a plane phase reference is defined at the chief ray intercept of the first
surface. This plane reference is oriented normal to the chief ray; the wavefront is a plane wave
and the phase zero point is arbitrary. The optical path length starts from this plane phase
reference.
OpticStudio can compute analysis results for surfaces other than the image surface by
applying assumptions. These assumptions work in most cases, however, there may be cases
where the methods described here for analyzing intermediate surfaces are not appropriate,
including systems which require ray aiming. All of the changes made to the lens described are
made on a copy of the original lens data made for analysis purposes so no changes are made
to the original lens data.
If the field type is either real or paraxial image height, the field type is changed to angle or
object height for infinite or finite conjugate systems, respectively. The angles and heights used
correspond to the primary wavelength chief ray angles and heights as computed for the
unaltered system.
If the selected surface precedes the stop surface, OpticStudio moves the stop surface to a
(possibly virtual) dummy space prior to the existing surface 1. Unless the system aperture is
object space numerical aperture or cone angle, the system aperture is changed to entrance
pupil diameter, and the aperture value is set equal to the original paraxial entrance pupil
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1007
diameter computed for the original stop position. Note this assumption might not be valid for
systems that require ray aiming. If the selected surface follows the stop surface, no changes are
made to the system aperture or stop definitions.
Surfaces which follow the selected surface are then deleted. The glass of the new image
surface is set to be the same as the selected surface.
Most analysis features that compute results for focal mode systems make more sense if the
rays are allowed to come to a focus after refraction from the desired surface. For example, the
OPD plot is generally a useful diagnostic only when the OPD is measured at the (possibly
virtual) focus of that surface. Other features which require a temporary image to be formed
include PSF, MTF, and diffraction encircled energy. For these features requiring a temporary
image, the new image surface is set to be a standard plane surface. A paraxial marginal ray
height solve is placed on the selected surface thickness to place the image surface at paraxial
focus for the selected surface. The analysis computation then proceeds at this newly created
intermediate image surface. Note the analysis occurs at the paraxial focus formed by the rays
after refracting through the selected surface. This shift to paraxial focus is not performed if the
intermediate system is in afocal mode.
For more information on afocal mode see “Afocal Image Space” in the Aperture section of the
System Explorer.
Some analysis features make more sense if the data is evaluated directly on the surface itself,
without allowing the rays to focus to an image. These features include the various spot
diagrams, footprint analysis, geometric encircled energy, line/edge spread function, and
extended source encircled energy.
Pupil Aberration
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1008
Shows entrance pupil distortion as a function of pupil coordinate.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1009
The options are identical to those for ray aberration fans, except the only option for
"Tangential" and "Sagittal" is pupil aberration, since pupil aberration is a scalar quantity. The
"Surface" only allows "Image" because this data is always computed at the stop surface.
Discussion Entrance pupil aberration is defined as the difference between the real ray
intercept on the stop surface and the on axis primary wavelength paraxial ray intercept as a
percentage of the paraxial stop radius. If the maximum aberration exceeds a few percent, ray
aiming (see “Ray Aiming”) may be required to get the rays in object space to correctly fill the
stop surface. If ray aiming is switched on, the entrance pupil aberration will appear to be zero
(or a very small residual value), because the distortion is accounted for by the ray tracing
algorithm. This is used as a check that ray aiming is working correctly. The definition used here
for pupil aberration is not intended to be complete or in agreement with other definitions. The
sole purpose of this feature is to provide guidance as to whether or not ray aiming is required.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1010
Max Curvature Defines the maximum scale for the field curvature plot in lens units. Enter zero
for automatic.
Max Distortion Defines the maximum scale for the distortion plot. Enter zero for automatic.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1011
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves. This
setting only applies to the Classic view, which is an option if “Enable Classic View” is selected in
the Graphics tab of the OpticStudio Preferences.
Ref. Field The reference field position. See the "Discussion" section here.
H/W Aspect If unity, then a square field will be selected. The output image may not be square
if the system is not symmetric, but the object field will be square. If the H/W aspect is greater
than 1, then the "height" or "y" field will be expanded by the aspect ratio. If the aspect is less
than 1, then the "height" or "y" field will be compressed by the aspect ratio. The aspect ratio is
the "y" field height divided by the "x" field width. The aspect ratio only affects the input field;
the image aspect ratio is determined by the optical system imaging properties. See the "SMIA-
TV Distortion" section here.
Discussion:
l Field curvature:
The field curvature plot shows the distance from the image surface to the paraxial image
surface as a function of field coordinate. The field curvature calculation is based on a sampling
across a half-fan in +/-Y (or X). For each sample point in the field, OpticStudio determines the
Z coordinate of the paraxial focal plane based on a parabasal ray trace in the X and Y directions
(for sagittal and tangential), and then compares this to the Z coordinate of the system image
surface. The tangential data are the distances measured along the Z-axis from the image
surface to the paraxial image surface measured in the tangential (YZ) plane. The sagittal data
are the distances measured in the plane orthogonal to the tangential plane. The base of the
plot is on axis, and the top of the plot represents the maximum field (angle or height). There
are no units on the vertical scale because the plot is always normalized to the maximum field
coordinate along the scan direction.
The field scan is along the +Y field by default. If +X or -X is selected, then the field scan is along
the X direction, in which case the tangential curve is for the XZ plane, and the sagittal curve is
in the YZ plane.
The field curvature plot does not always start at zero for zero field. The reason is that the plot
shows the distance from the image surface to the paraxial image surface, and the image
surface need not be coincident with the paraxial image surface. If there is any defocus, then the
two surfaces are offset, and so is the field curvature data.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1012
l Distortion:
Distortion in percent is defined as the real chief ray height, minus the reference ray height,
divided by the reference ray height, times 100:
where all heights are taken to be the image surface radial coordinate, at whatever image
surface is defined (the data is not referred to the paraxial image surface). The reference ray
height is computed by tracing a real ray from a very small field height, and then scaling the
results as required. This generalization permits the computation of reasonable distortion
values even for systems not well described by paraxial ray tracing. For F- Tan(theta) distortion,
the reference height for the undistorted ray in a rotationally symmetric system at paraxial focus
is given by
where f is the focal length and θ is the angle in object space. Note that this reference is
meaningless for optical systems that use field angles at or greater than 90 degrees. If a system
with field angles over 89 degrees is analyzed with this feature, the maximum computed field
angle will be limited to 89 degrees.
F-Theta distortion does not use the tangent relationship, but instead uses the height given by
the focal length of the lens multiplied by the angle the chief ray makes in object space. This so-
called F-Theta height is only meaningful in systems with the object at infinity, when field
heights are measured in angles. The reference height for the undistorted ray at the paraxial
focal plane is given by
where f is the focal length and θ is the angle in object space. F-Theta is used in scanning
systems where the image height needs to be linear with scan angle.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1013
proportion of linearity be defined by the focal length of the system. A focal length is chosen
that best fits the data, rather than the system focal length, although in general the best fit focal
length is close to the system focal length. The calibrated focal length used is given on the text
listing for this feature.
One effect of this definition of calibrated distortion is the non-zero distortion at zero field
angle. The reason for this non-zero distortion is best explained by looking at the limiting
behavior of the definition of calibrated distortion. Calibrated distortion in percent is defined as
For small angles, the real y chief ray coordinate in any reasonable optical system is well
described by ychief = fθ and the reference ray coordinate by yref = f’θ where f’ is the calibrated
focal length, so the distortion near zero field is
Therefore, the calibrated distortion is not generally zero on axis. This does not mean the image
height is not zero, it is an artifact of the different choice of focal lengths for the reference and
actual ray coordinates near the optical axis. Note that a percentage distortion near the axis is
not significant because the field itself approaches zero at zero field angle.
For non-rotationally symmetric systems, distortion is poorly defined and the data presented is
probably meaningless. The reason is that no single number adequately describes distortion at
a single field point if the system is not rotationally symmetric. Instead, see “Grid Distortion”.
Strictly speaking, the field curvature and distortion plots are only valid for rotationally
symmetric systems with plane object and image surfaces. However, OpticStudio uses a
generalization of the field curvature and distortion concepts to give reasonable results for
some, but not all, non-rotationally symmetric systems. Caution should be used when
interpreting these data for non-rotationally symmetric systems or systems with object and/or
image surfaces that are not planes.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1014
By default, OpticStudio ignores vignetting factors when computing the field curvature and
distortion plots. Vignetting factors can change the chief ray location on the stop surface, such
that the chief ray no longer goes through the center of the stop.
Computing distortion when using real image height as the field type
The distortion cannot be computed in the manner described here if the field type is real image
height. The reason is that when using real image height, OpticStudio iterates each chief ray
trace to find the exact object space angle to hit the desired image coordinate. Because the
desired image coordinate is always reached, the image height is linear with field coordinate.
The iteration is thus implicitly removing the distortion. Instead, OpticStudio automatically
changes the field type from real image height to field angle for the purposes of this
computation. The field angles at each defined field point are then chosen to yield the identical
real image height coordinates. Using this method, the deviation from linearity is now retained
and the distortion may be computed accurately. If the optical system is not axial symmetric,
the conversion from real image height to field angle may yield unexpected results as the field
angle scan direction and the real image coordinate direction may no longer be coplanar, and
care should be taken in interpreting the results. It is recommended that the system be
converted to use field angle or object height rather than real image height for non-axial
systems when evaluating distortion.
Grid Distortion
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1015
Display Select either "Cross" to mark each chief ray intercept with a cross, or "Vector" to plot a
vector from the ideal image point to the actual chief ray image point.
Scale If the scale is different than 1.0, then the "x" points on the distortion grid will be
exaggerated by the selected scale factor. The scale factor may be negative to change positive
to negative distortion on the plot.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1016
H/W Aspect If unity, then a square field will be selected. The output image may not be square
if the system is not symmetric, but the object field will be square. If the H/W aspect is greater
than 1, then the "height" or "y" field will be expanded by the aspect ratio. If the aspect is less
than 1, then the "height" or "y" field will be compressed by the aspect ratio. The aspect ratio is
the "y" field height divided by the "x" field width. The aspect ratio only affects the input field;
the image aspect ratio is determined by the optical system imaging properties.
Field Width The full width, in field units, of the "x" field of view. If the current field type is real
image height, OpticStudio will temporarily change the field height to field angle, and the "Field
Width" value will be in angular units. See “Computing distortion when using real image height
as the field type”.
Discussion:
This feature displays or computes the coordinates of a grid of chief rays. In a system without
distortion, the chief ray coordinates on the image surface follow a linear relationship with the
field coordinate:
where xp and yp are the predicted image coordinates relative to a reference image point and
fx and fy are the linear coordinates on the object surface relative to a reference point. For
optical systems using angles as a field definition, fx and fy are the tangents of the field angles
(the field coordinates must be linear, therefore, tangents of angles rather than angles are
used). To compute the ABCD matrix, OpticStudio traces rays over a very small region centered
upon the reference field position. Usually, this is the center of the field of view. OpticStudio
allows selection of which field position to use for reference.
By default, OpticStudio sets the corner of the field grid in object space to be at the maximum
radial field distance. Because object height is linear with the tangent of the field angle, the full
width of the field when angles are used to define the field is given by
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1017
Where θr is the maximum radial field angle at the corner of the field.
The ray coordinates in image space for the very small field of view are used to determine the
ABCD matrix components. The use of an ABCD matrix allows for coordinate rotations. If the
image surface is rotated, such that a y object coordinate images to both an x and a y image
coordinate, the ABCD matrix will automatically account for the rotation. The grid distortion
plot shows the linear grid, and then marks the actual chief ray intercept for a ray with the same
linear field coordinates with an "X" for each point on the grid.
If the optical system is not rotationally symmetric, then the distortion is not generally radial.
The distortion is a vector, and the magnitude of the distorted vector must be used to compute
the total distortion.
The text listing available tabulates the predicted image coordinate, the actual image
coordinate, and the "percent distortion" defined by
where
and
and the subscripts r and p refer to the real and predicted coordinates on the image surface
relative to the reference field position image location, respectively. Because the values for Rreal
and Rpredicted are always positive, this definition will always yield a positive value for P .
However, it is still a frequently useful concept to distinguish between "positive" and "negative"
distortion. To support this, if Rreal is less than Rpredicted, then the sign of P is changed to be
negative.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1018
The Grid Distortion plot is not directly visualizing the text output. The ray coordinates are
plotted on a grid that is in object space. An inverse transformation back to object coordinates
is done by applying the [A B; C D]-1 matrix to the [xp yp] and [xr yr] vectors. This transformation
can introduce rotation and stretching/squeezing which may make the grid distortion plot look
quite different from a plot of the data in the text tab. In addition, there may be a stretch factor
applied to the difference if the “Scale” setting is something other than 1. That is often used to
amplify small distortion values for visualization purposes.
The transformation to object space is necessary because the ray coordinates are plotted on a
grid that is also in object space. The black grid represents the object coordinates for the chief
rays, and the [A B; C D] matrix (explained above) is used to compute the predicted coordinates
of these rays at the image plane. The blue crosses represent the object coordinates of the real
chief rays. Therefore, neither the predicted nor the real image coordinates in the text output
are directly shown in the Grid Distortion plot.
NOTE: This definition of generalized distortion may not be applicable in all cases, and the
results should be used with caution.
SMIA-TV Distortion
The text listing of this feature also computes an alternate mea- sure of distortion called
Standard Mobile Imaging Architecture TV (SMIA-TV) Distortion. SMIA-TV Distortion is defined
as
where A = 0.5*(A1+A2) and A1, A2, and B are distances measured between three pairs of
points in a rectangular field of view as shown in the image.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1019
The A distances are mea- sured between the top and bottom corners of the field of view at the
left and right sides of the image, and the B distance is mea- sured between the top and bottom
of the image at the x-field center of the image. If any one of the 6 required rays cannot be
traced, the SMIA-TV distortion will be listed as zero.
OpticStudio cannot compute the distortion in the manner described here if the field type is
real image height. Instead, OpticStudio automatically changes the field type from real image
height to field angle for the purposes of this computation. For more information, see
“Computing distortion when using real image height as the field type” section of "Field
Curvature and Distortion".
Grid distortion cannot be calculated if the field units are angles and the maximum angle equals
or exceeds 90 degrees. This limitation is due to the assumption that the predicted image
height is proportional to the tangent of the field angle in object space. When the field angle
exceeds 90 degrees, the tangent does not predict the linear image height correctly.
The grid distortion plot is oriented in field units, so that the +y direction corresponds to the +y
field coordinate in field units (see “Fields”). This may or may not be different than the
orientation of a spot diagram or other plot plotted in image space units.
Longitudinal Aberration
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1020
Plot Scale Defines the maximum scale for the plot in lens units. Enter zero for automatic.
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves.
Discussion This feature computes the distance from the image surface to where a zonal
marginal ray "focuses", or crosses the optical axis. The computation is performed only for the
on axis field point, and only for zonal marginal tangential rays as a function of pupil zone. The
base of the plot is on axis, and the top of the plot represents the maximum entrance pupil
radius. There are no units on the vertical scale because the plot is always normalized to the
maximum entrance pupil radius. The horizontal scale is in lens units, and represents the
distance from the image surface to the point where the ray crosses the optical axis. For afocal
systems, the horizontal axis is diopters of power required to bring the rays to collimation.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1021
Because longitudinal aberration is defined in terms of the distance to the ray-axis crossing
point, this feature may produce meaningless data for non-rotationally symmetric systems.
Great care should be exercised in interpreting this plot for non-rotationally symmetric systems.
Lateral Color
For focal systems, the lateral color is the y-distance between the chief ray intercepts of the two
extreme wavelengths measured in lens units.
For afocal systems, this is the angle in afocal mode units between the chief rays of the two
extreme wavelengths.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1022
Plot Scale Defines the maximum scale for the plot in lens units. Enter zero for automatic.
Use Real Rays If checked, real rays are used, otherwise paraxial rays are used.
All Wavelengths If checked, then data for all defined wavelengths will be displayed. Each
wavelength will be referenced to the primary wavelength. If not checked, then the difference
between the shortest and longest wavelength rays will be used. See the discussion.
Show Airy Disk If checked, then the Airy disk radius at the primary wavelength will be plotted
on either side of the reference line to indicate the extent of the Airy disk.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1024
Maximum Shift The maximum extent in lens units for the horizontal axis. The vertical axis
scale is set by the range of wavelengths defined. Enter zero for automatic.
Pupil Zone The radial zone in the pupil used to compute the back focus. The default value of
zero means a paraxial ray will be used. Values between 0 and 1 mean real marginal rays are
used in the appropriate zone in the entrance pupil. A 1 is at the edge of the pupil, or full
aperture.
Discussion This is a plot of the shift in back focal length with respect to the primary
wavelength. At each plotted wavelength, the shift in image space required to reach focus for
that color marginal ray is computed. The shift distance is computed in the same media (glass
or air) as the surface prior to the image surface. This plot may not be meaningful for non-
paraxial systems.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1025
The maximum shift setting overrides the default scaling. Units are in lens units. The entire plot
is always referenced to the primary wavelength paraxial focus. The diffraction limited depth of
focus listed is given by the formula 4λF2, where F is the working F/# and λ is the primary
wavelength
Seidel Coefficients
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1026
Wavelength The wavelength number to use for the calculation.
Discussion
OpticStudio will compute the unconverted Seidel, transverse, longitudinal, and some
wavefront coefficients. The Seidel coefficients are listed surface by surface, as well as a sum for
the entire system. The coefficients listed are for spherical aberration (SPHA, S1), coma (COMA,
S2), astigmatism (ASTI, S3), field curvature (FCUR, S4), distortion (DIST, S5), longitudinal color
(CLA, CL), and transverse color (CTR, CT). The units are always the same as the system lens
units, except of course for the coefficients measured in waves.
These calculations are only valid and accurate for systems consisting entirely of surfaces that
are axial symmetric spheres, conic, second order, or fourth order aspheres. Any systems which
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1027
contain coordinate breaks, gratings, paraxial, or other surfaces that are not radially symmetric
are not adequately described by the paraxial rays which are used to compute the coefficients.
Specifically, the supported surface types are the Standard, Even Asphere, Odd Asphere,
Extended Asphere, and Extended Odd Asphere.
Transverse aberration coefficients are listed for each surface and for the system as a whole. The
coefficients given are transverse spherical (TSPH), transverse sagittal coma (TSCO), transverse
tangential coma (TTCO), transverse astigmatism (TAST), transverse Petzval field curvature
(TPFC), transverse sagittal field curvature (TSFC), transverse tangential field curvature (TTFC),
transverse distortion (TDIS), transverse axial color (TAXC), and transverse lateral color (TLAC).
The transverse aberrations are in the system lens units. The transverse aberration coefficients
may be very large in optical spaces where the light is nearly collimated, and have little meaning
in these optical spaces.
The Petzval Radius, which is the inverse of the Petzval Sum, is:
where ni-1 and ni are refractive indexes before and after the surface number i. The Ri is the
radius of curvature of the surface number i. The nm is the index of image surface. The m is the
surface number of image surface.
The Petzval Radius will take into account the absolute value of the refractive index in both
Object Space and Image Space. The Object and Image Radius are ignored for this calculation.
Longitudinal aberration coefficients are computed for longitudinal spherical aberration (LSPH),
longitudinal sagittal coma (LSCO), longitudinal tangential coma (LTCO), longitudinal
astigmatism (LAST), longitudinal Petzval field curvature (LPFC), longitudinal sagittal field
curvature (LSFC), longitudinal tangential field curvature (LTFC), longitudinal distortion (LDIS),
longitudinal axial color (LAXC), and longitudinal lateral color (LLAC). The longitudinal
aberrations are in the system lens units. The longitudinal aberration coefficients may be very
large in optical spaces where the light is nearly collimated, and have little meaning in these
optical spaces.
The wavefront coefficients given are spherical aberration (W040), coma (W131), astigmatism
(W222), field curvature Petzval (W220P), distortion (W311), axial color defocus term (W020),
lateral color tilt term (W111), field curvature sagittal (W220S), field curvature medial (W220M),
and field curvature tangential (W220T). All the wavefront coefficients are in units of
wavelengths at the edge of the exit pupil. The various aberration coefficients are interrelated
according to the following table. The n’ and u’ values are the index of refraction and the
paraxial marginal ray angle at the last surface in the system. For a discussion of the meaning
and derivation of the Seidel aberration coefficients, see Welford, Aberrations of Optical
Systems, Smith, Modern Lens Design, or O' Shea, Elements of Modern Optical Design. A list of
good references can be found in “References on Lens Design”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1028
Name Seidel Wave Description Transverse Longitudinal
Spherical
Spherical
Coma Sagittal
Tangential
From tangential
Astigmatism
to sagittal foci
Gaussian to
Petzval
Field Gaussian to
Curvature sagittal
Gaussian to
medial
Gaussian to
tangential
Distortion
Distortion
Chromatic
aberrations are
Axial Color measured
between the
extreme defined
wavelength,
Lateral Color referenced to
the selected
wavelength.
S1 = 8 W040
S2 = 2 W131
S3 = 2 W222
S4 = 4 W220 - 2 W222
S5 = 2 W311
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1029
Seidel Diagram
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1030
First/Last Surface The surface range to display. The sum is for the selected range of surfaces.
The image surface is not displayed.
Plot Scale Sets the maximum scale in lens units for the plot. Enter zero for automatic.
Ignore Chromatic If checked, axial and lateral color data will not be displayed.
Discussion The unconverted Seidel coefficients are displayed surface by surface, as well as a
sum for the selected range of surfaces. For details on the Seidel coefficients, see “Seidel
Coefficients”
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1031
Full-Field Aberration
The Full-Field Aberration analysis displays Zernike coefficients across the full field of view. For
more information, see “Discussion” below.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1032
Field The field number on which the field sampling grid is centered.
Field Shape This can be Rectangular or Elliptical. If Elliptical is chosen, data falling outside the
ellipse defined by X Field Width and Y Field Width will not be calculated. In the example below
this corresponds to data falling in the grey area.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1033
Wavelength The wavelength number to be used for the calculation.
X Field Width and Y Field Width The half size of the field sampling grid in X or Y. In degrees
or lens units depending upon the current field definition in the Field Data Editor.
If the field definition is Theodolite Angle in the Field Data Editor, the X/Y Field Width indicates
the Azimuth/Elevation angle in degrees, respectively.
X Field Sampling and Y Field Sampling: The number of sampling field points in X and Y
respectively.
Decomposition Currently the only option is Zernike Terms, and the wavefront is decomposed
using the Zernike Standard Coefficient analysis. The Zernike Standard polynomials are defined
in the table given in “Zernike Standard Coefficients.” Different decomposition options may be
added in the future.
Maximum Term The maximum term to be considered for the decomposition. Any value up to
231 may be specified.
Aberration The aberration to be plotted over the specified field of view. This can be defocus,
primary astigmatism, primary coma, or a specific Zernike term. Using Z4, Z5, ..., Z8 to represent
Zernike terms, the aberrations are calculated as:
l Defocus = Z4
l Primary Astigmatism:
l Primary Coma:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1034
l Magnitude = sqrt (Z7^2 + Z8^2)
l Angle = atan2(y = -Z7 , x = -Z8)
Where atan2 is the C library function that gives the arc tangent of (y/x) but works for all the
quadrants combinations
Why is there a minus sign on both the astigmatism and coma angles?
OpticStudio draws the Zernike aberrations to "look" like the transverse aberrations (which the
spot diagram shows).
Ex = - (R/n) (dW/dx)
Ey = - (R/n) (dW/dy)
Where R is the distance from the exit pupil to the image surface, n is the index of the medium
before the image, and W is the wavefront. The minus sign comes from there.
For astigmatism, the minus sign doesn’t matter as its icon is drawn as a line. However, we still
add the minus sign so that the conventions are same for coma and astigmatism.
For coma, the minus sign matters because that aberration skews all the rays to one side.
OpticStudio draws the coma “cone” shape to look like the spot diagram.
Note: The atan function used in the calculation is atan2(x,y) which utilizes the signs of both
arguments.
Note: the atan function used in the calculation is atan2(x,y) which utilizes the signs of both
arguments.
Pupil sampling Specify the density in the pupil to use for coefficient fitting. Larger grid sizes
are more accurate, although the computation time increases.
Display Choose between Absolute, Relative, or Average. Absolute displays the chosen
aberration without any additional modification. Relative displays the chosen aberration after
subtracting its average across all sampling points. Average displays the average of the chosen
aberration across all sampling points.
The primary astigmatism and primary coma aberrations are vectors (because they utilize more
than one Zernike term) and thus have slightly different responses to the Relative and Average
display settings. When Show As is set to Icons and the selected aberration is a vector, the
Average setting will calculate the average of each term of the vector separately. Similarly, the
Relative setting subtracts each term of the vector from the individual average. For example, if
the data to display is Primary Astigmatism (uses terms Z5 and Z6) then the Average setting will
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1035
use the average of Z5 and the average of Z6. Relative will use Z5 of each sampling point minus
the average of Z5, and Z6 of each sampling point minus the average of Z6.
Show As Choose between Icons, Grey Scale, Inverse Grey Scale, False Color, Inverse False
Color. Icons allow displaying both the aberration magnitude and orientation (if applicable),
and the icon scale is listed in the comments area. Note that the icons only show absolute
aberration values. The other Show As options can show negative magnitude values, but do not
show the aberration orientation. (Not all aberrations include orientation information.)
Discussion
The Full-Field Aberration analysis can be used to show a specific aberration as a function of
field position. This analysis can be particularly useful on systems containing freeform surfaces
to verify aberration correction across the specified field.
Note that sampling points falling outside of the Normalization boundary defined in the Field
Data Editor will not be plotted. See below an example for a Full-Field Aberration plot centered
on a “Chosen Field” point.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1036
Wavefront
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1037
View and analyze the wavefront produced by the optical system
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1038
Shows optical path difference as a function of pupil coordinate. See "Optical Path Difference"
for more information.
Wavefront Map
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1039
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
Rotation Rotation specifies how the surface plots are rotated for viewing; either 0, 90, 180, or
270 degrees.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1040
Scale The scale factor is used to override the automatic vertical scaling set by the program on
the surface plots. The scale factor can be greater than unity to vertically stretch the plot, or less
than unity to compress it.
Polarization If none is selected, polarization is ignored. If Ex, Ey, or Ez is selected, then the
phase due to polarization effects for the specified component of the electric field is added to
the optical path difference. If the polarization phase exceeds one wave, the wavefront map
may display abrupt changes of 2π because no phase "unwrapping" is performed.
Field The field number for which the calculation should be performed.
Use Exit Pupil Shape If checked, the shape of the pupil is distorted to show the approximate
shape of the exit pupil as seen from the image point for the specified field. The shape is based
upon the F/# of the beam in the X and Y pupil directions. If this box is unchecked, then instead
the plot will be scaled to circular entrance pupil coordinates, no matter how distorted the exit
pupil may actually be.
STAR Data STAR Effects On shows the Wavefront Map with STAR effects enabled. Difference
displays the Wavefront Map with STAR effects enabled and the original Wavefront Error
subtracted.
Show As Choose surface plot, contour map, grey scale, or false color map as the display
option.
Surface Selects the surface at which the data is to be evaluated. This is useful for evaluating
intermediate images. See “Evaluating results at intermediate surfaces”.
Remove Tilt If checked, the linear X- and Y- tilt is removed from the data. This is equivalent to
referencing the OPD data to the centroid.
Contour Format The contour format string. For a discussion of the contour format string
syntax, see “The Contour Format String”.
Subaperture Data: Sx, Sy, Sr Defines a subaperture of the pupil to compute the wavefront
data for. See “Subaperture computations” section in Zernike Fringe Coefficients for details.
Discussion See also the Interferogram feature. For details on RMS wavefront error see
“Comments about RMS wavefront computations” section in RMS vs. Field.
Interferogram
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1041
Generates and displays interferograms.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1042
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
Surface Selects the surface at which the data is to be evaluated. This is useful for evaluating
intermediate images. See “Evaluating results at intermediate surfaces” .
Scale Factor Determines the number of fringes per wave of OPD. Useful for modeling double
pass interferometers (i.e. use a scale factor of two).
Show As Choose contour map, grey scale, or false color map as the display option.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1043
Field The field number for which the calculation should be performed.
X-Tilt The number of fringes of tilt to add in the x-direction after applying the scale factor.
Y-Tilt The number of fringes of tilt to add in the y-direction after applying the scale factor.
Beam 1 Selects the first beam for the interferogram. See the discussion.
Beam 2 Selects the second beam for the interferogram. See the discussion.
Ref Beam To Vertex Normally, OpticStudio references the OPD to the chief ray; which in
effect subtracts out tilt from the wavefront phase. For interferometry, it is sometimes desirable
to retain the wavefront tilt. Checking this option on will add tilt to the beam based upon the
deviation of the chief ray from the image surface vertex. This option is only useful for field
positions whose chief ray is reasonably close to the surface vertex, where the assumption that
tilt is described by the deviation of the chief ray is valid. This feature should also only be used
when the scale factor is 1.0.
Use Exit Pupil Shape If checked, the shape of the pupil is distorted to show the approximate
shape of the exit pupil as seen from the image point for the specified field. The shape is based
upon the F/# of the beam in the X and Y pupil directions. If this box is unchecked, then instead
the plot will be scaled to circular entrance pupil coordinates, no matter how distorted the exit
pupil may actually be.
If Beam 1 is "reference" then the configuration of Beam 2 is used to determine the pupil shape,
otherwise the configuration of Beam 1 is used. If both Beam 1 and Beam 2 are defined by
different configurations, the shape of Beam 1 is used, and no attempt is made to confirm that
the pupils are the same shape. If the pupil shapes are different for the two configurations, this
feature cannot accurately predict the interferogram.
Consider Path Length Difference If unchecked, the interferogram is computed assuming the
phase at the center of each beam is zero, resulting in a "dark" fringe at the center. No attempt
is made to determine the phases of the two beams with respect to each other.
If checked, the difference between the total optical path length of the chief rays in each beam
configuration is considered. This setting will alter the phase of the entire interferogram, but will
not change the shape of the fringe pattern. For example, if the path difference is exactly one-
half wave, dark fringes will become bright and bright will become dark. The optical path length
of the chief rays from object to image surface is used, even if the fringes are not localized at
the image surface. This assumption is only valid if the fringes are localized on a plane that is
the same distance from the image surfaces in each configuration. If a reference beam is
selected rather than a beam from a configuration, the optical path length for the reference
beam is assumed to be zero.
Contour Format The contour format string. For a discussion of the contour format string
syntax, see “The Contour Format String”.
Subaperture Data: Sx, Sy, Sr Defines a subaperture of the pupil to compute the
interferogram data for. See “Subaperture computations” for details.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1044
Discussion
This feature works by computing two pupil maps, one each from beams 1 and 2. The phase (or
OPD) of these two pupil maps is subtracted, and then optionally some linear phase is added as
a function of the x and y pupil coordinate to simulate tilt fringes. The individual beams may be
OPD as computed for any one configuration, or a "reference" beam which has identically zero
OPD may be selected.
Interferometers may be simulated by modeling the two paths through the system using two
configurations, and then computing the interferogram of the two resulting beams. The
accuracy of this approach is limited by some simplifying assumptions:
l Any lateral shift or magnification difference between the two beams is ignored; it is
assumed that the pupils perfectly overlap at the exit pupil.
l Any differences in transmission are ignored; so the two OPD values at any one point in
the pupil are assumed to be of equal value in intensity and the phase can be subtracted
to yield the net phase difference.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1045
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
Show As Choose surface, contour map, grey scale, false color map, or cross section as the
display option.
Field The field number for which the calculation should be performed.
Row/Column When "Show As" is selected to be a cross section, this control defines the row or
column number to display.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1046
Knife Choose Horizontal Above, Horizontal Below, Vertical Left, or Vertical Right. The Vertical
Left knife blocks out all the light near focus from the knife position coordinate left; that is,
towards negative x coordinates. The Vertical Right blocks all light from the knife position
rightward. The Horizontal Above blocks all light from the knife position up, and Horizontal
Below blocks all light from the knife position down. The terms left, right, up and down refer to
the -x, +x, +y, and -y directions in the local coordinate system of the image surface.
Position The position in micrometers relative to the chief ray of the knife. The coordinate is
assumed to be in X or Y depending upon whether an X or Y knife is selected.
Data The computed shadowgram, the reference shadowgram, or the difference between the
two may be selected. See the discussion for details.
Decenter X/Y The decenter in X or Y of the reference shadowgram image relative to the
computed shadowgram image. The units are relative to the full width or height of the
reference shadowgram image. For example, an X Decenter of 0.25 will shift the reference
image relative to the computed image by 25% of the full width of the reference image.
Scale X/Y The scale factor in X or Y of the reference shadowgram image pixels relative to the
computed shadowgram image pixels.
Discussion
This feature simulates the placement of either an X- or Y- oriented knife edge at the image
surface; then computes the resulting shadowgram after propagating the vignetted beam back
to the near field. The method of calculation involves computing the diffraction based complex
amplitude PSF at focus via the FFT method; then a portion of the complex amplitude is
vignetted by the simulated knife edge, and the remaining complex amplitude is propagated
back to the near field. The shadowgram calculated this way is called the "computed"
shadowgram for this feature.
This feature also allows the import of either a bitmap file of a reference or measured
shadowgram. The reference shadowgram may be displayed for convenient check of
orientation.
The difference between the computed and reference shadowgram may be displayed.
OpticStudio computes the RMS difference between the computed and reference
shadowgrams, and this RMS difference may be optimized using the FOUC operand described
in the chapter "Optimization". Optimizing the RMS difference permits quantitative
determination of the aberrations present in the beam that created the measured shadowgram.
When calculating the difference between the computed and reference shadowgram, the two
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1047
images must be registered together to overlap correctly. The decenter x/y and scale x/y
controls are used for registering the two images.
This feature visualizes contrast loss across the pupil using Moore-Elliott method.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1048
Sampling The size of the grid used to sample the pupil.
Frequency The spatial frequency (see “MTF Units”) for which the data is plotted. When zero,
the frequency will be set to 5% of the cutoff frequency for the chosen field and wavelength.
Normalize If this box is checked, all circles are scaled so that the maximum value in the plot is
displayed at the maximum allowed circle size.
Show OPD If this option is checked, wavefront information is shown on the plot using a small
indicator. See Discussion below.
Discussion
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1049
This feature displays contrast loss across the pupil using the Moore-Elliott method at a specific
spatial frequency. The contrast loss distribution indicates which region in the pupil contributes
the most to a poor MTF, and can be used to better evaluate the needed changes to improve
the optical performance. For each sample point on the pupil, a circle with optionally a small
indicator is shown to suggest the amount of the contrast loss and wavefront information.
The size of each circle represents the magnitude of the contrast loss on that position in pupil.
It’s at a maximum when contrast loss is 1 and at a minimum when contrast loss is 0.
For each sampled pupil point (px, py) on the Contrast Loss Map, OpticStudio traces a total of 5
rays: the chief ray for the specified field; for the sagittal map, two rays from the specified field
point to pupil coordinates (px + ẟ/2, py) and (px - ẟ/2, py); for the tangential map, two rays
from the specified field point to pupil coordinates (px, py + ẟ/2) and (px, py - ẟ/2).
ẟ is determined from the chosen Frequency setting and the cutoff frequency. For more
information about ẟ, see the Moore-Elliott method in “Optimizing for MTF”.
The sagittal contrast loss is then calculated from the two rays specified above as:
where φ1 and φ2 are optical path difference of the two rays with respect to the chief ray in unit
of degrees. A very similar equation applies to the tangential contrast loss, with the difference
that φ1 and φ2 are calculated for rays (px, py + ẟ/2) and (px, py - ẟ/2) instead. A contrast loss
of 1 means that contrast has been completely lost, and 0 means that diffraction-limited
performance is achieved.
Note that if one of the sampling ray pupil coordinate is outside of the unit circle, the data on
that point can’t be calculated and no circle will be shown on the map at that pupil position.
This would be that case for e.g. the sagittal contrast loss for pupil point (px, py) = (1, 0) and ẟ =
0.1: the two sample rays would then be (0.9, 0) and (1.1, 0), the latter being outside of the unit
circle.
If the Show OPD option is checked, wavefront information is shown as a small indicator: for
each point on the pupil coordinate, the average OPD of the two rays (φ1 + φ2)/2 is calculated
and the modulo 2π is taken. This value determines the orientation of the indicator as shown
below. When the OPD is zero, the indicator points to the +X direction and rotates counter-
clockwise as the average OPD increases.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1050
Note that the MTF and diffraction-limited MTF at the chosen frequency are also reported on
the Tangential and Sagittal map for reference. The value is calculated in the same way as in the
FFT MTF analysis, using pupil sampling 128 x 128. If the system aberrations are too severe for
the MTF to be well sampled by a grid of 128 x 128 rays, then an error message “Cannot
compute MTF” will be displayed instead.
Note that in some cases the maximum contrast loss on the map may be very small and, as a
result, the magnitude of the contrast loss across the pupil may not be deduced easily. In this
case, users can check the Normalize option, which scales all circles so that the maximum value
in the plot is displayed at the maximum allowed circle size. When this option is checked, the
message “Plot scale: 0 to xx”, where xx is the largest contrast loss value in the map, will be
displayed in the Comments area.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1051
Calculates the Zernike coefficients using the Fringe (also called the "University of Arizona")
polynomials. The coefficients are given in units of waves.
Sampling Specify the density in the pupil to use for coefficient fitting. Larger grid sizes are
more accurate, although the computation time increases.
Please note that the sampling is done on a uniform grid. Results will be incorrect if those rays
are not uniformly sampled at the evaluated surface. See the section "Sampling" in the
discussion below.
Maximum Term Specify the maximum Zernike coefficient to compute. Any value up to 37
may be specified.
Ref OPD To Vertex Normally, OpticStudio references the OPD to the chief ray; which in effect
subtracts out tilt from the wavefront phase. For interferometry, it is sometimes desirable to
retain the wavefront tilt. Checking this option on will add tilt to the beam based upon the
deviation of the chief ray from the image surface vertex. This option is only useful for field
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1052
positions whose chief ray is reasonably close to the surface vertex, where the assumption that
tilt is described by the deviation of the chief ray is valid.
Surface Selects the surface at which the data is to be evaluated. This is useful for evaluating
intermediate images. See “Evaluating results at intermediate surfaces”. If Surface is set to
Image, the Reference OPD setting determines where the data is evaluated.
Subaperture Data: Sx, Sy, Sr Defines a subaperture of the pupil to compute the Zernike data
for. See “Subaperture computations” for details.
Discussion
This feature displays the individual Zernike coefficients as well as the peak-to-valley, RMS,
variance, Strehl ratio, residual RMS fit error, and maximum fit error.
The RMS of the wavefront error, σ , when referenced to the mean, is defined as
where W is the wavefront error, is the mean square error, and is
the average wavefront error. The RMS can actually be computed several different ways. If the
mean wavefront term is ignored, then the RMS "referenced to zero" results. This computation
yields the square root of directly, and is rarely used.
If the mean wavefront is subtracted from all the wavefront phase values (the absolute phase
reference has no physical meaning), then the RMS is "referenced to the mean".
Typically, the RMS is further referenced to the tilted and shifted reference sphere which
minimizes the RMS. This is equivalent to subtracting out not only the mean (which is piston)
but the average tilt in x and y as well. This is justified because tilt shifts the location of the
diffraction image centroid, but otherwise has no effect on image quality. For brevity,
OpticStudio calls this reference point the "centroid", although it is a reference point which is
usually close to but not exactly at the diffraction image centroid. Most of the time, the RMS is
taken to mean the RMS referenced to the centroid, which is always the lowest of the three
numbers.
The W values used by the Zernike RMS computations are the "raw" OPD values measured by
computing the phase of each ray as it intercepts the reference sphere. The reference sphere is
centered on the chief ray - image surface intercept point, and has a radius equal to the "exit
pupil position" length (see “Exit pupil position”). This method does not consider a subtle effect
due to the change in the location of the center of the reference sphere in the presence of
coma. For this reason, the Zernike based estimate of the RMS wavefront referenced to the
centroid may differ slightly from that computed by the RMS analysis feature. See “Comments
about RMS wavefront computations” section in RMS vs. Field. for more information.
Sampling
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1053
The wavefront used to fit the Zernike coefficients is sampled by a grid of rays that are
uniformly spaced in Normalized Pupil Coordinates.
l When Ray-Aiming is turned off, the pupil coordinates are defined virtually on a surface
at the Entrance Pupil Position in Object Space.
l When Ray-Aiming is turned on, the pupils coordinates are defined on the STOP surface.
For this reason, unless the STOP surface exactly overlaps the image surface, the sampled rays
are rarely uniformly spaced on the image surface.
This is important to know especially when directly measuring the wavefront on the image
surface. For example, this is how a Shack-Hartmann wavefront sensor would measure the
wavefront on a plane. If it is the case, set the STOP surface to be at the exact same position as
the image surface, turn on Ray-Aiming, and set the Reference OPD in the System Explorer to
Absolute 2.
Subaperture computations
By default, the Zernike polynomials are determined for the entire pupil. The subaperture values
Sx, Sy, and Sr allow computation of the Zernike data only over a circular subaperture portion of
the pupil. The subaperture is a circular region of normalized radius Sr, decentered from the
usual pupil by the normalized coordinates Sx and Sy.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1054
All three subaperture data values (Sx, Sy, and Sr) are normalized dimensionless parameters
relative to the full pupil unit circle. The transformation between full aperture and subaperture
normalized pupil coordinates is given by:
And
Where Fx and Fy denote the subaperture coordinates and Px and Py denote the full aperture
coordinates.
The Strehl ratio is computed using the RMS referenced to the centroid by the following
approximation:
This approximation is valid for monochromatic calculations resulting in a Strehl ratio higher
than about 0.10.
This feature computes a maximum of 37 Zernike terms. The particular Zernike terms used are
not orthonormal, but are instead all normalized to have unity magnitude at the edge of the
pupil. Some of the higher order terms in the expansion were dropped to keep the total
number of terms small, and the terms remaining were selected to favor accurate fitting of
higher order spherical aberration. This particular set of Zernike polynomials is sometimes
called the "Fringe" or "University of Arizona" notation. The more formal, and more general
polynomial set is the Standard notation, sometimes called the "Born & Wolf" or the similar
"Noll" notation, which is described under the "Zernike Standard Coefficients" feature.
The Zernike Fringe polynomials are defined in the following table. The angle φ is measured
counter clockwise from the local +x axis. The radial coordinate is the normalized dimensionless
parameter ρ.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1055
ZERNIKE FRINGE POLYNOMIALS
Term
1 1
2
3
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1056
25
26
27
28
29
30
31
32
33
34
35
36
37
Calculates the orthonormal Zernike coefficients computed using the notation defined in R.
Noll, "Zernike polynomials and atmospheric turbulence", J. Opt. Soc. Am., Vol. 66, No. 3, p207
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1057
(1976). This notation allows terms to be consistently defined up to (almost) arbitrary order,
rather than the limited 37 term Fringe polynomials. The coefficients are given in units of waves.
Sampling Specify the density in the pupil to use for coefficient fitting. Larger grid sizes are
more accurate, although the computation time increases.
Please note that the sampling is done on a uniform grid. Results will be incorrect if those rays
are not uniformly sampled at the evaluated surface. See the section "Sampling" in the
discussion below.
Maximum Term Specify the maximum Zernike coefficient to compute. Any value up to 231
may be specified.
Ref OPD To Vertex Normally, OpticStudio references the OPD to the chief ray; which in effect
subtracts out tilt from the wavefront phase. For interferometry, it is sometimes desirable to
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1058
retain the wavefront tilt. Checking this option on will add tilt to the beam based upon the
deviation of the chief ray from the image surface vertex. This option is only useful for field
positions whose chief ray is reasonably close to the surface vertex, where the assumption that
tilt is described by the deviation of the chief ray is valid.
Surface Selects the surface at which the data is to be evaluated. This is useful for evaluating
intermediate images. See “Evaluating results at intermediate surfaces”. If Surface is set to
Image, the Reference OPD setting determines where the data is evaluated.
Subaperture Data: Sx, Sy, Sr Defines a subaperture of the pupil to compute the Zernike data
for. See “Subaperture computations” for details.
Discussion
This feature is similar to the "Zernike Fringe Coefficients" feature, with a somewhat different
numbering scheme is used, more terms in the expansion are available for fitting, the terms are
orthogonal and normalized, and none of the terms are skipped. See the description of “Zernike
Fringe Coefficients” for some important details.
The most general way to express the Zernike polynomials is in the form
The radial portion of the polynomial is defined by two indices, n and m. The n index defines the
order of the radial power; so an n value of 5 would indicate all polynomials whose maximum
radial power was r5 . Only certain values for m are allowed once n is chosen; n + m must be
even, and 0 ≤ m ≤ n . For details on Zernike Standard polynomials, see "Principles of Optics",
by Born & Wolf, referenced in Chapter 1, or the Noll reference listed above. The terms are
orthonormal such that the magnitude of the coefficient of each term is the RMS contribution
of the term.
This feature lists the formulas next to the fitted coefficients; the entire 231 term table is too
long to include here. The first 28 terms are given below. The angle φ is measured counter
clockwise from the local +x axis. The radial coordinate is the normalized dimensionless
parameter ρ.
Term
1 1
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1059
2
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1060
27
28
Sampling
The wavefront used to fit the Zernike coefficients is sampled by a grid of rays that are
uniformly spaced in Normalized Pupil Coordinates.
l When Ray-Aiming is turned off, the pupil coordinates are defined virtually on a surface
at the Entrance Pupil Position in Object Space.
l When Ray-Aiming is turned on, the pupils coordinates are defined on the STOP surface.
For this reason, unless the STOP surface exactly overlaps the image surface, the sampled rays
are rarely uniformly spaced on the image surface.
This is important to know especially when directly measuring the wavefront on the image
surface. For example, this is how a Shack-Hartmann wavefront sensor would measure the
wavefront on a plane. If it is the case, set the STOP surface to be at the exact same position as
the image surface, turn on Ray-Aiming, and set the Reference OPD in the System Explorer to
Absolute 2.
Calculates the orthonormal Zernike coefficients computed using the notation defined in R.
Noll, "Zernike polynomials and atmospheric turbulence", J. Opt. Soc. Am., Vol. 66, No. 3, p207
(1976), with extensions for annular pupils, as described in V. N. Mahajan, "Zernike annular
polynomials for imaging systems with annular pupils", J. Opt. Soc. Am., Vol. 71, No. 1, p75
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1061
(1981). The coefficients are given in units of waves. Thanks are due to Brett Patterson of the UK
Astronomy Technology Centre who assisted in the development of this feature.
Sampling Specify the density in the pupil to use for coefficient fitting. Larger grid sizes are
more accurate, although the computation time increases.
Please note that the sampling is done on a uniform grid. Results will be incorrect if those rays
are not uniformly sampled at the evaluated surface. See the section "Sampling" in the
discussion below.
Maximum Term Specify the maximum Zernike coefficient to compute. Any value up to 231
may be specified.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1062
Wavelength The wavelength number to use for the calculation.
Ref OPD To Vertex Normally, OpticStudio references the OPD to the chief ray; which in effect
subtracts out tilt from the wavefront phase. For interferometry, it is sometimes desirable to
retain the wavefront tilt. Checking this option on will add tilt to the beam based upon the
deviation of the chief ray from the image surface vertex. This option is only useful for field
positions whose chief ray is reasonably close to the surface vertex, where the assumption that
tilt is described by the deviation of the chief ray is valid.
Surface Selects the surface at which the data is to be evaluated. This is useful for evaluating
intermediate images. See “Evaluating results at intermediate surfaces”. If Surface is set to
Image, the Reference OPD setting determines where the data is evaluated.
Subaperture Data: Sx, Sy, Sr Defines a subaperture of the pupil to compute the Zernike data
for. See “Subaperture computations” for details.
Discussion
This feature is similar to the "Zernike Standard Coefficients" feature, except the pupil may be
annular rather than circular. See that discussion, and the references above, for important
information. The annular nature of the pupil is defined by the single parameter ε , defined as
where Rinner and Router are the inner and outer radii of the annular pupil. When ε is zero, the
annulus is a circle, and the Annular and Standard Zernike polynomials are identical. When ε is
greater than zero, the annular Zernike polynomials are distinct from the Standard Zernike
polynomials. OpticStudio only traces rays in the annular region when fitting annular
polynomials, and unvignetted wavefront outside the annular region is ignored.
The annular polynomials are too complex in general to list on the text output window, so the
first 22 terms are listed here. The angle φ is measured counter clockwise from the local +x axis.
The radial coordinate is the normalized dimensionless parameter ρ.
Term
1 1
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1063
2
10
11
12
13
14
15
16 , where
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1064
, and
, where
17
, where
18
, and
, where
19
20
21
22
Sampling
The wavefront used to fit the Zernike coefficients is sampled by a grid of rays that are
uniformly spaced in Normalized Pupil Coordinates.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1065
l When Ray-Aiming is turned off, the pupil coordinates are defined virtually on a surface
at the Entrance Pupil Position in Object Space.
l When Ray-Aiming is turned on, the pupils coordinates are defined on the STOP surface.
For this reason, unless the STOP surface exactly overlaps the image surface, the sampled rays
are rarely uniformly spaced on the image surface.
This is important to know especially when directly measuring the wavefront on the image
surface. For example, this is how a Shack-Hartmann wavefront sensor would measure the
wavefront on a plane. If it is the case, set the STOP surface to be at the exact same position as
the image surface, turn on Ray-Aiming, and set the Reference OPD in the System Explorer to
Absolute 2.
Calculates the Fringe, Standard or Annular Zernike coefficients across the field at the image
surface and plots the results.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1066
Coefficients A space or comma separated, monotonically increasing, list of integers that
corresponds to the terms in the Fringe, Standard or Annular Zernike polynomial. For ranges of
terms, separate the first and last term in the range by a dash. Note that when the Coefficients
Type option is set to Fringe, the maximum number of terms is 37; if it is set to Standard or
Annular then 231 terms are permitted. If zero is used then all coefficients are plotted.
Coefficients Type Choose to plot the Fringe, Standard, or Annular Zernike polynomials.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1067
Field Scan Choose to calculate the Zernike terms along the positive X or Y, or negative X or Y
field directions.
Field Density The number of field points used to calculate each Zernike term between the
maximum and minimum field defined in the Field dialog.
Sampling The density in the pupil to use for coefficient fitting. Larger grid sizes are more
accurate, although the computation time increases.
Minimum/Maximum Plot Scale The range of values displayed on the y-axis. Zero indicates
OpticStudio will choose default values.
Discussion
The Zernike Fringe, Standard or Annular coefficients are displayed as a function of the +y, -y,
+x, or -x field. Specific terms or ranges of terms can be selected for display by using a comma
or space delimited list of integers. Ranges are defined by separating the first and last term to
be displayed by a dash. For example, the list 1, 5-7 would plot the Zernike terms 1 and 5
through 7. For a complete set of Fringe coefficients see the “Zernike Fringe Coefficients”. For a
complete set of Standard coefficients see the “Zernike Standard Coefficients”. It should be
noted that the effect of vignetting factors on the calculation is ignored. The obscuration ratio is
described in full in the “Zernike Annular Coefficients”
Calculate and plot aberrations across the full field of view. See “Full-Field Aberration” for more
information.
PSF
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1068
Compute the Point Spread Function (PSF) of a lens using various algorithms.
FFT PSF
Computes the diffraction point spread function (PSF) using the Fast Fourier Transform (FFT)
method.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1069
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
Display The display size indicates what portion of the computed data will be drawn when a
graphic display is generated. The display grid can be any size from 32 x 32 up to twice the
sampling grid size. Smaller display sizes will show less data, but at higher magnification for
better visibility. This control has no effect on the text display.
Rotation Rotation specifies how the surface plots are rotated for viewing; either 0, 90, 180, or
270 degrees.
Field The field number for which the calculation should be performed.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1070
Type Select linear (intensity), logarithmic (intensity), phase, real part (signed amplitude), or
imaginary part (signed amplitude).
Show As Choose surface plot, contour map, grey scale, or false color map as the display
option.
Use Polarization if checked, polarization is considered. See ”Polarization (system explorer)” for
information on defining the polarization state and how polarization is used by analysis
features.
Image Delta The delta distance between points in image space, measured in micrometers. If
zero, a default spacing is used. If negative, the image delta is set to the maximum allowed
value and the full sampling grid is used. See the discussion for details.
Normalize If checked, the peak intensity will be normalized to unity. Otherwise, the peak
intensity is normalized to the peak of the unaberrated PSF (the Strehl ratio).
Surface Selects the surface at which the PSF is to be evaluated. This is useful for evaluating
intermediate images. See “Evaluating results at intermediate surfaces”.
Discussion
The FFT method of computing the PSF is very fast, however, a few assumptions are made
which are not always valid. The slower, but more general Huygens method makes fewer
assumptions, and is described in “Huygens PSF”
The FFT PSF computes the intensity of the diffraction image formed by the optical system for a
single point source in the field. The intensity is computed on an imaginary plane which is
centered on and lies perpendicular to the incident chief ray at the reference wavelength. The
reference wavelength is the primary wavelength for polychromatic computations, or the
wavelength being used for monochromatic calculations. Because the imaginary plane lies
normal to the chief ray, and not the image surface, the FFT PSF computes overly optimistic (a
smaller PSF) results when the chief ray angle of incidence is not zero. This is often the case for
systems with tilted image surfaces, wide angle systems, systems with aberrated exit pupils, or
systems far from the telecentric condition.
The other main assumption the FFT method makes is that the image surface lies in the far field
of the optical beam. This means the computed PSF is only accurate if the image surface is fairly
close to the geometric focus for all rays; or put another way, that the transverse ray aberrations
are not too large. There is no hard and fast limit, however if the transverse aberrations exceed a
few hundred wavelengths, the computation is likely not accurate. Note that even systems with
very little wavefront aberration can have large transverse ray aberrations; for example, a
cylinder lens which only focuses rays along one direction. In this case, the transverse
aberrations along the unfocused direction will be on the order of the beam diameter. The
Huygens PSF method may provide more accurate results in these cases as well.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1071
For most lenses, a less important assumption is that scalar diffraction theory applies. The
vectorial nature of the light is not accounted for. This is significant in systems that are very fast,
around F/1.5 (in air) or faster. The scalar theory predicts overly optimistic (a smaller PSF) results
when the F/# is very fast.
For systems where the chief ray is nearly normal (less than perhaps 20 degrees), the exit pupil
aberrations are negligible, and the transverse ray aberrations are reasonable, then the FFT PSF
is accurate and generally much faster than the Huygens PSF method.
When in doubt, both PSF methods should be employed for comparison. A solid understanding
on the part of the user of these assumptions and the method of computation is essential to
recognize cases where the accuracy may be compromised.
The FFT PSF algorithm exploits the fact that the diffraction PSF is related to the Fourier
transform of the complex amplitude of the wavefront in the exit pupil of the optical system.
The amplitude and phase in the exit pupil are computed for a grid of rays, an FFT is performed,
and the diffraction image intensity is computed.
There is a tradeoff between the sampling grid size in the pupil, and the sampling period in the
diffraction image. For example, to decrease the sampling period in the diffraction image, the
sampling period in the pupil must increase. This is done by "stretching" the pupil sampling grid
so that it overfills the pupil. This process means fewer points actually lie within the pupil.
As the sampling grid size is increased, OpticStudio scales the grid on the pupil to yield an
increase in the number of points that lie on the pupil, while simultaneously yielding closer
sampling in the diffraction image. Each time the grid size is doubled, the pupil sampling period
(the distance between points in the pupil) decreases by the square root of 2 in each dimension,
the image surface sampling period also decreases by the square root of 2 in each dimension,
and the width of the diffraction image grid increases by a factor of the square root of 2 (since
there are twice as many points in each dimension). All ratios are approximate, and
asymptotically correct for large grids.
The stretching is referenced to a grid size of 32 x 32. The 32 x 32 grid of points is placed over
the pupil, and the points that lie within the pupil are actually traced. For this grid size, the
default distance between points in the diffraction image surface is given by
where F is the working F/# (not the same as the image space F/#), is the shortest defined
wavelength, and n is the number of points across the grid. The -2 factor is due to the fact the
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1072
pupil is not centered on the grid (since n is even), but is offset at n/2 + 1. The 2n in the
denominator is due to the zero-padding described later.
For grids larger than 32 x 32, the grid is by default stretched in pupil space by a factor of
each time the sampling density doubles. The general formula for the sampling in image space
is then
Since the stretching of the pupil grid decreases the number of sample points in the pupil, the
effective grid size (the size of the grid that actually represents traced rays) is smaller than the
sampling grid. The effective grid size increases as the sampling increases, but not as quickly.
The following table summarizes the approximate effective grid size for various sampling
density values.
The sampling is also a function of wavelength. The discussion above is only valid for the
shortest wavelength used in the calculation. If the computation is polychromatic, then the
longer wavelengths will be scaled to have smaller effective grids. The scale factor used is the
ratio of the wavelengths. This should be considered when selecting sampling grids for systems
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1073
with broad wavelength bands. For polychromatic computations, the data for shorter
wavelengths is more accurate than for longer wavelengths. For the FFT PSF phase, real, and
imaginary data types, the polychromatic average is not physically meaningful, and OpticStudio
will set the wavelength selection to the primary wavelength if the user selected all
wavelengths.
The image delta, Δ, can be selected manually if a different sampling distance is required. If the
image delta is zero, OpticStudio uses the default spacing and sampling grids described above.
If the image delta is greater than zero, then OpticStudio scales the pupil sampling to yield the
desired image delta size. The actual amount of stretching depends upon the grid size, the
image delta, the defined wavelengths, the F/#’s at each field and wavelength, and the aspect
ratio of the exit pupil. If the image delta is set too small, then not enough points will be left to
sample the pupil; if the image delta is too big, then the pupil grid will not extend over the full
width of the exit pupil. Both of these cases are trapped by OpticStudio and an error message
will be issued if they occur. If the image delta is less than zero, then OpticStudio does not
stretch the pupil at all. This maximizes the extent of the PSF in image coordinates and uses the
full grid of rays in the pupil, at the expense of not increasing the spatial resolution with
sampling, as the image delta will be nearly constant with increased sampling.
Once the sampling is specified, OpticStudio doubles the array size in a process called "zero
padding". This means for a 32 x 32 sampling, OpticStudio uses the center portion of a 64 x 64
grid. Therefore, the diffraction PSF will be distributed over a 64 x 64 size grid. The sampling in
the image space is always twice the pupil sampling. Zero padding is performed to reduce
aliasing.
The nature of the FFT algorithm is that the computation is done in pupil space coordinates. For
this reason, rotating the image surface will have no effect on the orientation of the computed
PSF. The X and Y orientation of the PSF corresponds to the X and Y orientation of rays in the
entrance pupil, which is not always the same as the spatial X and Y orientation of the image. To
compute the PSF in the image space coordinates, see “Huygens PSF”
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1074
This feature plots cross sections through the diffraction PSF.
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1075
Row/Col The row or column to display. For a sampling of 32 x 32, there are 64 rows and 64
columns (see the discussion section of the FFT PSF feature). Whether a row or a column is used
depends upon the "Type" setting. The default "Center" displays the center of the PSF, which is
not always the peak of the PSF.
Plot Scale Sets the maximum horizontal scale in micrometers. Enter zero for automatic scaling.
Field The field number for which the calculation should be performed.
Type Select X or Y cross sections, either linear, logarithmic, phase, real part, or imaginary part.
X cross sections are called rows, and Y cross sections are called columns.
Use Polarization If checked, polarization is considered. See ” Polarization (system explorer) for
information on defining the polarization state and how polarization is used by analysis
features.
Normalize If checked, the peak intensity will be normalized to unity. Otherwise, the peak
intensity is normalized to the peak of the unaberrated PSF (the Strehl ratio).
Discussion The cross sections are taken directly from the PSF data. Because the PSF is
computed directly from the phase in the exit pupil, the orientation of the coordinate system
may not be correct in all cases. What constitutes positive x or y may not agree with data
presented in image space coordinates such as the spot diagram.
Note: Also see the discussion section of the FFT PSF. Those comments also apply to this
feature.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1076
This feature plots the edge or line spread functions based upon a computation and integration
of the diffraction FFT PSF.
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
Plot Scale Sets the maximum horizontal scale in micrometers. Enter zero for automatic scaling.
Field The field number for which the calculation should be performed.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1077
Use Polarization If checked, polarization is considered. See ” Polarization (system explorer)”
for information on defining the polarization state and how polarization is used by analysis
features.
Use Coherent PSF If checked, the computation is done assuming coherent illumination. If
unchecked, the illumination is considered incoherent.
Discussion
The line response function (or line spread function, LSF) is the cross section of the image of a
line object. The edge spread function (ESF) is the cross section of the image of an edge (a
semi-infinite plane). The X- or Y- orientation refers to the direction of the line or edge. The X-
orientation means the line or edge is parallel to the X-axis. The Y-orientation means the line or
edge is parallel to the Y-axis. The LSF and ESF are computed by integration of the FFT PSF. See
also “Geometric Line/Edge Spread”
Note: Also see the discussion section of the FFT PSF. Those comments also apply to this
feature.
Huygens PSF
Computes the diffraction PSF using direct integration of Huygens wavelets method. The Strehl
ratio is also computed.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1078
Pupil Sampling Selects the size of the grid of rays to trace to perform the computation.
Higher sampling densities yield more accurate results at the expense of longer computation
times.
Image Sampling The size of the grid of points on which to compute the diffraction image
intensity. This number, combined with the image delta, determine the size of the area
displayed.
Image Delta The distance in micrometers between points in the image grid. Use zero for the
default grid spacing.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1079
Rotation Rotation specifies how the surface plots are rotated; either 0, 90, 180, or 270 degrees.
Field The field number for which the calculation should be performed.
Type Select linear (intensity), or logarithmic (intensity). The logarithmic scaling can range from
1 to 5 decades. Also available are real amplitude, imaginary amplitude, and phase in degrees.
Configuration Select "All" to perform a coherent sum of the PSF at each wavelength across all
configurations, or select the "Current" or any single configuration. Note this is a coherent sum
for the same wavelength in each configuration, followed by an incoherent sum of the resulting
PSF’s for different wavelengths. For this reason, each defined wavelength must be the same in
all configurations. Wavelength and configuration weights may be used but the wavelength
values must be identical. See CWGT and WLWT in “Summary of multi-configuration operands”.
This coherent sum also assumes that the image surface is located in the identical position in all
configurations. If "All" is selected, and both focal and afocal mode configurations are defined,
the Configuration setting will automatically be reset to "Current".
Normalize If checked, the peak intensity will be normalized to unity. Otherwise, the peak
intensity is normalized to the peak of the unaberrated PSF (the Strehl ratio).
Show As Choose surface plot, contour map, grey scale, or false color map as the display
option. The True Color option creates an RGB color representation of the PSF by converting
the wavelengths to the closest RGB equivalent and summing over all wavelengths. The
accuracy of the True Color presentation is limited by the RGB method of rendering color on a
computer display; and it is not possible to exactly represent monochromatic colors. The True
Color option cannot be used if the Type is anything other than linear. Note that choosing True
Color will require a recalculation of the data, as it is computed by a separate method. Choosing
between the other display options does not require a recalculation.
Use Centroid If checked, the plot will be centered on the geometric image centroid. If
unchecked, the plot will be centered on the chief ray.
Discussion
One way of considering the effects of diffraction is to imagine each point on a wavefront as a
perfect point source with an amplitude and phase. Each of these point sources radiates a
spherical "wavelet", sometimes called a "Huygens wavelet" after Huygens, who first proposed
the model. The diffraction of the wavefront as it propagates through space is given by the
interference, or complex sum, of all the spherical wavelets radiated.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1080
To compute the Huygens PSF, a grid of rays is launched through the optical system, and each
ray represents a particular amplitude and phase wavelet. The diffraction intensity at any point
on the image surface is the complex sum of all these wavelets, squared. The PSF is computed
this way for every point on the image grid. The center coordinates, reported both in the graph
and in the text listing, are defined by the geometric centroid of the beam if “Use Centroid” is
selected, while they correspond to the chief ray of the field point for which the PSF has been
calculated if “Use Centroid” is not selected. The graph is always centered on these center
coordinates, i.e. the coordinate (n/2+1), (n/2+1), where n is the number of points in the image
space grid. The data output for a rotationally symmetric system will be symmetric about the
point (n/2, n/2+1). Besides, regardless of whether “Use Centroid” is selected or not,
OpticStudio always calculates the shift between the center coordinates and the centroid of the
Huygens PSF itself, which is determined from the second moment analysis of the PSF. This shift
is reported as the centroid offset in the text listing. Then, the sum of the center coordinates
and the centroid offset is reported as the centroid coordinates in the text listing.
The Image Delta value determines the point spacing of the image space grid. If a value of zero
is specified, a default grid spacing is used. The default Image Delta is given by:
where np is the number of points in the pupil space grid, λ is the selected wavelength in the
settings, and F is the working F/#. If the Wavelength settings is All, then λ is the primary
wavelength. The exact value of the image Delta size is not critical, as long as the entire width of
the PSF is included within the range of n * (Image Delta).
Unlike the FFT PSF, OpticStudio computes the Huygens PSF on an imaginary plane tangent to
the image surface at the chief ray intercept. Note the imaginary plane is normal to the normal
of the surface, not the chief ray. Therefore, the Huygens PSF accounts for any local tilt in the
image surface caused by either the image surface slope, the chief ray incidence angle, or both.
The Huygens method accounts for the evolving shape of the diffraction image as the beam
propagates along the image surface. This is an important effect if the image surface is tilted
with respect to the incoming beam. Another advantage to the Huygens PSF method is that any
grid size and spacing may be selected by the user. This allows direct comparison between
PSF's from two different lenses, even if the F/#'s or wavelengths are different.
The only disadvantage of the Huygens PSF is speed. Direct integration is slow when compared
to the FFT method (see the previous section for details). The computation time depends upon
the pupil grid size squared times the image grid size squared, times the number of
wavelengths. OpticStudio accounts for any symmetry the system has. The Huygens PSF
automatically uses all available processors for maximum speed on multiple CPU computers.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1081
In general, a planar reference is used to calculate the phase when constructing the Huygens
PSF. This reference works well when the rays can be assumed to come from a distant pupil,
and when the size of the image region we are interested in is small. This allows every ray
coming from the pupil to be treated as a plane wave. A plane wave has constant phase over
the plane, so the phase of the plane wave as it hits the center of a single pixel in the image is
just the phase of the ray, plus 2p/l times the distance from plane wave to the pixel. The
Huygens PSF is then provided by a coherent sum of all the plane waves, each representing a
single ray.
However, if the image is large, then the distance from any given ray in the pupil to each pixel
might vary enough to where the plane wave approximation cannot be used. This can be
determined by computing the distance from the exit pupil to image center, and the distance
from the exit pupil to corner of the image. If these two distances differ by more than l/4, the
plane wave approximation will not be a good representation of the system because there will
be a non-negligible amount of phase curvature of the image. In this case, OpticStudio will
instead use a spherical wave for the phase reference. Doing so can increase the computation
time for the Huygens PSF – because we have to compute the phase for each pixel and can no
longer assume a linear relationship with pixel coordinates – but provides a much more
accurate calculation of the PSF for systems with significant aberrations at the image plane (for
which the plane wave reference often leads to noisy results). The occasional use of the
spherical wave reference thus expands the applicability of the Huygens PSF to a wide range of
systems, such as those used to model computer generated holograms.
By default, OpticStudio will use the criterion described above to automatically determine
whether to use the planar or spherical phase reference in the exit pupil for the Huygens
integration.
However, to override this for a system, change the selection in the System Explorer for the
“Method to Compute Huygens Integral” option (see The Setup Tab > System Group > System
Explorer > Advanced).
If beams in different configurations are orthogonal and strongly polarized, then the input
polarization must be considered for the Huygens PSF results to be accurate. The “Unpolarized”
setting in System Explorer should be turned off and “Use polarization” should be turned on in
the Huygens PSF properties. See “Polarization (system explorer)” for more information on the
polarization settings in the System Explorer.
The Huygens PSF results may be inaccurate if “Use polarization” is checked on in the Huygens
PSF settings, but “Unpolarized” is checked on in the System Explorer. If the PSF is summed over
multiple configurations with these settings, OpticStudio calculates the average polarization
transmission for each configuration, and assigns the resulting energy to the x component of
the transmitted field. Because the resulting energy for the configurations is artificially put into
this state, they will sum coherently in the Huygens PSF. However, beams with orthogonal
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1082
polarization should not interfere coherently, and therefore this result will be inaccurate if
beams in different configurations are orthogonal and strongly polarized. To prevent this from
occurring, the “Unpolarized” setting in System Explorer should be turned off, so that the
correct polarized beam input is used.
Computes the diffraction PSF using direct integration of Huygens wavelets method. The Strehl
ratio is also computed. This feature is very similar to the “Huygens PSF”, with the difference
being the data is plotted as a cross section.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1083
MTF
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1084
Various calculations of the Modulation Transfer Function (MTF) of a lens system
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1085
This feature visualizes contrast loss across the pupil using Moore-Elliott method. See “Contrast
Loss Map” for more information.
FFT MTF
Computes the diffraction modulation transfer function (MTF) data for all field positions using
an FFT algorithm.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1086
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
Show Diffraction Limit Select whether or not the diffraction limited data should be displayed.
Max Frequency Specify the maximum frequency (see “MTF Units”) plotted.
Type Select either modulation, real, imaginary, phase, or square wave response.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1087
Use Polarization If checked, polarization is considered. See ”Polarization (system explorer)“
for information on defining the polarization state and how polarization is used by analysis
features.
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves. This
setting only applies to the Classic view, which is an option if “Enable Classic View” is selected in
the Graphics tab of the OpticStudio Preferences.
Surface Selects the surface at which the MTF is to be evaluated. This is useful for evaluating
intermediate images. See “Evaluating results at intermediate surfaces”.
Discussion
Note: See the discussion sections of the FFT and Huygens PSF. Those comments also apply to
this feature.
The diffraction MTF computation is based upon an FFT of the pupil data. The resulting MTF is
the modulation as a function of spatial frequency for a sine wave object, although optionally
the real, imaginary, phase, or square wave response is available. The Square wave MTF is the
modulation response for a square wave target of the specific frequency, as opposed to the
response to a sine wave target for the other plots. The square wave response is computed
from the MTF data using the following formula:
where S(v) is the square wave response, M(v) is the sinusoidal modulation response, and v is
the spatial frequency.
For focal systems, the cutoff frequency at any one wavelength is given by one over the
wavelength times the working F/#. OpticStudio computes the working F/# at each wavelength
for each field for the sagittal and tangential response separately. This yields accurate MTF data
even for systems with anamorphic and chromatic distortion, such as those incorporating
cylinders or gratings.
For afocal systems, the cutoff frequency is the exit pupil diameter divided by the wavelength.
The diffraction calculations are more accurate as the sampling increases, the peak-to-valley
and maximum slope of the OPD decrease, and the transverse ray aberrations decrease. If the
peak-to-valley OPD in the pupil is too great, then the wavefront sampling is too coarse and
aliasing occurs. Aliasing will result in inaccurate data. OpticStudio will attempt to detect when
aliasing occurs, and issue an appropriate error message. However, OpticStudio cannot
automatically detect when the sampling is too low in all cases, especially in the presence of
very steep slopes on the wavefront phase.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1088
The FFT based MTF assumes a (reasonably) uniform distribution of rays on the exit pupil in
cosine space to be accurate. Some systems, such as extremely fast off-axis reflectors, have
dramatic stretching of the exit pupil and the FFT based MTF will thus be inaccurate. For these
systems, the Huygens MTF should be used instead. For more information, see “Huygens MTF”.
When the OPD in waves is large, such as more than 10 waves, it is probably a good idea to
switch to geometric MTF instead of diffraction MTF. For these highly aberrated systems, the
geometric MTF is very accurate, especially at low spatial frequencies (the higher frequency MTF
falls off rapidly when aberrations are large). If shown, the diffraction limit curve is for the
aberration free response at the reference field position; see “Diffraction limited”.
The spatial frequency scale of the MTF plot is in cycles per mm in image space, or cycles per
milliradian in object space (see “MTF Units”). MTF in cycles per mm is computed in image
space, so any magnification of the system needs to be considered when determining spatial
frequency response for object space.
The nature of the FFT algorithm is that the computation is done in pupil space coordinates. For
this reason, rotating the image surface will have no effect on the orientation of the computed
MTF. The tangential response corresponds to a periodic target oriented with lines along the
object space X axis, and the sagittal response corresponds to a periodic target oriented with
lines along the object space Y axis. This is different from the conventions of the “Geometric
MTF” and the “Huygens MTF”.
Computes the FFT modulation transfer function data as a function of focus shift at a specific
frequency.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1089
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
Delta Focus For focal systems, delta focus is the ± Z-axis range of the plot in lens units. For
afocal systems, delta focus is the ± optical power range of the plot in diopters.
Frequency The spatial frequency (see “MTF Units”) for which data is plotted.
# Steps The number of focal planes at which the data is computed. A smooth curve is drawn
through the computed points. More steps yield higher accuracy and longer computation
times. In the text output, the 101 points at each selected field point are sampled from the
smooth spline curve based on the “# Steps” calculated data points.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1090
Field The field number for which the calculation should be performed.
Type Select either modulation, real, imaginary, phase, or square wave response.
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves. This
setting only applies to the Classic view, which is an option if “Enable Classic View” is selected in
the Graphics tab of the OpticStudio Preferences.
Discussion
This analysis uses a faster version of the FFT MTF calculation algorithm. This is the same
algorithm used for the MTFA operand with parameter Grid = 0. Because this analysis tool
utilizes a slightly different version of the FFT calculation, the results may be different than what
is shown in the FFT MTF.
Displays the FFT computed MTF data as a 3D surface, contour, grey scale or false color map.
This plot is useful for visualizing the MTF response for object orientations other than purely
sagittal or tangential.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1091
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
Rotation Rotation specifies how the surface plots are rotated for viewing; either 0, 90, 180, or
270 degrees.
Scale The scale factor overrides the automatic vertical scaling set by the program on the
surface plots. Generally, this value should be set to unity. The scale factor can be greater than
unity to vertically stretch the plot, or less than unity to compress it.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1092
Field The field number determines for which defined field position the calculation should be
performed.
Show As Choose surface plot, contour map, grey scale, or false color map as the display
option.
Type Choose modulation, real part, or imaginary part of either the incoherent or coherent
optical transfer function. If a text listing is generated and either the real or the imaginary part is
requested, both the real and the imaginary parts are listed for completeness.
Discussion The regular MTF plot is just two orthogonal cross sections through the surface MTF
plot. This plot is primarily qualitative. See “FFT MTF” for details.
Computes the FFT MTF data as a function of field position, and displays the data in a graph.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1093
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
Frequency 1-6 The spatial frequencies (see “MTF Units” ) for which data is plotted.
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves. This
setting only applies to the Classic view, which is an option if “Enable Classic View” is selected in
the Graphics tab of the OpticStudio Preferences.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1094
Remove Vignetting Factors If checked, vignetting factors are automatically removed. See the
comments about vignetting factors in the discussion section below.
Field Density The field density is the number of points between zero degrees and the
maximum field at which the MTF is calculated, intermediate values are interpolated. A
maximum of 100 field points is allowed.
Discussion See “FFT MTF” for details. This feature plots MTF vs. field height up to the
maximum defined radial field coordinate.
Vignetting factors determine the size and shape of the pupil as seen from different field points
(see “Vignetting factors” for a full discussion). Because this analysis feature needs to trace rays
at arbitrary intermediate field points where no specific vignetting factors are defined, the use
of vignetting factors is not recommended. If "Remove Vignetting Factors" is checked on (the
default), any defined vignetting factors will automatically be replaced with surface apertures
for this computation. The surface aperture method is generally more accurate than the
vignetting factor method when the pupil is overfilled with light. The resulting data may be
different between the two methods. In some cases, particularly where the vignetting factors
are being used to define the shape of the source beam rather than the apertures of the optics,
it may be required to use the defined vignetting factors. In this case, check the "Remove
Vignetting Factors" box off. OpticStudio will then use the closest defined field to determine the
vignetting factors to use for an arbitrary field point.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1095
Computes the FFT MTF as a function of field position, and displays the data over a rectangular
region of field.
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
X or Y Field Width The X or Y field width in field units. This is the total width or height, not the
half width or height. Field units are degrees in object space if field angle is used, otherwise field
units are the same as lens units.
Frequency The spatial frequency (see “MTF Units”) for which data is plotted.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1096
See ” Polarization (system explorer)” for information on defining the polarization state and
how polarization is used by analysis features.
Wavelength The wavelength number to be used in the calculation, or All for polychromatic
MTF.
X or Y Pixels The number of pixels at which to compute the MTF in each respective direction.
Note the size of the pixels is determined by both the number of pixels and the width of the
field; the pixels are not required to be square. The MTF is computed at the center of the pixel
and the MTF is assumed to have that value over the entire region of the pixel for display
purposes.
MTF Data Choose Tangential, Sagittal, Average, Min, or Max MTF to be displayed.
Reference Field This control selects the field number that corresponds to the center of the
map. If zero is selected the (0, 0) field coordinate is used as the center of the map.
Show As Choose grey scale or false color map as the display option.
Remove Vignetting Factors If checked, vignetting factors are automatically removed. See
“Comment about vignetting factors”.
Discussion See “FFT MTF” for details. This feature computes the MTF at each field point on a
2D grid. If the total number of points is large, the computation time may become quite large.
See also the “Geometric MTF Map”.
Vignetting factors determine the size and shape of the pupil as seen from different field points
(see “Vignetting factors” for a full discussion). Because this analysis feature needs to trace rays
at arbitrary intermediate field points where no specific vignetting factors are defined, the use
of vignetting factors is not recommended. If "Remove Vignetting Factors" is checked on (the
default), any defined vignetting factors will automatically be replaced with surface apertures
for this computation. The surface aperture method is generally more accurate than the
vignetting factor method when the pupil is overfilled with light. The resulting data may be
different between the two methods. In some cases, particularly where the vignetting factors
are being used to define the shape of the source beam rather than the apertures of the optics,
it may be required to use the defined vignetting factors. In this case, check the "Remove
Vignetting Factors" box off. OpticStudio will then use the closest defined field to determine the
vignetting factors to use for an arbitrary field point.
Huygens MTF
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1097
Computes the diffraction modulation transfer function (MTF) data using a Huygens direct
integration algorithm.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1098
Pupil Sampling Selects the size of the grid of rays to trace to perform the computation.
Higher sampling densities yield more accurate results at the expense of longer computation
times.
Image Sampling The size of the grid of points on which to compute the diffraction image
intensity. This number, combined with the image delta, determine the size of the PSF used to
compute the MTF. See also “Huygens PSF” .
Image Delta The distance in micrometers between points in the image grid. Use zero for the
default grid spacing.
Configuration Select "All" to perform a calculation of the MTF based upon a coherent sum of
the PSF at each wavelength across all configurations, or select the "Current" or any single
configuration. Note the MTF is computed from the PSF, which is a coherent sum for the same
wavelength in each configuration, followed by an incoherent sum of the resulting PSF’s for
different wavelengths. For this reason, each defined wavelength must be the same in all
configurations. Wavelength and configuration weights may be used but the wavelength values
must be identical. See CWGT and WLWT in “Summary of multi- configuration operands. This
coherent sum also assumes that the image surface is located in the identical position in all
configurations. If "All" is selected, and both focal and afocal mode configurations are defined,
the Configuration setting will automatically be reset to "Current".
Field The field number for which the calculation should be performed.
Type Select the data to display, currently modulation is the only option.
Max Frequency The maximum frequency in MTF units (see “MTF Units”) to display.
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves. This
setting only applies to the Classic view, which is an option if “Enable Classic View” is selected in
the Graphics tab of the OpticStudio Preferences.
Discussion
See the discussion sections of the Huygens PSF. Those comments also apply to this feature.
The Huygens MTF computes an FFT of the Huygens PSF. The settings for Image Sampling and
Image Delta are the same as for the Huygens PSF, therefore it is instructive to do a Huygens
PSF first (see “Huygens PSF”). Since the transform is done on the PSF in image space
coordinates, the tangential response corresponds to spatial frequencies in the y direction in
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1099
local image surface coordinates, and the sagittal response corresponds to spatial frequencies
in the x direction. The Huygens MTF also has no dependence on the location of rays in the
paraxial pupils. The MTF can therefore be computed for any system that the Huygens PSF can
be computed for including many non-sequential systems using ports where reference rays
required by other diffraction algorithms would not make it through, or for systems where
pupils or images formed by multiple non- sequential sub-apertures are overlapped. Systems
with extreme exit pupil distortion, such as very fast off-axis reflectors, are also handled
correctly with the Huygens technique.
The nature of the Huygens algorithm is that the computation is done in image space
coordinates. For this reason, rotating the image surface will affect the orientation of the
computed MTF. The tangential response corresponds to the image of a periodic target
oriented with lines along the image space X axis, and the sagittal response corresponds to the
image of a periodic target oriented with lines along the image space Y axis. This is different
from the conventions of the “FFT MTF”
Computes the diffraction modulation transfer function (MTF) data using a Huygens direct
integration algorithm and displays the data as a function of delta focus.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1100
Pupil Sampling Selects the size of the grid of rays to trace to perform the computation.
Higher sampling densities yield more accurate results at the expense of longer computation
times.
Image Sampling The size of the grid of points on which to compute the diffraction image
intensity. This number, combined with the image delta, determine the size of the PSF used to
compute the MTF. See also “Huygens PSF”.
Image Delta The distance in micrometers between points in the image grid. Use zero for the
default grid spacing.
Configuration Select "All" to perform a calculation of the MTF based upon a coherent sum of
the PSF at each wavelength across all configurations, or select the "Current" or any single
configuration. Note the MTF is computed from the PSF, which is a coherent sum for the same
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1101
wavelength in each configuration, followed by an incoherent sum of the resulting PSF’s for
different wavelengths. For this reason, each defined wavelength must be the same in all
configurations. Wavelength and configuration weights may be used but the wavelength values
must be identical. See CWGT and WLWT in “Summary of multi- configuration operands”. This
coherent sum also assumes that the image surface is located in the identical position in all
configurations. If "All" is selected, and both focal and afocal mode configurations are defined,
the Configuration setting will automatically be reset to "Current".
Field The field number for which the calculation should be performed.
Type Select the data to display, currently modulation is the only option.
Max Frequency The maximum frequency in MTF units (see “MTF Units”) to display.
See ” Polarization (system explorer)” for information on defining the polarization state and
how polarization is used by analysis features.
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves. This
setting only applies to the Classic view, which is an option if “Enable Classic View” is selected in
the Graphics tab of the OpticStudio Preferences.
Delta Focus For focal systems, delta focus is the ± Z-axis range of the plot in lens units. For
afocal systems, delta focus is the ± optical power range of the plot in diopters.
Frequency The spatial frequency (see “MTF Units”) for which data is plotted.
# Steps The number of focal planes at which the data is computed. A smooth curve is drawn
through the computed points. More steps yield higher accuracy and longer computation
times. In the text output, the 101 points at each selected field point are sampled from the
smooth spline curve based on the “# Steps” calculated data points.
Discussion This feature is very similar to the Huygens MTF feature (see “Huygens MTF”).
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1102
Computes the diffraction modulation transfer function (MTF) data using a Huygens direct
integration algorithm and displays the data as a grey scale or false color plot.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1103
Pupil Sampling Selects the size of the grid of rays to trace to perform the computation.
Higher sampling densities yield more accurate results at the expense of longer computation
times.
Image Sampling The size of the grid of points on which to compute the diffraction image
intensity. This number, combined with the image delta, determine the size of the PSF used to
compute the MTF. See also “Huygens PSF” .
Image Delta The distance in micrometers between points in the image grid. Use zero for the
default grid spacing.
Configuration Select "All" to perform a calculation of the MTF based upon a coherent sum of
the PSF at each wavelength across all configurations, or select the "Current" or any single
configuration. Note the MTF is computed from the PSF, which is a coherent sum for the same
wavelength in each configuration, followed by an incoherent sum of the resulting PSF’s for
different wavelengths. For this reason, each defined wavelength must be the same in all
configurations. Wavelength and configuration weights may be used but the wavelength values
must be identical. See CWGT and WLWT in “Summary of multi- configuration operands” . This
coherent sum also assumes that the image surface is located in the identical position in all
configurations. If "All" is selected, and both focal and afocal mode configurations are defined,
the Configuration setting will automatically be reset to "Current".
Field The field number for which the calculation should be performed.
Type Select the data to display, currently modulation is the only option.
Show As Choose grey scale or false color map as the display option.
Type Choose modulation, real part, or imaginary part of either the incoherent or coherent
optical transfer function. If a text listing is generated and either the real or the imaginary part is
requested, both the real and the imaginary parts are listed for completeness.
Discussion This feature is very similar to the Huygens MTF feature (see “Huygens MTF”).
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1104
Computes the Huygens MTF data as a function of field position, and displays the data in a
graph.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1105
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
Frequency 1-6 The spatial frequencies (see “MTF Units” ) for which data is plotted.
See ” Polarization (system explorer)” for information on defining the polarization state and
how polarization is used by analysis features.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1106
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves. This
setting only applies to the Classic view, which is an option if “Enable Classic View” is selected in
the Graphics tab of the OpticStudio Preferences.
Remove Vignetting Factors If checked, vignetting factors are automatically removed. See the
comments about vignetting factors in the discussion section below.
Field Density The field density is the number of points between zero degrees and the
maximum field at which the MTF is calculated, intermediate values are interpolated. A
maximum of 100 field points is allowed.
Discussion This feature is very similar to the “FFT MTF vs. Field”, except the Huygens method is
used to compute the MTF rather than the FFT method. See “Huygens MTF” for details on the
Huygens MTF method.
Geometric MTF
Computes the geometric MTF, which is an approximation to the diffraction MTF based upon
ray aberration data.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1107
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
Max Frequency The maximum spatial frequency (see “MTF Units”) for which data is plotted.
Field The field number for which the calculation should be performed.
Multiply by Diffraction Limit When checked, will scale the geometric MTF by the diffraction
limited MTF to yield a more realistic result for systems with small aberrations. Should always be
used.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1108
See ” Polarization (system explorer)” for information on defining the polarization state and
how polarization is used by analysis features.
Scatter Rays If checked, rays will be statistically scattered at ray-surface intercepts that have
defined scattering properties. See ”Scattering (surface properties)”
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves. This
setting only applies to the Classic view, which is an option if “Enable Classic View” is selected in
the Graphics tab of the OpticStudio Preferences.
Discussion
The geometric MTF is a useful approximation to the diffraction MTF if the system is not close
to the diffraction limit. The primary advantage to using the geometric MTF is for systems which
have too many waves of aberration to permit accurate calculation of the diffraction MTF. The
geometric MTF is also very accurate at low spatial frequencies for systems with large
aberrations.
The nature of the geometric algorithm is that the computation is done in image space
coordinates. For this reason, rotating the image surface will affect the orientation of the
computed MTF. The tangential response corresponds to the image of a periodic target
oriented with lines along the image space X axis, and the sagittal response corresponds to the
image of a periodic target oriented with lines along the image space Y axis. This is different
from the conventions of the “FFT MTF”
Computes the geometric MTF data through focus at a specific spatial frequency.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1109
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
Delta Focus For focal systems, delta focus is the ± Z-axis range of the plot in lens units. For
afocal systems, delta focus is the ± optical power range of the plot in diopters.
Frequency The spatial frequency (see “MTF Units” ) for which data is plotted.
# Steps The number of focal planes at which the data is computed. A smooth curve is drawn
through the computed points. More steps yield higher accuracy and longer computation
times. In the text output, the 101 points at each selected field point are sampled from the
smooth spline curve based on the “# Steps” calculated data points.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1110
Field The field number for which the calculation should be performed.
Multiply by Diffraction Limit When checked, will scale the geometric MTF by the diffraction
limited MTF to yield a more realistic result for systems with small aberrations. Should always be
used.
See ” Polarization (system explorer)” for information on defining the polarization state and
how polarization is used by analysis features.
Scatter Rays If checked, rays will be statistically scattered at ray-surface intercepts that have
defined scattering properties. See ”Scattering (surface properties)”
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves. This
setting only applies to the Classic view, which is an option if “Enable Classic View” is selected in
the Graphics tab of the OpticStudio Preferences.
Computes the geometric modulation transfer function data as a function of field position.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1111
Settings The settings are identical to those for the FFT MTF vs. Field feature, with the added
ability to scatter rays, and a choice to scale by the diffraction limit or not.
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
Frequency 1-6 The spatial frequencies (see “MTF Units”) for which data is plotted.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1112
See ” Polarization (system explorer)” for information on defining the polarization state and
how polarization is used by analysis features.
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves. This
setting only applies to the Classic view, which is an option if “Enable Classic View” is selected in
the Graphics tab of the OpticStudio Preferences.
Remove Vignetting Factors If checked, vignetting factors are automatically removed. See the
comments about vignetting factors in the discussion section below.
Field Density The field density is the number of points between zero degrees and the
maximum field at which the MTF is calculated, intermediate values are interpolated. A
maximum of 100 field points is allowed.
Discussion This feature is nearly identical to the (diffraction) MTF vs. Field feature, except the
geometric MTF is used rather than the diffraction based MTF
Computes the geometric modulation transfer function data as a function of field position, and
displays the data over a rectangular region of field.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1113
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
X or Y Field Width The X or Y field width in field units. This is the total width or height, not the
half width or height. Field units are degrees in object space if field angle is used, otherwise field
units are the same as lens units.
Frequency The spatial frequency (see “MTF Units”) for which data is plotted.
See ” Polarization (system explorer)” for information on defining the polarization state and
how polarization is used by analysis features.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1114
Wavelength The wavelength number to be used in the calculation, or All for polychromatic
GMTF.
X or Y Pixels The number of pixels at which to compute the GMTF in each respective direction.
Note the size of the pixels is determined by both the number of pixels and the width of the
field; the pixels are not required to be square. The GMTF is computed at the center of the pixel
and the GMTF is assumed to have that value over the entire region of the pixel for display
purposes.
Reference Field This control selects the field number that corresponds to the center of the
map. The value zero refers to the center of the object (hx = 0, hy = 0), even if no field point is
defined there.
Show As Choose grey scale or false color map as the display option.
Scatter Rays If checked, rays will be statistically scattered at ray-surface intercepts that have
defined scattering properties. See "Scattering (surface properties)"
Remove Vignetting Factors If checked, vignetting factors are automatically removed. See
“Comment about vignetting factors”.
Discussion See the “Geometric MTF” for details. This feature computes the GMTF at each field
point on a 2D grid. If the total number of points is large, the computation time may become
quite large. See also the “FFT MTF Map”.
Vignetting factors determine the size and shape of the pupil as seen from different field points
(see “Vignetting factors” for a full discussion). Because this analysis feature needs to trace rays
at arbitrary intermediate field points where no specific vignetting factors are defined, the use
of vignetting factors is not recommended. If "Remove Vignetting Factors" is checked on (the
default), any defined vignetting factors will automatically be replaced with surface apertures
for this computation. The surface aperture method is generally more accurate than the
vignetting factor method when the pupil is overfilled with light. The resulting data may be
different between the two methods. In some cases, particularly where the vignetting factors
are being used to define the shape of the source beam rather than the apertures of the optics,
it may be required to use the defined vignetting factors. In this case, check the "Remove
Vignetting Factors" box off. OpticStudio will then use the closest defined field to determine the
vignetting factors to use for an arbitrary field point.
RMS
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1115
Provides the Root-Mean-Square (RMS) performance data as a function or field, wavelength
and defocus
Plots RMS radial, x, and y spot radius, RMS wavefront error, or Strehl ratio as a function of field
angle.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1116
Ray Density If the method is Gaussian quadrature, then the ray density specifies the number
of radial rays to be traced. The more rays traced, the greater the accuracy, although the
computation time increases. The maximum number is 20 which is sufficient for pupil
aberrations up to order 40. If the method is rectangular array, then the ray density indicates
the grid size. Rays outside the circular entrance pupil are ignored. See the "Discussion" section
for details.
Field Density The field density is the number of points between zero degrees and the
maximum field angle specified at which the RMS/Strehl ratio is calculated, intermediate values
are interpolated. A maximum of 100 field points is allowed.
Plot Scale Sets the maximum vertical scale for the plot. Zero results in automatic scaling.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1117
Method Select either Gaussian Quadrature (GQ) or Rectangular Array (RA). See “Comments
about RMS computation methods”.
Data Selects either wavefront error, spot radius, spot x-direction, spot y-direction, or Strehl
ratio. Strehl ratio is only available for monochromatic calculations, and is computed using the
method described in “Strehl ratio approximation” on page 206. For a polychromatic Strehl, see
the “Huygens PSF”.
Refer To Select either chief ray or centroid. For monochromatic calculations, the specified
wavelength is used for reference. For polychromatic calculations, the primary wavelength is
used for reference. Both reference points subtract out wavefront piston. The centroid reference
mode also subtracts out the tilt of the wavefront, which yields smaller RMS values.
Orientation Select +y, -y, +x, or -x field direction. Note the data will only be computed to the
limits of the defined fields in the selected direction.
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves.
Wavelength Select "All" to display data for each wavelength and a polychromatic
computation, any one wavelength to display monochromatic data, "Poly Only" which only
displays the polychromatic data, or "All With No Poly" to display all monochromatic data
without the polychromatic data. Strehl ratio can only be computed for a single wavelength.
Show Diffraction Limit If checked, then a horizontal line indicating the diffraction limited
response will be drawn on the plot. For RMS radius, x, or y; the diffraction limit is assumed to
be 1.22 times the working F/# on axis times the wavelength (primary wavelength if
polychromatic). The change in the diffraction limit due to changes in F/# with field are ignored;
a single value is used across the range of the plot. For Strehl ratio, 0.8 is used, and for RMS
wavefront, 0.072 waves is used. These are all approximate indicators for convenience only; the
actual meaning of "diffraction limited" may be open to interpretation.
Remove Vignetting Factors If checked, vignetting factors are automatically removed. See
“Comment about vignetting factors”.
Discussion
This feature calculates the RMS error or Strehl ratio as a function of field angle for each
wavelength.
Two different methods of calculation are available; either Gaussian Quadrature (GQ), or
Rectangular Array (RA). For GQ, the rays traced are arranged in a radial pattern with an optimal
weighting to estimate the RMS with a minimum number of rays. The method is described in G.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1118
W. Forbes, "Optical system assessment for design: numerical ray tracing in the Gaussian pupil",
J. Opt. Soc. Am. A, Vol. 5, No. 11, p1943 (1988). Although the method is very efficient, the
algorithm is not accurate if some of the rays are clipped due to surface apertures. To compute
the RMS wavefront in systems with surface apertures requires the use of the RA method, and a
larger number of rays for sufficient accuracy. For more information see “Selecting the pupil
integration method”.
For RMS wavefront computations, OpticStudio always subtracts out a reference sphere.
l When referenced to the centroid, OpticStudio computes a mean shifted, tilted ref-
erence sphere.
RMS wavefront error with the mean subtracted is computed as follows:
where Wn is the OPD at a given point in the pupil and wn is the weighting at that point
in the pupil.
This same method is used when computing RMS wavefront referenced to the centroid
by the default merit function.
l When reference to Chief Ray, the reference sphere is a sphere centered on the chief ray
- image surface intercept point.
where
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1119
l OPDi,j is the Optical Path Difference of each ray at each wavelength. The OPD
value will be a different value depending on the Reference (Centroid, Chief Ray).
Again, this same method is used when computing RMS wavefront "Ignore Lateral
Color" unticked by the default merit function, as all wavelengths will refer to the
reference sphere generated for the primary wavelength.
Plots RMS radial, x, and y spot radius, RMS wavefront error, or Strehl ratio as a function of
wavelength.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1120
Ray Density If the method is Gaussian quadrature, then the ray density specifies the number
of radial rays to be traced. The more rays traced, the greater the accuracy, although the
computation time increases. The maximum number is 20 which is sufficient for pupil
aberrations up to order 40. If the method is rectangular array, then the ray density indicates
the grid size. Rays outside the circular entrance pupil are ignored. See the "Discussion" section
for details.
Wave Density The wave density is the number of points between the minimum and maximum
defined wavelength at which the RMS/Strehl ratio is calculated, intermediate values are
interpolated. A maximum of 100 points is allowed.
Plot Scale Sets the maximum vertical scale for the plot. Zero results in automatic scaling.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1121
Method Select either Gaussian Quadrature (GQ) or Rectangular Array (RA). See “Comments
about RMS computation methods”.
Data Selects wavefront error, spot radius, spot x-direction, spot y-direction, or Strehl ratio.
Refer To Select either chief ray or centroid. Both reference points subtract out wavefront
piston. The centroid reference mode also subtracts out the tilt of the wavefront, which yields
smaller RMS values.
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves.
Field Select "All" to display data for all fields, select one field to display data for a single field.
Show Diffraction Limit If checked, then a curve indicating the diffraction limited response will
be drawn on the plot. For RMS radius, x, or y; the diffraction limit is assumed to be 1.22 times
the working F/# on axis times the wavelength. The change in the diffraction limit due to
changes in F/# with field are ignored. For Strehl ratio, 0.8 is used, and for RMS wavefront, 0.072
waves is used. These are all approximate indicators for convenience only; the actual meaning
of "diffraction limited" may be open to interpretation.
Discussion This feature calculates the RMS error or Strehl ratio as a function of wavelength for
each field position. The method of calculation is identical to that described in “RMS vs. Field”;
see that section for a detailed discussion. The wavelength range is determined by the
minimum and maximum wavelengths defined on the wavelengths dialog box.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1122
Plots RMS radial, x, and y spot radius, RMS wavefront error, or Strehl ratio as a function of
focus change.
Ray Density If the method is Gaussian quadrature, then the ray density specifies the number
of radial rays to be traced. The more rays traced, the greater the accuracy, although the
computation time increases. The maximum number is 20 which is sufficient for pupil
aberrations up to order 40. If the method is rectangular array, then the ray density indicates
the grid size. Rays outside the circular entrance pupil are ignored. See the "Discussion" section
for details.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1123
Focus Density The focus density is the number of points between the minimum and maximum
focus shift specified at which the RMS/Strehl ratio is calculated, intermediate values are
interpolated. A maximum of 100 points is allowed.
Plot Scale Sets the maximum vertical scale for the plot. Zero results in automatic scaling.
Method Select either Gaussian Quadrature (GQ) or Rectangular Array (RA). See “Comments
about RMS computation methods”.
Data Selects either RMS wavefront error, RMS spot radius, RMS X-direction, RMS Y- direction,
or Strehl ratio. Strehl ratio is only available for monochromatic calculations, and is computed
using the method described in “Strehl ratio approximation”. For a polychromatic Strehl, see the
“Huygens PSF”.
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves.
Refer To Select either chief ray or centroid. For monochromatic calculations, the specified
wavelength is used for reference. For polychromatic calculations, the primary wavelength is
used for reference. Both reference points subtract out wavefront piston. The centroid reference
mode also subtracts out the tilt of the wavefront, which yields smaller RMS values.
Wavelength Select "All" to display data for a polychromatic computation, select any one
wavelength to plot monochromatic data.
Min Focus The minimum value of the defocus to plot. For focal systems, the units are lens
units. For afocal systems, the units are diopters.
Max Focus The maximum value of the defocus to plot. For focal systems, the units are lens
units. For afocal systems, the units are diopters.
Show Diffraction Limit If checked, then a horizontal line indicating the diffraction limited
response will be drawn on the plot. For RMS radius, x, or y; the diffraction limit is assumed to
be 1.22 times the working F/# times the wavelength (primary wavelength if polychromatic) on
axis. The change in the diffraction limit due to changes in F/# with field are ignored; a single
value is used across the range of the plot. For Strehl ratio, 0.8 is used, and for RMS wavefront,
0.072 waves is used. These are all approximate indicators for convenience only; the actual
meaning of "diffraction limited" may be open to interpretation.
Discussion This feature calculates the RMS error or Strehl ratio as a function of a change in
focus position for each field position. The method of calculation is identical to that described in
“RMS vs. Field”; see that section for a detailed discussion. OpticStudio adds the specified focus
shift to the value of the thickness of the surface prior to the image surface. If the optical system
has an odd number of mirrors, this surface normally would have a negative thickness, and
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1124
therefore negative focus values move the image surface farther away from the last component.
For systems with an even number of mirrors, then negative focus values move the image
surface closer to the last component.
Plots RMS radial, x, and y spot radius, RMS wavefront error, or Strehl ratio as a function of field
position in a rectangular map.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1125
Ray Density If the method is Gaussian quadrature, then the ray density specifies the number
of radial rays to be traced. The more rays traced, the greater the accuracy, although the
computation time increases. The maximum number is 20 which is sufficient for pupil
aberrations up to order 40. If the method is rectangular array, then the ray density indicates
the grid size. Rays outside the circular entrance pupil are ignored. See the "Discussion" section
for details.
Data Selects wavefront error, spot radius, spot x-direction, spot y-direction, or Strehl ratio. If
the method selected is rectangular array, then a rough estimate of the PTV is also available as
one of the Data options. Note that PTV depends upon just two points in the pupil, and for this
reason it is difficult to obtain the exact PTV without resorting to high sampling and long
computation times. Both Strehl Ratio and PTV require a single wavelength to be selected;
polychromatic computations are not supported.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1126
Method Select either Gaussian Quadrature (GQ) or Rectangular Array (RA). See “Comments
about RMS computation methods”.
Plot Scale Sets the maximum vertical scale for the plot. Zero results in automatic scaling.
Wavelength Select "All" to display polychromatic data, or select any one wavelength to
display monochromatic data. Strehl Ratio and PTV Wavefront can only be computed for a
single wavelength.
Field Selects the reference field. The rectangular field of view will be centered on the selected
field point.
Refer To Select either chief ray or centroid. Both reference points subtract out wavefront
piston. The centroid reference mode also subtracts out the tilt of the wavefront, which yields
smaller RMS values.
Show As Choose surface plot, contour map, grey scale, or false color map as the display
option.
Surface Selects the surface at which the data is to be evaluated. This is useful for evaluating
intermediate images. See “Evaluating results at intermediate surfaces”.
Contour Format The contour format string. For a discussion of the contour format string
syntax, see “The Contour Format String”.
X/Y Field Size The half-field width in the X or Y directions in field units. Note this field of view
is centered on the reference field selected by the "Field" setting above.
X/Y Field Sampling The number of points in the X or Y directions used to sample the Data.
See ” Polarization (system explorer)” for information on defining the polarization state and
how polarization is used by analysis features.
Remove Vignetting Factors If checked, vignetting factors are automatically removed. See
“Comment about vignetting factors”.
Discussion This feature calculates the RMS error or Strehl ratio as a function of field position.
The method of calculation is identical to that described in “RMS vs. Field”; see that section for a
detailed discussion.
Enclosed Energy
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1127
Shows the fractional energy enclosed within circular and slit regions on the specified surface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1128
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
Type The analysis type option specifies how the encircled energy is calculated; either encircled
(radial), X-only, Y-only, or ensquared.
Maximum Distance This setting overrides the default scaling. The units are micrometers. To
choose the default scaling option, enter zero.
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1129
Refer To Select chief ray, centroid, or vertex as the reference point. Vertex refers to the
coordinates (0, 0) on the image surface. This option will only return meaningful data if the
diffraction image at all selected fields is within the maximum distance of the vertex. When
vertex is selected, OpticStudio is unable to detect if the sampling is sufficient, so some care
should be taken to set the sampling high enough for accurate results.
Surface Selects the surface at which the data is to be evaluated. This is useful for evaluating
intermediate images. See “Evaluating results at intermediate surfaces”.
Field The field number for which the calculation should be performed.
Show Diffraction Limit If checked, the diffraction limited results are computed and displayed.
See the discussion below.
Use Huygens PSF If checked, the more accurate but slower Huygens PSF method is used to
compute the PSF. This option should always be used if the image surface is tilted, or if the chief
ray is not close to normal to the image surface.
Image Sampling If "Use Huygens PSF" is checked, this control allows a user selectable image
sampling grid. The default setting will select a grid that is 2X larger in each direction than the
pupil sampling grid.
Image Delta This control selects the point spacing on the image grid in micrometers. Use zero
for the default image delta.
Discussion
See the discussion sections of the FFT and Huygens PSF. Those comments also apply to this
feature.
The accuracy of the diffraction encircled energy calculation is limited by the magnitude and
slope of the OPD error and the sampling density used. If the sampling density is insufficient,
OpticStudio will issue an error message indicating that the data is inaccurate. To increase the
accuracy, increase the sampling density or decrease the OPD error. If shown, the diffraction
limit curve is for the aberration free response at the reference field position (see “Diffraction
Limited” in the chapter “Conventions and Definitions“)
For systems with low OPD error, finite energy can exist in the PSF out to long distances from
the image centroid. For such systems, it can be computationally challenging to track energy
accurately over both small (within the Airy radius) and large distances. When using low
sampling, results can be subject to error in those cases. For such systems, higher sampling is
generally required for accurate results over the full range of the PSF.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1130
The X- and Y-only options compute the fraction of energy in the PSF in the [-y,y] or [-x,x] range
of the y- or x-axes, respectively, centered on the chosen reference point. For example, the X-
only enclosed energy for an x-value of 10 microns represents the fraction of energy in the
region 20 microns across in the x-direction, centered on the reference point, and infinite in the
other direction.
Geometric
Computes encircled energy using ray-image surface intercepts.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1131
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
Type The analysis type option specifies how the encircled energy is calculated; either encircled
(radial), X-only, Y-only, or ensquared.
Max Distance This setting overrides the default scaling. The units are micrometers. To choose
the default scaling option, enter zero.
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves.
Refer To Select either chief ray, centroid, vertex, or middle as the reference point. The middle
is the coordinate upon which the smallest circle enclosing all the ray intercepts is centered.
Surface Selects the surface at which the data is to be evaluated. This is useful for evaluating
intermediate images. See “Evaluating results at intermediate surfaces”.
Field The field number for which the calculation should be performed.
Scatter Rays If checked, rays will be statistically scattered at ray-surface intercepts that have
defined scattering properties. See “Surface scattering settings”.
Discussion The X- and Y-only options will compute the fraction of rays which are contained
with plus or minus the specified distance from either the chief ray or the image centroid. If a
scale of 10 micrometers is shown, then the region enclosed is 20 micrometers across (and
infinite in the other direction). The geometric encircled energy is not a good indicator of
performance if the system is close to diffraction limited.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1132
Sampling The size of the ray grid used to sample the pupil. The sampling may be 32x32,
64x64, etc. Although higher sampling yields more accurate data, calculation times increase.
Max Radius The maximum radius setting overrides the default scaling. The units are
micrometers. To choose the default scaling option, enter zero.
Surface Selects the surface at which the data is to be evaluated. This is useful for evaluating
intermediate images. See “Evaluating results at intermediate surfaces”.
Type The type option specifies which data is displayed on the graph; line and edge, line only,
or edge only.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1133
Discussion The line response function (or line spread function, LSF) is the cross section of the
intensity pattern of the image of a line object. The edge spread function (ESF) is the cross
section of the intensity pattern of the image of an edge (a semi-infinite plane). The X- or Y-
orientation refers to the direction of the line or edge. The X- orientation means the line or
edge is parallel to the X-axis. The Y-orientation means the line or edge is parallel to the Y-axis.
The zero coordinate is referenced to the chief ray. This is a geometric calculation. See also “FFT
Line/ Edge Spread”.
Extended Source
Computes encircled energy using an extended source similar to the geometric image analysis
feature.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1134
Field Size This value defines the full width of the square image file in field coordinates, which
may be either lens units or degrees, depending upon the current field definition (heights or
angles, respectively).
Rays x 1000 This setting determines approximately how many rays will be traced. The number
of rays traced is approximately 1000 times the specified value. The reason the number of rays
is only approximate is because the distribution of rays over the pixels in the image must be
uniform. For example, if there are 1500 pixels in an image file, then at least 1500 rays will be
traced, even if a value of 1 is selected. The distribution of rays at each wavelength is in
proportion to the wavelength weights.
Type The analysis type option specifies how the encircled energy is calculated; either encircled
(radial), X-only, Y-only, or ensquared. The X-only and Y-only options are sometimes called
"enslitted" and correspond to the total fraction of energy contained within an expanding slit.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1135
There are also options for X- or Y-distributions, which show the energy distribution in either x
or y directions. These latter two options also report the geometric full width at half max. The X-
or Y- distributions are the amount of energy falling on a pixel which is narrow in one direction
and infinite in the other direction.
Refer To Select either chief ray, centroid, or surface vertex as the reference point.
Surface Selects the surface at which the data is to be evaluated. This is useful for evaluating
intermediate images. See “Evaluating results at intermediate surfaces”.
Field The image file may be centered on any defined field position. This permits a small target
such as a bar chart to be moved to any location in the field of view.
File The name of the .IMA image file. This file must reside in the <images> folder (see
“Folders”). See the discussion section in the Geometric Image Analysis feature for a full
description of the IMA file format.
Max Distance This setting overrides the default scaling. The units are micrometers. To choose
the default scaling option, enter zero.
Use Dashes Selects either solid lines or dashed lines to differentiate the various curves. This
setting only applies to the Classic view, which is an option if “Enable Classic View” is selected in
the Graphics tab of the OpticStudio Preferences.
Remove Vignetting Factors If checked, vignetting factors are automatically removed. See
“Comment about vignetting factors”.
Discussion The X- and Y-only options will compute the fraction of rays which are contained
with plus or minus the specified distance from either the chief ray or the image centroid. If a
scale of 10 micrometers is shown, then the region enclosed is 20 micrometers across (and
infinite in the other direction). The geometric encircled energy is not a good indicator of
performance if the system is close to diffraction limited.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1136
See the Geometric Image Analysis feature discussion for details about extended source
modeling and the IMA file format.
Predicts the response of the optical system to a 2D bitmap placed on the object surface.
Image Simulation
This feature simulates the formation of images by convolving a source bitmap file with an array
of Point Spread Functions. The effects considered include diffraction, aberrations, distortion,
relative illumination, image orientation, and polarization.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1137
Source Bitmap Settings
Input File The name of the file for the source bitmap. The file may be in BMP, JPG, PNG, IMA,
or BIM file formats. For a description of the IMA and BIM file formats see “The IMA format” and
“The BIM format”. The input files are stored in the <images> folder (see “Folders” ). IMA abd
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1138
BIM files must have more than 1 but no more than 8,000 pixels in each direction, while BMP,
JPG and PNG files must have more than 1 and no more than 16,000 pixels in each direction.
Field Height This value defines the full height in the y-axis of the source bitmap in field
coordinates, which may be either lens units or degrees, depending upon the current field
definition (heights or angles, respectively). If the field type is Real Image Height, the field type
is automatically changed to Paraxial Image Height for this analysis. This avoids the problem of
Real Image Height masking the distortion in the image. The Field Height applies to the
resulting bitmap after any oversampling, guard band, or rotation is applied.
Oversampling Oversampling increases the pixel resolution of the source bitmap by copying
one pixel into 2, 4, or more identical adjacent pixels. The purpose of this feature is to increase
the number of pixels per field unit. Oversampling will be applied a factor of 2 at a time until the
specified oversampling is achieved, as long as the maximum number of pixels in any direction
will not exceed 16,000. This limit only applies to the oversampling feature, and not to the input
file. Oversampling is applied to the image before any effects of the optical system are
considered.
Flip Source Flips the source bitmap left-right, top-bottom, or both. The source bitmap is
flipped before any effects of the optical system are considered.
Guard Band This feature increases the pixel resolution of the source bitmap by repeatedly
doubling the number of pixels. This doubling only affects the analysis, while the original
bitmap file remains unchanged. This results in a black "guard band" all around the original
image. The purpose of this feature is to increase the number of pixels per field unit while
adding a region around the desired image. This is particularly useful if the point spread
function(s) are large compared to the source bitmap field size. The guard band will be applied
a factor of 2 at a time until the specified size is achieved, as long as the maximum number of
pixels in any direction will not exceed 16,000. This limit only applies to the guard band feature,
and not to the input file. The guard band is applied to the source bitmap before any effects of
the optical system are considered.
Rotate Source Rotates the source bitmap. The rotation is applied to the source bitmap before
any effects of the optical system are considered.
Wavelength If “RGB” is selected, then 3 wavelengths will be defined, 0.606, 0.535, and 0.465
micrometers for red green, and blue, respectively; no matter what the current wavelength
definitions are. If “1+2+3” is selected, then wavelengths 1, 2, and 3 as currently defined on the
wavelength data box will be used. The red channel of the source bitmap will be used for
wavelength 3, green channel for wavelength 2, and the blue channel for wavelength 1. The
displayed image will be in RGB format no matter what wavelengths are defined using this
option. For selection of a specific single wavelength, such as 6, the B channel image will be
used for wavelengths 4, 7, 10, 13, etc. The G channel image will be used for wavelengths 5, 8,
11, 14, etc. The R channel image will be used for wavelengths 6, 9, 12, 15, etc.
Wavelength weighting is usually ignored. The color weighting that results in the final image
depends only upon the color amplitude in the source bitmap and the relative transmission of
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1139
the optical system. The exception is when using monochromatic IMA files, the selected
wavelength is "1+2+3", and 3 wavelengths are defined. In this case only, the wavelength
weighting is used to define the relative color weighting.
Field The source bitmap may be centered on any defined field position. The resulting image is
then centered on this field position.
Pupil Sampling The grid sampling to use in the pupil space for computing the PSF grid.
Image Sampling The grid sampling to use in the source bitmap space for computing the PSF
grid.
PSF X/Y Points The number of field points in the X/Y direction at which to compute the PSF.
For field points in between these grid points, an interpolated PSF is used.
Apply Fixed Apertures If checked, all surfaces with optical power that have no aperture
defined are modified for this computation to have a circular aperture at the current clear semi-
diameter or semi-diameter value. Without this change in the aperture definition, rays may pass
the surface beyond the listed clear semi-diameter or semi-diameter, especially if the Field
Height exceeds the field of view defined by the field points. This leads to misleading
illumination, typically at the edges of the image.
Aberrations Choose None to ignore aberrations, Geometric to consider only ray aberrations,
or Diffraction to use the Huygens PSF to model the aberrations. If Diffraction is selected, the
analysis may automatically switch to Geometric if the aberrations are so severe that the
diffraction PSF cannot accurately be computed. See the discussion below.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1140
Show As Choose Simulated Image, Source Bitmap to see the input bitmap (including the
effects of oversampling, guard band, and rotation), or PSF Grid to see all of the PSF functions
computed over the field of view. See the discussion below.
Reference Selects the reference coordinate for the center of the plot: chief ray, surface vertex,
or primary wavelength chief ray. The latter option chooses the primary wavelength chief ray
even if some other wavelength is the only one selected.
Suppress Frame If checked, the frame is not drawn and the entire window is used to display
the image.
X/Y Pixels The number of pixels to use in the detected image. Use 0 for the default value,
which is the number of pixels in the source bitmap.
Pixel Size The simulated image pixel size (square). For focal systems, the units are lens units.
For afocal systems, the units are cosines. Use 0 for the default value, which is computed from
the magnification of the optical system for the center pixel in the source bitmap. Note that the
default-value computation is purely ray-based; if the Field Height is small enough such that the
geometric image is smaller than the PSF, this results in an unreasonably small pixel/detector
size.
Output File If a file name ending in the BMP, JPG, or PNG extension is provided, then the
simulated image will be saved in the specified file and be placed in the <images> folder (see
“Folders”).
Discussion:
The Image Simulation algorithm consists of the following steps to compute the appearance of
the image.
l The source bitmap is oversampled, rotated, and a guard band is applied, if these
options are selected.
l A "grid" of Point Spread Functions (PSFs) are computed. The grid spans the field size,
and describes the aberrations at selected points in the field of view defined by the bit-
map and field size settings. The PSF grid also includes the effects of polarization and rel-
ative illumination.
l The PSF grid is interpolated for every pixel in the modified source bitmap. At each pixel,
the effective PSFis convolved with the modified source bitmap to determine the aber-
rated bitmap image.
l The resulting image bitmap is then scaled and stretched to account for the detected
image pixel size, geometric distortion, and lateral color aberrations.
The most important part of the algorithm is the computation of the PSF grid. The PSF X/Y
Points settings determine how many PSFs are computed in each direction over the field of
view. There are three different methods for modeling the aberrations using the PSF:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1141
Diffraction, Geometric, and None. Diffraction uses the Huygens PSF (for details see “Huygens
PSF”).
The Huygens PSF accurately models diffraction effects for almost any optical system, but is
slower than the Geometric PSF, which is based upon an integration of the Spot Diagram. The
Huygens PSF also cannot be accurately computed if the aberrations are severe (for this feature,
the threshold is 20 times the diffraction limit). The Image Simulation algorithm detects when
the Huygens PSF cannot be computed, and will automatically switch to the Geometric PSF if
required. This switching is done independently for each field and wavelength, and so imaging
systems that are diffraction limited in one part of the field but severely aberrated in other parts
of the field can still be accurately modeled if Diffraction is selected. If None is selected for the
aberration type, the PSF grid is an array of delta functions and aberrations other than lateral
color and distortion are not considered.
Relative illumination and (optionally) polarization are considered in the PSF computation. The
PSF Grid is smoothly interpolated between computed field points to estimate the PSF at each
pixel in the modified source bitmap. The resulting PSF is then convolved with the source
bitmap to yield the aberrated image. The more PSF grid points that are used, the more
accurate the simulation is, but the longer the computation time.
If the image surface is not a plane, the aberrations and distortion are all computed on the
curved image surface, and the Simulated Image is projected onto the XY plane, ignoring the z
coordinate of the image surface. The pixels are assumed to be square on the projected plane.
The brightness of the output image is determined by normalizing the image to have the same
peak brightness as the input image. If "Use Relative Illumination" is not checked, then the chief
ray has to be traceable in order to establish a relative illumination across the image.
The simulated image is shown as it would appear when viewed looking down the local
negative Z axis of the image plane.
If the parameter Pixel Size is set to 0, the default value is calculated in following way.
1. Calculate pixel size at field space, which is (Field Height)/(Bitmap Y Pixels). Note the unit
of pixel size at field space depends on the Field Type.
2. Trace rays from upper-right and lower-left corners of the center pixel at field space,
and get the rays' coordinates at image plane.
3. The default pixel size at image plane is then calculated from the rays' coordinates at
image plane as shown in following figure.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1142
where xc and yc are field coordinate defined by Field in the setting, ∆x and ∆y are the pixel size
calculated in step 1.
The Image Size shown at the bottom text in Image Simulation result is then the product of
pixel size and pixel numbers in x and y directions. See the explanation for X/Y Pixels for pixel
numbers in x and y.
The accuracy of the simulation is always ultimately limited by the resolution of the input image.
If the resolution of the optical system is sufficient, the discrete pixel nature of the source
bitmap may be apparent. This can be manifested by stair-case like edges in the simulated
image. The oversampling feature can reduce these effects at the expense of longer
computation time.
If the field of view is large, it is often the case that the PSFs are small compared to the area of a
single pixel. In this case, a lot of computation of the PSF may yield what is effectively a delta
function, with only a single pixel representing the entire PSF. The computation can be done
much faster in these cases by ignoring aberrations, or at least by switching from diffraction to
geometric PSF computations.
If the magnification or field of view are small enough to yield an image that is comparable in
size to the PSF, or perhaps even smaller than the PSF, then the Guard Band feature is likely
required. The reason is that the PSF convolution is done over the source image pixels. If the
PSF is larger than the source bitmap in image space, the convolution loses the "spread"
outside the original bitmap caused by the large PSF. The guard band adds a black region
around the original image which can be used to show the spread due to the PSF.
By far the most important diagnostic is the "PSF Grid" under the "Show As" setting. It is always
a good idea to look at the PSF grid, and confirm it shows well sampled data, before computing
the Simulated Image.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1143
Comments on using field angles
The Field Height determines the physical size of the source bitmap as seen by the optical
system. For example, if a 30 x 30 pixel source bitmap is used, and the Field Height is 2.0 mm
(this assumes the fields are defined in terms of object heights), then each pixel represents a
66.67 micrometer region. If the same source bitmap is later used with a system with a 40
degree full field of view (using field angles), then the Field Height can be set to 40 to cover the
entire field. Each pixel will now represent a 1.33 degree square. The difficulty in using field
angle for defining the object field of view is that field angle units are inherently anamorphic. X-
direction angles represent a different subtended angle at a Y angle of 80 degrees than at an a
Y angle of 10 degrees. If field angles are being used, and the field of view is fairly wide (more
than about 40 degrees in any direction) then great care should be taken in interpreting the
results for an extended object.
For a precise definition of the field angles OpticStudio uses, see “Field angles and heights”.
Note that if fields are defined by image height, then Field Height determines the size of the
object in image space, not object space. The Field Height is always in whatever units the fields
are defined in, and so when using image height as a field type the Field Height determines the
source bitmap height in image space. The size of the source in object space is then determined
by the Field Height divided by the magnification of the lens.
When using paraxial image height, the anamorphic magnification of the system (if any) will be
masked in the simulated image. When using real image height, all forms of distortion will be
masked. For this reason, this feature will use paraxial image height for the field definition even
if real image height is selected.
However, it is recommended that neither real nor paraxial image height be used. Instead, use
object height for finite conjugate systems or field angle for infinite conjugate systems, as these
field types unambiguously define the size and orientation of the object in image space.
The PSF grid is generated from the object side. It is like the grid distribution type in Fields
Wizard. The difference is that the minimum value of pixel number is 1 and the coordinate of
the center is half of the resolution. When calculating the PSF’s at each grid point, the PSF is
centered on the chief ray for the field at that grid point.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1144
Geometric Image Analysis
The geometric image analysis feature has many applications. It can be used to model extended
sources, analyze useful resolution, represent the appearance of imaged objects, and provide
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1145
intuition as to image rotation. Image analysis is also useful for estimating multi-mode fiber
coupling efficiency.
Note that the Image Simulation feature is better suited for the evaluation of high
resolution photographic scenes.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1146
Field Size This value defines the full width of the square image file in field coordinates, which
may be either lens units or degrees, depending upon the current field definition (heights or
angles, respectively). Note that when using "field angle" as the field type the square IMA file is
inherently distorted; see the discussion below for details.
Image Size If "Show" is selected as a spot diagram, this value sets the size of the scale bar
which is superimposed on the image. It has no effect on the actual size of the image. The
image size is set by the object scale and the magnification and aberrations of the system. The
default may not be acceptable to see the desired portion of the image.
If "Show" is selected as any other option, this value sets the size of the detector used to
capture rays. Rays landing outside of the image size are ignored, and are not included in the
total detected rays, which will decrease the computed efficiency.
Parity The "Even" setting leaves the object as it would appear when viewed looking down the
negative Z axis in object space. The parity can be set to "Odd" which reverses the object from
top to bottom.
Rotation The rotation can be set to any angle in degrees. The algorithm actually rotates the
object before tracing the rays, so this feature can be used to switch from tangential to sagittal
orientation of bar targets, for example.
Rays x 1000 This setting determines approximately how many rays will be traced. The number
of rays traced is approximately 1000 times the specified value. The reason the number of rays
is only approximate is because the distribution of rays over the pixels in the image must be
uniform. For example, if there are 1500 pixels in an image file, then at least 1500 rays will be
traced, even if a value of 1 is selected. The distribution of rays at each wavelength is in
proportion to the wavelength weights.
Show Choose surface plot, contour map, grey scale, false color map, spot diagram, cross x, or
cross y as the display option.
Additional considerations for spot diagram mode: The memory requirement for the spot
diagram mode scales linearly with the number of rays traced, unlike the other modes where
the maximum memory needed is always nx*ny pixels). For this reason, OpticStudio does not
cache the analysis data in Spot Diagram mode. As a result, any changes to the GIA settings
when using Spot Diagram mode will force a complete recalculation of the GIA data.
Source The source may be uniform or Lambertian. The uniform setting weights rays equally.
Lambertian weights rays by the cosine of the angle the ray makes with local normal of the
object surface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1147
Scatter Rays If checked, rays will be statistically scattered at ray-surface intercepts that have
defined scattering properties. See “Surface scattering settings”.
Field The image file may be centered on any defined field position. This permits a small target
such as a bar chart to be moved to any location in the field of view. The resulting image is then
centered on the chief ray coordinate of this field position.
File The name of the .IMA or .BIM image file. This file must reside in the <images> folder (see
“Folders”). See the discussion section for a full description of the IMA and BIM file formats.
Edit IMA File Pressing this button will invoke the Windows Notepad editor which allows
modification of the currently selected IMA file. This button is disabled if the file type is BIM.
Surface The surface number at which to evaluate the rays. The default is the image surface.
Other surfaces may be selected, for example, to visualize the beam footprint on an optical
surface.
# Pixels The number of pixels across the width of the selected image size. This value is not
used if "spot diagram" is the method of displaying the image data.
NA The numerical aperture (NA) cut-off. If zero, this feature is ignored. If a number greater
than 0 is entered, then all rays with a numerical aperture greater than the specified number are
ignored.
Total Watts The total power in watts radiated by the source into the entrance pupil of the
optical system. This flux is then used to normalize the detected power according to the relative
pixel values and the total efficiency.
Plot Scale For false color and gray scale plots, this value defines the maximum scale range.
Use Symbols If checked, this option will draw different symbols rather than dots for each
wavelength. This helps distinguish the various wavelengths. This value is only used if "spot
diagram" is the method of displaying the image data.
Reference Selects the reference coordinate for the center of the plot: chief ray, surface vertex,
primary wavelength chief ray, or centroid. The primary wavelength option chooses the primary
wavelength chief ray even if some other wavelength is the only one selected.
Remove Vignetting Factors If checked, vignetting factors are automatically removed. See
“Comment about vignetting factors”.
Delete Vignetted If checked, rays are not drawn if they will be vignetted by any surface.
Use Pixel Interpolation If checked, ray energy is distributed among adjacent pixels according
to the distance from where the ray lands to the center of the pixel. This yields smoother, more
accurate results for images where the pixels are small compared to the spot size. If unchecked,
all the energy for a ray is placed only in the pixel struck. Pixel Interpolation should not be used
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1148
if the pixels are large compared to the spot size. This control has no affect if "Show" is set to
"spot diagram".
Save As BIM File If a file name ending in the BIM extension is provided, and "Show" is not set
to "Spot Diagram", then the output image will be saved in the specified file and be placed in
the <images> folder (see “Folders”).
Discussion
OpticStudio supports three different file formats. Two of these formats end in the IMA
extension, one in the BIM extension
There are two different IMA file formats, one text and one binary. Whichever file format is used,
the file must end in the extension IMA. OpticStudio will distinguish between the two types of
file formats automatically.
The text image file is a text file which ends in the extension .IMA. At the top of the file is one
number which indicates the size of the file in pixels. The remaining rows and columns contain
the pixel data, with one character to each pixel. All IMA files must be square, with n x n pixels
defined. For example, a 7 x 7 representation of the letter "F" could be described by the
following IMA file:
7
0111110
0100000
0100000
0111100
0100000
0100000
0100000
Note that the single entry "7" starts the file, and it is followed by a carriage return. Then there
are 7 rows of 7 columns each, and each row is terminated with a carriage return. The columns
are not separated by a space or any other character. The image file must be square.
OpticStudio will attempt to allocate enough memory to hold the image file and will report an
error if there is not enough memory.
The "intensity" at each pixel can be any digit between 0 and 9. The number of rays each pixel
will generate is proportional to this value. Pixels with a value of 0 do not radiate any rays.
The binary IMA file format is more complicated than the text format, and binary IMA files
cannot be edited with a text editor. However, the binary IMA files are dramatically more
powerful. Each pixel in the binary IMA file is represented by an unsigned byte, which means
there are 256 "gray-scale" levels of intensity. Furthermore, each wavelength can be assigned a
separate pixel map. Therefore, very realistic photograph like extended sources can be
modeled.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1149
The binary IMA file format requires 3 16-bit header values. The first 16-bit value is a signed
integer that must be equal to zero. The second 16-bit signed integer is the width of the pixel
map in pixels, which can be any number from 1 to 8000. The third 16-bit signed integer is the
number of pixel maps, which correspond to the number of colors (or wavelengths) represented
in the file.
For example, a 3-color binary pixel map of a 50 by 50 image would have 6 bytes of header (0,
50, and 3), followed by 2500 bytes for color 1, then 2500 bytes for color 2, then 2500 bytes for
color 3, for a total of 7506 bytes. The data for each color is stored by columns for each row (the
column index changes faster than the row index).
The drawback to the IMA format is that a maximum of 256 grey scale levels are supported. The
BIM format is a binary double precision floating point file format which effectively makes the
number of grey scales many trillions. The BIM format consists of the following binary values:
followed by n*n 64 bit double precision floating point values representing the relative
intensity. The first pixel is the bottom left corner, and the remaining pixels are listed by rows
along x.
Currently, the nx and ny values must be identical or an error message will be issued.
The comments regarding field angles for the Image Simulation also apply to this feature. For a
full discussion, see “Comments on using field angles”.
The comments regarding paraxial and real image height for the Image Simulation also apply to
this feature. For a full discussion, see “Comments on using paraxial and real image height”.
The rays generated by each pixel are chosen randomly from coordinates within the pixel cell.
The entrance pupil coordinates are also chosen randomly for each ray. The distribution of rays
is uniform over the pixel and over the circular paraxial entrance pupil (if ray aiming is used,
then there may be some pupil distortion). For the text IMA files, the number of rays generated
by each pixel is equal to the pixel intensity times the number of wavelengths times the ray
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1150
density. The wavelength used for each ray is selected randomly in proportion to the
wavelength weights. For the binary IMA files, the number of rays generated from each pixel is
proportional to the ray density times the fractional intensity relative to 256.
By separating the form of the object from the scale, the same image file can be used for many
applications. For example, the sample image file "letterf.ima" contains a 7x7 grid of pixels
defining the capital letter F. The object scale can be set to 1 mm, then 0.1 mm, then 0.01 mm to
get a feel for how small a character F the optical system can resolve, without the need to
change the IMA file.
Note that if fields are defined by image height, then field size determines the size of the object
in image space, not object space. The field size is always in whatever units the fields are
defined in, and so for image height the field size determines image height. The size of the
object is then determined by the field size divided by the magnification of the lens.
The choice of field position also permits great flexibility in analyzing image quality. For
example, the letter F image file can be tested at several field points to see if the resolution is
strongly affected by field aberrations. The object scale is set to the height of the letter, but the
image will be centered about the chief ray intercept of the selected field point.
The source is by default a uniform radiator of rays. Uniform here means uniform in the
entrance pupil. All rays generated fall within the entrance pupil, and they are all weighted
equally. Since ray wavelengths are selected randomly in proportion to the wavelength weights,
no explicit wavelength weighting is required. The uniform setting is usually preferred for large
object distance systems with small fields of view. The source may also be defined to be
Lambertian, which weights all rays by a cosine factor. Once the input ray weight is determined,
any pupil apodization (see “Apodization Type” ) that is defined will further modify the input ray
weight.
where the sum i is over all rays which were unvignetted, and the sum over j is over all rays
which were launched. The efficiency calculation considers vignetting, source distribution,
wavelength weights, and reflection and transmission losses in the optical system if the "Use
Polarization" checkbox is selected. If "spot diagram" is selected for the "show" option, then the
percent efficiency includes all unvignetted rays. The other display options vignette rays that are
beyond the extent of the detector size. Therefore, the percent efficiency will be different
between spot diagram displays and other displays if rays fall outside the region of the
detector.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1151
Calculating efficiency of multi-mode fibers
OpticStudio has an algorithm for accurately computing fiber coupling into single-mode fibers;
for details see “Fiber Coupling Efficiency”. Also see “Computing Fiber Coupling”.
To estimate the coupling efficiency for multi-mode fibers, a geometric approach may be used.
Place a circular aperture at or just before the image surface with the appropriate maximum
radial aperture representing the core size. Then set the NA (see the table above) to the
maximum acceptance NA of the fiber. The percent efficiency will then be calculated by
summing all the rays that pass the core aperture within the specified NA. The NA of a typical
multi-mode fiber with an inner core of index ni and an outer cladding of index no is given by
Text output
Selecting the "Text" option on the image analysis window menu bar will generate and display a
text file listing the ray data. If the "Show" option is set to "Spot Diagram", the file will have 9
columns. The first column is the sequential ray number. The second and third columns are the
x and y field coordinates (either degrees or object height). The fourth and fifth columns are the
normalized pupil coordinates, Px and Py. The sixth column is the integer wavelength number.
The seventh column is the weight of the ray, which depends upon the source properties. The
eighth and ninth columns are the image coordinates in lens units, relative to the reference ray.
If the "Show" option is not set to "Spot Diagram", then the text display will list the weighted ray
count in each pixel. The pixel listing starts at the -x, -y (bottom left) corner pixel, and proceeds
up the y columns. Use the "Escape" key to terminate a lengthy image analysis computation.
This feature creates an RGB color image based upon ray tracing data using an RGB bitmap file
as the source. This feature has many applications. It can be used to model extended sources,
analyze useful resolution, display distortion, represent the appearance of imaged objects,
provide intuition as to image rotation, display beam footprints, to name just a few.
This feature is based strictly upon geometrical ray tracing. The bitmap image analysis feature
uses standard BMP, JPG, and PNG files as the source image, see the discussion for details
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1152
Field Y Size This value defines the full y direction size of the source bitmap in field
coordinates, which may be either lens units or degrees, depending upon the current field
definition (heights or angles, respectively).
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1153
Parity The "Even" setting leaves the object as it would appear when viewed looking down the
negative Z axis in object space. The parity can be set to "Odd" which reverses the object from
top to bottom.
Rotation The rotation can be set to any angle in degrees. The algorithm actually rotates the
object before tracing the rays, so this feature can be used to switch from tangential to sagittal
orientation of bar targets, for example.
Rays/Pixel This setting determines how many rays per source image pixel per color channel
will be traced. Selecting 10 rays/pixel on a 640 x 480 3-color image will in general trace
9,216,000 rays.
X-Pixel Size The size in lens units, or afocal units when using afocal mode, of each detector
pixel measured in the X direction.
Y-Pixel Size The size in lens units, or afocal units when using afocal mode, of each detector
pixel measured in the Y direction.
Source The source may be uniform or Lambertian. The uniform setting weights rays equally.
Lambertian weights rays by the cosine of the angle the ray makes with local normal of the
object surface.
Normalize The image may be normalized by either the peak pixel intensity or by the average
pixel intensity. Using the peak pixel intensity scales all pixels equally so the pixel with the
highest intensity determines the overall brightness of the image. This method generally
produces fairly dark images if the signal-to-noise ratio is low. Using the average pixel intensity
scales all pixels equally until the average brightness equals the original bitmap image
brightness. The disadvantage to this method is that some pixels become oversaturated, and
are thus clipped at the maximum brightness that can be displayed.
Grey Scale If checked, the RGB intensities will be averaged at each detector pixel to yield a
grey scale detected image. Rays will still be traced according to the relative RGB intensities of
the source bitmap, but all color information will be lost when the detected image is displayed.
Wavelength If “RGB” is selected, then 3 wavelengths will be defined: 0.656, 0.587. and 0.486
micrometers for red green, and blue, respectively; no matter what the current wavelength
definitions are. If “1+2+3” is selected, then wavelengths 1, 2, and 3 as currently defined in the
wavelength data box will be used. If there are fewer than three system wavelengths defined,
the option “1+2+3” will revert to the “RGB” option. The red channel of the source bitmap will
be used for wavelength 3, the green channel for wavelength 2, and the blue channel for
wavelength 1. The displayed image will be in RGB format no matter what wavelengths are
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1154
defined using this option. Also note that if using this option in a system with less than 3
wavelengths defined in the wavelength data box, then the highest defined wavelength will be
used to “fill in” the remaining channels. For selection of a specific wavelength, such as 1, 2, 3,
etc... the B, G, or R channel image will be used; for wavelengths higher than 3 the R channel is
always used.
Field The source image may be centered on any defined field position. This permits a small
target such as a bar chart to be moved to any location in the field of view. The resulting image
is then centered on the chief ray coordinate of this field position.
Input The name of the BMP, JPG, or PNG source image file. This file must reside in the
<images> folder (see “Folders”).
Show Source Bitmap If checked, then the source bitmap will be drawn and no rays will be
traced. The number of rays, pixels, and pixel sizes are ignored when drawing the source
bitmap. This feature is used to check the appearance of the source bitmap and to verify
OpticStudio properly reads the bitmap file.
Output The name of the BMP, JPG, or PNG file to write the detected bitmap to. The detected
bitmap size is determined by the number of x and y pixels defined; but the pixels size must be
the same in x and y for the aspect ratio to be correct in the output bitmap file. The file name
must end in a BMP, JPG, or PNG extension, with no path name supplied. This file will be created
or overwritten without warning and will be placed in the <images> folder (see “Folders”).
Reference Selects the reference coordinate for the center of the plot, either the chief ray or the
surface vertex.
Delete Vignetted If checked, rays are not drawn if they will be vignetted by any surface.
Suppress Frame If checked, the frame is not drawn and the entire window is used to display
the image.
Remove Vignetting Factors If checked, vignetting factors are automatically removed. See
“Comment about vignetting factors”.
Apply Fixed Apertures If checked, all surfaces with optical power that have no aperture
defined are modified to have a circular aperture at the current clear semi-diameter value or
semi-diameter value. Without this change in the aperture definition, rays may pass the surface
beyond the listed clear semi-diameter or semi-diameter, especially if the Field Y Size exceeds
the field of view defined by the field points. This leads to misleading illumination, typically at
the edges of the image.
Discussion
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1155
Comments on Field Units
The Field Y Height determines the physical size of the source file as seen by the optical system.
For example, if a 50H x 100W pixel source file is used, and the Field Y Height is 2.0 mm (this
assumes the fields are defined in terms of object or image heights), then each pixel represents
a 0.040mm x 0.040mm region, and the source bitmap covers a 2.0mm high x 4.0 mm wide
area.
Note that if fields are defined by image height, then Field Y Height determines the size of the
object in image space, not object space. The Field Y Height is always in whatever units the
fields are defined in, and so when using image height as a field type the Field Y Height
determines the source bitmap height in image space. The size of the source in object space is
then determined by the Field Y Height divided by the magnification of the lens. When using
paraxial image height, the anamorphic magnification of the system (if any) will be masked in
the simulated image. When using real image height, all forms of distortion will be masked. For
this reason, this feature will automatically switch to paraxial image height for the field
definition if real image height is selected. However, it is recommended that neither real nor
paraxial image height be used. Instead, use object height, as this field type unambiguously
defines the size and orientation of the object in image space.
The rays generated by each pixel are chosen randomly from coordinates within the source
pixel cell. The entrance pupil coordinates are also chosen randomly for each ray. The
distribution of rays is uniform over the pixel, the ray distribution over the entrance pupil is
uniform unless pupil apodization is defined.
Once a ray is generated, it is traced through to the selected surface. If the ray is vignetted or an
error occurs, the ray is ignored. Otherwise, the pixel on the receiving detector that the ray
struck is determined, and the intensity of the ray is added to the detector’s bin count in the
appropriate color channel.
After all the rays are traced, an RGB image is created from the normalized counts in each
detector pixel. The percent efficiency is defined by
where the sum i is over all rays which were unvignetted, and the sum over j is over all rays
which were launched. The efficiency calculation also includes consideration of reflection and
transmission losses in the optical system if the "Use Polarization" checkbox is selected, as well
as ray errors. Rays that are beyond the extent of the detector are considered to be vignetted.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1156
This feature automatically divides the computation over all available processors for maximum
execution speed. Any symmetry in the lens is also used to speed up the ray tracing
computation. Use the "Escape" key to terminate a lengthy image analysis computation.
This feature creates an image based upon ray tracing a list of rays as the source. The rays are
defined by either a DAT or a SDF Source File (only binary format ray files are supported), as
used by the NSC Source File object described in Source File.
This feature is based strictly upon geometrical ray tracing. See the discussion for details.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1157
Input The name of the DAT or SDF source file. For a complete description of this file format
see “Source File”.
Wavelength The wavelength used to trace the rays for DAT files. The rays may either be
monochromatic, or may be based upon the defined wavelengths and weighting. If a SDF file is
used, the wavelengths specified in the SDF file are always used, regardless of the system
wavelength settings.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1158
Show As Choose Grey Scale or False Color for the intensity display. If Lumens are selected for
the units, then True Color is also a supported option.
Field The field position to place the source coordinate system at. It is the object point location
on the object surface that define the origin of the rays in the DAT or SDF input file.
X/Y Pixels The number of pixels across the X/Y direction on the detector.
X/Y Pixel Size The size in lens units of each detector pixel measured in the X/Y direction.
Reference This control defines the origin of the detector on the selected analysis surface.
Either the chief ray at the primary wavelength for the selected field, or the surface vertex may
be used to define the center of the detector.
Rotation This control rotates the entire source ray list about the +Z axis prior to tracing the
rays. The angle is in degrees, and the rotation is counterclockwise in the XY plane.
Units Choose either Watts for radiometric analysis, or Lumens for photometric analysis. Note
True Color display (for Show As) is only supported when using Lumens as the units.
Fraction Only that fraction of rays from the file will be traced. If the fraction is less than 1.0, the
rays which are traced from the file are randomly selected, though for a given fraction the
randomly selected rays will be identical from one analysis to the next. This feature is useful for
tracing a smaller number of rays than is defined in the file.
Use Polarization If checked, polarization ray tracing will be used to consider transmission.
Because no polarization data is stored in the source ray file, the polarization will be assigned
randomly.
Delete Vignetted If checked, rays are not drawn if they will be vignetted by any surface.
Suppress Frame If checked, the frame is not drawn and the entire window is used to display
the image.
Remove Vignetting Factors If checked, vignetting factors are automatically removed. See
“Comment about vignetting factors”.
Apply Fixed Apertures If checked, all surfaces with optical power that have no aperture
defined are modified to have a circular aperture at the current clear semi-diameter or semi-
diameter value. Without this change in the aperture definition, rays may pass the surface
beyond the listed clear semi-diameter or semi-diameter, especially if the Field Y Size exceeds
the field of view defined by the field points. This leads to misleading illumination, typically at
the edges of the image.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1159
Output The name of the BMP, JPG, or PNG file to write the detected bitmap to. The detected
bitmap size is determined by the number of x and y pixels defined; but the pixels size must be
the same in x and y for the aspect ratio to be correct in the output bitmap file. The file name
must end in a BMP, JPG, or PNG extension, with no path name supplied. This file will be created
or overwritten without warning and will be placed in the <images> folder (see “Folders”).
Discussion
This feature traces rays representing a complex light source through a sequential optical
system. The light source is modeled using either a flux-only DAT file, or a full spectrum SDF file,
as described in the NSC Chapter under “Source File”. Only binary format ray files are
supported.
NSC Source Files may contain rays that start at any arbitrary point in space, and may travel in
any direction, and be defined at any wavelength. This generality is not fully supported in the
sequential ray tracing paradigm, so a few assumptions are needed.
First, the specified field point on the object surface is assumed to be the origin for all rays in
the ray file, with the +Z axis of the source coordinate system parallel to the +Z axis of the
object surface. The source rays may be rotated about this origin using the Rotation angle
setting. Because the source rays may have a starting Z coordinate that is not zero, rays may
start either behind or in front of the actual object surface. It is assumed that the first surface is
far enough away from the object surface so that no rays start inside of the first or subsequent
sequential surfaces.
Second, rays that travel toward the optical system may be traced beyond the limits of the
entrance pupil. As long as the ray is traceable, the ray will continue through the sequential
system, even if the ray is beyond the normal acceptance region of the entrance pupil. This is
why it is important to use the "Apply Fixed Apertures" feature; otherwise, rays that can be
traced beyond the sequentially determined aperture size may be traced all the way to the
detector.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1160
The image analysis feature uses IMA/BIM files to describe the object to be imaged. See “The
IMA format” and “The BIM format”.
File Size The full width in lens units of the region defined by the file measured in image space.
Note IMA and BIM files are always square. This feature also supports a subset of ZBF files, see
the discussion for details.
Oversampling Sets the factor by which the file pixels are oversampled. This increases the
effective resolution of the file without the need to define a new file. If the original file has an
odd number of pixels, oversampling will make the number of pixels even because the
oversampling values are all even.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1161
Zero Padding Determines the actual size of the region to compute the diffraction image of by
adding zero intensity values around the file pixels. This increases the size of the displayed
diffraction image without changing the size of the unaberrated image; this allows study of the
energy diffracted well away from the perfect image location.
To keep the file data centered, zero padding will yield an odd number of pixels if the original
IMA file has an odd number of pixels. The number of pixels will be 2*n-1, where n is the
original number of pixels. If the original file has an odd number of pixels, the modified image
will have 2*n pixels.
Zero Padding only affects IMA and ZBF, and not BIM format files.
OTF Sampling The grid size of the sampling in the pupil; larger grids yield a more accurate
representation of the system OTF. This has no affect on the size of the diffracted image, just
the accuracy of the predicted frequency response.
Show AsChoose surface plot, contour map, grey scale, false color, cross section x, or cross
section y as the display option. For information on cross sections, see “Computing MTF using
Cross Section X/Y”.
Data TypeChoose either the incoherent image, coherent image, raw image, incoherent
transfer function, coherent transfer function, or the transform of the raw image.
For partial coherence computations, choose partially coherent image (either mostly coherent
or mostly incoherent), or partially coherent PSF or gamma. For a full discussion on partially
coherent image computations, see "Computing partially coherent images”.
See the discussion below for information about the coherent transfer function and the
limitations of this computation.
Fraction The fraction of encircled energy in the PSF and/or Gamma functions to consider when
computing partially coherent images.
Diffraction Limited If checked, aberrations are ignored. Apertures are still considered.
Field The field number indicates for which field position the optical transfer function is
computed.
File The name of the IMA, BIM, or ZBF image file. The IMA and BIM files must reside in the
<images> folder, while ZBF files must reside in the <pop> (see “Folders”).
See the discussion section for a full description of the supported file formats.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1162
Edit IMA File Pressing this button will invoke the Windows Notepad editor which allows
modification of the currently selected IMA file. BIM and ZBF files may not be edited directly.
Contour Format The contour format string. For a discussion of the contour format string
syntax, see “The Contour Format String”. The contours are defined in units of relative intensity.
Resample Image If checked, the final image will be resampled to simulate the image
recorded by a detector with finite resolution. The controls below are used to define the
resampling. This feature is only available for coherent, incoherent, raw, and partially coherent
spatial domain images.
Number X/Y The number of X and Y direction pixels to use for resampling the image.
Delta X/Y The width/height of the pixels used to resample the image. In focal mode, the Delta
values are measured in Lens Units. In afocal mode, the Delta values are measured in Afocal
Mode Units.
Decenter X/Y The X/Y decenter of the resampled detector relative to the final image. The units
are resampled delta pixels. For example, a Decenter X of +0.5 will decenter the resampling
detector one half the Delta X value to the right relative to the final image.
Output File If the input file is a ZBF file, and either a fully coherent or incoherent image is
selected for the Data Type, then the resulting complex amplitude may be saved in a ZBF file of
the name specified in this control. If the Output File name is left blank, no file is saved. No path
name should be provided, as the file will be saved in the <pop> folder (see “Folders”). To save
ZBF files, the zero pad must be set to yield a total number of pixels that is a power of 2, as this
is required for the ZBF file format.
Discussion
This feature can compute complex diffraction image properties from extended sources. The
method involved in the computation is based upon Fourier Optics, which is described in clear
and insightful detail in "Introduction to Fourier Optics" by Joseph Goodman, McGraw-Hill
1968. A more detailed treatment of coherent imaging theory may be found in "Linear Systems,
Fourier Transforms, and Optics" by Jack Gaskill, John Wiley 1978. See those references for
more information on coherent vs. incoherent imaging and other Fourier optics theory. There
are several important assumptions in the method that must be understood by the user before
this feature may be used to draw important conclusions.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1163
The file size parameter determines the full width of the input file in the image space of the
optical system. For details on the IMA format see “The IMA format”. For details on the BIM file
format see “The BIM format”. For details on the ZBF file format see “OpticStudio Beam File
(ZBF) binary format” and “OpticStudio Beam File (ZBF) text format”.
Note this feature is different from the geometric image analysis feature, where the file size
defines the size and shape in "field" space, which may be either object or image space. For this
feature, the input file defines the ideal image in image space. The data values in the IMA or
BIM file are interpreted to be in units of relative irradiance, not amplitude. The ZBF file is in
units of relative complex amplitude.
Although the IMA file is convenient for defining simple shapes, the resolution of files created
by hand is generally too low to see sufficient detail in the diffracted image. The oversampling
option remedies this problem by increasing the resolution; the number of pixels is increased,
and the data from each pixel is replicated as required to yield the same shape at higher
resolution. With an oversampling of 2X; the letter "F" file IMA image becomes a 14 x 14 grid:
00111111111100
00111111111100
00110000000000
00110000000000
00110000000000
00110000000000
00111111110000
00111111110000
00110000000000
00110000000000
00110000000000
00110000000000
00110000000000
00110000000000
Note the shape is the same, there is just twice the sampling in each direction. The width of the
image is unaffected; the pixels are half the width and there are twice as many in each direction
now.
Because the effects of diffraction tend to blur and extend the ideal image, it is desirable to
increase the size of the displayed area beyond the limits of the IMA file. This can be done with
the zero padding option. This option increases the IMA file size by adding zero intensity values
around the defined IMA file pixels. The letter "F" file would look like this with a zero padding of
2X:
0000000000000
0000000000000
0000000000000
0000111110000
0000100000000
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1164
0000100000000
0000111100000
0000100000000
0000100000000
0000100000000
0000000000000
0000000000000
0000000000000
The size and shape of the image is the same, but additional area has been defined that some
energy may now diffract into. Note the width of the new image has increased by the zero
padding factor, but the width of the "F" part of the image is the same. If the original file has an
odd number of pixels (as this sample letter F does) then the number of pixels after zero
padding will remain odd to preserve the notion of a "center" pixel. The number of total pixels is
thus 2*n-1 if n is odd, or 2*n if n is even, where n is the number of original pixels. Zero padding
is not available when using the binary IMA file format.
The oversampling and zero padding may be used together, however the array sizes quickly
become quite large. For an oversampling of 8X, a zero padding of 4X, and an original pixel size
of 12 x 12, the resulting array becomes 384 x 384, which OpticStudio internally further zero
pads up to 512 x 512 for transform purposes.
When using the ZBF file format for this feature, note that only the complex amplitude of the
unpolarized beam is considered. None of the other data in the ZBF file is relevant, including
the pilot beam data, wavelength, and pixel size. If the ZBF file has an unequal number of pixels
in each direction, the file size is the larger of the two dimensions, and zero-padding is added to
make the file square. The size of the pixels as defined in the ZBF file are not used. The ZBF file
format is only used here for convenience in specifying complex amplitude, and most of the
features specific to physical optics analysis are not used.
When performing an incoherent image analysis using a ZBF file as input, the intensity of the
data is computed by summing the squares of the real and imaginary values at each point. The
phase information is thus lost, as is correct for incoherent image formation. The resulting
image is a real valued intensity image. When performing coherent image analysis, the complex
amplitude as defined in the ZBF file is used.
Once the input image is defined, the image is transformed into frequency space, multiplied by
the OTF, and transformed back into position space. The primary assumption made by this
implementation of the Fourier method is that the OTF does not change over the extent of the
image region (to avoid this assumption see “Image Simulation”).
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1165
This means the field of view defined by the size of the image is small enough so that the OTF is
the same over all points in the image. The user must take care to be sure the image region
defined is small with respect to the rate of change of the field aberrations. OpticStudio
computes the OTF for the field point selected, and assumes this OTF is valid over the entire
region covered by the image.
Because of this assumption, distortion will not be visible in the predicted image, since only the
variation in OTF over the field will introduce distortion. To see the effects of distortion or other
"large field" effects, see “Image Simulation”.
Note that this feature is good at computing detailed image data for small images under
partially coherent light, while the Image Simulation feature is good at computing image data
for larger scale images or incoherent light.
Note for this reason, care should be taken when comparing the result to Extended Diffraction
Image Analysis. In Extended Diffraction Image Analysis, distortion could be considered with
checking the corresponded option. On the other hand, when the Field type is Real Image
Height, Extended Diffraction will use paraxial image height for the field definition even if real
image height is selected. Partially Coherent Image Analysis will not do this switch for the real
image height.
The other assumption this calculation makes is in the method used to compute the coherent
optical transfer function. The coherent optical transfer function is assumed to be the complex
pupil function:
where H is the complex OTF, di is the pupil to image distance, fx and fy are the spatial
frequencies, P is the pupil function (which determines the relative transmission over the pupil,
and is zero outside the pupil), and W is the wavefront aberration function. This approximation
is valid for a wide range of optical systems. For more information on the development of
coherent imaging theory, see the references by Gaskill or Goodman.
This feature also accounts for any vignetting at the image surface due to surface apertures
(apertures at other surfaces are accounted for via the effects of those apertures on the optical
transfer function). After the diffraction image is computed, any energy that lies outside of the
aperture defined on the image surface is eliminated. The fraction of energy within the
unvignetted portion of the image surface aperture is reported on the text version of the
analysis, if the image surface has a defined aperture.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1166
The prior discussion applies to fully incoherent or fully coherent illumination. Partially coherent
imaging is more complex. The method OpticStudio uses to model partially coherent
illumination is described in B. Saleh and M. Rabbani, "Simulation of partially coherent imagery
in the space and frequency domains and by modal expansion", Applied Optics Vol. 21, No. 15,
p2770 (1982).
The diffraction image for the partially coherent case can be described as:
image space, is the complex point spread function in image space, and the symbol *
indicates the complex conjugate. The position vector has components x and y in image
space. The function is assumed to be invariant over the entire region of the image
computed, which is the same assumption made in the fully coherent and incoherent cases.
The key difference between the fully coherent or fully incoherent illumination and partially
coherent illumination is contained with the function , which defines the degree of
coherence between any two points in the object illumination. The function is
symmetric, with a magnitude between 0 and 1 for all , For fully incoherent Imaging
for all . In either of these two extremes, the general imaging equation above
may be substantially simplified. For the partially coherent case, no easy simplification is
possible, and for this reason partially coherent computations are generally much slower than
fully coherent or incoherent cases.
To speed up the partially coherent image computation, two distinct algorithms may be
employed to solve the imaging integral above. The two algorithms are user selectable. If the
Mostly Incoherent method is selected, the algorithm assumes the function has a
spatial extent that is small compared to the width of the image being computed. If the Mostly
Coherent method is selected, the algorithm assumes the spatial extent of the function
is large, or at least comparable to the width of the image. The exact computation speed
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1167
depends upon the size and structure of both and , as well as the function
. A good rule of thumb is that if is wider than about 20% of the image, the
Mostly Coherent method is faster. Some experimenting may be required to determine the
faster method for any specific case. Both of these algorithms are multi-threaded and will
automatically use parallel execution on any number of available CPU’s for maximum
computation speed. Two different functional forms for are currently supported. The
where
Both the Mostly Coherent and Mostly Incoherent methods accelerate the computation by
assuming the various functions have a finite width that has a significant effect on the final
image. This finite width is defined by the function and by the user defined parameter called
"Fraction". This is the fraction of total energy within the functions and that is
considered significant. OpticStudio will determine the spatial dimension of significance of
these functions using the defined fraction. The closer the fraction is to unity, the slower the
computations will be. Generally, values between 0.90 and 0.96 are recommended. Values larger
than 0.96 may substantially increase the computation with little effect on the final image. Two
additional "Data Type" options are available for use with partially coherent computations. The
"Partially Coherent Test: PSF" will display the diffraction PSF (this is the intensity of the
function) used for the partially coherent image computation. The various sampling and
image width settings affect the sampling used for the PSF. Before any partially coherent image
can be considered accurate, the PSF should be computed to confirm adequate sampling of the
PSF. At least 10 points should be displayed over the width of the non-zero portion of the PSF
for adequate sampling. The data type "Partially Coherent Test: Gamma" displays the
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1168
The "Show As" option supports "Cross Section X" and "Cross Section Y" options. These options
compute the same complete diffraction image, but then plot only a single cross section across
either the columns or rows of the image, for X and Y, respectively. The intended purpose of
these cross sections is to visualize the effective MTF of the image of a bar target. The MTF can
be estimated by determining the maximum and minimum relative intensity across the cross
section. To reduce the effect of edges, the analysis parameters should be set to provide at least
5 well defined peaks across the cross section. The MTF is computed by looking for the
minimum and maximum intensity at all points between the second and second-to-last local
peaks in the intensity data. By considering only data within these two peaks, the effects of the
edges is somewhat reduced. The estimated MTF is then given by the usual computation of
(Imax-Imin)/(Imax+Imin). Finally, note that if a bar target is used the resulting MTF is the
square-wave, not sine-wave modulation.
The extended diffraction image analysis feature is similar to “Partially Coherent Image
Analysis”, except the Optical Transfer Function (OTF) may vary over the field of view of the
image and the illumination must be fully coherent or incoherent. This feature uses IMA/BIM
files to describe the object to be imaged. See “The IMA format” and “The BIM format”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1169
File SizeThe full width in lens units of the region defined by the IMA file. Note IMA files are
always square. This control does not set the size of the resulting image; that is defined by the
Display Size.
The file size parameter determines how big each pixel in the IMA file is in the image space of
the optical system. Note this is different from the geometric image analysis feature, where the
IMA file defines the size and shape in "field" space. For this analysis, the IMA file defines the
ideal image shape in image space. If the file size is 0.1 mm, then each pixel is 14.286
micrometers wide for this 7 x 7-pixel image.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1170
Oversampling Sets the factor by which the IMA file pixels are oversampled. This increases the
effective resolution of the IMA file without the need to define a new IMA file. If the original
IMA file has an odd number of pixels, oversampling will make the number of pixels even
because the oversampling values are all even.
Display Size This defines the width of the displayed image in lens units.
OTF Sampling The grid size of the sampling in the pupil; larger grids yield a more accurate
representation of the system OTF. Larger grids will also yield a larger maximum display size
(see the discussion below).
OTF Grid The grid size of the OTF computation. A denser OTF grid yields a more accurate
computation of the variation of OTF over the field of view of the image at the expense of more
memory usage and slower computation.
Resolution This multiplier yields more points in the final image while keeping the display size
fixed, at the expense of more memory usage.
Show As Choose surface plot, contour map, grey scale, or false color map as the display
option.
Data Type Choose either the incoherent image or coherent image. See “Comment about the
coherent optical transfer function” for information about the coherent transfer function and
the limitations of this computation.
Diffraction Limited If checked, aberrations are ignored. Apertures are still considered.
Use Delta Functions If checked, each pixel in the IMA file will be assumed to represent a delta
function. This is useful for checking the imaging of point sources like stars. If unchecked, the
whole pixel is assumed to be a luminous square area.
If Use Delta Functions is checked, it is very difficult to visually see the effects of aliasing in the
computation. For this reason, it is highly recommended that this option be unchecked while
setting up the file size, display size, and sampling parameters. Once the proper values for these
settings are determined, then Use Delta Functions may be checked if desired.
File The name of the image file. This file must reside in the <images> folder (see “Folders”).
See “The IMA format” and “The BIM format” for a description of file formats.
Edit IMA File Pressing this button will invoke the Windows Notepad editor which allows
modification of the currently selected IMA file. BIM files cannot be edited this way.
Field The field number indicates for which field position the image will be centered on.
Contour Format The contour format string. For a discussion of the contour format string
syntax, see “The Contour Format String”. The contours are defined in units of relative intensity.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1171
See ”Polarization (system explorer)” for information on defining the polarization state and how
polarization is used by analysis features.
Consider Distortion If checked, the real vs. paraxial ray distortion will be considered in
forming the image appearance.
Output File If a name is provided, the complex amplitude of the resulting image will be saved
in a ZBF file with the specified name. The file will be saved in the <pop> folder (see “Folders”).
See “Zemax Beam File (ZBF) binary format”.
Discussion
This feature can compute complex diffraction image properties from extended sources while
accounting for the variation in the optical transfer function (OTF) over the field of view. Most of
the discussion in “Partially Coherent Image Analysis” also applies to this feature. The
differences are described below.
denotes the convolution of A and P. Taking the Fourier transform of this equation yields the
spatial filtering perspective of the image forming process:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1172
where i, a, and o are the transforms of I, A, and P into the spatial frequency domain. The
function o is called the optical transfer function (OTF); which acts as a filter scaling the
amplitude and phase of the spatial frequency components of the image.
The Extended Diffraction Image Analysis eliminates one major assumption of the Partially
Coherent Image Analysis feature: that the OTF is constant over the field of view represented by
the function A. This is accomplished by considering the source IMA file one pixel at a time, and
computing the Fourier transform of the one pixel. The one-pixel transform is multiplied by the
OTF corresponding to that pixel. The sum over all pixels is then computed in spatial frequency
space, and finally the sum of the filtered pixel transforms is Fourier transformed back to form
the final image.
Computing the OTF for every pixel in the IMA file is slow and not practically required, as the
OTF over any reasonably small field of view does not change rapidly. As an alternative, this
feature computes a grid of OTF which spans over the field of view, and then interpolation is
used to compute the effective OTF at any single pixel. The greater the size of the OTF grid, the
more accurate the results will be, at the expense of longer computation times and more
memory usage.
This feature can require large amounts of RAM. For an OTF grid size of n x n, OpticStudio will
actually store n*n+1 OTF’s: the n*n OTF’s on the grid plus one to use as a running sum of the
image frequency components. The OTF itself is a complex value array of double precision
points. OpticStudio automatically zero pads the OTF grid to achieve accurate sampling. If the
OTF sampling is 64 x 64, a single OTF will be 128 x 128, using up 256k of RAM (128 x 128 x 2 x 8
bytes). For an OTF grid of 5 x 5, the total comes to 26*256k = 6.5 Mb. For 128 x 128 sampling
and a9 x 9 grid, the RAM required is 82 Mb.
Note when the Field type is Real Image Height, this feature will use paraxial image height for
the field definition even if real image height is selected. See discussions in Image Simulation.
For this reason, care should be taken when comparing the result to Partially Coherent Image
Analysis.
Relative Illumination
The Relative Illumination analysis computes the relative illumination as a function of radial field
coordinate for a uniform Lambertian scene. This feature also computes the Effective F/#.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1173
Ray Density The number of Rays on one side of an array of rays used to integrate the
illumination of the exit pupil. A value of 10 will trace about 10 x 10 x pi / 4 or 78 rays. Higher ray
densities yield more accurate results at the expense of longer computation times. The Ray
Density minimum value is 5.
Field Density The number of points along the radial field coordinate to compute the relative
illumination for. Larger field densities yield smoother curves.
Remove Vignetting Factors If checked, vignetting factors are automatically removed. See
“Comment about vignetting factors” in the description of “FFT MTF vs. Field”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1174
Wavelength Selects the wavelength for computation. Relative illumination is a
monochromatic entity.
Log Scale If checked, a logarithmic rather than linear scale will be shown.
Discussion
This feature computes the relative illumination (RI) as a function of radial y field coordinate. RI
is defined as the intensity of illumination per unit area of image surface normalized to the
illumination at the point in the field that has maximum illumination (which may not be on axis).
The computation considers apodization, vignetting, apertures, aberrations of both the image
and pupil, variations in F/#, chromatic aberrations, image surface shape, angle of incidence,
and optionally, polarization effects assuming unpolarized light. The method is based upon one
described in M. Rimmer, "Relative illumination calculations", Proc. SPIE Vol. 655, p99 (1986).
The published method was extended to include apodization, transmission, polarization, and
non-planar image surface effects. The computation method assumes the following are all true:
The relative illumination is computed by integration of the effective area of the exit pupil as
seen from the image point(s). The integration is carried out in direction cosine space using a
uniform grid in image cosine space.
Note that the RI computation will not in general yield a cosine-fourth curve, because the so-
called cosine-fourth "law" is actually an approximation based upon a thin, slow, aberration free
lens with the stop at the lens. For more general lenses, including telecentric, aberrated, or
vignetted lenses, the RI can be computed using an integration of the projected solid angle or
effective area of the exit pupil as seen from the image location, and this computation will not
yield a simple cosine-fourth curve. If a system violates the assumptions of the computation an
error message will be displayed and the RI will not be computed.
Effective F/#
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1175
The text listing of the relative illumination data also includes data for the Effective F/#. The
Effective F/# is the F/# required for a perfect optical system with 100% transmission and a
circular exit pupil to have the same image illumination as the system being evaluated. The
Effective F/# is computed by:
where A is the area of the projected solid angle of the pupil in cosine space weighted for
system transmission. The Effective F/# is a useful metric for comparing the brightness of the
image formed by different optical systems, because it accounts for RI and is independent of
the aperture shape. For more information, see "F-Number and the radiometry of image
forming optical systems with non-circular aperture stops," R. Siew, Proc. of SPIE Vol. 5867
(2005).
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1176
File The name of the .IMA or .BIM image file. This file must reside in the <images> folder (see
“Folders”). See the discussion section for a full description of the IMA and BIM file formats.
Show Choose surface plot, contour map, grey scale, or false color map as the display option.
Color If the selected file is a binary IMA, this control will select the color channel to display.
Edit IMA File Pressing this button will invoke the Windows Notepad editor which allows
modification of the currently selected IMA file. This button is disabled if the file type is BIM.
Discussion All input values are normalized to a relative intensity of 1.0 for display purposes.
See “Geometric Image Analysis” for a discussion of IMA/BIM files.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1177
This feature displays JPG, BMP, and PNG format image files without any processing.
File The name of the BMP, JPG or PNG image file. This file must reside in the <images> folder
(see “Folders” ).
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1178
The Laser and Fibers Group contains three different modes to propagate lasers. Here is a very
simplified summary:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1179
The Gaussian beam parameters are calculated upon paraxial ray data, assuming rotationally
symmetric system. Aberrations and coordinate breaks are ignored.
This feature propagates an arbitrary coherent optical beam through the optical system. For a
complete description of this feature see “About Physical Optics Propagation”
The Physical Optics Propagation feature results are generally not accurate for systems
including non-sequential component groups; see “Propagating through non-sequential
surfaces” for more information. For the most accurate results, replace non-sequential
component groups with sequential equivalents.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1180
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1181
General Tab
Start Surface The starting surface for the initial beam. The beam will begin in the optical space
just prior to the starting surface.
The entrance pupil may be used as the starting surface. If the system is telecentric in object
space, then surface 1 will be used as the starting surface even if the entrance pupil is selected.
End Surface The surface at which to terminate the propagation. The beam will stop just after
entering the optical space of the end surface.
Field The field number of the chief ray used to align the initial beam.
Surf to Beam The distance from the starting surface to the starting beam position in lens
units. This value is negative if the beam starts to the left of the surface.
Use Polarization If checked, 2 beam arrays will be propagated, one each for the X and Y
polarizations of the beam. If the Initial Beam is defined by a .ZBF file, then the polarization
details will always be set based on the information saved in the file. If “Unpolarized” is selected
in the System Explorer under ” Polarization (system explorer)” and Use Polarization is checked,
then 2 beams with orthogonal polarization are propagated and the output is averaged.
Because these 2 beams cannot be coherently summed, any complex field data for the output
(i.e. real, imaginary, or phase data) will be set to zero.
Separate X, Y If checked, the X and Y directions are propagated independently. This allows
much more efficient sampling if the beam is astigmatic or the optics are cylindrical or toroidal.
See "Separation of X and Y Propagation". Note this option must be checked when calculating
M-squared value for asymmetric beams. See “Beam with and M-squared”.
Use Disk Storage To Save Memory See “Memory requirements” for a discussion.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1182
Beam Definition Tab
X- Y- Width The initial width in lens units of the region represented by the array. See Auto
below.
Auto Pressing this button will calculate the optimum X- and Y- Width values to maintain the
approximately the same number of pixels across the beam both within and outside the
Rayleigh range. See “Comments about point spacing and sampling”.
Peak Irradiance The initial beam peak irradiance in power per area. This is an alternative to
Total Power.
Total Power The initial beam total power. This is an alternative to Peak Irradiance.
Read power from file If the beam type is File, pressing this button will read the current power
and peak irradiance values from the selected file.
Parameters Different initial beam types require various parameters to define the distribution.
These parameter names and values will change depending upon the beam type setting. For
details, see “Defining the initial beam”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1183
Display Tab
Show As Choose surface, contour, false color, grey scale, cross sections, encircled, ensquared,
or enslitted displays. Note that the encircled energy is a function of radius; and the ensquared
and enslitted widths are the half widths.
Row/Column If cross section is chosen for Show As, this control selects the row or column to
view.
Data Choose irradiance (beam power per area), phase (of the beam), transfer function
intensity, or transfer function phase. The Ex and Ey refer to the X and Y polarization
components of the beam. The transfer function values are the intensity and phase of
transmission for the final surface only; these are primarily used for debugging and analysis of
the POP results. For the phase data setting, the “phase” is always the EX phase, even in cases
when the energy in the beam is only in the Y direction.
The data may be viewed graphically, or as text. Select the Graph or Text tab at the bottom of
the analysis to change views. In addition to the Graph and Text output, a Prop Report
(propagation report) is also available. The propagation report lists various data about the
propagation algorithm parameters used, the orientation matrix for the pop results, and may
contain warnings that indicate if a possible inaccuracy is detected in the results.
Scale Choose linear or logarithmic scaling of the data. Logarithmic scaling only applies to
irradiance data on graphical (not text) displays.
Project The beam may be viewed from any one of these perspectives: along the beam (this is
along the chief ray used by the pilot beam), along the surface normal, or along the local Z axis
of the surface. Note ZBF beam file data is always "along the beam". See the comments about
beam projection below.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1184
Save Output Beam To If checked and a file name is provided, the complex amplitude of the
beam at the end surface will be written to a file. This file can be read back in as a starting beam
using the Beam Type control. OpticStudio will add the extension "ZBF" to the provided file
name. ZBF files are stored in the <pop> folder (see “Folders”).
Save Beam At All Surfaces If checked, the beam file will be saved at every surface from the
start surface to the end surface that uses the physical optics propagator. The "Save Output
Beam To" option must also be checked and a file name provided. The individual surface beam
files will be named according to the provided file name, with a suffix indicating the surface
number.
If “Use Polarization” has been selected under the General Tab and the input beam is
unpolarized (i.e. no specific polarization state has been provided in the ” Polarization (system
explorer)” input of the System Explorer), then individual surface beam files will be provided for
each of two orthogonal beams that are propagated to model the unpolarized beam, and an
additional suffix will be added to the file name to differentiate between the two beams.
For example, if the output file name is "MyBeamData.ZBF", then the beam file name for surface
12 will be "MyBeamData_0012.ZBF" if either “Use Polarization” has not been selected, or if “Use
Polarization” has been selected but the input polarization state has also been specified in the
System Explorer. If “Use Polarization” has been selected and no specific polarization state has
been specified in the System Explorer, then in the above case two files would be generated on
surface 12, named “MyBeamData_0012_1.ZBF” and “MyBeamData_0012_2.ZBF”. ZBF files are
stored in the <pop> folder (see Folders).
Zero Phase For Relative Irradiance Below Phase values are meaningless if the irradiance is
extremely low. Computing the phase angle of data points with nearly zero irradiance (relative
to the peak irradiance in the beam) will result in noisy plots and text listing of meaningless
data. This value sets the lower limit on the relative irradiance of data points for which the phase
is computed. Data points with relative irradiance lower than this threshold will have a phase
value of zero.
Plot Scale If zero, the vertical scale on false color, grey scale, and cross section plots will be set
by the maximum data value, or for log plots, the next largest power of 10. Otherwise, the
maximum vertical scale is set by the normalization value. If a log plot is generated, the
maximum scale is set by the next largest power of 10 greater than the plot scale value.
Contour Format The contour format string. For a discussion of the contour format string
syntax, see “The Contour Format String” . The contours are defined in the same units as the
data being displayed.
Zoom In Magnifies the displayed area of the beam. This is useful for eliminating some of the
guard band from the displayed beam data.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1185
Fiber Data Tab
Compute Fiber Coupling Integral If checked, the fiber data on this tab will be used and the
fiber coupling computed; otherwise, no fiber coupling computations will be performed. See
“Computing Fiber Coupling”.
Ignore Polarization If checked, the fiber mode will be unpolarized even if the beam itself is
polarized. If unchecked and the beam is polarized, then the fiber coupling overlap integral is
computed for the two orthogonal polarizations independently and the results combined to
yield the overall coupling. See “Defining the fiber mode”.
Tilt About X/Y (deg) The tilt about each axis in degrees of the fiber mode with respect to the
beam. The phase of the fiber mode will be modified with a linear tilt proportional to the tilt
angles.
Fiber Type Selects the mode for the fiber. See “Computing Fiber Coupling”.
File Selects the name of the DLL or data file describing the fiber mode. See “Computing Fiber
Coupling”.
Parameters Different fiber mode types require various parameters to define the mode. These
parameter names and values will change depending upon the fiber type setting.
Fiber Position The center of the receiving fiber may be referenced to the surface vertex or to
the chief ray. The incoming POP beam is referenced to the chief ray position and angle.
Discussion
For a full discussion of physical optics propagation, see ”About Physical Optics Propagation”
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1186
The analysis computes the beam irradiance or phase on a plane tangent to the chief ray at the
point where the chief ray intercepts the surface. The orientation matrix of the plane may be
determined from the propagation report. The irradiance or phase data is shown after the beam
refracts into, or reflects from, the end surface. The chief ray representing the center of the
beam will generally intercept the surface at some angle of incidence other than zero, and the
surface normal will generally be at some angle to the local Z axis. Using the "project" option on
the "display" tab, the beam data may be viewed along the beam, along the surface normal, or
along the local Z axis. The latter two options are implemented by elongating the beam along
the local X and Y directions in an independent manner based on the cosine of the angle
between the beam and the desired projection.
The beam itself is always represented by the data array in a coordinate system normal to the
chief ray. For this reason, the beam projected onto a surface by this feature may be elongated
compared to the same beam stored as a file and viewed with the Beam File Viewer, see “Beam
File Viewer”.
Beams in OpticStudio are always centered on the chief ray for the selected field and
wavelength. Therefore, the data in the beam file is positioned relative to the chief ray.
The center point in the beam file is at the coordinate (nx/2+1, ny/2+1).
l Display X Width/ Y Height: The width and height of the beam array in lens units at the
end surface.
l Peak Irradiance: The maximum irradiance in power per area. To set the power and area
units see “Units”
l Total Power: The total power in the beam. To set the power units see “Units”.
l Pilot Beam Data: The Pilot Beam data includes the radial beam size, beam waist, pos-
ition, and Rayleigh range. For detailed information on the Pilot Beam see “The pilot
beam”.
l Beam Width: The X, Y beam width calculated using second moment method. See
“Beam width and M-squared”.
l Fiber Coupling: If "Compute Fiber Coupling Integral" is checked, then the fiber coupling
is computed and displayed. The system efficiency is the fraction of beam power that
transmits from the starting surface to the surface at which the fiber coupling is com-
puted. The receiver efficiency is the fraction of the power in the beam mode that
couples into the fiber mode. The total coupling efficiency is the product of these two
numbers. For more information, see ” Computing Fiber Coupling”
The highest X- and Y-Sampling allowed for the beam in the OpticStudio user interface is
16,384. Higher sampling support is available via the ZOS-API however, up to a maximum of
1,073,741,824 by 1,073,741,824 pixels (available RAM permitting). For more information see
‘RunHighSamplingPOP’ on the I_Analyses interface in the ZOS-API Syntax Help.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1187
Orientation matrix in Prop report
This is how we calculate the orientation matrix listed in prop report.
The rotation matrix in the POP is composed by x, y, k as column vectors. Note the vectors x, y, k
should be relative to local coordinate of the surface. When calculating the rotation matrix
before surface n, you should use x(n-1), y(n-1), k(n-1), but relative to the local coordinate of
surface n.
Physical optics propagation is complex, and the user is urged to read and understand
this section before using the feature.
Geometrical optics is the modeling of optical systems by tracing rays. Rays are imaginary lines
which represent normals to the surfaces of constant phase, called the wavefront. Either rays or
wavefronts can be used to represent a beam. However, rays and wavefronts are propagated
differently. Rays propagate along straight lines without interfering with one another,
wavefronts propagate while coherently interfering with themselves. For this reason, the ray
model and the wavefront model yield different representations of the beam as it propagates
through free space or through optical components. The ray method is fast, flexible, and
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1188
extremely useful for modeling almost any optical system. However, rays are not well suited to
modeling certain important effects, primarily diffraction.
OpticStudio does have some ray based diffraction computations, such as the diffraction MTF
or PSF. These diffraction computations make a simplifying approximation: that all the
important diffraction effects occur going from the exit pupil to the image. This is sometimes
called the “single step” approximation. Rays are used to propagate the beam from the object,
through all the optics and intervening spaces, all the way to the exit pupil in image space. The
ray distribution in the exit pupil, with transmitted amplitude and accumulated OPD used to
compute the phase, is used to form a complex amplitude wavefront. Then, in a single step, a
diffraction computation is used to propagate this complex amplitude wavefront to the region
near focus.
Geometrical optics and the single step approximation work quite well for the majority of
traditional optical designs, where the beam is not near focus anywhere except the final image.
However, the model breaks down for several important cases:
l When the beam comes to an intermediate focus, especially near optics that truncate
the beam (rays by themselves do not predict the correct distribution near focus).
l When the diffraction effects far from focus are of interest (rays remain uniform in amp-
litude and phase, wavefronts develop amplitude and phase structure).
l When the propagation length is long and the beam is nearly collimated (collimated
rays will remain collimated over any distance, real beams diffract and spread).
Physical optics is the modeling of optical systems by propagating wavefronts. The beam is
represented by an array of discretely sampled points, analogous to the discrete sampling using
rays for a geometric optics analysis. The entire array is then propagated through the free space
between optical surfaces. At each optical surface, a transfer function is computed which
transfers the beam from one side of the optical surface to the other. The physical optics model
allows very detailed study of arbitrary coherent optical beams, including:
l Gaussian or higher order multi-mode laser beams of any form (beams are user defin-
able).
l Beams may be propagated along any arbitrary field position (skew beams).
l Amplitude, phase, and intensity may be computed at any surface in the optical system.
l Effects of finite lens apertures, including spatial filtering, may be modeled.
l Accurate computation of propagation through any optical component OpticStudio can
model via ray tracing, including lens system using Composite Surfaces.
The physical optics model is generally more accurate at predicting the detailed amplitude and
phase structure of the beam away from focus than conventional ray tracing. However, there
are some disadvantages to the physical optics propagation analysis:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1189
l The sampling limits the amount of aberration in the beam that can be accurately
modeled. For highly aberrated systems, geometrical optics should be used.
The following sections will summarize the physical optics propagation algorithms and the
information needed to properly use this advanced OpticStudio feature.
The physical optics propagation routines in OpticStudio are designed to work on multiple CPU
computers. Computers with two or more CPU’s will execute the physical optics propagation
feature faster than single CPU computers.
Diffraction Propagation
The theory and methodology of diffraction propagation is well understood and widely detailed
in available literature.
Goodman, Joseph W., Introduction to Fourier Optics, McGraw-Hill, New York (1968).
Lawrence, George N. "Optical Modeling", in Applied Optics and Optical Engineering, Volume
11, R. R. Shannon and J. C. Wyant, eds., Academic, New York (1992).
Only the material relevant to using the physical optics propagation feature in OpticStudio will
be summarized here.
where the E values are all complex and , and are the Cartesian Unit Vectors. The
coordinate system used by OpticStudio is that the beam propagates primarily down a local Z
axis. The Z axis used to represent the beam is aligned with a reference chief ray in each optical
space, and therefore this Z axis is not generally the same as the Z axis defined by the Lens Data
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1190
Editor which is used to position optics. Because the beam is propagating along the local Z
direction, the first approximation made is to neglect the Ez component. Since the electric field
must always be normal to the ray propagation direction, Ez can be reconstructed from other
data when required, as will be described later.
By keeping track of the electric field components along both the X and Y axes, effects due to
polarization may be studied, such as transmission and reflection losses, polarization
aberrations, and of course the polarization state of the beam. If polarization effects are not
required, the Y component of the field may be ignored, speeding the computations.
A very useful concept in physical optics modeling is the Fresnel number. Strictly speaking, the
definition of the Fresnel number only applies to unaberrated rotationally symmetric beams
with a finite extent.
However, the concept is still useful in cases that do not meet these criteria. The Fresnel number
depends upon the diameter of the beam, the radius of curvature of the wavefront phase, and
the distance to an observation point where the complex amplitude of the field is desired.
Conceptually the Fresnel number is the number of annular "Fresnel zones" from the center of
the beam to the edge. Fresnel zones are the radial zones where the phase as seen from the
observation point changes by π.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1191
Where A is the radial size of the beam and Z is the distance from the beam to the observation
point. The Fresnel number becomes small as Z grows large.
For beams that are not collimated, the concept is the same. A converging beam will have a very
small Fresnel number if the observation point is near focus. A perfectly spherical beam
converging to focus will have a Fresnel number of zero, since there are no zones where the
observed phase reaches π. As the observation point moves from the focal region, the Fresnel
number increases.
If the Fresnel number is small, less than roughly 1, then the beam at the observation point is
said to be in the "far field" relative to the current beam. For Fresnel numbers larger than 1, the
beam at the observation point is said to be in the "near field" relative to the current beam.
It is important to consider the terms near and far as being relative to the propagation from the
present location of the beam to the observation point at which the Fresnel number is
computed, rather than having any rigid relationship to the beam position alone. For example, a
beam in the exit pupil of an optical system is typically called the near field because the far field
is at focus. However, a short propagation from focus to a slightly out of focus observation
point is likely a near field propagation if the defocus is small.
The decision as to whether propagation is in the near or far field will determine the choice of
diffraction propagation methods.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1192
This normal vector has direction cosines α, β, and γ, where α2 + β2 + γ2 = 1
Now recall the definition of the Fourier transform and the inverse Fourier transform:
Let G = FF [E], that is, G is the Fourier spectrum representation of the electric field E. By
definition then
The electric field can therefore be interpreted as being the integral of a collection of plane
waves propagating with direction cosines
Eliminating γ, and making the approximation that the plane wave propagates at a small angle
with respect to the Z axis (for more information see Algorithm Assumptions), the plane wave
equation can be rewritten
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1193
The term is just a phase propagation term that is normally neglected. The term
which depends upon α and β is the transfer function for a plane wave in free space. Defining
To propagate an electric field from one plane to another, the field needs to be Fourier
transformed, the plane wave propagator applied, and then the resulting distribution inverse
Fourier transformed. These operations may be summarized by defining the plane to plane
(PTP) operator:
Where
And
Note that the transfer function T(Δz) has unity amplitude but a complex phase. This phase
varies slowly from
point to point in the frequency domain representation G if λΔzρ2 is small. But if λΔzρ2 grows
large, the phase variations become increasingly rapid. If the phase changes by more than
about between adjacent points in the finite array, the phase becomes ambiguous, and a
phenomenon known as aliasing occurs. For this reason, the angular spectrum method works
very well if the propagation distances are fairly short or if the beam is nearly collimated.
Although the diffraction theory is accurate for any propagation distance, when the beam is
represented by a finite sized array of discrete points, the phase of the beam cannot be
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1194
accurately represented if the phase of the angular spectrum propagator changes too rapidly
between points.
When using the angular spectrum propagator, the phase of the electric field is measured
relative to a plane. Positive phase indicates the wavefront is advanced along the local +z axis
relative to the plane, regardless of the direction of propagation.
The angular spectrum propagator is useful when the Fresnel number is large. This includes the
important case of propagating a beam a short distance. However, the angular spectrum
propagator also works well for propagating a large distance when the divergence of the beam
(and thus ρ ) is small. A good rule of thumb to use is that if the beam does not change size
significantly, the angular spectrum propagator may be used. To propagate beams with small
Fresnel numbers, where the beam will change size significantly, requires a separate theoretical
and numerical method.
Fresnel Diffraction
For small Fresnel numbers, the appropriate theory is Fresnel diffraction. For a complete
discussion and derivation, see the Goodman reference given in the introduction. The key
assumptions in Fresnel theory require that the field being computed is not too close to the
initial field, namely, if z2 – z1 = Δz , then Δz is large compared to the region over which the
field at z2 is to be determined. Another way of saying this is that the beam cannot diverge too
quickly; very fast F/# beams cannot be accurately modeled with Fresnel diffraction theory (for
more information on these approximations search the help files for “Algorithm assumptions”).
Where
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1195
Each of the terms in the above expression has a useful physical interpretation. The leading
term indicates that as the beam propagates, the phase changes along the z axis, just like the
plane wave described earlier. The amplitude also decreases linearly with distance, or the
intensity (E*E) falls quadratic ally.
The expression for q( r, Δz ) , called the quadratic phase factor, indicates that the phase is
referenced to a sphere of radius Δz (strictly speaking it is a parabola, but we have already
assumed in the Fresnel development that r2 « Δz ).
This is a very useful property; all that is required in the representation of the electric field is the
phase difference relative to the reference sphere. This significantly reduces the number of
sample points needed to accurately define the phase of the beam. When using the Fresnel
propagator, the phase of the electric field is measured relative to a reference sphere with a
radius equal to that of the distance from the beam waist. This is not the same radius as the
phase radius of curvature of the Gaussian beam. Positive phase indicates the wavefront is
advanced along the local +z axis relative to the reference sphere, regardless of the direction of
propagation.
This is the opposite of the T(Δz) operator, which varies rapidly in phase as Δz gets larger.
Fraunhofer Diffraction
Consider the Fresnel diffraction expression. If Δz is very large, then q( r, Δz ) may be neglected.
This yields the Fraunhofer diffraction expression, which is
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1196
Or
where phase and amplitude factors are omitted. The far field distribution is just a scaled
version of the Fourier transform of the near field distribution. Fraunhofer diffraction is only
valid if the Fresnel number is nearly zero.
The ray based diffraction features in OpticStudio, such as the diffraction MTF and PSF assume
Fraunhofer diffraction. This is why OpticStudio cannot compute the ray based diffraction MTF
or PSF if the beam is too much out of focus. The Fraunhofer assumption is never used by the
physical optics propagation algorithm in OpticStudio, it is presented here for completeness.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1197
The phase radius of curvature of the beam is a function of the distance from the beam waist, z:
For example, the axial phase is π/4 at a distance of plus one Rayleigh range. The beam size is
also a function of the distance from the waist:
Note for large distances the beam size expands linearly. The divergence angle of the beam is
given by
Now consider the problem of numerically representing this beam by a discrete sampling of
points. If a constant spacing between points is used, the beam will expand beyond the edges
of the array if the propagation proceeds too far from the waist. Therefore, far from the waist, a
linearly expanding coordinate system where the point spacing is proportional to z is best.
However, near the waist, the beam size does not decrease to zero, but remains reasonably
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1198
constant. In this domain, a constant sampling is most convenient. The compromise sampling
system is to use a constant spacing near the waist, and a linearly scaled spacing far from the
waist.
The diffraction theory developed earlier did not assume any particular shape or form to the
electric field being propagated. The algorithms are for the most part independent of the field
distribution. However, the problem of sampling remains. It is also impractical to compute (or
even define) Fresnel numbers for arbitrary, aberrated beams with irregular or non-existent
apertures.
For this reason, a pilot beam is used to assist the physical optics propagation algorithm in
determining which propagation algorithm to select. The pilot beam is an ideal Gaussian beam,
with a waist, beam size, phase radius, and relative z position. The initial parameters may be
generated by fitting the Gaussian beam equations to the initial distribution. The pilot beam is
then propagated from surface to surface. At each surface, new beam parameters, such as the
new waist, phase radius, or position are computed. The properties of the pilot beam are then
used to determine if the actual distribution is inside or outside the Rayleigh range, and what
propagation algorithms are appropriate.
After passing through an aperture that significantly truncates the beam, such as a pinhole
aperture, it may be required to recompute the pilot beam parameters, as described later in this
help file.
Although the pilot beam is an ideal Gaussian beam, it is different from the Paraxial Gaussian
Beam tool. The pilot beam are propagated by real rays, which are called probing rays. More
details about probing rays are described in "Propagation Through Arbitrary Optical Surfaces".
Using probing rays accounts for all situations namely when propagating through non-ideal
optics.
On the other hand, Paraxial Gaussian Beam uses only paraxial data when propagating beams.
For this reason, the pilot beam will give slightly different result compared to the Paraxial
Gaussian Beam. The difference can happen even in a refraction-free air propagation, where the
slopes of these real rays differ very slightly from the paraxial rays that are absolutely linear. The
difference becomes large when the beam is fast. See "Algorithm Assumptions" for limitations
for the fast beam.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1199
It is very important to understand the phase sign conventions when constructing beams using
DLL files, beam files, or when performing fiber coupling calculations where phase matching is
critical.
As shown in the previous sections, the angular spectrum propagator works best when the
beam is nearly collimated, while the Fresnel theory works best when the beam is diverging.
When using the angular spectrum propagator, the phase of the electric field is referenced to a
plane.
Once the beam propagates past the Rayleigh range, the Fresnel propagator is used, and the
phase of the electric field is referenced to a sphere whose radius is the distance from the beam
waist to the current position of the pilot beam.
The sign of the phase is positive if the wavefront is to the "right" of the reference surface, with
"right" being towards the positive local Z axis direction. For a beam propagated to the +z side
just inside the Rayleigh range, the phase slope is negative be- cause the wavefront is left of the
reference plane. Just outside of the Rayleigh range, the phase slope is positive because the
wavefront is now to the right of the reference sphere.
Therefore, the slope of the phase of the electric field will "flip" from negative to positive when
cross- ing from inside to outside the Rayleigh range on the +z side.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1200
For example, consider a Gaussian beam. At the waist, the phase is zero everywhere on the
reference plane. If the beam is propagated to just inside the Rayleigh range on the positive
side of the waist, the phase at the center of the beam will change to π/4 radians, this is the
Gouy shift given by . The phase radius of curvature of the beam will
become twice the Rayleigh range distance. The wavefront phase will be increasingly negative
relative to the center of the wavefront as the radial aperture is increased, because the curved
wavefront phase is measured relative to a plane.
If the beam now propagates a small distance so the pilot beam is now just on the far side of
the Rayleigh range, the phase will remain π/4 radians at the center but will now be referenced
to a sphere whose radius is the distance to the waist, which is the Rayleigh range for this case.
Because the radius of the reference sphere is smaller than the curvature of the wavefront, the
slope of the phase of the beam will now "flip" to be increasingly positive with radial aperture.
Finally, as the beam propagates further past the Rayleigh range, the phase relative to the
reference sphere will tend toward a constant value of π/2 radians (the limiting value of the
Gouy shift).
The two representations of the beam are equivalent, however care must be taken to account
for the proper phase reference surface when constructing or comparing different beams.
It has already been shown that short propagations are well modeled using the PTP operator.
This operator has the property that the sample spacing remains constant.
It is most convenient to use the Fresnel propagator when the beam is already at the waist of
the pilot beam, and the field is desired far from the waist relative to a reference sphere. For this
reason, the Fresnel propagator is redefined as the waist to sphere (WTS) operator:
Where
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1201
where nx and ny are the number of points in the x and y directions of the array. The last two
expressions yield the new linearly scaled sample spacings after application of the operator.
Reversing the order of operations results in the sphere to waist (STW) operator:
with a similar change in the sample spacing. There are four possible general propagation cases
to consider:
All these cases can be handled with the appropriate combination of the PTP, WTS, and STW
operators:
where z0 is the pilot beam waist position, z1 is the starting beam position, and z2 is the end
beam position.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1202
selecting the “Separate X, Y” option in the General Tab of the Physical Optics Propagation
analysis window settings.
If the propagation in X and Y is separated, then there will be two pilot beams; one each for the
X and Y direction. The phase references will also be distinct in the X and Y directions. In place
of a spherical reference surface, a "bispherical" surface is used instead. The sag of a bispherical
surface is given by:
Where
The pilot beam, including beam phase radius, waist, position, Rayleigh Range, divergence, are
all distinct in the X and Y directions. There is a small amount of additional computational
overhead in propagating the X and Y portions of the beam independently, and so this option
should only be used when required.
Note when "Separate X, Y" is selected, POP will maintain separate phase references for the X-
and Y-directions. This usually improves the accuracy when the beam has significant
asymmetry. There are no separate grids generated for real beam propagation when this option
is selected; however, the point spacing in X- and Y-directions in the grid will vary
independently during the propagation.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1203
across the beam size. Conversely, if the array size is small at the waist, the array size will grow
large compared to the beam far from the waist, leaving few sample points to represent the
beam. Please see "Suggestions for Use" for comments about issues that can arise if the
sampling grid is too big or small with respect to the beam width. This inverse relationship is a
necessary but frequently inconvenient product of the Fourier transform theory used to model
the diffraction. The exact equations describing the change in point spacing are given in the
previous section.
There is clearly a tradeoff between good sampling of the beam near the waist and good
sampling far from the waist. It can be shown that to achieve approximately uniform sampling
relative to the beam size at both the waist and far from the beam waist the array size at the
beam waist in the X and Y directions should be
The physical optics analysis feature settings include an “Auto” button which will use this
formula to set a suggested initial array width.
For an in-depth discussion of Physical Optics Propagation, see About Physical Optics
Propagation.
To avoid this problem, the properties of the pilot beam are used to generate a set of rays that
represent the wavefront incident upon the surface. This set of rays, called the probing rays, is
then traced through the optical surface using conventional geometric optics. The path length
of each ray, and the positional and angular aberrations generated, are then used to reconstruct
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1204
the pilot beam and complex amplitude after the surface. The probing ray set is used to
generate the transfer through the surface.
l The effective power of the surface with respect to the pilot beam. The direction of the
beam after leaving the surface.
l The polarization phase and amplitude transmission of a surface.
l The vignetting of the surface with any supported surface apertures (or ray errors). Note
that surfaces without hard apertures defined will pass the entire beam without vign-
etting, independent of how the system aperture is set.
l The phase aberrations.
l The anamorphic and non-linear stretching and compression (distortion) of the beam.
The probing ray method can be applied to propagation through a single surface, or multiple
surfaces at once. This is a very desirable property, because geometrical optics may be used to
propagate through whole optical components that would be difficult to model with physical
optics propagation. These include highly tilted surfaces and gradient index lenses, to name a
few. Propagating through multiple surfaces at once using rays also speeds up the analysis.
Some special surfaces, such as the ABCD matrix surface, and some types of Fresnel surfaces, do
not allow POP analysis at all because there is no way to compute the effective phase of these
surface types. A warning is issued by OpticStudio if the POP analysis cannot proceed due to
the presence of these special surface types.
Note: Do not apply a thickness value of zero to your materials in the Physical Optics
Propagation system as it will produce an inaccurate POP calculation.
There are a limited number of cases where POP can be used to propagate a beam through a
NSC surface with reasonable confidence in the results. These include:
-Prisms with an effectively sequential path and apertures large compared to the beam.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1205
Even in these cases, POP can only use ray tracing to model the effective phase the NSC surface
imparts to the beam. Diffraction propagation is not possible. For this reason, only relatively
slow beams propagating through thin NSC surfaces should be used. Always check the POP
results carefully before having confidence in results of propagation through NSC surfaces.
OpticStudio assumes the Ex and Ey portions of the field account for all the energy in the beam
at any given array point. However, the Ez component is required for polarization ray tracing.
OpticStudio recreates the Ez as needed by applying the condition that E must be perpendicular
to the propagation vector k. The vector k is computed from the pilot beam properties and the
phase errors present on the beam. The Ex and Ey fields are renormalized to account for the
correct beam intensity. After polarization propagation, the Ex and Ey components are
renormal- ized to again hold the energy present in the Ez component, which is then discarded.
Memory Requirements
Geometric optics ray tracing generally requires very little RAM, because each ray may be
traced from object to image, independently of all other rays. Physical optics is far more
demanding, because the entire beam must be stored at once. OpticStudio uses 8 byte “double
precision” floating point numbers to store the beam data. There are actually 16 bytes per array
position because the electric field amplitude is a complex number. Here are some guidelines
for how much RAM is required for various parts of the propagation algorithm:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1206
For example, propagating a 2048 x 2048 unpolarized beam through normal refractive surfaces
will require about 288 Mb. OpticStudio currently supports a minimum array size of 32 x 32 and
a maximum array size of 8192 x 8192 for 32-bit versions of OpticStudio and 16,384 x 16,384 for
64-bit versions of OpticStudio. OpticStudio requires the sampling to be an integral power of 2;
for example, 32, 64, 128, 256, etc.
If not enough RAM is available, the local hard disk drive may be used for temporary storage. If
the option “Use Disk Storage To Save Memory” is checked, OpticStudio will store the surface
transfer array (at 56 bytes per grid point) in a temporary file. Although this saves a substantial
amount of RAM, the analysis is much slower. Typically, using the disk storage option will slow
the analysis by a factor of 10 to 20. If the computer does not have sufficient RAM, it may
automatically “page” to the hard disk. This will allow the computation to proceed, but at a rate
hundreds or even thousands of times slower than if sufficient RAM were available.
32-bit versions of Windows do not allow OpticStudio to allocate more than 3.0 Gb of RAM, and
in many cases, the actual limit is much lower depending upon how much actual RAM the
computer has. This limit is imposed by Windows, and not OpticStudio. Both OpticStudio and
Windows are available as 64-bit versions, and these versions allow use of memory well beyond
3.0 Gb. For complex POP calculations, use of 64-bit Windows and OpticStudio is strongly
recommended.
The X- and Y-Sampling determine the number of points used to sample the beam. Larger
values are generally more accurate at the expense of longer computation times and larger
RAM requirements.
The X- and Y-Width are measured in lens units. The larger the width, the more empty space
around the portion of the beam with non-zero intensity there will be. This space is called the
guard band, and it is vital that sufficient empty space exist around the beam. The empty space
allows room for the beam to expand as aberrations are introduced to the beam. If portions of
the beam get too close to the edge of the array, they will "alias" and reflect back into the
beam, decreasing the accuracy of the computed results.
The initial beam may be any of these types: Gaussian Waist, Gaussian Angle, Gaussian
Size+Angle, Astigmatic Gaussian, Top Hat, File, DLL, or Multimode. See the following sections
for a detailed discussion of each beam type.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1207
The beam may then be aligned along the chief ray for any defined field position, in the optical
space preceding any surface. The starting location for the beam may also be offset from the
starting surface by the “Surf To Beam” setting, in the General settings for the Phyiscal Optics
Propataion analysis. Propagation then proceeds to the ending surface.
Gaussian Waist
The Gaussian Waist beam is an optionally truncated and decentered Hermite-Gaussian of
arbitrary order defined by:
where
And Hi (u) is the Hermite polynomial function of order i. Note the order may be specified in the
x and y directions independently. The x order is defined by the integer l, and the y order is
defined by the integer m. If both l and m are zero, the simple "Gaussian" TEM(0,0) beam is
generated. Higher order modes may be generated by modifying the order values; for example,
to generate TEM(1,2) set l = 1 and m = 2. For a discussion of Hermite- Gaussian beams see
Saleh, B. E. A., and Teich, M. C., Fundamentals of Photonics, John Wiley & Sons, New York
(1991). If the order number is set higher than 30, the order zero will be used to prevent
excessively long computation time.
The dx and dy values are used to decenter the beam. The transmittance function T (x, y ) is
used to (optionally) truncate the beam to a finite aperture. The transmittance function is
defined as
otherwise.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1208
Ax and Ay are the truncating aperture values. If Ax or Ay are zero, no truncating aperture is
used. A smoothing function is used near the edge of the truncating aperture to reduce pixel
related errors. The smoothing function weights the pixel amplitude by the area of the pixel
inside the truncating aperture. The truncating aperture is useful for modeling receiver fiber
modes, where the truncating aperture is typically 15% greater than the core size.
The value for E0 is chosen to yield the peak irradiance in power per unit area or the total beam
power as defined in the settings box.
The beam is defined at the waist and will generally diverge to a larger beam size as it
propagates away from the waist. See Gaussian Angle and Gaussian Size+Angle below.
Gaussian Angle
The Gaussian Angle beam is an optionally decentered TEM(0, 0) mode whose waist size is
determined by the far-field divergence half-angle in degrees, measured in air. OpticStudio
uses the specified divergence angle to compute the beam waist. The beam waist is given by:
Note that the angle is the half-angle of divergence in degrees, and the wavelength is not
scaled by the index of the starting medium. If the x and y angle values are different, then an
elliptical beam will be generated. The beam is defined at the waist.
Gaussian Size+Angle
The Gaussian Size+Angle beam is an optionally decentered TEM(0, 0) mode defined by the
beam size (not waist) and the far-field divergence half-angle in degrees, measured in air.
OpticStudio uses the specified beam size and divergence angle to compute the beam waist,
position, and phase. The beam waist is given by:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1209
Note that the angle is the half-angle of divergence in degrees, and the wavelength is not
scaled by the index of the starting medium. If the resulting beam waist is larger than the
specified beam size (a physical impossibility), the waist value will be used for the beam size.
The z position of the beam relative to the waist is then computed using:
where zr is the Rayleigh range. If the x and y direction values for the various data are different,
then an elliptical beam with a possibly toroidal phase will be generated.
Astigmatic Gaussian
The Astigmatic Gaussian beam is an optionally decentered TEM(0,0) mode defined by the
beam waist values in X and Y and the beam waist positions in X and Y. The beam waist
positions are the distances from the current beam position (defined at the Start Surface and
accounting for any non-zero Surface To Beam value) to the beam waists in X and Y (the value is
negative if the waist is to the left of the current beam position).
Note that the Astigmatic Gaussian beam is functionally identical to the Gaussian Size+Angle
beam described above. The Astigmatic Gaussian beam option is simply provided as an
alternative to the Gaussian Size+Angle beam option for applications in which the waist values
and waist positions of the beam are known rather than the beam size and far-field divergence
angle.
Top Hat
The top hat beam is an optionally decentered uniform amplitude beam defined as
where E0 is chosen to yield the peak irradiance in power per unit area or the total beam power
as defined in the settings box.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1210
File (defining the initial beam)
A beam may be defined in a user defined table properly formatted into a file. The table of
values must be placed in either a binary or text format file and read from disk. The file must
end in the extension ZBF (for Zemax Beam File). The binary format is identical to the format
written out by OpticStudio if the “Save Output Beam To:” option is selected. The Ex and Ey
values are defined such that the Ex*Ex + Ey*Ey is in units of watts. If the "Use Polarization"
option is selected, then the polarization details will always be set based on the information
saved in the .ZBF file. If the units flag indicates the beam units are different from the current
lens units, the beam is automatically scaled to the current lens units when read into
OpticStudio.
All ZBF Beam Files must be placed in the <pop> folder (for details, search the help files
for “Folders”).
Beams in OpticStudio are always centered on the chief ray for the selected field and
wavelength. Therefore, the data in the beam file should be positioned relative to the chief ray
that will be used to align the beam. The center point in the beam file is at the coordinate
(nx/2+1, ny/2+1). OpticStudio requires the values of nx and ny to be an integral power of 2; for
example, 32, 64, 128, 256, etc. The minimum sampling is 32 and the current maximum
sampling is 8192 for 32-bit versions of OpticStudio and 16,384 for 64-bit versions of
OpticStudio. Fiber coupling data is ignored when reading beams, and will be zero if fiber
coupling is not computed on output. Note the total fiber coupling is the product of the
receiver and system efficiency. The first data point is at the -x, -y corner, and the data proceeds
across the x rows first. The Rayleigh distance is ignored on input and is automatically
recomputed by OpticStudio. The wavelength value stored in the ZBF file is scaled by the index
of the media the beam is currently in.
If the ZBF file is used on a system where the wavelength defined in the System Explorer is
different than the value defined in the ZBF file, then the wavelength in the ZBF file is ignored
and the beam will be propagated at the wavelength specified in the System Explorer instead. In
such cases a warning will be shown in the Beam Definition tab of the Physical Optical
Propagation settings.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1211
The ZBF binary file format is defined as follows. All integers are 4 bytes, all doubles are 8 bytes.
1 integer: The format version number, currently 1.
1 integer: The number of x samples (nx).
1 integer: The number of y samples (ny).
1 integer: The "is polarized" flag; 0 for unpolarized, 1 for
polarized.
1 integer: Units, 0 for mm, 1 for cm, 2 for in, 3 for meters.
4 integers: Currently unused, may be any value.
1 double: The x direction spacing between points.
1 double: The y direction spacing between points.
1 double: The z position relative to the pilot beam waist, x
direction.
1 double: The Rayleigh distance for the pilot beam, x direction.
1 double: The waist in lens units of the pilot beam, x direction.
1 double: The z position relative to the pilot beam waist, y
direction.
1 double: The Rayleigh distance for the pilot beam, y direction.
1 double: The waist in lens units of the pilot beam, y direction.
1 double: The wavelength in lens units of the beam in the current
medium.
1 double: The index of refraction in the current medium.
1 double: The receiver efficiency. Zero if fiber coupling is not
computed.
1 double: The system efficiency. Zero if fiber coupling is not
computed.
8 doubles: Currently unused, may be any value.
2*nx*ny double: Ex values.
If polarized, 2*nx*ny Ey values follow the Ex values.
The Ex and Ey values are defined such that the Ex*Ex + Ey*Ey is in units of watts.
The ZBF text file format is defined as follows. The first line must be the single character “A”,
followed by the other data values specified.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1212
unused 1: Currently unused, may be any value.
lambda: The wavelength in lens units of the beam in the current medium.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1213
If polarized, followed by 2*nx*ny Ey values.
The Ex and Ey values are defined such that the Ex*Ex + Ey*Ey is in units of watts.
DLL
To define a beam using an external program, the algorithm which computes the initial complex
electric field from user defined parameter data must be written and compiled into a Windows
Dynamic Link Library, or DLL. Sample DLLs are provided with OpticStudio with source code.
Studying an existing DLL is the best way to see how the DLL is used to define the beam
amplitude and phase. New DLLs may be easily created with a suitable compiler.
Each DLL may use between zero and 8 user defined data values as parameters in the
computation of the beam properties. These values are defined by the DLL and are only used by
the DLL. The values may be entered or edited directly on the settings box when the DLL is
selected as the beam type.
When initializing a beam using a DLL, OpticStudio passes to the UserBeamDefinition function
the source parameters, the wavelength, and other data. The UserBeamDefinition function then
is required to compute the electric field values. These values are returned to OpticStudio and
are used to populate the beam array. The DLL also returns values for the pilot beam, including
the waist size, position, and Rayleigh range in the x and y directions. If all of these pilot beam
values are zero, OpticStudio will automatically fit the pilot beam parameters to the electric field
data.
The function UserParamNames is used to define the names of all used parameters. These
names appear on the settings dialog box.
The best way to learn the use of Beam DLLs is to copy and study an existing DLL. The sample
DLLs provided with OpticStudio include extensive documentation and comments on the data
format; see any of the sample source code files for examples.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1214
All Beam DLLs must be placed in the <program>\DLL\PhysicalOptics folder.
Multimode
A multimode beam consists of a sum of any number of other beams. The sum may be coherent
or incoherent, and several options exist for scaling, randomizing, and altering the phase of the
individual components of the beam. The multimode beam sum is defined in a user defined text
file. The file must end in the extension ZMM (for Zemax Multi Mode).
All ZMM Files must be placed in the <pop> folder (for details, search the Help Files for
“Folders”)
The ZMM file uses a simple command syntax that defines the multimode beam. The "master"
beam is initially set to zero amplitude over the entire beam. The individual component beams
are generated in the sequence defined in the ZMM file. Each beam as defined in the ZMM file
is then summed either coherently or incoherently with the master beam. The sum mode, either
coherent or incoherent, is controlled by the COHERENT and INCOHERENT commands. The
default sum mode is COHERENT. All of the available ZMM commands are described below.
!,Comment
Any data following the ! symbol is ignored. Comment lines may be used by starting the line
with a ! symbol. Blank lines are also allowed and are ignored.
COHERENT
COHERENT
The coherent sum of any two beams is computed by summing the point-by-point real and
imaginary parts of the two beams. The phase of the resulting beam thus depends upon the
vector sum of the components. All subsequent beam sums will be coherent unless an
INCOHERENT command is used.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1215
DLL
The DLL command defines a beam based upon a user-defined DLL, which is then summed to
the master beam. The syntax is:
Note that the data values are separated by spaces. The weight value defines the dimensionless
relative total power of this beam as compared to other beams in the same ZMM file. The
weight value may be negative, for details search the help files for “Using random values”. The
DLL_NAME is the name of the DLL file (with no extension). The DLL file must be placed in the
correct folder, see “DLL” for details. The other values are exactly as defined for the DLL
parameters. No scaling of the parameters is supported, since the dimensionality and purpose
of the DLL parameters cannot be known in advance.
Comment of DLL_NAME
Note currently the file name for DLL doesn't allow spaces inside. If the DLL file name includes
spaces, remove it or replace it by other characters. For example, to use the Laguerre beam in
ZMM file, users should first go to folder \Zemax\DLL\PhysicalOptics\ and change the file name
"Laguerre beam.dll" to "Laguerre_beam.dll". Then a syntax lilk below can be used
GW
The GW command defines a Gaussian Waist beam which is then summed to the master beam.
The syntax is:
Note that the data values are separated by spaces. The weight value defines the dimensionless
relative total power of this beam as compared to other beams in the same ZMM file. The
weight value may be negative, for details search the help files for “Using random values”. The
other values are exactly as defined for the Gaussian Waist beam, search the help files for
“Gaussian Waist” for a description. The transverse data values, such as the waist and aperture
sizes, may be scaled from the POP Beam Definition tab; search the help files for “Using the
scale factor” for details.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1216
INCOHERENT
INCOHERENT
The incoherent sum of any two beams is computed by summing the point-by-point intensity
of the two beams, taking the square root to determine the amplitude, and setting the real part
of the combined beam to this amplitude, and the imaginary part to zero. All phase information,
including that of aberrations in the beam, is lost when performing incoherent sums. Therefore
care should be taken when using this command. All subsequent beam sums will be incoherent
unless a COHERENT command is used. See also COHERENT. The default sum mode is
COHERENT.
PHASE
The PHASE command multiples any subsequently defined beams by a complex factor
determined by the defined phase angle. The syntax is:
PHASE angle
or
PHASE RANDOM
The angle is in units of degrees and may be any value. If the angle is set to the keyword
RANDOM, the phase is randomly selected to be between -180 and 180 degrees. Note the
random angle generated depends upon the random seed value used, search the help files for
“Using random values” for details. All subsequently defined beams are multiplied by the
resulting complex factor before being added to the master beam.
TH
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1217
Note that the data values are separated by spaces. The weight value defines the dimensionless
relative total power of this beam as compared to other beams in the same ZMM file. The
weight value may be negative, for details, search the help files for “Using random values”. The
other values are exactly as defined for the Top Hat beam, search the help files for “Top Hat” for
a description. The transverse data values, such as the waist and aperture sizes, may be scaled
from the POP Beam Definition tab; search the help files for “Using the scale factor” for details.
The PHASE RANDOM command uses the random number generator to compute a random
phase.
The random values used will always be the same given the same initial "seed" value. The seed
value for the random number generator is a user definable value and is Parameter 1 for the
multimode beam type. Use a different seed value to generate different, random, but
reproducible beams.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1218
Draw “lens file name-surface #” on shaded model
Auto Resample
For more information on these settings, see the Physical Optics section of the Surface
Properties in the Lens Data Editor.
The solution is to use an additional (usually dummy) surface to propagate the rays some
distance away from focus (at least one Rayleigh range), and then end the "Use Rays" section of
the propagation at the dummy surface. The rays can then be accurately converted to a
wavefront and the propagation can proceed, even if a virtual propagation back to the focus is
necessary.
The fiber coupling receiver efficiency is defined as a normalized overlap integral between the
fiber and beam complex amplitude:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1219
Where Fr (x, y) is the function describing the receiving fiber complex amplitude, W(x, y) is the
function describing the complex amplitude of the beam coupling into the fiber, and the ’
symbol represents complex conjugate.
Note that these functions are all complex valued, so this is a coherent overlap integral. When
propagating a polarized beam, the fiber coupling receiver efficiency is calculated individually
for both the x- and y-polarized portions of the beam, using only the y- or x- components of
the complex-valued electric field, respectively. The overall fiber coupling receiver efficiency is
then calculated via a weighted average between the x- and y-polarized fiber coupling receiver
efficiencies, based on the powers of the x- and y-polarized portions of the beam.
Maximum receiver efficiency (T = 1.0) is achieved when the mode of the beam perfectly
matches the mode of the fiber in both amplitude and phase at all points. Any deviation in
mode shape, or phase, will reduce the value of T to less than 1.0. Optical aberrations typically
introduce phase deviations which reduce receiver efficiency. Additional system losses may be
caused by apertures which vignette the beam, losses due to reflection from air-glass
boundaries, or bulk absorption. These loss factors reduce the system efficiency. The total
coupling efficiency into the fiber is the system efficiency multiplied by the receiver efficiency.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1220
The fiber mode may be a Gaussian or Top Hat function, or may be defined by a DLL or a data
file. This allows very general and arbitrary fiber modes to be described, including multi-mode,
aberrated, or arbitrary amplitude and phase fibers. The fiber mode may also be defined using
all the same options allowed for defining initial beams. For more information, see Defining the
Initial Beam.
If the beam is not polarized, then the fiber mode is not polarized and only the X-direction of
the E field of the fiber mode is used in the overlap integral. If the beam is polarized, then the
fiber mode may be either polarized or unpolarized. If the setting “Ignore Polarization” on the
Fiber Data Tab in the Physical Optics Propagation settings is checked, then the fiber mode is
unpolarized, and the X-direction E field is used to compute the coupling for both the X- and Y-
direction fields in the polarized beam. If “Ignore Polarization” is unchecked, then the coupling
for the X- and Y-direction is done independently and then combined to yield the overall
coupling.
Decenter X/Y values are in lens units and may be defined on the Fiber Data tab of the Physical
Optics Propagation settings box. These values decenter the fiber mode. The decenter values
shift the center of the mode within the array defining the fiber mode at the end surface. For
this reason, the decenter values should be small enough to keep the majority of the mode
energy inside the array width/height at the end surface.
The tilt values are in degrees. Tilt of the fiber is modeled as adding a linear phase shift to the
fiber mode. The phase shift is proportional to the fiber tilts and the mode width/height.
Note that if the end surface is at the receiving fiber location (typically near focus) then a tilt of
the fiber introduces phase tilt. If the end surface is far from the fiber, then tilt of the fiber
introduces a decenter of the mode. Therefore, great care must be used in selecting the tilt and
decenter values; proper use of these values depends upon knowledge of where the overlap
integral is being computed (at the end surface!) relative to the fiber location.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1221
incoming chief ray’s x and y coordinates on the end surface, and the fiber is tilted to be aligned
with the local Z axis rather than the chief ray.
Centroid Locations
The beam centroid is given by:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1222
where I(x, y) is the irradiance of the beam.
where cx is the centroid coordinate as defined earlier. The beam width (defined here as the
beam radius at the 1/e2 intensity point) is then Wx = 2σx, or twice the square root of the
second moment.
The beam widths in the direction of its principal axes are given by
Where
Note the beam width will change as the beam propagates, and is thus a function of the beam z
coordinate relative to the waist. The smallest value for the beam size is Wx(0) . The beam width
at other locations is given by
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1223
where Mx is a parameter characteristic of the beam. This expression allows definition of the
desired M- squared factor as
Because the M-squared calculation relies on the Rayleigh length of the pilot beam, for
asymmetric beams propagations, the "Separate X,Y" in the POP analysis settings must be
checked when calculating M-squared value. If "Separate X,Y" is not checked, the pilot beam
parameters are the same for x- and y-directions and the M-squared values in each direction
won't fully account for the asymmetry in the beam distribution.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1224
A variation on encircled energy is to compute the radial coordinate at which a specified
fraction is achieved.
The orthogonal unit vectors ex, ey point along x and y directions, and the beam propagation is
along z axis. The ray direction vector Θ is defined as the angular transverse projection of the
paraxial wave propagation vector k, i.e. kt = kΘ. At any transverse position z, the spatial,
angular, or mixed second-order moments may be represented as [2]:
Here the indexes (ν, υ = 1, 2), and k ,q, m, and n are positive integers such that k + q + m + n =
2.
Differentials defined as
and .
The knowledge of the POP complex amplitude function E(r; z) at any given position z is
sufficient to calculate all moments of the Wigner distribution function [4].
The optical power of the beam is considered the zero-order moment of the Wigner
distribution function. It is also the normalization factor for all the higher moments. In
OpticStudio the power at a given position z is calculated using the POP complex amplitude
function E(r; z):
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1225
The spatial and the angular first-order moments (centroids) are written as the following (ν, υ =
1, 2):
The spatial second-order moments are calculated using the formulas [2]:
The angular second-order moments are calculated using the formulas [3]:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1226
The mixed spatial-angular second order moments are calculated using the following (ν, υ = 1,
2) [4]:
Please note, the return values of POPD are actually the square-roots of the second moments.
These have been implemented as POPD operand options 27, 28, and 29 with the Xtr1 auxiliary
parameter:
“Xtr1” parameter
Data 0 1 2 3
27
28
29
References
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1227
It frequently takes some experimentation with the sampling, width, and surface specific
settings (see above) to get good, accurate results from this feature. Keep in mind the following
suggestions:
Use an appropriate width for the initial beam. The best initial width to use is almost always that
computed by the “Auto” button next to the width control, and the use of this control is highly
recommended. Note that if the width is too large, then there will not be enough points across
the beam to yield adequate sampling, if the width is too small, aliasing will occur. If the beam
waist is smaller than the wavelength at any surface, including the initial beam, the POP results
are probably not accurate, see “Algorithm assumptions”.
Always check the initial beam by setting the end surface to the start surface in the
analysis window, and observe that the beam is properly sized for the selected array
width.
Use adequate sampling. As the guard beam increases in size relative to the non-zero
amplitude portion of the beam, the number of points that have non-zero data will decrease. It
may be required to increase the sampling to be sure enough points sample the beam.
If there are any cylindrical or toroidal optics in the system, or if the beam itself is astigmatic or
anamorphic, try using "Separate X, Y" on the beam definition tab. Separating the X and Y
propagation greatly reduces the sampling required for accurate results because a reference
bispherical surface is used instead of a reference sphere, and the bisphere is capable of more
closely fitting anamorphic beams.
If the results seem unbelievable, debug the propagation by propagating one surface at a time
through the optical system, and study the results for plausibility. Typically, this process will
highlight at which surface the algorithm fails. It is frequently the case that certain surfaces,
such as gradient index optics or highly tilted surfaces, are best handled by ray tracing. For
these surfaces, choose the "Use Rays To Propagate To Next Surface" option.
Imagine a large diameter beam with a wavelength of 1.0 micrometers (0.001 mm), an array
width of 64 mm, and a sampling of 64 x 64 points. The delta between points is 1.0 mm. Now
imagine the beam going through a collimating lens with a focal length of 100.0 mm. The
sampling spacing near focus is given by:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1228
which yields a new sampling spacing of 0.0015625 and a total width of 0.1 mm. To decrease
the sample spacing in the focal plane while keeping the array width constant, the product nx
Δx1 must increase. Since the sample spacing is the array width divided by the number of
points, both the number of points and the initial array width would have to be doubled. If the
aberrations are so large that the beam size is on the order of the array width in the focal plane,
then the array width must increase. Note the array width in the focal plane is given by:
Increasing the array width can be accomplished by increasing the number of points while
leaving the initial array width fixed.
Note that the beam sampling and width may be manually adjusted at any surface.
See “Surface specific settings” for information on resizing the beam at any surface.
Note: beam qualities will be calculated after refraction or reflection on the end surface. Users
should not assign zero thicknesses to surfaces with materials that are analyzed by Physical
Optics Propagation.
Algorithm Assumptions
There are numerous approximations made in the model and algorithms used for physical
optics modeling. Some of these assumptions will limit the accuracy of the results in certain
cases. The major assumptions are described below.
Both the angular spectrum and the Fresnel diffraction propagation algorithms are developed
assuming the beam is not too fast. Neither theory accurately predicts the correct diffraction
results if the F/# of the beam is too low. The errors in the propagation theory will reveal
themselves as discontinuities in the data as the propagation algorithm crosses over the
Rayleigh range boundary. The loss of accuracy cannot be precisely quantified (if OpticStudio
could precisely quantify the error, we could apply that as a correction to have a more accurate
theory). OpticStudio will report a warning in the propagation report if the Gaussian pilot beam
waist becomes smaller than the wavelength. This is a good rule to use as a limit of the accuracy
of POP in general. Gaussian beams whose waist is small compared to the wavelength, such as
fibers, act essentially as point sources radiating into a sphere. In this domain, the ray model is
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1229
perfectly acceptable. In other words, don’t use POP for very fast beams! The big differences
between ray based and POP based results show up in very slow diffracting beams, not fast
beams, so use ray based computations in OpticStudio to model very fast beams with
confidence. Specifically, use the ray-based fiber coupling algorithm rather than POP for fast,
accurate results in systems where the beam is fast and the diffraction effects from the edges of
the lenses are not significant; this applies to virtually all fiber coupling systems.
Scalar diffraction theory applies. The vector nature of the electric field is ignored. For very fast
beams, scalar diffraction theory is not valid and the results should be used with caution. Note
that propagation of fast beams is generally well handled by geometric ray tracing, except near
focus. Although there is no exact cut-off to the accuracy of scalar diffraction theory, beams
faster than F/1 are probably not accurately modeled with scalar theory. This limitation is
another reason not to use POP for very fast beams, as the previous paragraph explains.
Diffraction effects of surface structures are ignored. Gratings, binary optics, and diamond
turned surfaces have a complex micro surface structure that can significantly affect the local
electric field. This may or may not affect the propagation of the beam. Note that ray tracing,
which also ignores the surface structure, has proved to be very useful and accurate for
modeling these devices. Any surface adequately modeled by ray tracing will also work fine with
physical optics propagation, since ray tracing is used to compute the surface transfer function.
The POP algorithm generally separates the electric field into two beam local orthogonal
directions. The pilot beam properties, which are used to reference the phase of the electric
field, are also computed along these two orthogonal directions. If the beam is incident upon
an optical surface where the plane of incidence is not aligned with these projections, and if the
optical surface has diffractive power that is also not aligned with these projections, the POP
algorithm cannot accurately predict the correct electric field after diffraction, and the predicted
beam will appear to rotate slightly. The error is usually only noticeable for beams that are
incident at large skew angles to very steeply tilted diffraction gratings that have significant
diffractive bending of the beam (that is, a diffractive order of 0 would describe a significantly
different ray path than the diffractive order being used would). These types of systems are well
modeled by conventional ray tracing and POP should not be used if the beam rotation is
apparent.
When performing polarized beam analysis, the input and fiber mode beam (if any) should
contain polarized electric field data. For unpolarized or randomly polarized input beams,
OpticStudio propagates and then averages two orthogonally polarized beams. Similarly, if a
polarized beam analysis is requested and a ZBF file or DLL is used to define the input or fiber
mode beam, but no polarized data is contained in the file or created by the DLL, then
OpticStudio will create a polarized beam from the unpolarized data. The method used is to set
the two orthogonally polarized electric fields equal in amplitude and phase, normalizing to
conserve the total power in the beam. This allows polarized beam analysis, including
transmission through coatings, interfaces, and bulk media.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1230
Samples
Many sample files are included with OpticStudio to demonstrate some of the applications and
proper use of the physical optics modeling features. The files are located in the
<data>\Samples\Physical Optics folder. Some of these files are described below. Because of
the large amount of computation involved in physical optics propagation, some of these files
take some time to compute and display the results.
Note that beam may be virtually propagated backward using the normal OpticStudio sign
convention of a negative thickness. Choosing the “End Surface” to be any of the surfaces in the
LDE will show the beam intensity at that surface. Note the phase of the beam along the axis
has the correct Gouy shift.
A Pinhole Aperture
The sample file "Pinhole Aperture" illustrates spatial filtering. The first lens forms an aberrated
image, which can be seen by selecting the end surface to be 5. Surface 6 has a small circular
aperture, which only allows the central portion of the beam to pass. The second lens
recollimates the beam. The spatially filtered beam can be seen at the image of the stop on
surface 10. There are several interesting things to note:
The transmitted irradiance drops to 0.12. The smaller the pinhole, the lower the transmitted
irradiance. Because the pinhole aperture changes the properties of the beam, the pilot beam
parameters must be recomputed. Note the option to do so is selected on surface 6.
A Lens Array
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1231
The sample file "Lenslet Array" uses the user defined surface DLL "US_ARRAY.DLL" to create a 7
x 7 array of rectangular lenses. The focal distance is 100.0 mm, and the pilot beam will focus
down to a waist size of about
10 micrometers. However, the lenslet array forms multiple focal spots. To see all of the spots
requires high sampling so that all the spots can be seen without aliasing. Notice the decrease
in intensity and the aberrations apparent in the spots towards the outside. It is also possible to
see the rectangular structure in the diffracted image spots due to the rectangular apertures of
the lenslets.
Talbot Imaging
Talbot imaging refers to the property of a beam forming an image of itself as it propagates.
The image reveals itself in both phase and amplitude modulations as the beam propagates.
The sample file "Talbot Imaging" shows a user defined aperture on surface 1 that consists of 20
rectangular slits, like a grating. A propagation of 20 mm reveals the phase reversed Talbot
image of the grating. An additional 20.0 mm shows the restored image of the grating. The
image is not perfect because of the finite extent of the grating. Note the region near the center
of the grating has a well formed image.
Fresnel Lens
The sample file "Fresnel Zone Plate Lens" illustrates the focusing power of an aperture
consisting of concentric rings. The spacing of the rings is selected to block light from every
other Fresnel zone, so that at a distance of
200.0 mm the light diffracted from all the zones interferes constructively. The constructive
interference creates a bright focused spot on axis; an effect not predicted by ray tracing. This
file also illustrates the intensity of the beam at several planes between the Fresnel zone plate
and focus; note the concentric ripples caused by interference from the edges of the zone plate.
Since OpticStudio does not have a multiple-zoned circular aperture, the zone plate was
created by placing one annular obscuration on each of several surfaces; all located at the same
plane. The option to “Use Rays To Propagate To Next Surface” is used to speed the
computation through all the aperture surfaces.
These files may be user defined or may be generated by the Physical Optics Propagation
analysis.
For information on the ZBF file format, see “Zemax Beam File (ZBF) binary format”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1233
The available settings are a subset of what is available for the Physical Optics Propagation.
For rapid viewing through a range of files that differ only by the surface number, use the left
and right cursor keys.
Description The primary advantage to using this feature is that the beam may be propagated
once through the optical system, using the Physical Optics Propagation feature described
above, and then the beam files may be analyzed and viewed without the need to re-propagate
the beam. Beam files for every surface may be generated by choosing "Save Beam At All
Surfaces" on the Physical Optics Propagation feature settings.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1234
ZBF files are stored in the <pop> folder (see Folders)
Gaussian Beams
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1235
the plane described by the beam waist, and travels with an angle equal to the divergence of
the beam. Paraxial Gaussian beams are limited to on-axis simply astigmatic systems.
For other propagation beam analysis features, see also “Skew Gaussian Beam” and “Physical
Optics Propagation”
M2 Factor The M-squared quality factor used to simulate ideal, aberrated, or mixed mode
Gaussian beams. See the Discussion.
Waist Size The radial size of the embedded (perfect TEM00 mode) beam waist in object space
in lens units.
Surf 1 to Waist The distance from surface 1 (NOT the object surface) to the beam waist
location.
This parameter will be negative if the waist lies to the left of surface 1.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1236
Update After defining the various input beam parameters, clicking on "Update" will
immediately trace the specified Gaussian beam, and display the usual results in the dialog box.
Orient Select the Orientation of the results displayed in the dialog box.
l Y-Z will show the results in the Y-Direction so in the Y-Z plane.
l X-Z will show the results in the X-Direction so in the X-Z plane.
Surface Select from the drop down list the Surface at which the results are displayed in the
dialog box.
Discussion
This feature computes ideal and mixed mode M-squared Gaussian beam data, such as beam
size, beam divergence, and waist locations, as a given input beam propagates through the lens
system.
Note that the Position data reports the position of the surface with respect to the waist of the
Gaussian beam. Therefore, negative position value indicates the waist of the beam lies on the
right hand side of the surface being considered.
This discussion is a brief introduction to Gaussian beam propagation theory, and we refer the
reader to the articles mentioned at the bottom of the discussion for further details on Gaussian
beam propagation.
To summarize, the Paraxial Gaussian Beam feature propagates and transforms a Gaussian
beam using is based on equations whose terms consist solely of the heights and slopes of two
paraxial rays, under the assumption of simple astigmatism.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1237
l The paraxial waist ray (tangent to the input beam at the waist). At the waist, the paraxial
waist ray is defined by its height yw and a direction vw:
yw = waist
vw = 0
l The paraxial divergence ray (tangent to the input beam at infinity). At the waist, the
paraxial divergence ray is defined by its height yd and a direction vd:
yd = 0
vd = divergence
By propagating these 2 paraxial rays in the X-Z plane and in the Y-Z plane, the paraxial
gaussian beam characteristics can be calculated at any surface:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1238
where :
For more information on Gaussian beam propagation, see one of the following references:
Gaussian beams are idealized, "perfect" beams, and this limits the range of systems for which
Gaussian beam analysis is useful. This method is applicable to cases in which
1. the aberrations of the system are negligible around the region of the propagating
beam. Because the calculation of Gaussian beam parameters is based upon paraxial ray
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1239
data, the results cannot be trusted for systems which have large aberrations, or those
poorly described by paraxial optics. Flat fold mirrors will not invalidate the results, but
decentered or tilted components generally will.
2. the system and the beam are simply astigmatic. The equations to propagate the beam
implicitly have no cross-dependencies in x and y.
This feature ignores all apertures, and assumes the Gaussian beam propagates well within the
apertures of all the lenses in the system.
For an off-axis simply astigmatic gaussian propagation, see "Skew Gaussian Beam".
For a more general beam propagation analysis feature, see “Physical Optics Propagation”.
A Gaussian laser beam is described by a beam waist size, a wavelength, and a location in object
space. The Gaussian beam is an idealization that can be approached but never attained in
practice. However, real laser beams can be well described by an “embedded” Gaussian beam
with ideal characteristics, and a quality factor, called M2, which defines the relative beam size
and divergence with respect to the embedded Gaussian mode. The ideal M2 value is unity, but
real lasers will always have an M2 value greater than unity.
This feature requires the definition of the initial input embedded beam properties, and the M2
value. The input embedded beam is defined by the location of the input beam waist relative to
surface 1 (note this is not the object surface, but the first surface after the object) and the waist
radial size at this location. OpticStudio then propagates this embedded beam through the lens
system, and at each surface the beam data is computed and displayed in the output window.
OpticStudio computes the Gaussian beam parameters for both X and Y orientations.
OpticStudio defaults to a waist size of 0.05 lens units (no matter what the lens units are) and a
surface 1 to waist distance of zero; this of course means the waist is at surface 1. The default
values may be reset by clicking on the "Reset" button. After the default values are computed
and displayed, any alternate beam waist size and location may be entered and that Gaussian
beam will be traced instead.
Once the initial beam waist and location parameters are established, OpticStudio traces the
embedded beam through the system and computes the radial beam size, the narrowest radial
waist, the surface coordinate relative to the beam waist, the phase radius of curvature of the
beam, the semi divergence angle, and the Rayleigh range for every surface in the system.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1240
OpticStudio calls these parameters the Size, Waist, Waist Z, Radius, Divergence, and Rayleigh,
respectively, on the text listing that is generated.
The dimensions for all parameters are lens units except for the semi divergence angle, which is
in units of radians. The embedded Gaussian beam parameters can be computed using the
following standard formulas.
where z is the distance from the beam waist. The radial beam size at any z is computed from
Where is the beam waist. The divergence angle of the beam is given by
Finally, the Gouy shift is the phase of the center of the Gaussian beam:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1241
All of the preceding results are correct for the ideal embedded Gaussian beam. For aberrated,
mixed-mode beams, an extension to the fundamental Gaussian beam model has been
developed by Siegman. The method uses a term called the beam quality factor, usually
denoted by M2. The factor M2 can be thought of as "times diffraction limited" number, and is
always greater than unity. The M2 factor determines the size of the real, aberrated Gaussian
beam by scaling the size and divergence of the embedded Gaussian mode by M. Note that the
Rayleigh range and phase radius are not scaled by M, but are instead the embedded mode
values as defined by Siegman. It is common practice to specify M2 for a laser beam, rather
than M, although the factor M is used to scale the beam size. The M2 factor must be measured
to be determined correctly. If the M2 factor is set to unity, the default value, OpticStudio
computes the TEM00 data described above. If M2 is greater than unity, then OpticStudio
computes both the embedded Gaussian beam parameters as well as the scaled data.
Computes Skew Gaussian Beam parameters. Skew beams may enter an optical system at any
surface from any field position, and may travel through the optical system off axis. The Skew
Gaussian Beam parameters are computed using real rays and account for astigmatism but not
higher order aberrations. See also “Paraxial Gaussian Beam” and “Physical Optics Propagation”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1242
X Waist Size The x direction radial size of the beam waist in the space prior to the "start
surface" in lens units.
Y Waist Size The y direction radial size of the beam waist in the space prior to the "start
surface" in lens units.
Surf to Waist The distance from the "start surface" to the beam waist location. This parameter
will be negative if the waist lies to the left of the start surface.
Discussion
For important background information on Gaussian beams, see “Paraxial Gaussian Beam”.
This feature computes the ideal skew Gaussian beam data, such as beam size, beam
divergence, and waist locations, as a given input beam propagates through the lens system.
The beam is not limited to being on axis in a symmetric optical system, and beam at any angle
may be traced anywhere in the optical system.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1243
The beam is initially defined by a waist size in the x and y directions in the optical space prior
to the starting surface. The field and wavelength settings are used to define a chief ray which is
traced through the optical system. This chief ray becomes the axis for the skew Gaussian beam
throughout the propagation.
The x and y directions are initially defined by the entrance pupil orientation. The +y direction
relative to the chief ray is defined as a vector pointing from the chief ray coordinate at the
entrance pupil to the coordinate of the px = 0, py = 1 marginal ray coordinate at the entrance
pupil. The px = 1, py = 0 marginal ray defines the +x direction. For a discussion of the
normalized pupil coordinates, see “Normalized pupil coordinates”.
As the chief ray propagates through the optical system, the two marginal rays are propagated
as well, and are used to define the +x and +y directions in each optical space. All the data
listed for x and y directions are measured in this moving coordinate system.
The Skew Gaussian Beam feature results are generally not accurate for systems including non-
sequential component groups. For the most accurate results, replace non-sequential
component groups with sequential equivalents.
Fiber Coupling
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1244
This feature computes the coupling efficiency for single mode fiber coupling systems. For
multi-mode fiber coupling, see “Calculating efficiency of multi-mode fibers”. Also
see ”Computing Fiber Coupling”
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1245
Source Fiber Settings
NA x/y Numerical Aperture of the source fiber in object space in the xz and yz planes
respectively. This is n times the sin of the half angle to the 1 over e squared intensity point.
X Angle, Y Angle The angular rotation of the source fiber in object space, in degrees,
measured from the nominal orientation of the source fiber. The X angle is the angle measured
in the XZ plane; the Y angle is measured in the YZ plane.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1246
Align Source to Chief Ray If unchecked, the fiber is oriented along the object z axis, centered
on the field point. If checked, the center of the fiber points along the chief ray for that field
point.
Ignore Source Fiber If checked, then the pupil is illuminated using the specified Apodization
Type & Value in the Aperture Settings of the System Explorer. All computations are then
referenced to the total energy incident upon the entrance pupil.
NA x/y Numerical Aperture of the receiving fiber in image space in the xz and yz planes
respectively. This is n times the sin of the half angle to the 1 over e squared intensity point.
Tilt About X, Y The angular rotation of the receiving fiber in image space, in degrees,
measured from the nominal orientation of the receiving fiber. If both X and Y rotations are
specified, the rotation is first around X, then around Y. Note the rotations are about the
specified axes; so Tilt About X rotates the fiber toward or away from the Y axis. Rotations are
done after the XYZ decenters below.
Decenter XYZ The linear position shift in the x/y/z direction in lens units of the receiving fiber,
measured from the nominal position of the receiving fiber. Shifts are done before the XY tilts
above.
Align Receiver to Chief Ray If unchecked, the fiber is positioned at XY coordinates (0.0, 0.0)
on the image surface. If checked, the fiber is repositioned in x and y to be centered at the point
the chief ray intercepts the image surface. In either case the receiving fiber is oriented along
the image space z axis, unless rotated using the controls above.
Use Huygens Integral If checked, the Huygens PSF is used for the beam mode at the
receiving fiber. Computing the Huygens PSF is much slower than the direct ray-based
integration used if this option is unchecked. However, there are cases where the full Huygens
PSF is required. These cases generally have severe caustics or discontinuities in the
wavefront. The recommended approach is to leave this option unchecked. If the fast ray-based
integration cannot be computed accurately, the fiber coupling will be zero and a warning will
be printed which will recommend switching to the Huygens algorithm.
Discussion
This feature computes fiber coupling for single-mode fibers with a Gaussian shaped mode. For
multi-mode fiber coupling, see “Calculating efficiency of multi-mode fibers”. For a more
detailed and flexible physical optics treatment of fiber coupling see ”Computing Fiber
Coupling”
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1247
Fiber coupling efficiency is computed based upon a two fiber or a one fiber model. In the two
fiber model, light emerges from a source fiber to fill or overfill the entrance pupil of an optical
system. Energy not collected by the entrance pupil is lost, reducing the overall efficiency. If
desired, the source fiber may be ignored for a one fiber model; and in this case the efficiency is
computed relative to the energy entering the entrance pupil; which in turn is a function of the
system apodization (see “Apodization Type” ).
The system efficiency (S) is the sum of the energy collected by the entrance pupil which passes
through the optical system, accounting for both the vignetting and transmission of the optics
(if polarization is used), divided by the sum of all the energy which radiates from the source
fiber:
where Fs is the source fiber amplitude function and the integral in the numerator is only done
over the entrance pupil of the optical system, and t(x,y) is the amplitude transmission function
of the optics. The transmission is affected by bulk absorption and optical coatings (if use
polarization is checked on). If the source fiber is ignored, then the integral in the denominator
is only done over the entrance pupil, and the Fs function is determined by the system
apodization, if any.
Aberrations in the optical system introduce phase errors which will affect the coupling into the
fiber. Maximum coupling efficiency is achieved when the mode of the wavefront converging
towards the receiving fiber perfectly matches the mode of the fiber in both amplitude and
phase at all points in the wavefront. This is defined mathematically as a normalized overlap
integral between the fiber and wavefront amplitude:
Where Fr(x,y) is the function describing the receiving fiber complex amplitude, W(x,y) is the
function describing the complex amplitude of the wavefront from the exit pupil of the optical
system, and the ‘ symbol represents complex conjugate. Note that these functions are complex
valued, so this is a coherent overlap integral.
T has a maximum possible value of 1.0, and will decrease if there is any mismatch between the
fiber amplitude and phase and the wavefront amplitude and phase.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1248
OpticStudio computes the values S and T. The total power coupling efficiency is the product of
these numbers. A theoretical maximum coupling efficiency is also computed; this value is
based upon ignoring the aberrations but accounting for all vignetting, transmission, and other
amplitude mismatches between the modes.
Note that the Single Mode Fiber Coupling tool is unable to take into account materials
assigned to the Image Surface. If effects from receiver fiber index are needed, please use POP
instead
Multi-Mode Coupling
Compute the coupling efficiency of the optical system into a multi-mode fiber of a specified
NA and radial aperture by using the NA setting on the Geometric Image Analysis feature.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1249
OpticStudio has an algorithm for accurately computing fiber coupling into single-mode fibers;
for details see “Fiber Coupling Efficiency”. Also see ”Computing Fiber Coupling”
To estimate the coupling efficiency for multi-mode fibers, a geometric approach may be used.
Place a circular aperture at or just before the image surface with the appropriate maximum
radial aperture representing the core size. Then set the NA (see the table above) to the
maximum acceptance NA of the fiber. The percent efficiency will then be calculated by
summing all the rays that pass the core aperture within the specified NA. The NA of a typical
multi-mode fiber with an inner core of index ni and an outer cladding of index no is given by
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1250
Polarization and Surface Physics
Group (the analyze tab, sequential
ui mode)
For more information on polarization calculations, see “Polarization Analysis” in the manual.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1251
Polarization Ray Trace
The polarization ray trace feature generates a text window which displays all the polarization
data for a single ray.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1252
Jx, Jy Jones electric field. see ”Defining the Initial Polarization”
Global Coordinates If checked, all coordinate and cosine data are given in global rather
than local coordinates.
Discussion This feature tabulates all of the data computed by OpticStudio to perform
polarization ray tracing. See “Polarization Analysis”.
Generates a graph of the polarization ellipse as a function of pupil position. This aids in
visualizing the change in polarization over the pupil. This feature may also be used to compute
transmission in systems modeled using interfering paths in separate configurations, such as
birefringent polarizing beam splitters and interferometers.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1253
Jx, Jy Jones electric field. See ”Defining the Initial Polarization”
SurfaceThe surface at which the data is shown. Data is after refraction through the specified
surface.
Add Configs
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1254
Sub Configs If the "Add Configs" and "Sub Configs" settings are left blank, the polarization
ellipse and transmission is computed for a single configuration (selected in the drop-down
menu at the top of the window; “Current” is the default setting) and no interference effects are
considered. To model interference between configurations see the discussion below.
Discussion
The Graph tab shows the polarization ellipse. This is the figure traced out by the electric field
vector as the wave propagates during one cycle. The magnitude of the ellipse is determined by
the transmission of the ray which is generally a function of pupil position. For more
information on analyzing polarization, see Polarization Analysis.
The transmission value is displayed at the bottom of the analysis window. This is the
transmission of the polarized beam for the field, wavelength, and surface that are selected in
the settings. This transmission value takes into account Ez. For each ray of the beam the
intensity is calculated as Ex^2+Ey^2+Ez^2, and the transmission is displayed as the average of
the intensities.
The Text tab shows the data computed by this analysis. It lists the Px, Py, Ex, Ey, Intensity,
Phase, and Orientation values.
WARNING: The polarization pupil map assumes the rays are close to parallel to the z-axis and
only uses the Ex and Ey components of the electric field to calculate the polarization ellipse. If
the rays have a significant angle relative to the z-axis, this approximation will be invalid.
Some optical systems require more than one configuration to model the complete optical
beam. The most common example is a polarizing beamsplitter that uses uniaxial crystals to
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1255
separate orthogonal polarizations of the incident electric field. Typically, these beamsplitters
implement 2 crystals with orthogonal axis orientations,
Each requiring an ordinary and an extraordinary ray trace configuration, and therefore these
systems require a total of 4 configurations to model all possible ray paths.
Computing transmission through these systems can be complicated. If a single incident ray is
decomposed into 4 individual rays, one for each configuration, each ray will carry a portion of
the electric field and energy. It is a fundamental property of rays that the ray trace does not
depend upon other rays in other configurations. Thus, if each ray is propagated individually,
each will carry some portion of the electric field. If in two or more configurations the ray paths
are superimposed, then the coherent sum of the individual ray paths must be considered.
Because the phase is accounted for, some rays will constructively interfere with other rays
while other rays will destructively interfere. This allows OpticStudio to simulate effects such as
fringes in interferometers (shearing or otherwise) or interference from various orders of a
diffraction grating. However, computing the coherent irradiance involves some assumptions.
Physically, destructive interference means the energy would have propagated somewhere
other than where the ray went. In a similar way, when constructive interference occurs, the
squaring of the amplitude sum of many rays artificially and non-physically increases the energy
in the beam. OpticStudio cannot determine where the energy went (or came from), and
therefore cannot account for conservation of energy in coherent irradiance calculations
without making assumptions.
For the Polarization Pupil Map, the coherent irradiance for each polarization component is
computed by summing the real and imaginary parts of that component for every ray,
computing the square of the magnitude of this sum, dividing by the square of the sum of the
coherent amplitude of that polarization component for all incident rays upon that pixel, then
finally multiplying this ratio by the incoherent irradiance in that polarization component. This
method allows the computed coherent irradiance to vary between a value of zero and the
incoherent irradiance. However, there is no way to accurately determine the true coherent
irradiance in this case because of the limitation of the ray model in the presence of
constructive and destructive interference as described above. Specifically, it is unknowable
where energy lost in this computation would have propagated.
To address this difficulty, the "Add Configs" and "Sub Configs" allow user specification of
which configurations should be coherently summed. The "Add" configurations are all ray
traced, and the electric fields are coherently summed. The "Sub" configurations are also all ray
traced, and these are separately coherently summed. As part of the coherent sum, OpticStudio
can determine how much energy was lost due to destructive interference between the rays in
the "Sub" configurations. This energy is then added to the "Add" configurations, and the total
transmission is then determined. To list multiple configurations, separate the configuration
numbers with a blank space. For example, to define configurations 1 and 2 as the "Add"
configurations enter "1 2".
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1256
This feature is particularly useful for analysis of birefringent systems, where two or more
configurations (ordinary and extraordinary) are required to trace all possible beam paths. The
computations may be applicable to other systems as well, but great care should be taken
before any computed results are trusted. This feature may yield meaningless or misleading
results if the "Add" and "Sub" configurations are defined in a way that does not reflect how the
beams actually interfere with one another.
In addition to coherently adding multiple configurations, birefringent systems also give the
user the option of tracing rays through the system using the ordinary or extraordinary index to
calculate the ray’s direction, then accounting for the phase difference between the ordinary
and extraordinary ray. This feature is useful for waveplates and other systems where the
ordinary and extraordinary beams largely overlap. See the discussion in Birefringent In for
more details.
Transmission
Computes the integrated and surface by surface transmission through the optical system
considering polarization effects.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1257
Jx, Jy Jones electric field. See ”Defining the Initial Polarization”
Sampling Specify the density in the pupil. Larger grid sizes are more accurate, although the
computation time increases.
Unpolarized If checked, the electric field definition is ignored and the unpolarized
computation is performed.
Discussion
This feature tabulates for each field position and wavelength the integrated transmission of
the optical system for the specified polarization. The transmission is computed as a fraction of
100%, with 100% being that transmitted if there were no absorption, reflection, or vignetting
losses. The transmission calculation accounts for vignetting factors, vignetting due to
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1258
apertures or obscurations, ray clipping due to ray trace errors, surface Fresnel or coating
losses, and bulk internal transmittance due to absorption.
Also tabulated for each field and wavelength is the relative (“Rel. Tran”) and total (“Tot. Tran”)
transmission of the chief ray.
The relative transmission accounts for transmission of the specific interface, whereas the total
transmission accounts for transmission of all surfaces up to and including the specified one.
This allows identification of where significant surface losses originate.
When the relative transmission of a surface (surface N) is calculated, it will take into account
the transmission of the preceding material, as well as the transmission of a coating at the
interface. In other words, the relative transmission will report bulk transmission of the
preceding material (surf N-1) and transmission of the current coating (surf N). See the graphic
below for more details.
Consider a system with an Object (surf 0) and four additional flat surfaces. The surfaces are
numbered below.
For this analysis the relative transmission calculation for surface 1 starts directly after surface
0's interface and ends directly after surface 1's interface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1259
Phase Aberration
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1260
Jx, Jy Jones electric field. See ” Defining the Initial Polarization”
Discussion
Polarization phase aberrations are induced by the effects of refraction through dielectric
media, and by reflection from metallic or dielectric mirrors. This feature computes for the
specified field position and wavelength the polarization phase aberration in the image space
for the X and Y orientations of the electric field vector as a function of entrance pupil
coordinate. The aberration is defined as the variation in the phase of the electric field in one
direction, such as X or Y, as a function of the pupil position. For example, if the electric field in
the X direction is (0.7 + 0.7i) for the chief ray (note the E field values are complex), and at some
other point in the pupil the electric field in the X direction is (-0.7 + 0.7i) then the polarization
phase aberration between these points is one-quarter wave (the phase of Ex changed from 45
degrees to 135 degrees, or one-quarter wave). Note this is completely distinct from the phase
differences between the Ex and Ey fields, which describe the polarization state (linear or
circular for example). For phase differences between Ex and Ey see “Power Pupil Map”.
Like the usual OPD plots, the polarization phase aberration is referenced to the chief ray.
However, there are cases where the chief ray phase cannot be determined in both orientations.
For example, in an axial symmetric system, if the incident polarization is linear in the Y
direction, there is zero intensity in the X direction for the chief ray, and therefore the X phase is
indeterminate. For other rays in the pupil, there is generally a slight rotation of the polarization,
and therefore the resulting electric field in the X direction yields a valid phase angle. To avoid
this discontinuity in the phase, OpticStudio averages two rays on either side of the chief ray to
interpolate the chief ray phase. The problem may still appear under certain circumstances,
even with this averaging technique. In all cases, the phase data is still valid, because the phase
aberration has no effect on image quality if the intensity is zero.
Transmission Fan
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1261
Generates a graph of the transmitted intensity for each field and wavelength as a function of
either tangential or sagittal pupil fans.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1262
Wavelength The wavelength number of the rays to trace.
Unpolarized If checked, the electric field definition is ignored and the unpolarized
computation is performed.
Discussion The polarization transmission fan is useful for determining the transmission
variation over the pupil as a function of field and wavelength. See “Polarization Analysis”.
Surface
Sag Table
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1263
Surface Sag
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1264
Sampling The size of the grid used. The sampling may be 33x33, 65x65, etc.
Contour Format The contour format string. For a discussion of the contour format string
syntax, see "The Contour Format String" below. The contours are defined in lens units.
Surface The surface number at which the sag will be computed and displayed.
Show As Choose surface plot, contour map, grey scale, or false color map as the display
option.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1265
Off-Axis Coordinates When checked, the plot will consider any apertures defined in the
Surface Properties of the surface. The coordinate system for the sag computation will have an
origin at the vertex of the off-axis part.
Valid apertures for this option will be: Circular Aperture, Rectangular Aperture, Elliptical
Aperture, User Aperture, and Floating Aperture.
Remove The Remove selection gives the option to remove “None”, “Base Radius”, “Best Fit
Sphere”, “Base Sag” or “Composite Sag”.
If “Base Radius” is selected, the base radius of curvature of the surface will be subtracted from
the current sag, and the difference will be reported.
If “Best Fit Sphere” is selected another option will appear labelled “Criterion” The Criterion
section will explain the options for Remove Bet Fit Sphere.
l in case STAR data is applied to the surface, the sag difference between the surface with
STAR effects applied and the original surface. This is useful to visualize small changes in
sag due to the FEA data.
l in case the surface is a Composite Base or Add-on, the sum of sag profiles of any com-
posite Add-on surfaces up to and including the surface above the one considered. This
is useful to visualize Composite Add-on profiles that are added to the Composite Base.
If “Composite Sag” is selected, the analysis displays the sag profile of the surface being
considered, ignoring any Composite Add-on surfaces added to it.
Criterion The Criterion selection appears when Remove Best Fit Sphere is selected and gives
the option to select “Minimum Volume”, “RMS, no offset”, “RMS, with offset”. When "Minimum
Volume" is selected, a new checkbox labelled "Reverse Direction" will appear. Reverse direction
changes the sign on the radius of curvature of the best-fit sphere. This results in fitting, for
example, a concave best fit sphere instead of a convex best fit sphere. These selections indicate
where the Best Fit Sphere will be subtracted from the surface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1266
Discussion:This feature accounts for the size and shape of any aperture present on the surface;
even if the aperture is decentered. The sag is computed on a uniform grid of points in XY
plane, and the Z value of the sag is the displayed data.
The Contour Format string allows some control over the appearance of the contour map.
If left blank, the default contour spacing will be selected. If a single value is entered, then the
contour spacing will be set to this value. For example, if 0.05 is entered, the contour interval
will be 0.05. If multiple values separated by spaces are entered, only those contours will be
drawn. For example, if "0.8 0.5 0.2" is entered, only those three contours will be drawn. If the
specified contour settings result in too many contours to be drawn properly, the default
number of contours will be selected.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1267
Surface Phase
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1268
Sampling The size of the grid used. The sampling may be 33x33, 65x65, etc.
Contour Format The contour format string. For a discussion of the contour format string
syntax, see “The Contour Format String”. The contours are defined in periods; each period is a
phase change of 2π .
Modulo-2pi If this is ticked, whenever the plot reaches a 2pi phase shift, it will restart the
phase plot. This option will draw the locations of the 2pi zones.
Surface The surface number at which the phase will be computed and displayed.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1269
Data Choose surface phase.
Show As Choose surface plot, contour map, grey scale, or false color map as the display
option.
Remove The Remove selection gives the option to remove “Piston”, “Tilt X”, “Tilt Y”, and
“Power”. These terms are calculated using a Zernike decomposition.
Discussion This feature accounts for the size and shape of any aperture present on the surface;
even if the aperture is decentered. The phase is computed on a uniform grid of points in XY
plane, and the phase value is the displayed data. This feature defines phase in units of periods;
so one period represents a phase change of 2π . Surfaces which do not impart a phase change
to the ray, such as the Standard surface, will display a phase of zero everywhere on the surface
phase display. See also the Surface Sag feature.
Surface Curvature
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1270
Sampling The size of the grid used. The sampling may be 33x33, 65x65, etc.
Contour Format The contour format string. This option will only appear when "Contour" is
selected under "Show As". For a discussion of the contour format string syntax, see “The
Contour Format String”. The contours are defined in lens units.
Show As Choose surface plot, contour map, grey scale, or false color map as the display
option.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1271
Off-Axis Coordinates If checked, the plot will consider any apertures defined in the Surface
Properties of the surface. The coordinate system for the sag computation will have an origin at
the vertex of the off-axis part.
Valid apertures for this option will be: Circular Aperture, Rectangular Aperture, Elliptical
Aperture, User Aperture, and Floating Aperture.
Remove The Remove selection gives the option to remove “None”, “Base Radius”, “Best Fit
Sphere”, “Base Sag” or “Composite Sag”.
If “Base Radius” is selected, the base radius of curvature of the surface will be subtracted from
the current curvature, and the difference will be reported.
If “Best Fit Sphere” is selected another option will appear labelled “Criterion” The Criterion
section will explain the options for Remove Bet Fit Sphere.
l in case STAR data is applied to the surface, the sag difference between the surface with
STAR effects applied and the original surface. This is useful to visualize small changes in
sag due to the FEA data.
l in case the surface is a Composite Base or Add-on, the sum of sag profiles of any com-
posite Add-on surfaces up to and including the surface above the one considered. This
is useful to visualize Composite Add-on profiles that are added to the Composite Base.
If “Composite Sag” is selected, the analysis displays the sag profile of the surface being
considered, ignoring any Composite Add-on surfaces added to it.
Criterion The Criterion selection appears when Remove Best Fit Sphere is selected and gives
the option to select “Minimum Volume”, “RMS, no offset”, “RMS, with offset”. When "Minimum
Volume" is selected, another checkbox with the title "Reverse Direction" will appear. Reverse
direction changes the sign on the radius of curvature of the best-fit sphere. This results in
fitting, for example, a concave best fit sphere instead of a convex best fit sphere. These
selections indicate where the Best Fit Sphere will be subtracted from the surface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1272
Discussion This feature accounts for the size and shape of any aperture present on the surface;
even if the aperture is decentered.
Surface Slope
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1273
Displays the tangential, sagittal, x, or y slope of a surface as a 2D color or contour map, or as a
3D surface plot.
Sampling The size of the grid used. The sampling may be 33x33, 65x65, etc.
Contour Format The contour format string. For a discussion of the contour format string
syntax, see “The Contour Format String”. The contours are defined in lens units.
Surface The surface number to for which the slope will be computed and displayed.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1274
Show As Choose surface plot, contour map, grey scale, or false color map as the display
option.
Off-Axis Coordinates When checked, the plot will consider any apertures defined in the
Surface Properties of the surface. The coordinate system for the sag computation will have an
origin at the vertex of the off-axis part.
Valid apertures for this option will be: Circular Aperture, Rectangular Aperture, Elliptical
Aperture, User Aperture, and Floating Aperture.
Remove The Remove selection gives the option to remove “None”, “Base Radius”, “Best Fit
Sphere”, “Base Sag” or “Composite Sag”.
If “Base Radius” is selected, the base radius of curvature of the surface will be subtracted from
the current slope, and the difference will be reported.
If “Best Fit Sphere” is selected another option will appear labelled “Criterion” The Criterion
section will explain the options for Remove Bet Fit Sphere.
l in case STAR data is applied to the surface, the sag difference between the surface with
STAR effects applied and the original surface. This is useful to visualize small changes in
sag due to the FEA data.
l in case the surface is a Composite Base or Add-on, the sum of sag profiles of any com-
posite Add-on surfaces up to and including the surface above the one considered. This
is useful to visualize Composite Add-on profiles that are added to the Composite Base.
If “Composite Sag” is selected, the analysis displays the sag profile of the surface being
considered, ignoring any Composite Add-on surfaces added to it.
Criterion The Criterion selection appears when Remove Best Fit Sphere is selected and gives
the option to select “Minimum Volume”, “RMS, no offset”, “RMS, with offset”. When "Minimum
Volume" is selected, an additional checkbox labelled "Reverse Direction" will appear. Reverse
direction changes the sign on the radius of curvature of the best-fit sphere. This results in
fitting, for example, a concave best fit sphere instead of a convex best fit sphere. These
selections indicate where the Best Fit Sphere will be subtracted from the surface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1275
Discussion This feature accounts for the size and shape of any aperture present on the surface;
even if the aperture is decentered.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1276
Displays the sag of a surface as a cross section.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1277
Surface The surface number to compute the sag display for.
Angle Choose the orientation angle in degrees relative to the local x axis for the cross section.
Off-Axis Coordinates When checked, the plot will consider any apertures defined in the
Surface Properties of the surface. The coordinate system for the sag computation will have an
origin at the vertex of the off-axis part.
Valid apertures for this option will be: Circular Aperture, Rectangular Aperture, Elliptical
Aperture, User Aperture, and Floating Aperture.
Remove The Remove selection gives the option to remove “None”, “Base Radius”, “Best Fit
Sphere”, “Base Sag” or “Composite Sag”.
If “Base Radius” is selected, the base radius of curvature of the surface will be subtracted from
the current sag, and the difference will be reported.
If “Best Fit Sphere” is selected another option will appear labelled “Criterion” The Criterion
section will explain the options for Remove Bet Fit Sphere.
l in case STAR data is applied to the surface, the sag difference between the surface with
STAR effects applied and the original surface. This is useful to visualize small changes in
sag due to the FEA data.
l in case the surface is a Composite Base or Add-on, the sum of sag profiles of any com-
posite Add-on surfaces up to and including the surface above the one considered. This
is useful to visualize Composite Add-on profiles that are added to the Composite Base.
If “Composite Sag” is selected, the analysis displays the sag profile of the surface being
considered, ignoring any Composite Add-on surfaces added to it.
Criterion The Criterion selection appears when Remove Best Fit Sphere is selected and gives
the option to select “Minimum Volume”, “RMS, no offset”, “RMS, with offset”. When "Minimum
Volume" is selected, another checkbox labelled "Reverse Direction" will appear. Reverse
direction changes the sign on the radius of curvature of the best-fit sphere. This results in
fitting, for example, a concave best fit sphere instead of a convex best fit sphere. These
selections indicate where the Best Fit Sphere will be subtracted from the surface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1278
Discussion This feature calculates the surface sag as a cross section across the full clear
diameter or full diameter of the surface. See also Surface Phase Cross Section.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1279
Displays the phase of a surface as a cross section.
Surface The surface number upon which the phase will be computed and displayed.
Angle Choose the orientation angle in degrees relative to the local x axis for the cross section.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1280
Remove The Remove selection gives the option to remove “Piston”, “Tilt X”, “Tilt Y”, and
“Power”. These terms are calculated using a Zernike decomposition.
Discussion This feature calculates the surface phase as a cross section across the full clear
diameter or diameter of the surface. This feature defines phase in units of periods; so one
period represents a phase change of 2π . Surfaces which do not impart a phase change to the
ray, such as the Standard surface, will display a phase of zero everywhere on the surface phase
display. See also the Surface Sag Cross Section feature.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1281
Sampling The sampling may be 33, 65, etc.
Surface The surface number for which the curvature will be computed and displayed.
Angle Choose the orientation angle in degrees relative to the local x axis for the cross section.
Off-Axis Coordinates If checked, the plot will consider any apertures defined in the Surface
Properties of the surface. The coordinate system for the sag computation will have an origin at
the vertex of the off-axis part.
Valid apertures for this option will be: Circular Aperture, Rectangular Aperture, Elliptical
Aperture, User Aperture, and Floating Aperture.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1282
Remove The Remove selection gives the option to remove “None”, “Base Radius”, “Best Fit
Sphere”, “Base Sag” or “Composite Sag”.
If “Base Radius” is selected, the base radius of curvature of the surface will be subtracted from
the current curvature, and the difference will be reported.
If “Best Fit Sphere” is selected another option will appear labelled “Criterion” The Criterion
section will explain the options for Remove Bet Fit Sphere.
l in case STAR data is applied to the surface, the sag difference between the surface with
STAR effects applied and the original surface. This is useful to visualize small changes in
sag due to the FEA data.
l in case the surface is a Composite Base or Add-on, the sum of sag profiles of any com-
posite Add-on surfaces up to and including the surface above the one considered. This
is useful to visualize Composite Add-on profiles that are added to the Composite Base.
If “Composite Sag” is selected, the analysis displays the sag profile of the surface being
considered, ignoring any Composite Add-on surfaces added to it.
Criterion The Criterion selection appears when Remove Best Fit Sphere is selected and gives
the option to select “Minimum Volume”, “RMS, no offset”, or “RMS, with offset”. When
"Minimum Volume" is selected, a checkbox labelled "Reverse Direction" will also appear.
Reverse direction changes the sign on the radius of curvature of the best-fit sphere. This
results in fitting, for example, a concave best fit sphere instead of a convex best fit sphere.
These selections indicate where the Best Fit Sphere will be subtracted from the surface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1283
Discussion This feature calculates the surface curvature cross section across the full clear
diameter or diameter of the surface. See also the Surface Sag Cross Section feature.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1284
Displays the slope of a surface as a cross section.
Off-Axis Coordinates When checked, the plot will consider any apertures defined in the
Surface Properties of the surface. The coordinate system for the sag computation will have an
origin at the vertex of the off-axis part.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1285
Valid apertures for this option will be: Circular Aperture, Rectangular Aperture, Elliptical
Aperture, User Aperture, and Floating Aperture.
Remove The Remove selection gives the option to remove “None”, “Base Radius”, “Best Fit
Sphere”, “Base Sag” or “Composite Sag”.
If “Base Radius” is selected, the base radius of curvature of the surface will be subtracted from
the current slope, and the difference will be reported.
If “Best Fit Sphere” is selected another option will appear labelled “Criterion” The Criterion
section will explain the options for Remove Bet Fit Sphere.
l in case STAR data is applied to the surface, the sag difference between the surface with
STAR effects applied and the original surface. This is useful to visualize small changes in
sag due to the FEA data.
l in case the surface is a Composite Base or Add-on, the sum of sag profiles of any com-
posite Add-on surfaces up to and including the surface above the one considered. This
is useful to visualize Composite Add-on profiles that are added to the Composite Base.
If “Composite Sag” is selected, the analysis displays the sag profile of the surface being
considered, ignoring any Composite Add-on surfaces added to it.
Criterion The Criterion selection appears when Remove Best Fit Sphere is selected and gives
the option to select “Minimum Volume”, “RMS, no offset”, “RMS, with offset”. When "Minimum
Volume" is selected, an additional checkbox labelled "Reverse Direction" will appear. Reverse
direction changes the sign on the radius of curvature of the best-fit sphere. This results in
fitting, for example, a concave best fit sphere instead of a convex best fit sphere. These
selections indicate where the Best Fit Sphere will be subtracted from the surface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1286
Discussion This feature calculates the surface slope cross section across the full clear diameter
or diameter of the surface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1287
For more information on coating calculations, see “Polarization Analysis”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1288
Computes the S, P, and average polarization intensity coefficients for reflection for the
specified surface as a function of incident angle.
Min Angle The minimum angle of incidence to plot. This defines the left edge of the plot.
Max Angle The maximum angle of incidence to plot. This defines the right edge of the plot.
Min Y The minimum y value to plot. This defines the bottom edge of the plot.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1289
Max Y The maximum y value to plot. This defines the top edge of the plot.
Face The face number which defines the interface to use, if the surface is a Non-sequential
Components surface.
Discussion: The incident angle is measured in the medium prior to the specified surface.
Computes the S, P and average polarization intensity coefficients for transmission for the
specified surface as a function of incident angle.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1290
See "Reflectivity vs. Angle" for settings.
Discussion The incident angle is measured in the medium prior to the specified surface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1291
Computes the S, P, and average polarization intensity coefficients for absorption for the
specified surface as a function of incident angle.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1292
See "Reflectivity vs. Angle" for settings
Discussion The incident angle is measured in the medium prior to the specified surface.
Computes the R (reflected) and T (transmitted) diattenuation for the specified surface as a
function of incident angle.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1293
See "Reflectivity vs. Angle" for settings.
Discussion The incident angle is measured in the medium prior to the specified surface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1294
For sequential surfaces, this feature computes the S and P polarization phase for reflection (if
the glass is MIRROR) or for transmission (if the glass is not MIRROR) as a function of incident
angle. For non-sequential objects, this feature computes the S and P polarization phase for
reflection (if the material is MIRROR) or for transmission (if the material is not MIRROR) as a
function of incident angle.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1295
See "Reflectivity vs. Angle" for settings.
Discussion The incident angle is measured in the medium prior to the specified surface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1296
Computes the retardance for the specified surface as a function of incident angle.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1297
Discussion The incident angle is measured in the medium prior to the specified surface.
Computes the S, P, and average polarization intensity coefficients for reflection for the
specified surface as a function of incident wavelength.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1298
Min Wave The minimum wavelength to plot. This defines the left edge of the plot.
Max Wave The maximum wavelength to plot. This defines the right edge of the plot.
Min Y The minimum y value to plot. This defines the bottom edge of the plot.
Max Y The maximum y value to plot. This defines the top edge of the plot.
Face The face number which defines the interface to use, if the surface is a Non-sequential
Components surface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1299
Reverse Direction If the selected surface is a Non-sequential Components surface, choosing
this option will reverse the incident media and substrate.
Computes the S, P, and average polarization intensity coefficients for transmission for the
specified surface as a function of incident wavelength.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1300
See "Reflectivity vs. Wavelength" for settings.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1301
Computes the S, P, and average polarization intensity coefficients for absorption for the
specified surface as a function of incident wavelength.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1302
See "Reflectivity vs. Wavelength" for settings
Computes the R (reflected) and T (transmitted) diattenuation for the specified surface as a
function of incident wavelength.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1303
See "Reflectivity vs. Wavelength" for settings
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1304
For sequential surfaces, this feature computes the S and P polarization phase for reflection (if
the glass is MIRROR) or for transmission (if the glass is not MIRROR) as a function of incident
wavelength. For non-sequential objects, this feature computes the S and P polarization phase
for reflection (if the material is MIRROR) or for transmission (if the material is not MIRROR) as a
function of incident wavelength.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1305
See "Reflectivity vs. Wavelength" for settings
Computes the retardance for the specified surface as a function of incident wavelength.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1306
See "Reflectivity vs. Wavelength" for settings
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1307
Diffraction Efficiency Analyses
(sequential ui mode)
Graphs of Diffraction Efficiency for Sequential mode volume hologram surfaces. These are
calculated using the Kogelnik approximation method for thick holograms. For more
information about calculation methods, see Calculation assumptions and limitations. The
diffraction efficiency is determined by tracing a ray from the object to the specified surface and
calculating the transmission rate. The polarization state of the traced ray is determined by the
settings in System Explorer…Polarization.
These analyses can be used with Hologram 1, Hologram 2, Toroidal Hologram, and Optically
Fabricated Hologram surface types when they are set up as a volume hologram. Details of how
to set the volume hologram parameters are in the respective Surface type help files.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1308
Graph of Diffraction Efficiency for volume hologram surfaces as a function of incident angle
and wavelength using the Kogelnik approximation method for thick holograms. For more
information about calculation methods, see Calculation assumptions and limitations. The
diffraction efficiency is determined by tracing a ray from the object to the specified surface and
calculating the transmission rate. The polarization state of the traced ray is determined by the
settings in System Explorer…Polarization.
The Field Type must be Angle in the System Explorer. During analysis, the Y value of the Field is
varied and the X value is fixed.
This analysis can be used with Hologram 1, Hologram 2, Toroidal Hologram, and Optically
Fabricated Hologram surface types when they are set up as a volume hologram. Details of how
to set the volume hologram parameters are in the respective Surface type help files.
Sampling The size of the sampling grid used. The sampling may be 33x33, 65x65, etc.
Wavelength Selects the wavelength number as defined in the System Explorer to use for the
analysis.
Field Selects the field as defined in the System Explorer to use for the analysis.
Minimum Angle Minimum incident angle of the chief ray in degrees. If both Minimum Angle
and Maximum Angle are equal to zero, Minimum Angle will be internally set to 99% of the
selected Field’s Y value.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1309
Maximum Angle Maximum incident angle of the chief ray in degrees. If both Minimum Angle
and Maximum Angle are equal to zero, Maximum Angle will be internally set to 101% of the
selected Field’s Y value.
Minimum Wavelength Minimum wavelength of the incident ray in microns. If both Minimum
Wavelength and Maximum Wavelength are set to zero, Minimum Wavelength will be internally
set to 99% of the selected Wavelength.
Graphs of Diffraction Efficiency for volume hologram surfaces as a function of incident angle
using the Kogelnik approximation method for thick holograms. For more information about
calculation methods, see Calculation assumptions and limitations. The diffraction efficiency is
determined by tracing a ray from the object to the specified surface and calculating the
transmission rate. The polarization state of the traced ray is determined by the settings in
System Explorer…Polarization.
The Field Type must be Angle in the System Explorer. During analysis, the Y value of the Field is
varied and the X value is fixed.
This analysis can be used with Hologram 1, Hologram 2, Toroidal Hologram, and Optically
Fabricated Hologram surface types when they are set up as a volume hologram. Details of how
to set the volume hologram parameters are in the respective Surface type help files.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1310
Sampling The number of the sampling points used. The sampling may be 33, 65, etc.
Wavelength Selects the wavelength number as defined in the System Explorer to use for the
analysis.
Field Selects the field as defined in the System Explorer to use for the analysis.
Minimum Angle Minimum incident angle of the chief ray in degrees. If both Minimum Angle
and Maximum Angle are equal to zero, Minimum Angle will be internally set to 99% of the
selected Field’s Y value.
Maximum Angle Maximum incident angle of the chief ray in degrees. If both Minimum Angle
and Maximum Angle are equally to zero, Maximum Angle will be internally set to 101% of the
selected Field’s Y value.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1311
Graphs of Diffraction Efficiency for volume hologram surfaces as a function of wavelength
using the Kogelnik approximation method for thick holograms. For more information about
calculation methods, see Calculation assumptions and limitations. The diffraction efficiency is
determined by tracing a ray from the object to the specified surface and calculating the
transmission rate. The polarization state of the traced ray is determined by the settings in
System Explorer…Polarization.
This analysis can be used with Hologram 1, Hologram 2, Toroidal Hologram, and Optically
Fabricated Hologram surface types when they are set up as a volume hologram. Details of how
to set the volume hologram parameters are in the respective Surface type help files.
Sampling The number of the sampling points used. The sampling may be 33, 65, etc.
Wavelength Selects the wavelength number as defined in the system explorer to use for the
analysis.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1312
Field Selects the field as defined in the System Explorer to use for the analysis.
Minimum Wavelength Minimum wavelength of the incident ray in microns. If both Minimum
Wavelength and Maximum Wavelength are equal to zero, Minimum Wavelength will internally
be set to 99% of the selected Wavelength.
Kogelnik method
Diffraction Efficiency of a volume hologram can be determined by calculating the electric field
of diffracted rays using Kogelnik’s method. This has an advantage over other methods as it
accurately predicts the efficiency of the 0th and 1st orders for volume phase gratings, however
this accuracy decreases when the thickness of the hologram is too low or the index
modulations are too large.
The n1 and n2 parameters of the hologram surface must be carefully set to the refractive
indexes seen by construction beams 1 and 2 outside of the hologram during construction.
l Index modulation cannot be too large compared to the average index of the hologram.
A rule of thumb is dn/n < 0.16 for reflection and dn/n < 0.06 for transmission holo-
grams.
l The hologram is assumed to be thick such that energy from the input ray will trans-
ferred into direct 0th or diffracted 1st order waves. To ensure this, a rule of thumb is:
l There can only be one set of fringes in the hologram. Multiplexing is not allowed.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1313
More details can be found in the following papers:
l Kogelnik, H., "Coupled wave theory for thick hologram gratings," Bell Syst. Tech. J. 48,
2909-2947 (1969)
l Cheng, H. and Tian, X., "An advanced ray-tracing model for multi-color holographic
optical elements," Proc. SPIE 11188, Holography, Diffractive Optics, and Applications IX,
1118817 (2019)
Report Graphic
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1314
The Report Graphic feature generates a graphical window that simultaneously displays 4, 6, or
9 analyses.
The primary advantage of this feature is that multiple analyses may be printed on a single
page, making a suitable summary for reports, archival documentation, or promotional
literature, and each report may be customized and saved to allow easy report generation from
file to file. Reports for 2x2 are saved with the extension .22, 2x3 with the extension .23, and 3x3
with the extension .33.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1315
Settings
There are drop-down menus that allow selection of both graphic and text analyses for each
position within the Report Graphic window. An analysis does not need to be open in a
separate window to be selected for the Report Graphic.
To save the report with a custom name, select “Save As” from the settings. The report name
will then appear as a menu option for quick regeneration of the report.
Additionally, the layout mode allows customization of how the images are aligned. Options are
Top Left, Centered, and Clustered.
To change the settings for an individual analysis within the Report Graphic, click on the
corresponding tab at the bottom of the window. This will provide access to the settings and
toolbar for each analysis.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1316
Surface Data
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1317
SurfaceThe surface number to display the data for.
Discussion
This feature generates a text window which displays surface-specific data. The data includes
surface and element powers and focal lengths, edge thickness, index of refraction, and other
data for the surface.
If the glass type of the surface is a “model” glass, then OpticStudio will list out the index of
refraction at each defined wavelength calculated from the model glass parameters. Also listed
is the name of the “Best Fit Glass”, which is the name of the glass in the currently loaded
catalog(s) which has the closest index of refraction to the model glass in an RMS sense.
Specifically, OpticStudio computes the index error as the sum of the squares of the difference
between the model index and the actual glass index using the dispersion formulas. The sum is
over the defined wavelengths. The index error is computed for every glass in the current
catalogs, and the glass with the lowest RMS index deviation is designated as the best fit glass.
Note that the best fit glass may have a different V number than the model glass, however, this
is due to the approximations made in the model glass dispersion. Since index of refraction is
the physically significant parameter, only the index is used is making the glass selection. When
changing from model glass to a real “fixed” glass, the same algorithm is used to make the
selection. For more information on model glasses, see “Using model glasses”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1318
System Data
Discussion This feature generates a text window which lists many system-related parameters,
such as pupil positions and sizes, magnification, F/#, etc.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1319
Prescription Data (reports group, the
analyze tab, sequential ui mode)
This function generates a list of all surface data, and summarizes the lens system. This is the
feature to use for printing the contents of the Lens Data Editor.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1320
General Data Includes F/#, pupil positions, magnification, etc.
Surface Data Surface type, radii, thickness, glass, clear semi-diameter or semi-diameter, conic.
Surface Detail Surface Parameter data. All NSC object data is also listed in this section for NSC
groups.
Index Data Index of refraction and TCE data for each wavelength/surface.
Global Vertex Global coordinates of the vertex and the rotation matrix for each surface. See
“Global Coordinate Reference Surface” for a discussion of this data.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1321
Center Of Curvature Global coordinates of the center of curvature of rotationally symmetric
surfaces. The radius, position, and orientation of the surface are used to determine the point at
the vertex center of curvature. The location of this point is useful for alignment.
F/ Numbers Lists working F/# for each field position and wavelength combination.
Cardinal Points Lists the locations of focal, principal, anti-principal, nodal, and anti-nodal
points.
POP Settings Lists the surface by surface settings used by the Physical Optics Propagation
feature.
Files Used Lists all the files used by the optical system model, including glass data, macros,
extensions, CAD files, DLL files, and others.
Discussion This report lists specification data, indices of refraction, global coordinates,
element volumes, and more. It is suitable for describing the lens prescription.
When OpticStudio computes element volumes for spherical or plane standard surfaces with
circular edges, the edge of the surface with the smaller diameter is assumed to be “squared
up” to the clear semi-diameter or semi-diameter of the larger surface. The volume is exact for
this common special case.
For other elements, with possibly aspheric faces, elliptical, annular, or rectangular apertures
and/or decentered apertures, a numerical integration technique is used that yields
approximate volumes to an accuracy of about 0.1%. If the surface is rotationally symmetric, the
edge of the surface with the smaller diameter is “squared up” to the clear semi-diameter or
semi-diameter of the larger surface. Otherwise, the edge of the surface with the smaller
diameter is “tapered” to the clear semi-diameter or semi-diameter of the larger surface. If zero
volume is reported than the algorithm is unable to compute the volume to sufficient accuracy.
This happens when the aperture types are not the same, or have different sizes or decenters.
When computing the density of elements, the density in grams per cubic centimeter for a
catalog glass is retrieved from the glass catalog. For gradient index surfaces, OpticStudio
assumes the density is 3.6 g/cc, which may not be a good estimate.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1322
Displays in a graphic window a summary of the system data, similar to the text based system
data report.
Discussion This graphic is primarily used to display a summary of system data within the
printed page of the report graphics 4 or 6 feature; described in “Report Graphics 4/6”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1323
This feature lists for the selected range of surfaces and wavelengths the locations of the focal,
principal, anti- principal, nodal, anti-nodal planes. The calculation is done for any defined
wavelength and either the X-Z or Y-Z orientation.
First Surface The starting surface number for the cardinal points calculation.
Last Surface The ending surface number for the cardinal points calculation.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1324
Wavelength The wavelength number to use for the computation.
Orientation Select whether the cardinal points are calculated in the YZ or XZ plane.
Discussion The term cardinal planes (sometimes called cardinal points) refers to those special
conjugate positions where the object and image surfaces have a specific magnification. The
cardinal planes include:
Except for the focal planes, the cardinal planes are conjugates with each other, that is, the
image space principal plane is conjugate with the object space principal plane, etc. If the lens
has the same index in both object space and image space, the nodal planes are identical to the
principal planes.
The object space planes are measured from the First Surface, and the image space planes are
measured from the Last Surface. Note that the material of the image plane, or Last Surface, will
affect the calculation of the cardinal points.
This feature may not return reliable results if coordinate breaks or non-centered optics are
included within the specified surface range.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1325
Universal Plot 1-D
Displays as either a plot or as a text listing the value of any optimization operand as a function
of one other parameter. See also “Universal Plot 2-D”.
Select either surface, system, multi-configuration, or NSC data as the independent variable.
Select the parameter to use as the independent variable. The available selections include
radius, curvature, thickness, conic, and parameter values if surface parameters are chosen. For
system parameters, the selections include the system aperture, field and wavelength data,
apodization factor, temperature, and pressure. For configuration data, all multi-configuration
operands are listed. For NSC data, object position and parameter data are listed.
The surface number for the independent variable parameter if the parameter is associated with
a surface. This field is used for the configuration number if configuration data is selected. If
NSC data is selected, this field is used for the object number.
# of Steps The number of values between the start and stop values, inclusive, to compute the
dependent variable function value.
Operand The optimization operand to use as the dependent variable function. The current
system merit function is also included as "Merit". If the system merit function is selected, then
either the entire merit function or any specific operand’s value may be selected using the
"Line" control below.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1326
Line The optimization operand # to use as the dependent variable function if "Merit" is
selected for the Operand.
Int1/Int2 The Int1 and Int2 values for the selected operand. The dialog box will display the
short name for the Int1 and Int2 values to aid in identifying the data that needs to be supplied.
If the edit control is grayed out; then the selected operand does not use that value.
Data1-Data4 The Data values for the selected operand. The dialog box will display the column
heading name for these values to aid in identifying the data that needs to be supplied. If the
edit control is grayed out; then the selected operand does not use that value.
Min/Max Plot Value The min and max value to plot for the dependent variable (Y) function. If
both of these values are zero, then a default scale will be chosen. If either one is not zero, then
the y range of the plot will extend from the minimum to the maximum. If the data does not fit
within the specified range, then the data may plot beyond the borders of the data box.
Plot Title Any text may be entered which will be used as the title for the plot or text listing.
Save As New Universal Plot This will save the current settings in a Universal Plot 1D (UPL) file
specified by the user. Any name which may be used as a valid file name may be entered.
Although the "browse" window allows the file to be saved in any folder, OpticStudio will only
recognize the file if it resides in the <data>\Miscellaneous folder (see “Folders”).
Once the settings are saved, the file name will appear as a menu option under the Universal
Plot 1D menu option for quick regeneration of the plot.
Load From This will load the settings from a previously saved Universal Plot 1D (UPL) file
specified by the drop down list to the right of the button.
Discussion
This feature will either plot as a graph or create a text listing of the value of any optimization
operand as a function of a single system, surface, or multi-configuration value.
For example, suppose a plot of the sagittal MTF at 30 lp/mm was needed as a function of the
decenter of a lens group (which may be a useful diagnostic for tolerancing analysis). Since the
MTFS operand computes the sagittal MTF, the Universal Plot can generate such a graphic or
text listing. See “Optimization operands” for a list of available optimization operands. A
decenter of a lens group is defined by Parameter 1 or 2 on the relevant coordinate break
surface, and Parameter 1 and 2 are both listed in the available surface group parameters.
Because of the number of different plots this feature can generate, there are no intelligent
defaults for either the independent or dependent settings. These values need to be carefully
provided in the settings dialog box. If the optimization operand cannot be computed, an error
message will be displayed and the plot will not be generated.
Because many optimization operands accept Hx and Hy values to define the field point for the
calculation, these operands may require that the number of fields be set to 1, then set Hx = 0
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1327
and Hy = 1, then finally choose Y Field 1 as the independent variable for a plot of the operand
as a function of field. A similar trick works for getting plots as a function of wavelength.
Some individual operands, like DIFF and SUMM, have no meaning if selected from the
"Operand" column because these operands are only defined when used as part of a larger
merit function. If results from a calculation like DIFF are required, then the merit function
should be selected from the Operand list and the individual DIFF’s within the merit function
selected for the "Line".
The escape key will terminate the analysis if the computation is taking too long.
Please note that since the Universal Plot analyses work on copies of the system data, macro
commands that manipulate the user interface, such as CLOSEWINDOW, WINL(), and GETT() are
not effective and should not be used in macros called by the Universal Plot using the ZPLM
operand.
Displays as either a plot or as a text listing the value of any optimization operand as a function
of two other parameters. See also “Universal Plot 1-D”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1328
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1329
Independent Variable X or Y Settings
Select either surface, system, multi-configuration, or NSC data as the independent variable.
Select the parameter to use as the independent variable. The available selections include
radius, curvature, thickness, conic, and parameter values if surface parameters are chosen. For
system parameters, the selections include the system aperture, field and wavelength data,
apodization factor, temperature, and pressure. For configuration data, all multi-configuration
operands are listed. For NSC data, object position and parameter data are listed.
The surface number for the independent variable parameter if the parameter is associated with
a surface. This field is used for the configuration number if configuration data is selected. If
NSC data is selected, this field is used for the object number.
Start/Stop Value The beginning and ending range of the independent variable.
# of Steps The number of values between the start and stop values, inclusive, to compute the
dependent variable function value. The minimum value is 2.
Operand The optimization operand to use as the dependent variable function. The current
system merit function is also included as "Merit". If the system merit function is selected, then
either the entire merit function or any specific operand’s value may be selected using the
"Line" control below.
Line The optimization operand # to use as the dependent variable function if "Merit" is
selected for the Operand.
Int1/Int2 The Int1 and Int2 values for the selected operand. The dialog box will display the
short name for the Int1 and Int2 values to aid in identifying the data that needs to be supplied.
If the edit control is grayed out; then the selected operand does not use that value.
Data1-Data4 The Data values for the selected operand. The dialog box will display the column
heading name for these values to aid in identifying the data that needs to be supplied. If the
edit control is grayed out; then the selected operand does not use that value.
Display Settings
Show As Choose surface plot, contour map, grey scale, or false color map as the display
option.
Contour Format The contour format string. For a discussion of the contour format string
syntax, see “The Contour Format String”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1330
Min/Max Plot Scale These controls define the min and max range of the Z-direction scale for
the display. If the value is set to exactly zero, a default value will be selected. To define a value
of zero, use a very small number such as 1.0E-20. If the defined plot scale values do not span
the resulting data, the plot may clip, saturate, or otherwise distort the data display. These
settings have no effect on the surface or contour plots.
Plot Title Any text may be entered which will be used as the title for the plot or text listing.
Save As New Universal Plot This will save the current settings in a Universal Plot 2D (UP2) file
specified by the user. Any name which may be used as a valid file name may be entered.
Although the "browse" window allows the file to be saved in any folder, OpticStudio will only
recognize the file if it resides in the <data>\Miscellaneous folder (see “Folders”).
Once the settings are saved, the file name will appear as a menu option under the Universal
Plot menu option for quick regeneration of the plot.
Load From This will load the settings from a previously saved Universal Plot 2D (UP2) file
specified by the drop down list to the right of the button.
Discussion
This feature will either plot as a graph or create a text listing of the value of any optimization
operand as a function of any two system, surface, or multi-configuration values.
For example, suppose a plot of the sagittal MTF at 30 lp/mm was needed as a function of the X
and Y decenter of a lens group (which may be a useful diagnostic for tolerancing analysis).
Since the MTFS operand computes the sagittal MTF, the Universal Plot 2D can generate such a
graphic or text listing. See “Optimization operands” for a list of available optimization
operands. The X and Y decenter of a lens group is defined by Parameters 1 and 2 on the
relevant coordinate break surface, and Parameters 1 and 2 are both listed in the available
surface group parameters.
Because of the number of different plots this feature can generate, there are no intelligent
defaults for either the independent or dependent settings. These values need to be carefully
provided in the settings dialog box. If the optimization operand cannot be computed, an error
message will be displayed and the plot will not be generated.
Because many optimization operands accept Hx and Hy values to define the field point for the
calculation, these operands may require that the number of fields be set to 1, then set Hx = 0
and Hy = 1, then finally choose Y Field 1 as the independent variable for a plot of the operand
as a function of field. A similar trick works for getting plots as a function of wavelength.
Some individual operands, like DIFF and SUMM, have no meaning if selected from the
"Operand" column because these operands are only defined when used as part of a larger
merit function. If results from a calculation like DIFF are required, then the merit function
should be selected from the Operand list and the individual DIFF’s within the merit function
selected for the "Line".
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1331
When selecting independent variables that are controlled by Multi-Configuration operands,
note that the Multi- Configuration operand will override the changes made to the independent
variable. For this reason OpticStudio automatically alters the corresponding data on the Multi-
Configuration operand as well.
The escape key will terminate the analysis if the computation is taking too long.
Please note that since the Universal Plot analyses work on copies of the system data, macro
commands that manipulate the user interface, such as CLOSEWINDOW, WINL(), and GETT() are
not effective and should not be used in macros called by the Universal Plot using the ZPLM
operand.
Stray Light
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1332
Ghost Focus Generator
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1333
First Surface The first surface to consider reflections from.
Save Files If checked, the files used to compute the ghost ray trace are saved to a file.
Image Surface Only If checked, only data for the image surface will be shown when
computing double bounce ghosts.
Ghost Reflector Coating The name of the coating, if any, to apply to surfaces that will be
changed from refractive to reflective to simulate ghosting. For example, if a 1% reflective
coating is applied to all optical surfaces; then enter a coating name of "I.99". The result will be a
surface that reflects 1% of the energy; and this will aid in accurate computation of total ghost
energy using the polarization transmission analysis, if desired. This example uses an ideal
coating, but real coatings may also be used as ghost coatings if the substrates are properly
defined in the coating model. This feature is intended for computing detailed transmission
data when looking at the generated and saved ghost files using polarization ray tracing and
the transmission feature, see “Transmission”.
Discussion
This feature may not work correctly for systems which contain coordinate breaks or some
special surface types such as the non-sequential components surface. Only the current
configuration is considered. Afocal mode is turned off for the purposes of this analysis.
This feature generates lens files which are derived from the current lens prescription data. The
generated files are set up to reflect light at a given surface, rather than refract it. The portion of
the optical system prior to the new reflective surface is then duplicated so the rays can be
traced back through. The purpose of this analysis is to check whether or not rays reflected
from any optical surface can form "ghost" images on other components or near the focal
plane. These effects are significant in high power laser systems, where focused reflections can
damage optics. Ghost images also reduce contrast. Both single and double reflections are
supported.
For each ghost system, the paraxial marginal ray height, paraxial ray F/#, and real ray RMS spot
radius on axis are listed. Glass surfaces which may have an internal focus are also indicated. For
the image surface, when doing double-bounce ghost analysis, the paraxial marginal and chief
ray heights, distance from the image surface to the ghost, and the EFL of the ghost system are
also provided.
The lens files generated are stored in the file GHfffsss.ZMX, and these lens files can be opened
for more analysis. The fff is the number of the first ghost surface, and sss is the number of the
second ghost surface. For example GH007002.ZMX is a ghost focus file of the double bounce
off surface 7 then 2. For single bounce ghosts, only the fff number is non-zero.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1334
Dummy surfaces (those that do not define an index boundary) and mirror surfaces are ignored
as candidate bounce surfaces. The only exception is the image surface, which is considered a
potential first bounce surface even if there is no index change on that surface.
Not all ghost reflection configurations can be traced; there are occasionally problems with
total internal reflection or rays completely missing surfaces. The GHfffsss.ZMX file may need to
be opened and modified to analyze it in detail.
If the first reflected surface is before the stop, then the entrance pupil position is incorrectly
calculated as well. This problem is easily overcome (for the purposes of analyzing the ghosts
only) by using the following procedure before you begin the ghost focus generation:
These steps will give you a real entrance pupil in object space, and the rays will be correctly
traced when reflected off surfaces before the stop. Ghost focus analysis can be very complex
for moderately complicated systems, and care is required in interpreting the results of this
analysis.
YNI Contributions
This feature lists for each surface the paraxial YNI value, which is proportional to the Narcissus
contribution of that surface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1335
Wavelength The wavelength number to use for the calculation.
Discussion In sequential mode, the YNI Contributions analysis and YNIP operand give first-
order approximations to the Narcissus contribution of the surface.
The YNI contribution of each surface is the product of the paraxial marginal ray height times
the index times the angle of incidence at the surface defined by Surf at the wavelength defined
by Wave. This quantity is related to the Narcissus contribution of the specified surface.
The following equation shows the cold return for on-axis image for a single surface in the
system. The Narcissus intensity is proportional to the summation of cold return of all refractive
surfaces. Therefore, to reduce the Narcissus intensity, the YNI needs to be as large as possible.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1336
For a more detailed discussion, see “Narcissus: reflections on retroreflections in thermal
imaging systems,” Applied Optics, Vol. 21, No. 18, p3393 (1982).
Biocular Analysis
Analysis of biocular systems, where both eyes look through the same optical path to see a
projected image.
Field of View
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1337
Displays the field of view for up to four configurations. See the discussion for important
assumptions before using this feature.
Config 1, 2, 3, 4 Selects which configurations to display the field of view data for.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1338
Top/Bottom Y The upper and lower limits in field of view units.
Use Angles If checked, the field of view units are degrees, otherwise, the units are direction
cosines.
Discussion
This feature primary usage is the analysis of biocular systems, where both eyes look through
the same optical path to see a projected image. It is intended to show the field of view for up
to four configurations. Field of view in this context means the angle of rays emanating from the
stop surface, not the object surface, which are unvignetted all the way to the image surface.
To calculate the unvignetted field of view, OpticStudio launches rays from the centre of the
STOP, ignoring all surfaces in front of the STOP. This is based on the assumption that the chief
ray goes through the centre of the STOP, regardless of where the STOP is placed in the system.
So OpticStudio launches rays from the STOP centre: XYZ of (0, 0, 0). The grid of rays is traced
from the STOP surface to the Image Surface. The initial LMN direction cosines of this grid of
rays are chosen from the min to the max scan angles (defined in the settings by Left X, Right X,
Bottom Y, Top Y). OpticStudio records the maximum extent of the ray in direction cosine space
(L & M values) for a ray that is not vignetted. As soon as the ray is vignetted, this direction
cosine coordinate is recorded and displayed on the plot.
To summarize, that analysis acts as a Multi-Configuration Vignetting plot for all optics after the
STOP. It traces the chief ray from the center of stop and reports at what angular extent this
chief ray becomes vignetted. The field of view is computed by tracing chief rays at various
angles from each configuration. If the ray passes all apertures, then the point on the plot
corresponding to that angle will be inside of the closed curve for that configuration. Each
configuration will generate a closed curve representing the limits of the field of view for that
configuration. The ray tracing is done iteratively to determine the exact angles at which the
chief rays become vignetted.
l The field of view is either angles in degrees or in direction cosines directly. The angles/-
cosines are measured along the chief ray from the stop position relative to the local Z
axis at the stop surface. Surfaces prior to the STOP are ignored.
l The image surface is assumed to be the location of the image the eyeball is looking at.
Each selected configuration should represented a single (usually decentered) eyeball
position.
l The eyeball decenter should be set up so that the X, Y coordinates on the image sur-
face represent the same point on the image source in all configurations. For example, if
the image source is a Cathode-Ray Tube (CRT) display, then the point with image
coordinates (x = 1, y = 2) should correspond to the same physical location on the CRT
in all configurations.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1339
l All surfaces should have fixed apertures for the purposes of vignetting rays that are out-
side of the field of view.
Units:
l If the field of view units are cosines, then the plot is linear in cosine space, with the Z dir-
ection cosine determined from the X and Y direction cosines.
l If the field of view units are angles, then the direction cosines of the chief rays are
determined from the X and Y field angles using these formulas:
Dipvergence/Convergence
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1340
Left Eye Config Defines the configuration to use as the left reference eye.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1341
Right Eye Config Defines the configuration to use as the right eye, whose dipvergence and
convergence is determined relative to the left eye.
Do X Scan If checked, the plot scan is across the X direction field of view, otherwise, the scan is
across the Y direction field of view.
Use Angles If checked, the field of view units are degrees, otherwise, the units are direction
cosines.
Min/Max Angle / Cosine Sets the limits of the scan in X or Y, in either cosine space or in
degrees. Note the limits do not need to be symmetric, and the min value need not be less than
the max value.
X/Y Angle/Cosine 1-6 If "Do X Scan" is checked, then up to 6 Y angles/cosines offsets may be
selected for display. If "Do X Scan" is unchecked, then up to 6 X angles/cosines offsets may be
selected for display. To turn off one or more of the offset values, set the value to -99.
Convergence Offset This value is subtracted from the computed convergence value. This
allows only the deviation from the desired value to be displayed.
Discussion
When two eyes are used to look through a biocular lens, there is usually a small angular
difference between the direction the two eyes must look to see the same image point.
viewer’s head so the chief rays from the two eye positions would converge as
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1342
they move toward the lens and away from the viewer’s head.
l Divergence means that the two chief rays diverge as the rays propagate toward
the lens, as if to see a virtual image point behind the head.
l Convergence and divergence are really the same thing from a computational
standpoint. OpticStudio uses the common convention that convergence is a
positive value and divergence is a negative value; for this reason only the term
convergence will be used in the subsequent discussion, with the understanding
that if the convergence is negative then it is properly called divergence. Usually,
convergence is more tolerable than divergence and the two aberrations may
have different specifications.
Dipvergence and convergence are both measured in milliradians, and typical limits are on the
order of 1.0 milliradians for visual systems.
The computation proceeds for a given point in the field of view by tracing a reference ray in
the left eye configuration. The same angle chief ray is then traced in the right eye
configuration. In general, the right eye ray will not land on the exact same X, Y coordinates on
the image surface as the left eye reference ray did. OpticStudio iterates the right eye trace until
the chief ray is found that matches the left eye reference ray intercept coordinates. The
resulting right eye chief ray will in general make some angle with respect to the left eye in both
the vertical and horizontal directions, and it is these angles that are the dipvergence and
convergence, respectively.
Note that both the left eye and the right eye chief rays must pass all surfaces without errors
and without vignetting for the computation to be valid. If both rays do not trace, no data will
be returned for that field of view. The field of view overlap between the configurations is very
useful for setting appropriate min/max scan values, see the “Field of View” for determining the
field of view overlap.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1343
It is possible for the iteration required for the right eye to fail. This typically happens if either
no solution exists or if the dipvergence/convergence is so large that algorithm becomes
unstable. Failed iteration will usually show up as gaps in the plot.
PAL/Freeform
This features computes optical power or effective focal length as a function of pupil position.
See also “Power Field Map”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1344
Sampling The rectangular grid size to use for the analysis.
Field The field number for which the calculation should be performed.
Offset A user defined offset value that is added to the computed data.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1345
Surface The last surface with optical power. The power and EFL data is computed for the
system as a whole up to and including refraction from this surface. See the discussion below.
Data The data to be computed. The options are spherical, cylinder, maximum, minimum,
tangential, sagittal, Y direction, X direction, and Astigmatic (X minus Y) optical power in
diopters or effective focal length (EFL) in lens units.
Show As Choose surface plot, contour map, grey scale, or false color map as the display
option. A scan across the X- or Y-field direction is also available.
Contour Format The contour format string. For a discussion of the contour format string
syntax, see “The Contour Format String”.
Discussion
This feature computes optical power or focal length as a function of pupil coordinate. The
power or focal length is determined for the optical system as a whole up to and including
refraction from any surface. The method used is to trace a ring of real rays around a central
reference ray at each point in the pupil. The ray data are used to determine the focal length for
each pupil position. This focal length can then be used to compute the optical power in units
of diopters (inverse meters). In the general case, the focal length is a function of orientation. By
tracing a ring of rays, the average, maximum, and minimum optical power or focal length
around the reference ray can be determined. From this data, several types of optical power can
be computed. Note that the definitions used by this feature may vary from other uses of these
terms.
The spherical power is given by the average power over the ring of rays. The maximum and
minimum powers are the extreme values over the ring of rays. The cylinder power is defined as
the difference between the maximum and minimum powers. Note using this definition the
amount of cylinder power is always positive. For cylinder, the EFL value reported is the
difference between the maximum and minimum focal lengths. For astigmatic EFL, the value
reported is the difference between the X and Y direction focal lengths.
This feature can also compute the power along the tangential or sagittal directions. In this
context, the tangential direction is along the plane that contains both the chief ray and the
local z axis in object space. The sagittal direction is orthogonal to the tangential direction. Also
available are the Y and X direction optical powers. The directions are defined by the local
coordinate orientation on the entrance pupil. Astigmatic power is defined as the X direction
power minus the Y direction power.
The surface setting should define the last surface of the portion of the lens being evaluated
that has optical power. It is recommended that this be set manually to the correct value rather
than use the default "Image" surface setting. The reason is that exact ray tracing is used to
compute the optical power, and the most accurate data is the ray data immediately after
refracting from the last powered surface. OpticStudio may not be able to correctly resolve
some sign ambiguities if the rays propagate a long way past the lens.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1346
For example when rays are close to parallel, the projected focus can easily flip from the front of
the system to the back due to the finite precision of the computation. A high effective focal
length (10000 for instance) may indicate such a case.
The "offset" value is a user defined value added to all the computed data. This feature is useful
for evaluating the deviation relative to some user defined reference value.
This features computes optical power or effective focal length as a function of field position. A
common application of this feature is analysis of the spherical and cylinder power of a
Progressive Addition Lens (PAL). See also “Power Pupil Map”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1347
Sampling The rectangular grid size to use for the analysis.
Offset A user defined offset value that is added to the computed data.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1348
Surface The last surface with optical power. The power and EFL data is computed for the
system as a whole up to and including refraction from this surface. See the discussion below.
Use Tangent of Field Angle If checked, and the field type is angle in degrees, the displayed
spatial distribution of the data is proportional to the tangent of the angle rather than angle
directly.
Data The data to be computed. The options are spherical, cylinder, maximum, minimum,
tangential, sagittal, Y direction, X direction, and Astigmatic (X minus Y) optical power in
diopters or effective focal length (EFL) in lens units.
Show As Choose surface plot, contour map, grey scale, or false color map as the display
option. A scan across the X- or Y-field direction is also available.
Contour Format The contour format string. For a discussion of the contour format string
syntax, see “The Contour Format String”.
Discussion
This feature computes optical power or focal length as a function of field coordinate. The
power or focal length is determined for the optical system as a whole up to and including
refraction from any surface. The method used is to trace a ring of real rays around the chief ray
at each point in the field. The ray data are used to determine the focal length for each field
position. This focal length can then be used to compute the optical power in units of diopters
(inverse meters). In the general case, the focal length is a function of orientation in the
entrance pupil. By tracing a ring of rays, the average, maximum, and minimum optical power or
focal length around the pupil can be determined. From this data, several types of optical power
can be computed. Note that the definitions used by this feature may vary from other uses of
these terms.
The spherical power is given by the average power over the entrance pupil. The maximum and
minimum powers are the extreme values over the pupil. The cylinder power is defined as the
difference between the maximum and minimum powers. Note using this definition the amount
of cylinder power is always positive. For cylinder, the EFL value reported is the difference
between the maximum and minimum focal lengths. For astigmatic EFL, the value reported is
the difference between the X and Y direction focal lengths.
This feature can also compute the power along the tangential or sagittal directions. In this
context, the tangential direction is along the plane that contains both the chief ray and the
local z axis in object space. The sagittal direction is orthogonal to the tangential direction. Also
available are the Y and X direction optical powers. The directions are defined by the local
coordinate orientation on the entrance pupil. Astigmatic power is defined as the X direction
power minus the Y direction power.
The surface setting should define the last surface of the portion of the lens being evaluated
that has optical power. It is recommended that this be set manually to the correct value rather
than use the default "Image" surface setting. The reason is that exact ray tracing is used to
compute the optical power, and the most accurate data is the ray data immediately after
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1349
refracting from the last powered surface. OpticStudio may not be able to correctly resolve
some sign ambiguities if the rays propagate a long way past the lens.
The "offset" value is a user defined value added to all the computed data. This feature is useful
for evaluating the deviation relative to some user defined reference value.
To optimize a lens for specific power characteristics, see the POWF optimization operand.
NSC RayTracing
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1350
Graphics and Text Windows
Operations
OpticStudio has a variety of analysis windows, each with different toolbars and right-click
menu options. This section explains the different toolbar features and interactive options.
The following is a list of all toolbar icons and their associated functions:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1351
Annotate See “Using the annotation feature” for details. The items under Annotate are:
Arrow Draws a line segment with a directional arrow at the end point.
Text Prompts for and then draws text on the graphic window.
Lock/Unlock If lock is selected, the window will be converted into a “static” window whose
data cannot change. The locked window contents may be printed, copied to the clipboard, or
saved in a file. The application for this feature is for comparing the results of different lens files.
Once a window is locked, it cannot be updated, and so any new lens files which are
subsequently loaded may be analyzed and compared to the locked window results. Once the
window is locked, it cannot be updated until unlocked.
Active Cursor The active cursor displays the value of the coordinates the cursor is currently
pointing to in the title bar of the window when the cursor covers an "active" region of the
displayed graphic. On most X vs. Y type graphs, the meaning of the displayed values is
obvious. On some graphics, such as the 3D Layout, the displayed image is a projection of a 3D
object on a 2D plane. The projection of the image renders the coordinate data displayed by
the active cursor less meaningful if the image has been rotated. Not all graphics support the
active cursor. The active cursor is by default "off" but can be turned on and off by choosing this
menu option. The active cursor can be set to automatically be on or off when a new graphic
window is created on the Graphics menu of the OpticStudio Preferences settings found in the
Setup Tab.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1352
Clone This selection will open a new window whose settings and displayed data are initially
identical to the current window. This feature is useful for creating a new window based upon
the settings in the original window. The cloned window acts like any other window after it is
created, so it may be updated or have its settings changed independent of the first window.
Overlay Provides a list of all open graphical windows; any of these may be selected for
overlaying with the currently displayed data. The overlay feature is useful for comparing two
similar graphs or layouts to detect small changes.
Aspect Ratio The aspect ratio may be selected to be 3 x 4 (height x width) which is the default,
or 3 x 5, 4 x 3, or 5 x 3. The latter two are taller than they are wide. The default aspect ratio may
be set on the Graphics menu of the OpticStudio Preferences settings found in the Setup Tab.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1353
Line Thickness Set the thickness of lines of the analysis window
Resolution Defines the resolution for the current graphic. This is useful for retaining
readability when resizing a window. To make small windows easier to read, use a lower
resolution.
Configuration Set which configuration is shown. This toolbar icon is only shown if there are
multiple configurations, and if the configuration selection is not in the analysis settings.
Word Wrap Wrap text to window width. Also speeds up scrolling of very long files.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1354
Help See more help on this feature
Camera View Adjust the camera orientation to view the object in an isometric or plane view.
Rotate Use the left mouse-button and drag to freely rotate the object.
Pan Use the left mouse-button and drag to move the model left/right/up/down.
Zoom Use the left mouse-button and drag to select a rectangular zoom region.
Roll Use the left mouse-button and drag to roll the model.
Additional Camera Controls Aside from using the Camera Control options within the drop
down menu, the camera can also be manipulated manually using the mouse and/or keyboard.
Left & Right Arrow Keys Rotate the entire scene clockwise or counter-clockwise
Up & Down Arrow Keys Rotate the Object about the X-Axis
Page Up & Page Down Keys Rotate the Object about the Y-Axis
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1355
Cutting Planes Turn on a cutting plane along the X/Y, Y/Z, or X/Z directions.
Cutting axis manipulators open when cutting planes are used. These manipulators allow the
cutting plane to be rotated and translated.
Hide Cutting Plane Hides the visualization of the cutting plane but keeps the cutting plane
active.
Drop Shadow Draw a shadow under the optical system based on the current lighting
positions.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1356
Shaded Turn smooth shading on or off
Render Options Change rendering options between Solid, showing Hidden Lines and
Wireframe
Blending Options for rendering semi-transparent objects. These options are purely based on
the object color and opacity, and only apply to the shaded model view.
Distance Sorting (Default) All objects are first sorted by their camera z-distance, and then
transparency is calculated in a single pass. This may result in artifacts for objects that overlap
or when a more distant object is partially obscuring a closer one. This method works well in
many cases and is reasonably fast.
Software Blending Uses a software-based Painter's algorithm to perform all blending. This
method is completely accurate; however, it can be slow.
Hardware Blending Uses a hardware assisted single pass depth peeling algorithm to perform
blending. This method works well and is reasonably fast for simple scenes, but cannot handle
multiple layers of transparency.
Simple Uses a screen door sampling method for blending. This method is very fast but cannot
handle complex scenes with multiple levels of transparency.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1357
Use Lighting Toggles scene lighting on/off.
Classic Graphics
You can still view analysis charts as they were displayed in previous versions of OpticStudio.
To do this, check the “Enable Classic View” setting in the Graphics section of the OpticStudio
Preferences:
Checking “Enabling Classic View” enables a “Classic” tab at the bottom of LightningChart
analyses, as shown in the following picture:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1358
Right clicking on a Classic chart invokes the following menu. The tools listed in this right-click
menu have the same functions as their matching buttons in the analysis toolbar:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1359
Note that the Classic tab is not available for analyses with graphics that have not been updated
to the LightningChart format.
LightningCharts
For OpticStudio analyses with updated graphics, the Graph tab displays the data in a
LightningChart.
Notice that there are two key differences between the Classic chart toolbar and the
LightningChart toolbar:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1360
The overlay button is inactive in the LightningChart toolbar. This feature is only available for
Classic charts.
The user can set the LightningChart resolution. This defines the resolution for the current
graphic, and is useful for retaining readability when resizing a window. For small windows, user
lower resolution.
Interactive Features
Click and drag anywhere on an axis to move the range of displayed data:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1361
Click and drag the gray bars at the axis edges to increase or decrease the range of displayed
data:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1362
Data Markers
Insert Data Marker This option is enabled if the user right clicks on a plotted line, and it adds
a marker with a data label to the chart.
Remove all Data Markers Removes all data markers from the chart.
Once a data marker is added to the chart, the user can click and drag to move the marker
along the plotted line. The allowed data marker positions are directly tied to the calculated
data points. There is no interpolation between calculated data points, so if the chart is zoomed
in beyond the resolution of the these data points, the allowed data marker positions can
become coarsely spaced.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1363
Legend Options
Show Legend Checked “on” shows the legend. Checked “off” hides the legend.
Show Legend Series Checkboxes This feature allows the user to show and hide the different
series by clicking a checkbox next to each series in the legend:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1364
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1365
Manually Position The user can manually position the legend by clicking and dragging.
Axis Options
By default, the chart axes are auto-scaled and auto-titled, but the user can customize these
settings by clicking Edit axis options… X or Y:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1366
Uncheck the Auto option to enable the title and min/max values:
Active Overlay
Charts that support active overlay are most XY curve plots, such as FFT PSF Cross Section and
Geometric MTF, and the spot diagram plots, such as Footprint Diagram and Spot Matrix
Diagram. The Active Overlay feature provides the ability to pull in series data from other plots
and plot the data alongside the analysis window’s own data series. The data series pulled in
from other analysis windows are called “Overlay Series”. The overlaid data and axes remain
interactive when overlaid into a chart that supports Active Overlay.
Unit Considerations
Only series with compatible units can be overlaid into a chart. To overlay data on the primary
Y-axis, both the X- and Y-axis units must be the same between the target chart and the overlay
data. To overlay using a secondary Y-axis, the X-axis units of the overlay data must be
compatible with the target plot.
For example, to overlay a series from another analysis onto a PSF cross-section plot using the
primary Y-axis, the overlay series must have a unitless quantity for the Y-axis, since PSF cross-
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1367
section plots have relative irradiance, a unitless quantity, on the Y-axis. Also, in this example,
the X-axis units must be the current aberration unit (e.g., microns if not in afocal mode).
Toolbar Button
To edit the series that are overlaid onto a plot, select the overlay series button. If this button is
disabled, it is because either the plot does not support overlay series or there may be no other
windows open that can provide overlay series to the window. Alternatively, the overlay series
may be accessed via a right-click context menu item on the chart “Add/remove overlay series.”
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1368
The tree on the left under the “Series” heading shows the data series with compatible units for
overlay organized by the hierarchy Analysis/Subplot/Series. For analyses with only one
subplot, there is no subplot node on the tree.
The title for each analysis and subplot is appended with a string “(M/N)” where M is the
number of series under that element that is selected for overlay into the chart and N is the
total number of series under that element that can be overlaid. Each series title by default is
appended with a string “[m]” where m is the window number to provide a quick visual hint as
to the source. If there is more than one subplot, “[m.n]” is appended where m is the window
number and n is the subplot number.
The “All Off”, “All Primary” and “All Secondary” buttons allow you to quickly toggle on and off
the selections under either an analysis or subplot node on the tree.
To see the overlay series on the chart, either select the “Apply” button, which leaves the modal
dialog window open so that you can continue editing, or select “OK” button to apply overlay
and close the dialog window. Finally, if you want to revert to the last set of applied overlay
series changes, select “Cancel”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1369
Each overlay series has properties that can be edited on the Series Settings tab. Changes made
to the series properties will appear the next time “Apply” or “OK” buttons are selected.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1370
For example, if we want to add overlays from this plot (Through Focus Spot Diagram) onto a
Spot Diagram plot, from the Spot Diagram plot we would open the Overlay Series dialog and
start by selecting the first subplot of the Spot Diagram plot that will receive overlay data. You
do this using the “Current Chart” dropdown.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1371
As an illustration, suppose we added the second series from Subplot 15 of the Through Focus
Diagram and set it to display as green circles. The series selection and series settings tabs will
look like the following:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1372
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1373
The resulting plot look like this:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1374
Secondary Y-Axis Overlays
For increased flexibility in utilizing overlay series, XY curve plots can overlay series on a
secondary Y-axis. This is especially helpful if the scale of the overlay series data is significantly
different than the target plot data or if the overlay series data have different units than the
target plot data.
As an example, consider a case where we want to overlay a diffraction enclosed energy plot
onto an FFT PSF cross section. In the FFT PSF cross section, the overlay series selection will look
like this:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1375
The resulting plot is:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1376
The default label for the secondary Y-axis is “Y2”. The label can be edited as desired via the
right-click context menu “Edit axis options->Y2”. In the same menu it’s also possible to
customize maximum and minimum values of the secondary Y-axis.
Additional Notes
l Overlay series are drawn 50% thinner than native ones by default. This can be cus-
tomized in the Series Settings tab of the Overlay Series dialog.
l When overlay series are present in a plot, the Overlay Series button on the toolbar is
highlighted:
l For secondary axis overlay series, the Y2 axis can only have a single type of unit asso-
ciated with it. Selecting a series with incompatible units to plot on a secondary Y-axis
will cause any existing series on the secondary Y-axis to be removed.
l When a plot with overlay series is open during a tolerancing calculation with Monte
Carlo overlay turned on, the regular overlay series will be removed and only the series
native to the analysis window will have Monte Carlo overlays applied.
l If a window that formerly had regular overlay series present but was then overlaid with
Monte Carlo sample series is unlocked, the regular overlay series will return to the plot.
If the source window for the regular overlay series is still locked, the data that will dis-
play is from the last Monte Carlo sample. To get the nominal overlay data to return, the
source window for the overlay data needs to be unlocked and updated, then the win-
dow with the overlay will need to be updated.
l During Slider or Visual Optimizer updates, overlay series may not update in synch with
the series data native to the analysis window. This is because different analyses run at
different speeds and if the analysis data for overlay is not available when a window
updates, the series will be an empty data set. Once the source window for the overlay
data has updated, you can manually refresh the target window for the overlay data and
the updated data will show correctly.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1377
To add text to the window, click the Text icon, click on a point in the window, and a text entry
dialog box will appear. Type in the desired text, then click "OK"; the entered text will be added
to the window.
For more precise control over the exact locations of lines and text, as well as control over the
text font, and the ability to add more complex annotations, click the Edit icon in the window
toolbar. This will invoke the annotation editor, which consists of a text editor and several
buttons. There is also a single checkbox for enabling or disabling annotations for the graph.
The text edit field is used to define the annotations to be applied to the graph. There are
several supported commands, each with a specific syntax:
The TEXT command will write any text within the double quotes at the location specified by x
and y, at an angle in degrees given by angle, using a fixed font whose size is given by scale. The
font color is controlled by the integer color parameter, which corresponds to the 1-based
position of the color in the list of Shaded Model background colors. For instance, to make the
text Red, use a value of 3 for color.
The coordinates are in normalized units, where the left edge of the graph has a coordinate of x
= 0.0, the right edge x = 100.0, the bottom edge is y = 0.0, and the top edge is y = 100.0. The
origin is the lower left hand corner. The “angle” value is in degrees.
The scale parameter units is in arbitrary units. The angle, scale, and color values may all be left
undefined, in which case the default values will be used. Note that the color parameter is
available – and used identically – for all annotations.
LINE x1 y1 x2 y2 color
The LINE command draws a straight line from x1, y1 to x2, y2. The units and coordinate system
are as described for x and y in the description of the TEXT command.
The ARROW command draws a one-headed arrow pointing from x1, y1 to x2, y2. The units and
coordinate system are as described for x and y in the description of the TEXT command. If Size
is 1.0 or is omitted, the arrow head is drawn at the default size. To scale the default arrow head
size, use any other floating point value for size. For example, a size value of 2.0 will make the
head twice as large as the default, a value of 0.5 will make it half the default size, etc.
BOX x1 y1 x2 y2 color
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1378
The BOX command draws a box with opposite corners from x1, y1 to x2, y2. The units and
coordinate system are as described for x and y in the description of the TEXT command.
The MEASURE command draws a measurement line from x1, y1 to x2, y2 and displays the line
length in system units.The text size is defined by scale; doubling the scale parameter will
roughly double the size of the measurement text.
A similar annotation functionality is available in Classic View. The primary differences with
Classic View are that color is not supported for annotation features, and the MEASURE
annotation feature is not available. The Syntax is as follows:
Annotating 3D Layouts
It is a little trickier to define annotations for 3D layout windows (3D Viewer, Shaded Model,
etc.) since their exact position and orientation in three dimensional space must be specified. In
order to unambiguously define the annotations, a temporary cutting plane is inserted in the
view when adding a new annotation. This cutting plane is initially oriented perpendicular to the
current camera view, but can be moved and rotated in any arbitrary way (the annotation plane
is light-blue):
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1379
When setting the annotation plane position and orientation, it can be helpful to rotate the
view such that it is no longer perpendicular to the annotation plane:
The double-sided arrow widgets at the center of the annotation plane translate the plane
along its axes, while the circular arrow widget can be used to rotate the plane around the
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1380
associated axis. In both cases, to manipulate the plane, left-click on the widget, and hold the
button down while moving the mouse left and right. There are also several built-in mouse
behaviors while annotation mode is active:
l A single right-click anywhere on the annotation will re-center the view on that point,
and orient the camera perpendicular to the annotation plane.
l Shift-right-click and drag the mouse left/right to control the depth of the annotation
plane (i.e. translates the plane along its normal).
l Ctrl-right-click and drag the mouse left/right to rotate the view clockwise/counter-
clockwise.
l Ctrl-shift-right-click and move the mouse up/down/left/right to freely rotate the view
(identical to the default Rotate behavior).
The annotation plane will stay active as long as one of the annotation modes is selected (Box,
Arrow, Line, Text, or Measure). To exit annotation mode, either click on the active annotation
mode icon, hit the ‘Escape’ key, or click on one of the camera mode icons (e.g. Rotate, Pan,
etc.).
All of the 2D annotations defined above have a 3D counterpart; while the format of the
annotation is similar, there are several additional parameters required:
The TEXT3D command will write any text within the double quotes at the location specified by
x, y, and z. The orientation is defined by ux, uy, and uz (up vector), rx, ry, and rz (right vector),
and the angle parameter. Scale defines the size of the text, while color defines the font color;
the available colors are the same as described by the TEXT command above. Angle, scale, and
color values may all be left undefined, in which case default values will be used. Note that the
units, coordinate system, and color parameters are the same for all commands.
LINE3D x1 y1 z1 x2 y2 z2 color
The LINE3D command draws a straight line from x1, y1, z1 to x2, y2, z2.
The ARROW3D command draws a one-headed arrow pointing from x1, y1, z1 to x2, y2, z2. The
arrow head is drawn in a plane perpendicular to the vector defined by vx, vy, and vz. If size is
1.0 or is omitted, the arrow head is drawn at the default size. To scale the default arrow head
size, use any other floating point value for size. For example, a size value of 2.0 will make the
head twice as large as the default, a value of 0.5 will make it half the default size, etc.
BOX3D tlx tly tlz trx try trz blx bly blz color
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1381
The BOX3D command draws a rectangle with a top-left corner at tlx, tly, tlz, a top-right corner
at trx, try, trz, and bottom-left corner at blx, bly, blz.
The MEASURE3D command draws a measurement line from x1, y1, z1, to x2, y2, z2, and
displays the line length in system units. The text and tick marks are defined in a plane
perpendicular to vx, vy, and vz. The text size is defined by scale; doubling the scale parameter
will roughly double the size of the measurement text.
Since OpticStudio is primarily used to generate graphical and text data, OpticStudio only
supports exporting to the clipboard. Once the desired data has been copied to the clipboard, it
is easy for another application, such as a word processor, graphics editor, or desktop
publishing system to retrieve the data.
To get OpticStudio graphics and text into the clipboard, choose the graphic or text window
desired, then select the copy button from the Toolbar. Nothing will appear to happen (the data
transfer is extremely fast), however the data will now be available to other applications.
To now get the clipboard data into a document processing application, run that application,
and choose Paste, usually from the Edit menu of that application. See the documentation for
that application for details.
Another way of getting OpticStudio graphics into other applications is to perform a screen
capture which creates a bitmap image of either the entire display or any single window. To
capture the entire screen as a bitmap image, use the Print Screen button on the keyboard (and
this button varies by keyboard). To capture a single window, select that window and press Alt-
Print Screen. Once the image has been captured, the image can usually be pasted into another
application using Ctrl- V or Edit, Paste, depending upon the application.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1382
mouse button and hold the button down for 1/2 second anywhere in the window. The cursor
will change from an arrow to a cross. Now drag the mouse down and right to define a
rectangle of the desired size which covers the area to zoom in on. Now, let go of the left
mouse button. The selected area will be magnified to fill the window, while maintaining the
aspect ratio of the plot.
Panning is accomplished via a right click and hold for analysis windows, or scroll wheel click
and hold for shaded models and NSC viewers, then moving the mouse. Panning is only
allowed after a graphic has been zoomed.
To restore the graphic to the original size, right click the analysis window and select “reset
zoom”.
Some analysis features, such as MTF and the image analysis feature, will run for long periods of
time in some circumstances. For example, large MTF grids or large image analysis ray densities
require longer computation times. However, analysis features do not display a status box or
terminate button, because analysis features display their output directly in a window. For this
reason, the keyboard command "Escape" is used to terminate lengthy analysis computations.
There is no mouse equivalent for this feature; only the Escape key is used.
The Escape key will terminate MTF, PSF, encircled energy, and other diffraction computations.
If the Escape key is pressed, control will return to the main program (it may take 1 or 2
seconds) and the data displayed in the window will be invalid. For the image analysis feature,
the escape key will terminate the tracing of new rays, however, rays that have already been
traced will be displayed, and data from those rays is accurate, if incomplete.
Printing Windows
The Graphics section of the Help Files > Setup Tab > OpticStudio Preferences includes settings
for printing layout plots to scale and the default printing orientation.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1383
In addition, the printer icon in the toolbar of any analysis window will bring up a Print Preview
dialog window. This dialog allows you to configure options such as the desired printer, scaling,
and page ranges. The print shortcut key will also open the Print Preview window, and by
default this shortcut is “Ctrl + P”.
Advanced Settings
Use the link with the selected printer name at the top-left corner, or the Properties button to
choose the desired printer as well as advanced printer driver settings. Note that the 'Print'
button on the advanced settings dialog does not actually print, but merely accepts the new
settings and closes the dialog.
Orientation
The orientation controls whether the output is printed in Portrait or Landscape mode. There
are four options:
1. Default – use the current value from the printer advanced settings.
2. Automatic – determine the best fit based on the paper dimensions and selected scal-
ing mode.
3. Portrait
4. Landscape
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1384
Immediately below the orientation selection box, the computed orientation will be displayed
(useful when selecting Default or Automatic).
Maximum Size
Maximum Size uses the minimum margins reported by the printer driver, while Use Margins
allows the user to specify each of the four margins manually. The margin settings are in inches
and affect the printed output whether it is a text or a graphic window.
Scaling
Scaling determines how the graphic is scaled to fit the output pages. Note that all scaling
options are applied equally to both axes (i.e. aspect ratio is maintained). There are currently
three options:
The Center option is used to pad the graphic so that it is centered on the print page(s), rather
than on the upper-left hand corner.
Selection
There are several options to select which of the available pages are printed. Use the preview
page controls at the bottom right to decide which pages you want printed, and then choose
from the following options:
1. 1. All
2. Range – used to select a contiguous range of pages to print, from x to y.
3. Current – only print the current preview page.
4. Selected (only for text) – only print the currently selected analysis text. Note that
this option is only available when printing text, and only when a block was selec-
ted before opening the print dialog.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1385
Offset of highlighted geometries in
Shaded Model
For Shaded Model in sequential mode or NSC Shaded Model in non-sequential mode, when a
surface or object is selected in the editor, the related geometry will be highlighted.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1386
When a surface or object is selected, its representation in Shaded Model or NSC Shaded Model
will be slightly offset so that it's easier to distinguish the highlighted geometries from two
overlapped ones.
Note this is purely for visualization and the amount of offset cannot be precisely quantified. If
this effect is not desired, do not select the surface or object in the editor for seeing the more
accurate geometries in Shaded Model or NSC Shaded Model. Instead, we can assign color to
the surface or the object in the Properties > Draw in the lens data editor or non-sequential
component editor.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (sequential ui mode) 1387
The Analyze Tab (non-
sequential ui mode)
Analyze Tab (Non-sequential UI Mode)
This tab provides access to OpticStudio’s analysis features in Non-Sequential mode, which is
used for most lighting, illumination, stray light designs and more. Analysis features provide
detailed performance data over a wide range of requirements. Analysis features never change
the underlying design, but provide diagnostic information on the design that is used to guide
any required changes.
The System Viewers group gives access to the layout plots that are used to view the optical
system itself.
Trace Rays initiates ray tracing using either the comprehensive Non-Sequential ray trace
engine, or a faster, approximate method called LightningTrace™ that is very useful if the source
can be approximated as a point source.
Detectors & Analysis and Raytrace Analysis groups provide the ability to analyze a previous
raytrace.
Universal Plots allow you to create your own analysis features if required.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1388
NSC 3D Layout
Draws 3D layout plots of the sources and objects in a single NSC group.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1389
Fletch Rays If checked, small arrows are drawn on each ray to indicate the direction of
propagation.
Split Rays If checked, rays from NSC sources will be statistically split at ray-surface intercepts.
Rays entering from the entry port are not affected by this setting.
Scatter Rays If checked, rays from NSC sources will be statistically scattered at ray-surface
intercepts. Rays entering from the entry port are not affected by this setting.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1390
Suppress Frame Suppresses drawing of the frame on the bottom of the window, which leaves
more room for the layout plot itself. No scale bar, address block, or other data will be
displayed.
Configuration Select "All" to show all configurations, "Current" to show just the active
configuration, or select any combination of other configurations.
Color Rays By Select "Source #" to use color to distinguish rays traced from each source,
unless a source has a user defined color assigned to that source, "Wave #" to distinguish
between each wavelength, "Config #" to distinguish between configurations, "Wavelength" to
approximate the color of wavelengths in the visible spectrum, or "Segment #" to distinguish
between segment level number (number of object intersections since the ray left the source
point).
Surface Selects the NSC surface to view when in Mixed Mode. This option will be greyed out in
pure Non-Sequential.
Scale Bar Shows or hides the scale bar in the layout plot.
Rotation About X The angle in degrees by which the lens appears to be rotated about the X
axis.
Rotation About Y The angle in degrees by which the lens appears to be rotated about the Y
axis.
Rotation About Z The angle in degrees by which the lens appears to be rotated about the Z
axis.
Offset X, Y, Z The X, Y, and Z direction offset between configurations in lens units. Only has an
effect on the drawing if "All" configurations are being drawn.
Ray Trace If the default option of "Use Rays" is selected, conventional ray tracing is used to
draw rays on the plot, with the number of rays being determined by the "# Layout Rays"
parameter values for all sources defined in the NSC group.
If one of the "Use LightningTrace" options is selected, rays from the LightingTrace mesh are
drawn on the plot (see “The LightningTrace Control”). The mesh rays that are drawn
correspond to a Ray Sampling input of "4X" and an Edge Sampling input of "Low (1X)" (the Ray
Sampling may be automatically reduced by OpticStudio to "Low (1X)" if the total number of
rays in the mesh exceeds the total number of rays that can be rendered on the plot).
For "Use Lightning Trace - True Color", the color of each ray in the plot is determined from the
Tristimulus values for the ray (the ray color will be black if the Tristimulus values are zero).
For "Use Lightning Trace - Average Wavelength", the color of each ray in the plot is based on
the source from which the ray is launched; the color corresponds to the average wavelength of
all rays from that source.
Filter If blank, all rays are drawn. Otherwise, only rays which meet the criteria defined by the
filter string will be drawn. See “The filter string” for information about the filter string syntax.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1391
The name of the filter string being used is shown in the bottom right corner of the layout plot.
If the filter being used is a path filter, the path number and associated filter may be
incremented by pressing the space bar. Holding the control key while pressing the space bar
decrements the path filter, and also holding the shift key will increment or decrement the path
number by 10. For more information, see “Path Analysis”.
Ray Database If "none" is selected, new rays will be traced and displayed. If a ZRD data base
file is selected, then rays contained within the database will be displayed. In either case the
filter, if any, is applied. Generally, reading rays from a large database is faster than retracing
them. The other advantage to using a database of rays is that the rays are always the same,
until the database is replaced. OpticStudio cannot tell if the selected database is for rays from
the current lens being displayed; so care should be taken when selecting the ZRD file that it
corresponds to the lens data being displayed. For more information on the ZRD file, see “Ray
database (ZRD) files”.
Discussion
The settings in the above table are very much like their counterparts on the 3D Layout feature.
However, this feature only draws objects in a single NSC group, and only traces and draws rays
from sources defined within the group.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1392
The options are very similar to those available for the NSC 3D Layout and Shaded Model
features.
Detector: this option allows to color detector objects by either the energy incident on the
detector in the last analysis or by just the rays traced in the layout view. The detector shows
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1393
false color or black and white displays, using either coherent intensity or any of the other
options supported by the detector viewer. See “Detectors” for details.
Detector Display Mode: This option put all detectors on the same scale. For Detectors
Rectangle and Surface, any data type is changed to Incoherent or Coherent Irradiance as
appropriate. The data type of the Detector Color is changed to Irradiance and Object as
Detector’s data type is changed to Flux or Irradiance as appropriate.
The detectors show false color or black and white displays, the log scale and max scale options
are ignored. Note that the “Consider” option uses the per object settings.
This feature is only available in the Premium and Enterprise editions of Ansys Zemax
OpticStudio.
Draws a shaded solid model representation of a part or assembly as defined in a CAD format
file
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1394
File Name Selects the CAD part file to draw.
Opacity The options are to ignore, which draws all surfaces and objects as opaque, or all 50%,
which draws partially transparent objects.
Rotation About X The angle in degrees by which the lens appears to be rotated about the X
axis.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1395
Rotation About Y The angle in degrees by which the lens appears to be rotated about the Y
axis.
Rotation About Z The angle in degrees by which the lens appears to be rotated about the Z
axis.
Discussion
The object may be rotated with the mouse or the cursor keys to change the viewing angle.
When selecting an Autodesk Inventor (*.ipt, *.iam) or Creo Parametric (*.prt, *.asm) file, the file
is automatically converted to either a STEP or an IGES file for viewing.
The documentation for the Object Editor (editors group) can be found in the Setup tab.
The Object Editor is an interactive tool for viewing and editing object properties. All
information in the Object Editor can also be found in the Non-sequential Component Editor
Parameters and Object Properties.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1396
Please see the Object Editor (editors group) documentation in the Setup tab for full details.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1397
Ray Trace
The Ray Trace Control is used to launch and trace rays for analysis using defined sources,
objects, and detectors. The controls on the dialog box are described below.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1398
Clear Detectors Select either "All" or any one specific detector to clear. This resets all of the
detector’s pixels to zero energy.
Clear & Trace Clears the detectors selected and begins tracing rays. See the Clear Detector
and Trace settings for details.
Trace Begins tracing rays from all defined sources. Once the trace begins, only the Terminate
and Auto Update controls are available. See the discussion below on other effects of initiating
a ray trace.
Auto Update If checked, all detectors will be redrawn periodically so progress may be
monitored.
# CPU's Selects the number of CPU's over which to spread the ray tracing task. More than 1
may be selected, even on a single CPU computer, in which case the single CPU will time share
the multiple simultaneous tasks. The default is the number of processors detected by the
operating system. Using more CPU’s may speed the computation but requires significantly
more memory. If OpticStudio reports insufficient memory errors or begins using the hard disk
as a memory cache, try reducing the number of CPU’s.
Use Polarization If checked, polarization will be used to determine ray energy, reflection,
transmission, absorption, and thin film or coating effects. If Split Rays is checked, Use
Polarization will be checked automatically, as it is required for accurate ray splitting.
For more information on how OpticStudio uses polarization, please see Polarization (system
explorer) in the System Explorer.
Split NSC Rays If checked, rays will split according to the interface properties as described in
“Ray splitting”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1399
Scatter NSC Rays If checked, rays will scatter according to the scatter properties of the
interface.
Ignore Errors If checked, errors generated by ray tracing are ignored, and any errors that
occur will not terminate the ray trace. This should be turned on with caution, since errors may
indicate a serious flaw in the system being traced. However, some perfectly good systems
occasionally have a few rays fail because of finite computer precision or other minor problems.
If the “lost energy (errors)” given at the end of the ray trace is small relative to the total power
of all sources defined, then the few rays which trigger errors can be safely ignored. See “Lost
energy”.
Save Rays If checked, ray data will be saved to the file name specified. The file name only
should be provided with the proper extension (ZRD, DAT, or SDF) and no folder name. See also
“Filter” and "Saving ray data to a file" below.
Save Path Data If checked, ray data will be saved as a PAF file to the file name specified. A PAF
file contains the same information as a ZRD file but ray data is saved and loaded more quickly
from a PAF file. Currently a PAF file can only be used in the Path Analysis tool.
Filter This option is only available if “Save Rays” is checked on. If the filter is not left blank, then
the defined filter will be applied to each ray tree traced before it is saved to a file. Only if the
ray tree passes the filter will the ray tree be saved. This may substantially reduce the amount of
data saved, and therefore may reduce the resulting file size. For a description of the filter
syntax, see “The filter string”.
Discussion
There are some important considerations to understand when performing a Monte Carlo ray
trace. When the detectors are cleared, all the energy counts in each pixel are reset to zero.
Once the Trace button is selected, OpticStudio will trace exactly the number of specified
analysis rays for each source listed in the NSC Editor. Each source has an associated power in
watts or other units (“Analysis Units” ). The initial intensity of each ray from a given source is
the total power divided by the number of rays to be traced. For example, for a 1 watt source
tracing 1,000,000 rays; each ray initially has 1.0E-06 watts of power associated with it.
If the ray tracing is terminated before all the rays are traced; the total power and peak power as
listed on the detector objects will be inaccurate; although the ray distribution will be accurate
for the number of rays traced. The analysis cannot be paused and resumed; so once a ray trace
is terminated, selecting Trace again will start a new trace.
If the detectors are cleared, then Trace is pressed, the ray trace completes, and Trace is pressed
again; all detectors will show the total power from both traces. OpticStudio has no reliable way
of knowing how many times rays have been traced between detector clearings; since sources
may be added, deleted, or modified at any time.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1400
For accurate power computations, the detectors should be cleared before tracing; then a single
trace should be performed without early termination.
If the Save Rays option is checked, some or all of the traced ray data may be saved to a file. The
nature of the data saved depends upon the file name provided.
If the file extension is ZRD, the complete (optionally filtered) ray data will be saved. The folder
the file will be placed in is the same as the lens file being traced. The ZRD format is used by
OpticStudio in the ray data base viewer (see “The Ray Database Viewer” ). For details on the
ZRD format, see “Ray database (ZRD) files”.
If the extension is DAT or SDF, then only rays (optionally filtered) that strike a particular object
are saved to a source file. This format is used by Source File objects (see “Source File” ).
To use the source file format, the file name must be of the form n-filename.DAT or n-
filename.SDF where n is an integer corresponding to the object number desired. In this case,
the filename.DAT or filename.SDF (with the n- part removed) will be created listing rays that hit
object n.
For example, the file name “11-ReferenceObject.DAT” will save all rays that hit object 11 into
the file “ReferenceObject.DAT”. The file will be placed in the folder <objects>\Sources\Source
Files (see “Folders” ). If the file extension DAT is used, the ray data is stored in the older “flux
only” format and the wavelength data is lost.
This results in smaller files and is recommended for monochromatic sources only. If the file
extension SDF is used, the ray data is stored in the newer “spectral color” format, and
wavelength data is stored with every ray. For more information on source file formats see
“Binary Source File format”.
Saving rays slows down the calculation significantly, as writing data to a file is much slower
than the ray tracing. For this reason the Save Rays feature should only be used when the data is
needed for subsequent analysis.
If the Save Path Data option is checked, the traced ray data will be saved to a PAF file. This
contains the same information as the ZRD file but it is faster to save this data and load it in the
Path Analysis tool. Additional functionality is not yet supported for this file type.
Lost energy
When tracing some NSC systems, not every ray can be traced successfully. When a ray trace is
terminated, the energy associated with the ray is called “lost energy”. The lost energy is
measured in source units (see “Source Units” ).There are different causes for terminating the
trace of a particular ray:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1401
- If a ray falls below the minimum energy threshold for tracing, the ray will be terminated.
The minimum relative and absolute energy thresholds are described in “Non-sequential
(system explorer)” .
The ray trace control reports this type of lost energy as the energy lost due to threshold
settings.
- Sometimes geometry errors or round-off errors lead to conditions where the ray can no
longer be traced. Geometry errors are usually caused by poorly formed solids or improper
nesting of objects. For some rays, correct intercept or refraction data cannot be computed.
This may happen when iteration to a surface fails, or the coating data cannot be computed.
Rays that hit the maximum number of object intercepts, nesting levels, or segment levels, are
also terminated with an error condition. The ray trace control reports these types of lost energy
as the energy lost due to errors.
- Rays that strike the edge of an object may be terminated if the local refraction and/or
reflection cannot be computed accurately. A ray is considered to strike the edge of an object if
the intercept point lies within a threshold distance to the edge, or if two or more objects are
struck at the same point and the objects have non-parallel normals at the intercept point. For
most objects, the threshold distance is approximately the glue distance in lens units. Along the
edge of a faceted object, the threshold distance is approximately the glue distance
(interpreted here as a dimensionless number) multiplied by the dimensions of the facet. Note
that rays that strike very close to the edge of a part have no useful physical interpretation
anyway; an actual object would diffract (or scatter) all energy incident within a few wavelengths
of the edge. Rays that miss all objects, or are absorbed by either coatings, bulk transmission, or
detectors, are also terminated. OpticStudio absorbs all these rays without error or report, as
the energy is not considered lost because the energy is known to be absorbed or propagated
out of the system and is thus accounted for.
If the fraction of lost energy is relatively small, lost energy can be ignored. Even well designed
and accurate optical models will occasionally have spurious ray errors. Rays that strike within
edges or seams between parts and are thus absorbed will usually represent an insignificant
fraction of the total energy in the system. If the lost energy is unacceptably high, then the
settings (see for example “Minimum Relative Ray Intensity” ) or the object geometry needs to
be checked. For assistance in studying geometry errors, see "Create Source Ray From Last
Geometry Error Tool"
Lightning Trace
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1402
This feature is only available in the Premium and Enterprise editions of Ansys Zemax
OpticStudio.
The LightningTrace Control is used to launch and trace a specific set of rays from a discrete
mesh for analysis using defined sources, objects, and detectors. The controls on the dialog box
are described below.
Ray Sampling Sampling used to define the initial mesh for ray launch.
Edge Sampling Sampling used to define the accuracy with which the mesh resolves the edges
of objects.
Trace Begins tracing mesh rays from all defined sources.All detectors are automatically cleared
(i.e. all pixels on all detectors are reset to have zero energy) prior to raytracing.
Discussion
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1403
This feature uses an advanced ray interpolation technology (patent pending) to quickly
estimate illumination patterns without the need for tracing millions of rays. The intended
application is very fast determination of approximate lighting patterns, allowing initial setup
and design of illumination systems to proceed much faster than by using conventional ray
tracing (see “The Ray Trace Control” ).
When using LightningTrace, a specific set of rays are launched and traced from each defined
source. The launch directions are chosen along a mesh which encapsulates the source. The
resolution of this mesh is defined by the Ray Sampling input, and varies from “Low (1X)” to
“1024X” (note that as the mesh size doubles, the number of mesh rays quadruples). All rays
launched from each mesh start at the same position, corresponding to the center position of
the corresponding source. Thus, LightningTrace neglects the size and spatial distribution of
each source, and represents each source by its far-field description.
As rays are traced through the system, OpticStudio automatically refines the mesh as needed
to ensure that a sufficient number of rays pass through each object on the way from the source
to any detectors. The user may control the level of refinement made at the edges of objects via
the Edge Sampling input. This input also varies from “Low (1X)” to “1024X”.
Rays which leave the mesh are traced in the usual fashion. Mesh rays may only follow the
specular ray path, however; splitting and scattering of these rays is not supported. Polarization
effects are also not accounted for in tracing the mesh rays. Finally, while the overall color (i.e.
Tristimulus values) of each source will be retained during ray tracing, including the variation of
color with far-field angle, the spectral distribution of each source is neglected, and an average
wavelength for the source is used to trace the mesh rays.
The initial mesh of rays used by the LightningTrace analysis (i.e. the mesh that is generated
prior to any automatic refinements made by OpticStudio) may be visualized in the NSC 3D
Layout and the NSC Shaded Model (see “NSC 3D Layout” and “NSC Shaded Model” ). Note
that the intensity of each ray leaving the mesh is not constant; ray intensities in any angular
region are given by the far-field intensity of the source in that region.
Results of the LightningTrace analysis may be observed on Detector Rectangle, Detector Color,
and Detector Polar objects (see the “NSC Detectors” chapter). To observe the results on any of
these detectors, the detector must either be a terminal detector in the system (i.e. rays do not
interact with any other objects after hitting the detector) or the material for the detector must
be set to “ABSORB”. In addition, only the spatial data will be available when viewing the results
on a Detector Rectangle or Detector Color object, while angular data can be obtained by using
a Detector Polar object. The results can be viewed on the Detector Viewer (see “The Detector
Viewer” ) in the usual fashion.
Nearly all sources are supported by LightningTrace. However, sources defined via the Source
DLL, Source Imported, and Source Object objects are also not supported by LightningTrace.
For such sources, it is very likely that the size and spatial distribution of the source will be
important to the system design. Thus LightningTrace will be inappropriate for modeling a
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1404
system containing such sources. If a system contains any of the sources not supported by
LightningTrace, that system cannot be analyzed with LightningTrace.
The main benefit of LightningTrace is speed. Since rays are only traced from a mesh, the
number of rays traced through the system will generally be much smaller than used during
conventional ray tracing. The response of the system for regions between the mesh are
computed using an advanced ray interpolation technology to estimate the behavior of the
mesh rays. As such, LightningTrace represents an approximation of the system performance,
and in some cases could lead to artifacts (such as hot spots) in the results. A common example
of hot spot generation occurs when LightningTrace is used in symmetric (e.g. on-axis) optical
systems with results being viewed on detectors with odd numbers of pixels. However, for many
lighting and illumination systems the approximations used by LightningTrace are valid. In such
systems, ray tracing and optimization (which is available via the NSLT operand; see
“Optimization operands” ) can be orders of magnitude faster when using LightningTrace as
compared to conventional ray tracing.
Systems for which LightningTrace will work well are those systems in which the size and spatial
distribution of all sources is not important to the system design, either because the sources
themselves are sufficiently small and/or are sufficiently far enough away from all secondary
optics. For example, LightningTrace would be well- suited for modeling systems containing
very small LED sources with complex far-field distribution patterns. Thus, LightningTrace can
be an ideal tool for designing LED lighting systems, examples of which include architectural
lighting or street/roadway lighting (for a description of tools to aid in designing roadway
lighting, see “Roadway Lighting” ).
LightningTrace is not the appropriate tool to use for critical illumination systems (in which
sources are to be imaged onto detectors) or systems in which the size and spatial distribution
of any source is important (such as an LED collimator or beam expander). In addition,
LightningTrace will not be accurate for systems containing diffusers (or other scattering
components) or for systems with significant dispersion (e.g. due to the presence of diffraction
gratings). Finally, LightningTrace cannot be used to model perfectly collimated beams in an
optical system. All of the above systems should be designed using conventional ray tracing.
For the class of systems for which LightningTrace is appropriate (e.g. LED lighting),
LightningTrace provides users with a fast, virtual prototyping tool for their designs. For these
systems, LightningTrace may be used very effectively with the Visual Optimizer (see “Visual
Optimization” ) to observe the variation of system performance with design inputs in real time.
A conventional ray-trace analysis should always be performed as the design matures to
validate the LightningTrace analysis.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1405
Critical Ray Tracer (analyze tab, non-
sequential)
This feature is only available in the Premium and Enterprise editions of Ansys Zemax
OpticStudio.
The Critical Ray Tracer reads from an ASCII file containing “critical” rays to be traced in a non-
sequential system and provides an output table of data indicating whether each of those rays
are traced completely through the system and whether the position and direction cosine of
each ray is within some tolerance of the target values provided in the file. This tool is for
engineers who wish to validate that non-sequential modifications to a sequential system
design do not degrade the performance of the original sequential system.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1406
Input File File containing critical rayset to be traced. By default, the Critical Ray Tracer looks
for a file ending in “–PROD.CRS” in the current directory. If it can’t find such file, it searches for
a file ending in “–PROD-NONSEQ.CRS” in the current directory. If it can’t find such a file, it
uses the first CRS file in the current directory.
Rays to Display Choose All to display all rays, Fail to display only failed rays, and Pass to
display only passing rays.
Position Tolerance Maximum allowed difference between the target ray’s position and the
actual ray’s position in lens units.
Angle Tolerance Maximum allowed angle between the target ray’s ray vector and the actual
ray’s ray vector in degrees.
Hit Data Choose XYZ to display XYZ data, LMN to display LMN data, or XYZ & LMN to display
XYZ and LMN data.
Display Actual End Data Display the ray’s data for the ray’s terminating segment.
Display Target End Data Display the ray’s ending data as recorded in the original sequential
system.
Discussion
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1407
Rayset Generator found in sequential mode. See the discussion in the Critical Rayset
Generator for details on the file format. A ray is launched at the starting position and direction
given in the input file and traced through the current system. That ray is then given a
pass/FAIL grade depending on whether it terminates at the target position and direction.
The Critical Ray Tracer outputs a table of pass/FAIL results for each ray as well as the object on
which the ray terminates. Rays are identified by their Field Point, wavelength and a Ray Flag
which describes whether a ray was a:
l Chief ray
l Marginal ray
l Grid ray
l Ring ray
l Ray that is part of an Y-Fan Ray, but is not a chief or a marginal
l Ray that is part of an X-Fan, but is not a chief or a marginal
l Ray that is part of an XY-Fan, but is not a chief or a marginal
l Ray that is part of a raylist
Users may also choose to display supplemental data describing the ray’s starting position and
direction, the target ending position and direction, and the actual ending position and
direction. The first line in the output will contain the percent of rays that pass as well as the
percent of rays that fail.
To determine if a ray passes or fails, the Critical Ray Tracer inserts a detector at the target XYZ
values with the tilts given in the file header. If the ray terminates on any other object or does
not terminate on any object, the ray will FAIL. If the ray lands on the inserted detector, but the
XYZ values or direction of the ray on the detector are outside of the tolerance specified by the
user, the ray will FAIL. If the ray does not terminate on a surface, the Termination Object will be
0. If the ray terminates on the inserted detector, its Termination Object will be “Target
Location”. Only if the ray lands on the correct detector and the XYZ values and ray direction on
the ending surface are within the tolerance specified by the user will the ray PASS.
If the user modifies the system wavelengths such that none match the wavelengths in the file,
the Critical Ray Tracer issues an error message and aborts. When multiple configurations are
present, the active configuration is used. For explicit rays in the raylist, the field point is listed
as "NA".
Errors are ignored. Polarization, splitting and scattering are not used.
A critical ray file can be read into the Source File object in non-sequential mode. This allows
the Critical Ray Set to be traced and analyzed like any other Source File.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1408
NSC Single Ray Trace
Analysis and visualization on a ray-by-ray basis.
Ray Trace L/M/N Ray's initial direction cosines with respect to x/y/z.
Use Polarization If checked, polarization will be used to determine ray energy, reflection,
transmission, absorption, and thin film or coating effects. If Split Rays is checked, Use
Polarization will be checked automatically, as it is required for accurate ray splitting.
Split NSC Ray If checked, rays will split according to the ray splitting properties of the
interface .
Scatter NSC Ray If checked, rays will scatter according to the scatter properties of the
interface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1409
Wavelength Wavelength number representing the system wavelength to use for the single
ray trace.
Reference Object If an object is selected, the x/y/z coordinates and l/m/n angles of the ray
will be referenced to the local vertex of the selected object.
Results Settings:
Show XYZ If checked, the global X, Y, and Z coordinate data of the ray segment-object
intercept point will be displayed.
Show LMN If checked, the global L, M, and N direction cosine data of the segment will be
displayed.
Show Path If checked, the path length in "Lens Units" on page 2440 from the parent segment
is displayed. This is the physical, not the optical path length. OpticStudio will also show the
phase in radians, but only for segments striking a detector surface.
Show Normal If checked, the global Nx, Ny, and Nz object normal vector components at the
ray segment-object intercept point will be displayed.
Expand Into Branches If checked, each branch of the tree will be expanded to show a single
complete path from source to ray termination.
Show EXYZ If checked, the global electric field in the X, Y, and Z directions will be displayed.
Decimal Precision Number of decimal places that are shown in the text output.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1410
NSC 3D Layout Settings:
Suppress Frame Suppresses drawing the frame on the bottom of the window, which leaves
more room for the layout plot itself. No scale bar, address block, or other data will be
displayed.
Rotation X The angle in degrees by which the lens appears to be rotated about the X-axis.
Rotation Y The angle in degrees by which the lens appears to be rotated about the Y-axis.
Rotation Z The angle in degrees by which the lens appears to be rotated about the Z-axis.
Results:
The feature allows to ray trace a single ray in NSC without affecting the original system. The
NSC single ray trace enables the analysis and visualization on a ray-by-ray basis to study the
ray propagation in a non-sequential optical system.
The Non-Sequential Single Ray Trace tool uses the same format as the Ray Database Viewer to
ensure consistency and familiarity.
Discussion:
Upon viewing the output Segment 0 data is at the source point of the ray and subsequent
segment coordinate data is at the end of the segment. The Intensity, phase, cosine, field, and
path to values are prior to reflection, refraction, splitting, absorbing, or scattering at the end
point.
Basic ray information includes Wavelength, number of segments, and number of branches. The
data is arranged by segment number and includes; parent, level, in, hit, face, XRTS, DGEF, and
BZ.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1411
Detectors Group
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1412
Detector Viewer
The Detector Viewer displays data from detectors in either a graphic or text format. For
information on tracing rays to record data on detectors, see “The Ray Trace Control”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1413
Surface Selects the NSC surface number. This is always surface 1 when in NSC mode.
Detector Selects the detector object. If the window is a text window, there is also an option to
summarize all detectors.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1414
Show As Choose grey scale or false color display, or cross section plots of rows or columns.
Detector Color objects support a flux vs. wavelength plot, which is only available if the option
to “Record spectral data” has been selected for the detector (see the description given under
the “Type tab” ). Detector Polar objects support either a full or half polar directivity plot, which
displays normalized detected energy as a function of angle. Note that directivity data shown
under the Classic view of the detector viewer (which is only available when “Enable Classic
View” has been selected under the Graphics tab of the OpticStudio Preferences) may look
smoother than the same data shown under the Graph view because a spline interpolation is
applied between the calculated data points in the Classic view (spline interpolation is not
supported for the Graph view as such post-processing can suggest more detail than is actually
present in the calculated data). Cross sections are not available in all text displays.
The Geometric MTF in the Detector Viewer has been deprecated. The NSC Geometric MTF
replaces this functionality.
Row/Column Selects the row or column to display for cross section plots. For Detector Surface
objects, see “Comments regarding Detector Surface objects”.
Angle Detector polar objects support cross sections displayed as linear in angle, or in full or
half polar directivity plots. This angle control defines the angle of the plane defining the cross
section through the data, relative to the positive local x axis of the detector.
When displaying directivity plots only, the Angle control name becomes Angle(s). The control
then supports multiple angles separated by commas.
For example, the Angle(s) list may be 0, 45, 90, 135. All the angles are then shown on the same
plot. A maximum of 5 angles may be listed.
Z-Plane This control is only used by detector volume objects. The Z-Plane selects which cross
section of a volume detector to display. The number of Z-Planes in a detector volume is set by
the number of voxels in the Z direction. The text version of the Detector Viewer also supports
an "All’ option to display all cross sections as well as a table of all voxel center coordinates and
data. Pressing the left and right arrow keys while viewing detector volume data will cycle
through all the Z-Planes.
Smoothing Smoothing reduces pixel noise due to low sampling by averaging the data in
adjacent pixels. The data in every pixel is replaced by the average of the data in the pixel and
the neighboring pixels. This averaging algorithm is applied the number of times specified by
the smoothing parameter.
Note that when smoothing data of Detector Polar, after averaging the nearest neighbors for
each pixel, all the pixels on the entire detector are further scaled to preserve the original power
value.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1415
Show Data See discussion below for important information.
Ray Database If none is selected, the ray data currently stored on the detectors is used.
Otherwise, the previously saved ray database data is used.
Filter A filter string may be applied to select only rays with particular properties. This option is
only available when using a ray database. For information on the filter string syntax, see “The
filter string”.
Scale Choose linear or logarithmic scales. See "Max/Min Plot Scale" below.
Max/Min Plot Scale If non-zero values are provided, the plot will be scaled to the specified
min and max data range. If these values are both zero, the default scaling will be applied.
If the Scale (see above) is Logarithmic, the Min Plot Scale setting is ignored. If the Max Plot
Scale setting is greater than zero, then the next greater power of 10 is used as the maximum
log scale.
Output Image File If a file name is provided, the detected image will be saved to the file. The
file name should include the full path, or the default path will be the same as for IMA files. The
file extension should be BMP, JPG or PNG. If the file extension is not recognized JPG will be
used. This option is only supported for detector color and rectangle objects. The exported
image is at the full resolution of the detector, not the screen, and will use the same number of
pixels in the vertical and horizontal directions as the detector does. However, the pixels in the
exported image are assumed to be square, so if the detector pixels are not square some
distortion of the aspect ratio of the image will be introduced.
Suppress Frame If checked, the frame is not drawn and the entire window is used to display
the image. This feature is not supported for polar detectors.
Discussion
Once ray data has been recorded on the detectors, or from rays stored in a ray database, the
Show Data option determines what aspect of the data is displayed as follows:
Incoherent Irradiance: This is incoherent power per area as a function of spatial position on
the detector. The power of each ray that strikes the same pixel is summed without regard to
the phase of the ray. This option becomes Incoherent Illuminance when using photometric
rather than radiometric units.
Coherent Irradiance: This is coherent power per area as a function of spatial position on the
detector. The complex amplitude of each ray that strikes the same pixel is summed, keeping
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1416
track of the real and imaginary parts separately considering the phase of each ray. The final
amplitude is then squared to yield the coherent power. This option becomes Coherent
Illuminance when using photometric rather than radiometric units.
Coherent Phase: The phase angle of the complex amplitude sum used in Coherent Irradiance.
Radiant Intensity: The power per solid angle in steradians as a function of incident angle
upon the detector. This option becomes Luminous Intensity when using photometric rather
than radiometric units.
Radiance (Position Space): The power per area per solid angle in steradians as a function of
spatial position on the detector. Since it is not possible to display the variation in angle space
and position space at the same time, this plot is effectively identical to the Incoherent
Irradiance display, with the data values divided by two pi. Note this scaling assumes the
detector is collecting data over a hemisphere, no matter what angular range the detector
actually collects rays over. This option becomes Luminance when using photometric rather
than radiometric units.
Radiance (Angle Space): The power per area per solid angle in steradians as a function of
incident angle upon the detector. Since it is not possible to display the variation in angle space
and position space at the same time, this plot is similar to the Radiant Intensity display, with
the data values divided by the product of the area of the detector and the cosine of the angle
at the center of the pixel. This option becomes Luminance when using photometric rather than
radiometric units.
Incident Flux: For detector volumes, the incident flux is the flux entering each voxel, measured
in source units (watts, lumens, or joules).
Absorbed Flux: For detector volumes, the absorbed flux is the flux absorbed within each
voxel, measured in source units (watts, lumens, or joules).
Absorbed Flux/Volume: For detector volumes, the absorbed flux/volume is the flux absorbed
within each voxel, measured in source units (watts, lumens, or joules) per unit volume
measured in cubic lens units.
Flux vs. Wavelength: For detector color objects, the spectral distribution of the flux incident
on the detector. The plot will be shown as a bar chart. To obtain the spectral distribution on
any object (other than a detector color), use the Flux vs. Wavelength analysis (see “Flux vs.
Wavelength” ).
A Beam Info tab on the Detector Viewer is shown when the viewer is looking at data from a
Detector Rectangle or Detector Color object. On this tab is summary information about the
beam landing on the detector, including:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1417
Detector Tools
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1418
Saves intensity data recorded on a polar detector into an IESNA or EULUMDAT file.
Format Data may be saved in either the IESNA or EULUMDAT format. For more information on
the IESNA format supported by OpticStudio, see “Source IESNA File” . For more information on
the EULUMDAT format supported by OpticStudio, see “Source EULUMDAT File”.
Detector The object number of the Detector Polar from which the intensity data will be saved.
File Name The name of the file to be saved. IESNA files will be saved in the
<objects>\Sources\IESNA folder, while EULUMDAT files will be saved in the
<objects>\Sources\EULUMDAT folder. For more information on the <objects> folder, see
"Folders" .
Smoothing The level of smoothing to use in processing the data. The smoothing algorithm is
described in “The Detector Viewer” .
Allow exponential output: If ticked, OpticStudio will display numeric data in exponential
(scientific) notation.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1419
Description
Intensity values recorded on a Detector Polar object may be saved into a file format commonly
used for describing photometric data from a real lamp. These data represent the angular
distribution of the emission only; for more information, see “Detector Polar object”.
Note that the IESNA specification requires polar angle data be defined from 0 to 90 or 0 to 180
degrees. As such, it is recommended that this tool only be used with polar detectors whose
maximum angle is defined to be 90 or 180 degrees. If this is not the case, OpticStudio will issue
a warning and pad the exported data with zeros out to 90 or 180 degrees.
Saves the data for the detector currently selected in the editor. The only supported detectors
are the Detector Rectangle, Detector Color, Detector Polar, and Detector Volume objects. The
file format and data stored is specific to each detector type, and the distinct extensions DDR,
DDC, DDP, and DDV are used to denote the different file formats. For information on the file
formats, see “Saving and Loading Detector Data”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1420
Loads data previously saved in a DDR, DDC, DDP, or DDV file onto the detector currently
selected in the editor. If the detector size, angular range, pixel count, or other property does
not match the target detector, then the detector properties are automatically modified to
match that of the incoming data. If the units of the stored data do not match the current units,
an error is issued and the detector is not modified. For information on the file formats, see
“Saving and Loading Detector Data”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1421
Detector Data may be loaded onto an individual detector or all detectors simultaneously.
ZRD File The name of the Ray Database (ZRD) file to be reloaded onto the detector/s.
Filter An (optional) Filter String used to isolate specific rays in the file.
Discussion
Ray trace results are often saved to a ray database (ZRD) file for further analysis. Using this
tool, the results from a saved ZRD file may be reloaded onto a particular detector or onto all
detectors in the system. A corresponding ZPL keyword (ZRDPLAYBACK) is available to reload
the ZRD file within a macro. Using this keyword, data saved to a ZRD file may then be filtered
(using filter strings) as a part of post-processing.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1422
NSC Geometric MTF
This feature allows users to calculate the Geometric Modulation Transfer Function (MTF) on a
detector in non-sequential mode. The calculation uses the spatial distribution of the irradiance
falling on the detector to determine the Geometric MTF along two perpendicular directions,
namely the X and Y axes of the detector. Note that the Geometric MTF in non-sequential mode
is always calculated in cycles/millimeter, regardless of the chosen MTF Units in the System
Explorer.
The Geometric MTF is based on all the light falling on the detector, not just light coming from
a single source in the system. As such, the results may differ between sequential and non-
sequential calculations of the Geometric MTF if the non-sequential system includes mechanical
components (for lens mounts or another package) that the light may interact with, or if the
non-sequential system allows rays to be split or scattered. A filter string can be applied to the
ray database file to account for a particular source. Please see The Filter String for more
information.
Note that a Detector Rectangle with a PSF wave # that is not set to 0 is not supported. When a
detector has a PSF wave # set, the data for each pixel is the Huygens integral of all rays
incident upon the detector. Therefore, the resulting detector distribution is related to the
Huygens PSF and the NSC geometric MTF is invalid.
Maximum Spatial Frequency specifies the Maximum Spatial Frequency for the calculation. If
set to 0, the Maximum Spatial Frequency will be the Nyquist frequency based on the pixel size.
If X and Y pixel dimensions are different, the smaller Nyquist frequency will be used. If the user
inputs a frequency larger than the Nyquist frequency, the displayed results after the Nyquist
frequency are invalid.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1423
Discussion about samplingTo get an accurate NSC geometric MTF for systems that are above
the diffraction limit, enough sampling at the detector needs to be set up. In general, a detector
size of about ~10x the spot size should suffice if the detector has 513x513 pixels. Note that an
odd number of pixels are recommended. The user should adjust the spatial sampling until
there are no significant changes in the NSC Geometric MTF.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1424
The Ray Database Viewer reads in a previously saved ZRD file, and displays the data in a text
format. For information on creating a ZRD file, see the previous section.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1425
File The name of the ZRD file to use. OpticStudio will look in the folder where the current lens
is saved, and list all files with the ZRD extension found there.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1426
Show Unprocessed Data If checked, the complete data tree for each ray traced will be
displayed.
Expand into Branches If checked, each branch of the tree will be expanded to show a single
complete path from source to ray termination.
XYZ If checked, the global X, Y, and Z coordinate data of the ray segment-object intercept
point will be displayed.
LMN If checked, the global L, M, and N direction cosine data of the segment will be displayed.
Normal If checked, the global Nx, Ny, and Nz object normal vector components at the ray
segment-object intercept point will be displayed.
Path If checked, the path length in lens units from the parent segment is displayed. This is the
physical, not the optical path length. OpticStudio will also show the phase in radians, but only
for segments striking a detector surface.
Exyz If checked, the global electric field in the X, Y, and Z directions will be displayed.
First/Last Ray The first and last number of the rays to display. These controls are very useful
for limiting the length of the displayed data. If the subset data is to be saved in a new ZRD file,
only rays within this range will be included. The value -1 may be used for the Last Ray, which
indicates the last ray defined in the file. If -1 is used for the Last Ray, text output will be
suppressed.
Apply Filter If checked, the filter string entered will be used to reduce the amount of data
displayed. The filter string is also used to determine the subset of the segments which are
saved to a new ZRD file. For information on the filter string syntax, see “The filter string”.
Save Subset Data As If checked, the data displayed which passes the filter string will be saved
in ZRD format in the file name specified. The file name should end in the extension ZRD, with
no path provided. The path used will be the same as the current lens file. To prevent accidental
overwrite of the subset data file, this control is automatically "unchecked" after every save.
ZRD Format This control selects the format to be used for the ZRD file created if “Save Subset
Data As” is checked. For information on ZRD formats, see “Ray database (ZRD) files”.
Save Rays on Object "n" As If checked, ray segments which hit the specified object number
and which pass the defined filter (if any) will be saved as source rays in a binary source file
format of the specified name. Note the ray position data is saved in global coordinates. This
file may subsequently be used as a source file. For information on the ray source file format,
see “Source File” . The file name should end in the extension DAT (for flux only monochromatic
data) or SDF (for polychromatic data), with no path provided. The folder used will be
<objects>\sources\Source Files.
Only rays within the range of the first/last ray setting are saved. To save all rays that hit the
specified object from the ZRD file, choose 1 for the first ray and any integer greater than the
number of rays in the ZRD file for the last ray. If the total number of rays exceeds 1000, then
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1427
printing of the individual ray data in the ray database report will be suppressed to speed up
the process. To see the text listing, choose "Update" again from the text window menu bar. The
second update will show the text data because the "Save Rays On Object" box is automatically
unchecked after every save.
Discussion
The text display for the ray database viewer can be quite long, so it is best to limit the amount
of data displayed by using the first/last controls and the filter string.
A typical unprocessed ray listing looks like this, with some columns removed for brevity:
“Seg#” is the segment #, and is sequential from 0 to the total number of segments the ray
generated.
“Prnt” is the parent number, which indicates which prior segment generated that particular
segment. For example, the parent of segment 4 is segment 3, whose parent is 2, whose parent
is 1. Segment 0 is the source segment, and the starting coordinates indicate the location of the
source point. Any segment can be traced back to the source in this manner.
“Levl” is how many segments away from the source ray the segment is. For segment 4, there
are 4 segments back to the source.
“Hit” indicates the object number struck at the end of the segment. The source segment has a
hit number of 0, since the XYZ coordinates listed are the starting and not the terminating
coordinates of the segment. For all other segments, the XYZ coordinates and other data are at
the segment end on the “hit” object. If the hit object is 0, the ray missed all objects and is
terminated.
"Face" indicates the face number the ray segment hit. If the number is 0, it means either the ray
hit face 0 (i.e., the side face of a lens) or face is not applicable to the object type like sources.
“XRTS DGEF BZ” is a quick indicator of what happened to the segment. X means terminated, R
reflected, T transmitted, S scattered, D diffracted, and B bulk scattered. All these values indicate
what happened at the end of the segment, when the segment struck the object “hit”. The
values G, E, and F indicate the segment was a ghost, diffracted, or scattered, respectively, from
the parent segment’s “hit” object number, so these events occurred atthestart of the segment.
The symbol Z indicates a ray error occurred and the ray was terminated. Note more than one
event may occur for any ray segment.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1428
The other data displayed includes the global XYZ coordinates of the end of the segment, the
global normal vector coordinates of the object struck at the end of the segment, the ray
intensity, the object comments, and possible other data as this feature is expanded. Object
comments include which object the ray is currently inside of, whether the ray underwent bulk
scattering inside of an object, and whether the wavelength for the ray was modified during a
bulk scattering event (wavelength modification during bulk scattering is described in detail in
“Bulk Scatter tab” ).
Path Analysis
This feature is only available in the Premium and Enterprise editions of Ansys Zemax
OpticStudio.
This feature groups rays from a Ray Database file according to the path the rays took through
the system. Rays that took the same path, in terms of the order different objects were
interacted with, are summed so the total flux in each path can be determined. This feature also
may automatically generate path filters so the groups of rays may be studied separately.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1429
Ray Database Selects the ray data file to analyze.
First/Last Ray Choose the ray range. To use all rays, set the First ray to 1 and the last ray to -1.
Filter See The Filter String. Filters for PAF files must be specified during the Ray Trace and
cannot be applied here.
Generate Path Filters If selected, path filters for all possible paths are automatically
generated.
Relative Minimum Flux The relative flux is the amount of energy at the end of a branch
relative to the starting energy at launch. If this value is less than the specified minimum, then
the branch is added to the "uncategorized" sum.
Discussion
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1430
This feature reads all or some subset of the rays in the selected ZRD file, and filters the rays
according to the specified filter string, if any. Then, each branch of each ray is analyzed, and
the order of object interaction is determined. This order is called a "path". If a ray starts at
source object 3, then hits the front of object 7 and then the back of object 7, then reflects off
object 9, the path is 3, 7, 9. Note the interaction with object 7 twice is considered to be a single
interaction, so the path is not 3, 7, 7, 9. The same object number will never appear twice
consecutively in a path. There is a maximum number of objects allowed in any one path, and
this limit is currently 100. All paths with more than this number of object interactions are
considered to have the same path.
All branches that have the same path are grouped together. The flux (always in watts,
regardless of the source units) at the end of the path is summed for all branches having the
identical path. The list of all possible paths is generated and sorted in the order of total ending
flux. This data is summarized in a report listing the path #, flux out, relative flux out as a
percentage of the total flux in for all rays, the number of branches with that same path, and
then the object sequence in the path. Branches that do not fall into any path because of a
Relative Minimum Flux requirement, or because the maximum number of unique paths
(currently 10,000) is exceeded, are added to the catch-all "uncategorized" path.
Only one ZRD file can be active with the Path Analysis feature at one time, however many path
analysis windows are open.
If "Generate Path Filters" is checked, this feature will create a path filter for each path defined,
and this filter will be named _1 for path 1, _2 for path 2, etc. These path filters may
subsequently be used in any analysis feature that supports filter strings to isolate the selected
path. These filters must not have any leading zeros before the path number. For example _02
should not be used instead of _2. The generated path filters are automatically saved with the
lens file.
There is a handy shortcut for using path filters when looking at the NSC 3D Layout, NSC
Shaded Model, or Detector Viewer plots: press the spacebar to increment the path filter
number (from 1 to 2 or 5 to 6, etc). Press Ctrl-Space to decrement the path filter number. Also,
holding down the Shift key while pressing the space bar will increment or decrement the path
filter by 10.
Path filters may also be used in combination with other filters, whether explicit or named. For
example, the following is a valid filter that selects only ghost rays off object 11 with the
specified path: "_7 & G11". For more information see The Filter String and Named Filters.
Note that path filters _n doesn’t include the filters used when performing the Path Analysis.
The path filter _n only filters rays by selecting ray branches whose segments follow an explicit
path.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1431
This feature selects all rays from a ZRD or SDF ray database file, and sums the intensity of rays
striking a specific object as a function of wavelength.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1432
Ray Database Selects the existing ZRD or SDF file to analyze.
First/Last Ray Choose the ray range. To use all rays, set the First ray to 1 and the last ray to -1.
Object The object the rays strike. A specific object must be selected, and the intensity for any
segment that strikes the object will be added to the sum for the associated wavelength.
Bins Because the ray wavelengths are discrete, the sum for each wavelength must be over a
finite bandwidth. This setting determines how many wavelength bins are used to span the
range from minimum to maximum wavelength.
Minimum/Maximum Wavelength The lowest and highest wavelength. Rays outside this
wavelength range are ignored.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1433
Plot Scale The maximum scale for the plot. Use zero to choose a default scale.
Bar Chart If selected, the data will be displayed as a bar chart. This setting only applies to the
Classic view, which may be checked-on in the Graphics (OpticStudio Preferences) section of
the OpticStudio Preferences. See the “Classic” tab at the bottom on the “Flux vs Wavelength”
screenshot above.
Discussion
Because the wavelengths for each segment are discrete and are only determined by the rays in
the ray database file, this plot can take on a noisy look with lots of data "spikes". To minimize
the noisy nature of this computation, the number of rays traced should be large, and the
number of bins kept reasonably small.
To minimize the noise, a smoothing operation is done. The energy of each ray is smeared
between the two nearest bins to the wavelength.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1434
The Surface Sag helps to evaluate each surface manufacturability, shape, and complexity. This
feature supports NSC ray tracing to calculate the sag values of a specified Face of an Object
present in the Non-sequential Component Editor (NCE).
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1435
Settings
Sampling: Selecting this sets the resolution of the Sag Map, accuracy in the results can be
increased when selecting “Remove option Best Fit Sphere”.
Data: This feature only supports Surface Sag data as of this release.
Remove: There are several options available in this drop-down menu, these are:
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1436
l Best Fit Sphere: this option adds and fits a sphere to the measured object face, which
is based upon the Best Fit Sphere (BFS) criterion. This is then removed from the sag pro-
file, see the “criterion” section of Surface Sag for more details.
l Average Sag: this option will compute the average sag of the measured object face
and then remove it from all the values in the profile.
l Minimum Sag: this option computes the minimum sag of the measured object face
and remove it from all the values in the profile.
Sag Offset: The sag values will be displayed with the selected sag offset in Lens Units.
Rotation: The value is the z-axis tilt angle of the probe rays (in degrees) used to measure the
sag profile. When the “Show As” setting is set to either “Cross-section Y” or “Cross-section X”,
this option in settings can be used to sample slices at different angles across the surface.
Width: This box is automatically populated with the width of the sag map displayed in Lens
Units. This value is based on the physical size of the object face when changing either the
“Object” or “Face” drop-down menus.
Note that some objects, such as CAD objects, are not supported, and the user will have to
adjust the width of the sag map to accommodate the non-supported object.
Note that the automatic value may be too large when selecting an object face with user-
defined aperture (UDA) applied, adjusting the value will improve the resolution of the sag map.
Object: In the drop-down menu you can select the object number from the NCE to analyze.
Face: In the drop-down box this indicates the nominated face of the selected object to
measure.
Show As: Allows the selection of the graphical output generated in the results. Selecting
“Cross-section Y” or “Cross-section X” will only give results based on the measured object's
face. Using the “Remove Best Fit Sphere” allows the complete sag profile to always be used,
regardless of which option is selected.
If selecting options other than the two cross-section modes, the graphical result will show a
square matrix of sag values shown in the “Text Tab”.
X and Y Decenter: The shifts of both X and Y will be displayed in these boxes in Lens Units.
These values are in relation to the probe ray used to measure the sag profile representing
decenters from the vertex of the measured object face.
Keep Object Tilt: This setting is unchecked by default, but if the Keep Object Tilts setting is
checked it will preserve the object’s original x and y tilt from the LDE. This ensures that tilts in
the sag map data are considered for sag calculation. When unchecked, the Probe ray is in the
same orientation as the object; hence, tilts are not considered for sag calculation.
Layout tab: The inclusion of the Layout tab, is for visualization of the output that can also be
used for troubleshooting the sag analysis if needed.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1437
Discussion
The sag is computed on a uniform square grid of points (or a uniform line for cross-section
modes), and the values of the sag are the displayed data. This feature leverages NSC ray
tracing to calculate the sag values. A useful aspect of this ray tracing approach is the ability to
visualize how the given object surface is sampled by the analysis. This visualization can be
accessed via the Layout Tab, where the part being measured is shown along with a
representation of the probe ray.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1438
For complicated files, where objects of interest may have UDAs applied to them for example, it
may be useful to utilize the Layout Tab in a trial-and-error type approach, whereby the Width,
Decenter X, and or Y settings are manually changed until the probe rays correctly sample the
surface of interest.
It is important to note there are points to take into consideration based on using the NSC ray
tracing approach, especially regarding the Best Fit Sphere removal option, see the BFS
Limitations below.
BFS Limitations
At the same time, the ray tracing approach used in this analysis has the capability to measure
the profile of arbitrary object faces, but it does have some limitations; particularly when it
comes to fitting the measured data. One key point is that sampling is a key parameter when
attempting to fit a sphere to any sag profile (regardless of the selected BFS criterion). This is
due to its effect on the resulting resolution of the sag data, these data points are the only
information that can be used to inform the fitting process.
In terms of setting the sampling to obtain an acceptable solution for the BFS radius, this is
dependent on the geometry of the surface (profiles with higher slope values typically require
higher sampling to resolve) as well as the required accuracy of the solution, both of which are
user and system dependent. The user should make sure that the BFS radius for the measured
surface, correctly converges when going to higher sampling values.
It is also important to note that in the RMS fitting mode a square grid of rays is used to sample
the surface profile. This contrasts with the fitting sphere and the geometry of the measured
surface also, therefore the data will point towards the centre of the profile contributing more
to the result.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1439
For more information on coating calculations, see the Polarization (system explorer) section of
the System Explorer and the About Coatings section of the Libraries tab.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1440
Computes the S, P, and average polarization intensity coefficients for reflection for the
specified surface as a function of incident angle.
Min Angle The minimum angle of incidence to plot. This defines the left edge of the plot.
Max Angle The maximum angle of incidence to plot. This defines the right edge of the plot.
Min Y The minimum y value to plot. This defines the bottom edge of the plot.
Max Y The maximum y value to plot. This defines the top edge of the plot.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1441
Face The face number which defines the interface to use, if the surface is a Non-sequential
Components surface.
Discussion
In non-sequential mode, the default Incident Media is air. The analysis is done on Object / Face
basis. There is no way to determine that all the area of the Face of an Object is in contact with
all the area of the Face of another Object l. To change the Incident Media, use the "Inside Of"
flag.
Computes the S, P and average polarization intensity coefficients for transmission for the
specified surface as a function of incident angle.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1442
See "Reflection vs. Angle" for settings
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1443
Computes the S, P, and average polarization intensity coefficients for absorption for the
specified surface as a function of incident angle.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1444
See "Reflection vs. Angle" for settings
Computes the R (reflected) and T (transmitted) diattenuation for the specified surface as a
function of incident angle.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1445
See "Reflection vs. Angle" for settings
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1446
For sequential surfaces, this feature computes the S and P polarization phase for reflection (if
the glass is MIRROR) or for transmission (if the glass is not MIRROR) as a function of incident
angle. For non-sequential objects, this feature computes the S and P polarization phase for
reflection (if the material is MIRROR) or for transmission (if the material is not MIRROR) as a
function of incident angle.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1447
See "Reflection vs. Angle" for settings
Computes the retardance for the specified surface as a function of incident angle.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1448
See "Reflection vs. Angle" for settings
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1449
Computes the S, P, and average polarization intensity coefficients for reflection for the
specified surface as a function of incident wavelength.
Min Wave The minimum wavelength to plot. This defines the left edge of the plot.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1450
Max Wave The maximum wavelength to plot. This defines the right edge of the plot.
Min Y The minimum y value to plot. This defines the bottom edge of the plot.
Max Y The maximum y value to plot. This defines the top edge of the plot.
Face The face number which defines the interface to use, if the surface is a Non-sequential
Components surface.
Discussion See the “Polarization (system explorer)” section of the System Explorer.
Computes the S, P, and average polarization intensity coefficients for transmission for the
specified surface as a function of incident wavelength.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1451
See "Reflectivity vs. Wavelength" for settings
Discussion See the “Polarization (system explorer)” section of the System Explorer.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1452
Computes the S, P, and average polarization intensity coefficients for absorption for the
specified surface as a function of incident wavelength.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1453
See "Reflectivity vs. Wavelength" for settings
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1454
Computes the R (reflected) and T (transmitted) diattenuation for the specified surface as a
function of incident wavelength.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1455
See "Reflectivity vs. Wavelength" for settings
For sequential surfaces, this feature computes the S and P polarization phase for reflection (if
the glass is MIRROR) or for transmission (if the glass is not MIRROR) as a function of incident
wavelength. For non- sequential objects, this feature computes the S and P polarization phase
for reflection (if the material is MIRROR) or for transmission (if the material is not MIRROR) as a
function of incident wavelength.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1456
See "Reflectivity vs. Wavelength" for settings
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1457
Computes the retardance for the specified surface as a function of incident wavelength.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1458
Diffraction Efficiency Analyses (non-
sequential ui mode)
Graphs of Diffraction Efficiency for Non-Sequential mode volume hologram objects. These are
calculated using the Kogelnik approximation method for thick holograms. The diffraction
efficiency is determined by tracing a ray from the object to the specified surface and
calculating the transmission rate. The Calculation assumptions and limitations for Non-
Sequential mode analyses are the same as for Sequential mode.
To perform the calculations, a copy of the selected hologram object is created and the power
of rays after diffraction is measured. Results over the selected scanning range are reported in
the analysis window.
These analyses can be used with Hologram Lens, Toroidal Hologram, and Hologram Surface
object types when they are set up as a volume hologram. Details of how to set the volume
hologram parameters are in the respective Object type help files.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1459
Graph of Diffraction Efficiency for volume hologram objects as a function of incident angle and
wavelength using the Kogelnik approximation method for thick holograms. For more
information about calculation methods, see Calculation assumptions and limitations.
To perform the calculations, a copy of the selected hologram object with the settings below is
created and the power of rays after diffraction is measured. Results over the selected scanning
range are reported in the analysis window.
This analysis can be used with Hologram Lens, Toroidal Hologram, and Hologram Surface
object types when they are set up as a volume hologram. Details of how to set the volume
hologram parameters are in the respective Object type help files.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1460
Sampling The size of the sampling grid used. The sampling may be 33x33, 65x65, etc.
Wavelength Selects the wavelength number as defined in the System Explorer to use for the
analysis.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1461
Hologram Object Chooses the hologram object that will have it's diffraction efficiency
measured.
Ambient Object If the diffractive face of the hologram object exactly overlaps another object,
this other object must be selected here. By default this option is set to None.
Detector Object Chooses the detector object. By default this option is set to Automatic.
Minimum Angle Minimum incident angle of the chief ray in degrees. If both Minimum Angle
and Maximum Angle are equal to zero, Minimum Angle will be internally set to -0.01.
Maximum Angle Maximum incident angle of the chief ray in degrees. If both Minimum Angle
and Maximum Angle are equal to zero, Maximum Angle will be internally set to 0.01.
Minimum Wavelength Minimum wavelength of the incident ray in microns. If both Minimum
Wavelength and Maximum Wavelength are set to zero, Minimum Wavelength will be internally
set to 99% of the selected Wavelength.
Position X/Y/Z Position of the testing ray relative to the Hologram Object. This option allows
the diffraction efficiency to be tested on different positions of the Hologram Object.
Inside of Object If the test ray starts inside of an object, that object must be selected here.
Pre-propagation Chooses the ray's starting position. This should be selected such the the
ray's starting position does not overlap or begin behind the holographic surface. This functions
in the same way as the parameter available in Sources in Object Properties. By default this is
1000 times the Glue Distance.
Tilt about Choose which axis to rotate the ray used for testing.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1462
Graphs of Diffraction Efficiency for volume hologram objects as a function of incident angle
using the Kogelnik approximation method for thick holograms. For more information about
calculation methods, see Calculation assumptions and limitations.
To perform the calculations, a copy of the selected hologram object with the settings below is
created and the power of rays after diffraction is measured. Results over the selected scanning
range are reported in the analysis window.
This analysis can be used with Hologram Lens, Toroidal Hologram, and Hologram Surface
object types when they are set up as a volume hologram. Details of how to set the volume
hologram parameters are in the respective Object type help files.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1463
Sampling The size of the sampling grid used. The sampling may be 33x33, 65x65, etc.
Wavelength Selects the wavelength number as defined in the System Explorer to use for the
analysis.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1464
Hologram Object Chooses the hologram object that will have it's diffraction efficiency
measured.
Ambient Object If the diffractive face of the hologram object exactly overlaps another object,
this other object must be selected here. By default this option is set to None.
Detector Object Chooses the detector object. By default this option is set to Automatic.
Minimum Angle Minimum incident angle of the chief ray in degrees. If both Minimum Angle
and Maximum Angle are equal to zero, Minimum Angle will be internally set to -0.01.
Maximum Angle Maximum incident angle of the chief ray in degrees. If both Minimum Angle
and Maximum Angle are equal to zero, Maximum Angle will be internally set to 0.01.
Position X/Y/Z Position of the testing ray relative to the Hologram Object. This option allows
the diffraction efficiency to be tested on different positions of the Hologram Object.
Inside of Object If the test ray starts inside of an object, that object must be selected here.
Pre-propagation Chooses the ray's starting position. This should be selected such the the
ray's starting position does not overlap or begin behind the holographic surface. This functions
in the same way as the parameter available in Sources in Object Properties. By default this is
1000 times the Glue Distance.
Tilt about Choose which axis to rotate the ray used for testing.
Graphs of Diffraction Efficiency for volume hologram objects as a function of wavelength using
the Kogelnik approximation method for thick holograms. For more information about
calculation methods, see Calculation assumptions and limitations.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1465
To perform the calculations, a copy of the selected hologram object with the settings below is
created and the power of rays after diffraction is measured. Results over the selected scanning
range are reported in the analysis window.
This analysis can be used with Hologram Lens, Toroidal Hologram, and Hologram Surface
object types when they are set up as a volume hologram. Details of how to set the volume
hologram parameters are in the respective Object type help files.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1466
Sampling The size of the sampling grid used. The sampling may be 33x33, 65x65, etc.
Wavelength Selects the wavelength number as defined in the System Explorer to use for the
analysis.
Hologram Object Chooses the hologram object that will have it's diffraction efficiency
measured.
Ambient Object If the diffractive face of the hologram object exactly overlaps another object,
this other object must be selected here. By default this option is set to None.
Detector Object Chooses the detector object. By default this option is set to Automatic.
Angle Chooses the incident angle of the chief ray in degrees. By default this option is set to 0.
Minimum Wavelength Minimum wavelength of the incident ray in microns. If both Minimum
Wavelength and Maximum Wavelength are set to zero, Minimum Wavelength will be internally
set to 99% of the selected Wavelength.
Position X/Y/Z Position of the testing ray relative to the Hologram Object. This option allows
the diffraction efficiency to be tested on different positions of the Hologram Object.
Inside of Object If the test ray starts inside of an object, that object must be selected here.
Pre-propagation Chooses the ray's starting position. This should be selected such the the
ray's starting position does not overlap or begin behind the holographic surface. This functions
in the same way as the parameter available in Sources in Object Properties. By default this is
1000 times the Glue Distance.
Tilt about Choose which axis to rotate the ray used for testing.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1467
Prescription Data (reports group, the
analyze tab, non-sequential ui mode)
This function generates a list of all surface data, and summarizes the lens system. This is the
feature to use for printing the contents of the Lens Data Editor.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1468
General Data Includes F/#, pupil positions, magnification, etc.
Surface Data Surface type, radii, thickness, glass, clear semi-diameter, semi-diameter, conic.
Surface Detail Surface Parameter data. All NSC object data is also listed in this section for NSC
groups.
Index Data Index of refraction and TCE data for each wavelength/surface.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1469
Global Vertex Global coordinates of the vertex and the rotation matrix for each surface. See
“Global Coordinate Reference Surface” for a discussion of this data.
F/ Numbers Lists working F/# for each field position and wavelength combination.
Cardinal Points Lists the locations of focal, principal, anti-principal, nodal, and anti-nodal
points.
POP Settings Lists the surface by surface settings used by the Physical Optics Propagation
feature.
Files Used Lists all the files used by the optical system model, including glass data, macros,
extensions, CAD files, DLL files, and others.
Discussion
This report lists specification data, indices of refraction, global coordinates, element volumes,
and more. It is suitable for describing the lens prescription.
When OpticStudio computes element volumes for spherical or plane standard surfaces with
circular edges, the edge of the surface with the smaller diameter is assumed to be “squared
up” to the clear semi-diameter or semi-diameter of the larger surface. The volume is exact for
this common special case.
For other elements, with possibly aspheric faces, elliptical, annular, or rectangular apertures
and/or decentered apertures, a numerical integration technique is used that yields
approximate volumes to an accuracy of about
0.1%. If the surface is rotationally symmetric, the edge of the surface with the smaller diameter
is “squared up” to the clear semi-diameter or semi-diameter of the larger surface. Otherwise,
the edge of the surface with the smaller diameter is “tapered” to the clear semi-diameter or
semi-diameter of the larger surface. If zero volume is reported than the algorithm is unable to
compute the volume to sufficient accuracy. This happens when the aperture types are not the
same, or have different sizes or decenters.
When computing the density of elements, the density in grams per cubic centimeter for a
catalog glass is retrieved from the glass catalog. For gradient index surfaces, OpticStudio
assumes the density is 3.6 g/cc, which may not be a good estimate.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1470
Universal Plot Group (the analyze
tab, non-sequential ui mode)
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1471
Displays as either a plot or as a text listing the value of any optimization operand as a function
of one other parameter. See also “New Universal Plot 2D...”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1472
Independent Variable X Settings
Select either surface, system, multi-configuration, or NSC data as the independent variable.
Select the parameter to use as the independent variable. The available selections include
radius, curvature, thickness, conic, and parameter values if surface parameters are chosen. For
system parameters, the selections include the system aperture, field and wavelength data,
apodization factor, temperature, and pressure. For configuration data, all multi-configuration
operands are listed. For NSC data, object position and parameter data are listed.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1473
The surface number for the independent variable parameter if the parameter is associated with
a surface. This field is used for the configuration number if configuration data is selected. If
NSC data is selected, this field is used for the object number.
Start/Stop Value The beginning and ending range of the independent variable.
# of Steps The number of values between the start and stop values, inclusive, to compute the
dependent variable function value.
Operand The optimization operand to use as the dependent variable function. The current
system merit function is also included as "Merit". If the system merit function is selected, then
either the entire merit function or any specific operand’s value may be selected using the
"Line" control below.
Line The optimization operand # to use as the dependent variable function if "Merit" is
selected for the Operand.
Int1/Int2 The Int1 and Int2 values for the selected operand. The dialog box will display the
short name for the Int1 and Int2 values to aid in identifying the data that needs to be supplied.
If the edit control is grayed out; then the selected operand does not use that value.
Data1-Data4 The Data values for the selected operand. The dialog box will display the column
heading name for these values to aid in identifying the data that needs to be supplied. If the
edit control is grayed out; then the selected operand does not use that value.
Min/Max Plot Value The min and max value to plot for the dependent variable (Y) function. If
both of these values are zero, then a default scale will be chosen. If either one is not zero, then
the y range of the plot will extend from the minimum to the maximum. If the data does not fit
within the specified range, then the data may plot beyond the borders of the data box.
Plot Title Any text may be entered which will be used as the title for the plot or text listing.
Save As New Universal Plot This will save the current settings in a Universal Plot 1D (UPL) file
specified by the user. Any name which may be used as a valid file name may be entered.
Although the "browse" window allows the file to be saved in any folder, OpticStudio will only
recognize the file if it resides in the <data>\Miscellaneous folder (see “Folders”).
Once the settings are saved, the file name will appear as a menu option under the Universal
Plot 1D menu option for quick regeneration of the plot.
Load From This will load the settings from a previously saved Universal Plot 1D (UPL) file
specified by the drop down list to the right of the button.
Discussion
This feature will either plot as a graph or create a text listing of the value of any optimization
operand as a function of a single system, surface, or multi-configuration value.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1474
For example, suppose a plot of the sagittal MTF at 30 lp/mm was needed as a function of the
decenter of a lens group (which may be a useful diagnostic for tolerancing analysis). Since the
MTFS operand computes the sagittal MTF, the Universal Plot can generate such a graphic or
text listing. See “Optimization operands” for a list of available optimization operands. A
decenter of a lens group is defined by Parameter 1 or 2 on the relevant coordinate break
surface, and Parameter 1 and 2 are both listed in the available surface group parameters.
Because of the number of different plots this feature can generate, there are no intelligent
defaults for either the independent or dependent settings. These values need to be carefully
provided in the settings dialog box. If the optimization operand cannot be computed, an error
message will be displayed and the plot will not be generated.
Because many optimization operands accept Hx and Hy values to define the field point for the
calculation, these operands may require that the number of fields be set to 1, then set Hx = 0
and Hy = 1, then finally choose Y Field 1 as the independent variable for a plot of the operand
as a function of field. A similar trick works for getting plots as a function of wavelength.
Some individual operands, like DIFF and SUMM, have no meaning if selected from the
"Operand" column because these operands are only defined when used as part of a larger
merit function. If results from a calculation like DIFF are required, then the merit function
should be selected from the Operand list and the individual DIFF’s within the merit function
selected for the "Line".
The escape key will terminate the analysis if the computation is taking too long.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1475
Displays as either a plot or as a text listing the value of any optimization operand as a function
of two other parameters. See also “New Universal Plot 1D...”.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1476
Independent Variable X or Y Settings
Select either surface, system, multi-configuration, or NSC data as the independent variable.
Select the parameter to use as the independent variable. The available selections include
radius, curvature, thickness, conic, and parameter values if surface parameters are chosen. For
system parameters, the selections include the system aperture, field and wavelength data,
apodization factor, temperature, and pressure.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1477
For configuration data, all multi-configuration operands are listed. For NSC data, object
position and parameter data are listed.
The surface number for the independent variable parameter if the parameter is associated
with a surface. This field is used for the configuration number if configuration data is selected.
If NSC data is selected, this field is used for the object number.
Start/Stop Value
# of Steps
The number of values between the start and stop values, inclusive, to compute the dependent
variable function value. The minimum value is 2.
Operand The optimization operand to use as the dependent variable function. The current
system merit function is also included as "Merit". If the system merit function is selected, then
either the entire merit function or any specific operand’s value may be selected using the
"Line" control below.
Line
The optimization operand # to use as the dependent variable function if "Merit" is selected for
the Operand.
Int1/Int2 The Int1 and Int2 values for the selected operand. The dialog box will display the
short name for the Int1 and Int2 values to aid in identifying the data that needs to be supplied.
If the edit control is grayed out; then the selected operand does not use that value.
Data1-Data4
The Data values for the selected operand. The dialog box will display the column heading
name for these values to aid in identifying the data that needs to be supplied. If the edit
control is grayed out; then the selected operand does not use that value.
Display Settings
Show As Choose surface plot, contour map, grey scale, or false color map as the display
option.
Contour Format The contour format string. For a discussion of the contour format string
syntax, see “The Contour Format String”.
Min/Max Plot Scale These controls define the min and max range of the Z-direction scale for
the display. If the value is set to exactly zero, a default value will be selected. To define a value
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1478
of zero, use a very small number such as 1.0E-20. If the defined plot scale values do not span
the resulting data, the plot may clip, saturate, or otherwise distort the data display. These
settings have no affect on the surface or contour plots.
Plot Title Any text may be entered which will be used as the title for the plot or text listing.
Save As New Universal Plot This will save the current settings in a Universal Plot 2D (UP2) file
specified by the user. Any name which may be used as a valid file name may be entered.
Although the "browse" window allows the file to be saved in any folder, OpticStudio will only
recognize the file if it resides in the <data>\Miscellaneous folder (see “Folders”).
Once the settings are saved, the file name will appear as a menu option under the Universal
Plot menu option for quick regeneration of the plot.
Load From This will load the settings from a previously saved Universal Plot 2D (UP2) file
specified by the drop down list to the right of the button.
Discussion
This feature will either plot as a graph or create a text listing of the value of any optimization
operand as a function of any two system, surface, or multi-configuration values.
For example, suppose a plot of the sagittal MTF at 30 lp/mm was needed as a function of the
Xand Y decenter of a lens group (which may be a useful diagnostic for tolerancing analysis).
Since the MTFS operand computes the sagittal MTF, the Universal Plot 2D can generate such a
graphic or text listing. See “Optimization operands” for a list of available optimization
operands. The X and Y decenter of a lens group is defined by Parameters 1 and 2 on the
relevant coordinate break surface, and Parameters 1 and 2 are both listed in the available
surface group parameters.
Because of the number of different plots this feature can generate, there are no intelligent
defaults for either the independent or dependent settings. These values need to be carefully
provided in the settings dialog box. If the optimization operand cannot be computed, an error
message will be displayed and the plot will not be generated.
Because many optimization operands accept Hx and Hy values to define the field point for the
calculation, these operands may require that the number of fields be set to 1, then set Hx = 0
and Hy = 1, then finally choose Y Field 1 as the independent variable for a plot of the operand
as a function of field. A similar trick works for getting plots as a function of wavelength.
Some individual operands, like DIFF and SUMM, have no meaning if selected from the
"Operand" column because these operands are only defined when used as part of a larger
merit function. If results from a calculation like DIFF are required, then the merit function
should be selected from the Operand list and the individual DIFF’s within the merit function
selected for the "Line".
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1479
When selecting independent variables that are controlled by Multi-Configuration operands,
note that the Multi- Configuration operand will override the changes made to the independent
variable. For this reason OpticStudio automatically alters the corresponding data on the Multi-
Configuration operand as well.
The escape key will terminate the analysis if the computation is taking too long.
Roadway Lighting
This feature is only available in the Premium and Enterprise editions of Ansys Zemax
OpticStudio.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1480
Mounting Height The distance in lens units from the roadway to the lamp origin.
Arrangement The arrangement of lamps. Choose single side, double side, or staggered.
Longitudinal Spacing The spacing between lamps in lens units along the direction of the
roadway. For single and double side arrangements, this is the spacing between two adjacent
lamps on the same side of the road. For staggered arrangement, this is the spacing along the
road of adjacent lamps on opposite sides of the road. The spacing of adjacent lamps on the
same side of the roadway would, therefore, be two times the spacing.
Lateral Offset The lateral lamp offset in lens units. This is the transverse lamp position, relative
to the edge of the roadway. This value can be positive or negative.
Origin The object that represents the origin of the lamp coordinate system.
Lane Width The width of each lane in the roadway in lens units.
Surface Classification The road surface classification. This corresponds to the specularity of
the road surface. Currently R1, R2, R3, and R4 are supported.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1481
Road Class The roadway class. This determines the specifications required to have a passing
roadway. Currently ME1, ME2, ME3A, ME3B, ME3C, ME3D, ME4A, ME4B, ME5, ME6, CE0, CE1,
CE2, CE3, CE4, and CE5 are supported.
Discussion
This analysis computes roadway lighting data according to CIE 140-2000 "Road Lighting
Calculations". A quick indication as to whether the lamp passes the specifications dictated by
the defined road class is provided along with the calculated value. While all settings are
defined in system units, the computed data is always returned in units of meters and lumens,
per the specification.
There are two methods intended for the usage of this analysis. This first is to simply analyze an
existing lamp whose far-field intensity is defined in a *.IES or *.LDT file. In this case the far-field
data file should be specified as the origin object in the settings and OpticStudio will only
account for that source in the computation. The second is for the user to define sources and
geometries associated with the roadway lamp in the system; no other objects or detectors
should exist in the system. OpticStudio will trace analysis rays from all defined sources and
compute the data based upon the far-field intensity pattern. In both scenarios the calculation
is done assuming the origin object’s local x-axis is the longitudinal direction (along the
roadway), and the local y-axis is the transverse direction (across the roadway). Note that some
IES/LDT files have data defined assuming different lamp orientations. Make sure to confirm
this and rotate the source, if necessary, before using this analysis.
An associated capability is the ability to optimize lamps to pass these specifications. See “NSC
Roadway Merit Function Tool” for details.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1482
This feature is only available in the Premium and Enterprise editions of Ansys Zemax
OpticStudio.
Displays a true color image of the illumination pattern formed by one or more sources. The
sources may be defined by IES or LDT source files.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1483
No. of Sources The number of sources to be displayed. May be any number from 1 to 8.
Active Source The source number for which the subsequent data (file name, spectral
distribution, position and orientation) are defined.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1484
File Name The name of the IESNA, EULUMDAT, or SDF file containing the data to be
displayed.
Source Color The model used to define the spectral distribution of the active source. The ten
options provided for the source color model are described in “Defining the color and spectral
content of sources”.
X, Y, Z; x, y; R, G, B; Temp (K); u'v’ Six of the models require additional numeric inputs for
characterizing the color of the active source. The appropriate inputs should be entered based
on the selected model (e.g. X, Y and Z values for the CIE 1931 Tristimulus XYZ model). No
additional numeric inputs are required for the System Wavelengths, Uniform Power Spectrum,
D65 White, or Spectrum File models. For any model requiring additional numeric inputs - other
than Black Body Spectrum - OpticStudio must perform fitting to determine the corresponding
spectrum (this fitting is also required for the D65 White model). More details on the fitting
algorithm are provided in “The spectrum fitting algorithm”.
Spectrum The number of wavelengths to use in characterizing the spectral distribution of the
active source. The user has no control over this option when selecting the System Wavelengths
or the Spectrum File models (though in the latter case the appropriate value from the
spectrum file will be read into the dialog).
Wavelengths From The minimum wavelength (in microns) to use in characterizing the
spectral distribution of the active source. The user has no control over this option when
selecting the System Wavelengths or the Spectrum File models (though in the latter case the
appropriate value from the spectrum file will be read into the dialog).
To The maximum wavelength (in microns) to use in characterizing the spectral distribution of
the active source. The user has no control over this option when selecting the System
Wavelengths or the Spectrum File models (though in the latter case the appropriate value from
the spectrum file will be read into the dialog).
Spectrum File The name of the file containing the spectral data for the active source. This
option is only available when selecting the Spectrum File model. More information on the file
format is provided in “Defining a spectrum file” in the Sources section of the Object Properties.
X; Y; Z The global X, Y, and Z position of the active source, in lens units. The global position of
the screen is always at (0,0,0).
Tilt X; Tilt Y; Tilt Z The global X, Y, and Z tilt of the active source, in degrees.
X, Y Half Width The X and Y half width of the screen, in lens units.
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1485
Suppress Frame If checked, the frame is not drawn and the entire window is used to display
the image.
Discussion
This analysis will simulate the true color image that is formed by luminous flux emanating from
a number of sources (up to 8) onto a screen. The far-field luminous intensity data stored in the
respective source file, along with the solid angle subtended by each pixel on the screen,
determines the luminous flux for each pixel. Since this analysis only considers the far-field
distribution of the sources, the spatial source data contained in the SDF files are ignored
(spatial data are not present in the IES or LDT files).
The total number of sources to simulate is specified by the "No. of Sources" input. The
properties of any particular source may then be defined by specifying the source of interest via
the "Active Source" input. Each source is then defined by a particular file. In addition, each
source may have its own unique spectral distribution and its own unique global position and
orientation. If an SDF file is selected for a particular source, then the settings for the source
spectral distribution will be grayed out, as in this case the source color information is explicitly
provided in either the SDF file itself.
The global position of the screen is always at (0,0,0), and the global orientation of the screen is
always along the Z axis, i.e. the direction cosines for the normal vector of the screen are (0,0,1).
The size and sampling of the screen are given by the "X/Y Half Width" and "# X/Y Pixels"
settings, respectively.
Source files must all be stored in the <data>\Objects\Sources\ folders; IES files must be stored
in the IESNA sub-folder, LDT files must be stored in the EULUMDAT sub-folder, and SDF files
must be stored in the Source Files sub-folder (see “Folders” ).
Ansys Zemax OpticStudio 2023 R2 The Analyze Tab (non-sequential ui mode) 1486
The Optimize Tab (sequential ui
mode)
Manual Adjustment group contains a series of features that let you manually adjust the
design for desired performance.
Automatic Optimization group provides access to the Merit Function Editor, which is how a
system’s performance specification is defined in OpticStudio. The Optimization Wizard lets you
quickly generate a merit function based on the most common requirements (including the
smallest spot, best wavefront error, and smallest angular deviation) which can then be edited
to your exact requirements.
Global Optimization is used in two main scenarios: at the start of a design process (Global) in
order to generate design forms for further analysis, and after initial optimization (Hammer) to
exhaustively improve the current design.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1487
Quick Focus
The Quick Focus button is available in the Manual Adjustment section of the Optimize tab. The
Quick Focus adjusts the back focal distance for best focus. See also “Quick Adjust.”
Settings:
Spot Size Radial Focus to best RMS spot radius image surface.
Spot Size X Only Focus to best RMS x direction spot size image surface.
Spot Size Y Only Focus to best RMS y direction spot size image surface.
Use Centroid Reference all calculations to the image centroid rather than the chief ray. This
option is slightly slower, but more appropriate for systems dominated by coma.
Discussion:
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1488
This feature adjusts the thickness of the surface prior to the image surface. The thickness
chosen is that which minimizes the RMS aberration. Note that for non-axially symmetric
systems, the Quick Focus tool only works if the chief ray can be traced for all fields.
There are several different RMS computations that may be performed as listed above. The
“best focus” position depends upon which criterion is selected. The RMS is always computed as
a polychromatic average over the field, using the defined fields, wavelengths, and weights.
Quick Adjust
The Quick Adjust button is available in the Manual Adjustment section of the Optimize tab. It
adjusts any radius or thickness to achieve best transverse or angular ray focus evaluated at any
subsequent surface. See also “Quick Focus”
Settings:
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1489
Adjust Surface Selects the surface to adjust.
Criterion Selects the best focus criterion. All criterion use the image centroid for a reference.
Evaluate Surface Selects the surface at which to evaluate the criterion. Note the criterion is
evaluated after refraction into the specified surface for angular criterion.
Discussion:
This feature adjusts any radius or thickness to minimize the RMS aberration at any subsequent
surface. The RMS is always computed as a polychromatic average over the field, using the
defined fields, wavelengths, and weights. Note RMS angular data is computed after refraction
into the specified evaluation surface. This tool can remain open on the desktop while other
editing or work is done. Click on the “Adjust” button to recompute the best focus data.
Slider
The Slider is available in the Manual Adjustment section of the Optimize tab. The slider control
is used to interactively adjust any system or surface parameter while viewing any analysis
window.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1490
Settings:
Type Select either the surface, system, configuration, or NSC data group.
Parameter Select the parameter to modify. The available selections include radius, curvature,
thickness, conic, and parameter values if surface data are chosen. For system parameters, the
selections include the system aperture, field and wavelength data, apodization factor,
temperature, and pressure. For configuration data, all multi-configuration operands are listed.
For NSC data, object position and parameter data are listed.
Surface The surface number for the data to be modified if the data is associated with a surface.
This field is used for the configuration number if configuration data is selected. If NSC data is
selected, this field is used for the object number.
Window Select either "All" or any specific analysis window to update when the slider is
adjusted. See the discussion.
Start / Stop Value The beginning and ending range of the data corresponding to the extreme
limits of the slider control.
Animate / Stop Automatically increments the data over the defined range, and updates the
selected windows in a continuous loop. Press “Stop” (the animate button changes to a “Stop”
when animation is running) to terminate the animation.
Keep and Exit Saves the current value in the editor and closes the slider control.
Exit Restores the original data for the modified parameter and closes the slider control.
Discussion:
The slider control can be used to adjust any surface or system parameter while monitoring how
the changed value affects the data displayed in any open analysis window or in all windows.
When the slider control is activated, a copy is made of the data to be modified. If a new type of
data is selected (for example, the surface number or parameter or surface/system setting is
altered) the old data is automatically restored, unless the “Save” button has been pressed. The
Save button replaces the saved copy of the original data with the newly modified data.
If any or all of the analysis windows require a long time to update, the slider control may act
erratically. This is due to the Windows operating system handling of the slider control requiring
a very fast update while dragging or scrolling the slider bar control. If this occurs, select a
single window for updating rather than “all” or choose analysis options to reduce computation
time.
Visual Optimizer
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1491
The Visual Optimizer is available in the Manual Adjustment section of the Optimize tab. This
feature uses multiple slider controls to allow simultaneous manual adjustment of selected
variable values.
Settings:
Window Select either "All" or any specific analysis window to update when the slider is
adjusted. See the discussion.
Start/Stop The minimum and maximum values of the variable, corresponding to the full left
and right positions of the slider control, respectively. The difference between the max and min
values is the total range of the slider.
Slider The slider control, which may be dragged left or right to adjust the selected variable.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1492
Animate / Stop Automatically increments the data over the defined range, and updates the
selected windows in a continuous loop. Press “Stop” (the animate button changes to a “Stop”
when animation is running) to terminate the animation.
Keep and Exit Saves the current value in the editor and closes the Visual Optimization control.
Exit Restores the original data for the modified parameter and closes the Visual Optimization
control.
Discussion:
The visual optimization dialog supports between 1 and 8 individual slider controls. Each slider
control may be used to interactively modify any defined variable value. Note the variable
status of each value must be set prior to invoking the visual optimization control.
Whenever any variable value is changed, the selected window or all windows are updated in
sequential mode. In non-sequential mode, the rays optionally may be traced to update all
detector viewers and (optionally) shaded model plots. These operations take time, depending
upon the system complexity, the types of analysis windows open, and the number of rays
traced. The visual optimization tool will not allow another update to be performed until the
current update is completed. It may be required to wait until the updates are completed before
the slider may be adjusted again. However, for many illumination systems LightningTrace is
fast enough that updates occur almost instantaneously, allowing the performance impact of
changing a variable value to be determined in real-time.
Note that radius variables are always varied as curvatures as opposed to radii for numerical
stability. The same applies to focal length variables, which are varied as power. This is indicated
with the correct labels in the visual optimizer.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1493
Merit Function Editor (automatic
optimization group)
The Merit Function Editor is available in the Automatic Optimization section of the Optimize
tab. The Merit Function Editor is used to define, modify, and review the system merit function.
The system merit function is used for optimization.
Settings:
Operand Type This option allows the type of operand and other data to be changed. For a
complete description of merit function operands, see the following
Discussion:
Operands are set by typing the name in the first column and then filling in the remaining data
fields. There are multiple fields that may be required to define an operand. The fields are called
Int1 and Int2 for the two integer values, and Data1 through Data6 for up to 6 double precision
values. Not all of the operands use all of the fields provided.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1494
Optimization Operands Summary
The following sections describe the available operands.
The first section is a “quick reference” table which categorizes the operands by general subject.
The second provides a detailed description of each operand, organized by category, and states
which operands use which data fields. Names shown in bold define data values used to define
the operand. These same names will appear in the editor column headings.
The third section provides the same detailed description of each operand, but lists the
operands alphabetically in a single table, instead of by category as in the previous section.
If you are viewing this in an HTML dialog, expand the header in Contents tab to view the
following subsections.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1495
XXET, ZTHI
Constraints on CVOL, MNDT, MXDT, SAGX, SAGY, SCRV, SPHS, SSLP, SSAG, STHI, TMAS,
lens properties TOTR, VOLU, NORX, NORY, NORZ, NORD, SCUR, SDRV
Constraints on
PMGT, PMLT, PMVA.
parameter data
Constraints on
GCOS, GTCE, INDX, MNAB, MNIN, MNPD, MXAB, MXIN, MXPD, RGLA
glass data
Constraints on
PANA, PANB, PANC, PARA, PARB, PARC, PARR, PARX, PARY, PARZ, PATX,
paraxial ray
PATY, YNIP
data
CEHX, CEHY, CENX, CENY, CNAX, CNAY, CNPX, CNPY, DXDX, DXDY, DYDX,
Constraints on DYDY, HHCN, HYLD, IMAE, MNRE, MNRI, MXRE, MXRI, OPTH, PLEN, RAED,
real ray data RAEN, RAGA, RAGB, RAGC, RAGX, RAGY, RAGZ, RAID, RAIN, RANG, REAA,
REAB, REAC, REAR, REAX, REAY, REAZ, RENA, RENB, RENC, RETX, RETY
Constraints on
TrueFreeForm GOPT
surface data
Constraints on
element GLCA, GLCB, GLCC, GLCR, GLCX, GLCY, GLCZ
positions
Changing
CONF, IMSF, PRIM, SVIG, WLEN, CVIG, FDMO, FDRE
system data
ABSO, ACOS, ASIN, ATAN, CONS, COSI, DIFF, DIVB, DIVI, EQUA, LOGE,
General math
LOGT, MAXX, MINN, OPGT, OPLT, OPVA, OSUM, PROB, PROD, QSUM,
operands
RECI, SQRT, SUMM, SINE, TANG, ABGT, ABLT
Multi-
configuration CONF, MCOL, MCOG, MCOV, ZTHI
(zoom) data
Gaussian beam
GBPD, GBPP, GBPR, GBPS, GBPW, GBPZ, GBSD, GBSP, GBSR, GBSS, GBSW
data
Gradient index
control DLTN, GRMN, GRMX, InGT, InLT, InVA, LPTD
operands
Foucault
FOUC
analysis
Ghost focus
GPIM, GPRT, GPRX, GPRY, GPSX, GPSY
control
Fiber coupling
FICL, FICP, POPD
operands
Relative
illumination RELI, EFNO
operand
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1496
Optimization
with ZPL ZPLM
macros
User defined
UDOC
operands
Merit function
control BLNK, DMFS, ENDX, GOTO, OOFF, SKIN, SKIS, USYM
operands
Constraints on FREZ, NPGT, NPLT, NPVA, NPXG, NPXL, NPXV, NPYG, NPYL, NPYV, NPZG,
non-sequential NPZL, NPZV, NSRM, NTXG, NTXL, NTXV, NTYG, NTYL, NTYV, NTZG, NTZL,
object data. NTZV
Non-sequential
ray tracing and NPAF, NSDC, NSDD, NSDE, NSDP, NSLT, NSRA, NSRM, NSRW, NSST,
detector NSTR, NSTW, NSRD
operands.
Constraints on
construction
optics for
CMFV
optically
fabricated
holograms
Constraints on
optical
coatings, CMGT, CMLT, CMVA, CODA, CEGT, CELT, CEVA, CIGT, CILT, CIVA
polarization ray
trace data
Physical Optics
Propagation POPD, POPI
(POP) results
Best Fit Sphere
BFSD
data
Tolerance
TOLR
sensitivity data
Thermal
Coefficient of TCGT, TCLT, TCVA
Expansion data
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1497
This section provides a detailed description of each operand, organized by category, and
states which operands use which data fields. Each category is a different heading, and is
followed by a table with the corresponding operands. Names shown in bold define data
values used to define the operand. These same names will appear in the editor column
headings.
Surf1: The starting surface number of the group to compute the cardinal points
for.
Surf2: The ending surface number of the group to compute the cardinal points
CARD for.
Orientation: The orientation to use for computing the cardinal plane locations (0
– YZ plane or 1 – XZ plane).
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1498
4 – Object Space Principal Plane
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1499
cylinder, 2 for max, 3 for min, 4 for tangential, 5 for sagittal, 6 for y, 7 for x, and 8
for astigmatic power in diopters. To get the EFL values, add 9 to these codes. For
example, for tangential EFL use Data = 13. For cylinder, the EFL value is the
difference between the maximum and minimum focal lengths. For astigmatic, the
EFL is the difference between the x and y direction focal lengths (x-y).
For a full description of this type of analysis, see “Power Field Map”. See “Hx, Hy,
Px, and Py”.
Power at a point in the pupil. Computes the power or effective focal length (EFL)
after refraction from the surface defined by Surf at the wavelength defined by
Wave for any point in the field, at any point in the pupil. For the Data parameter,
use 0 for spherical, 1 for cylinder, 2 for max, 3 for min, 4 for tangential, 5 for
sagittal, 6 for y, 7 for x, and 8 for astigmatic power in diopters. To get the EFL
POWP values, add 9 to these codes. For example, for tangential EFL use Data = 13. For
cylinder, the EFL value is the difference between the maximum and minimum
focal lengths. For astigmatic, the EFL is the difference between the x and y
direction focal lengths (x-y).
For a full description of this type of analysis, see “Power Pupil Map”. See “Hx, Hy,
Px, and Py”.
The surface power (in inverse lens units) of the surface defined by Surf at the
POWR
wavelength defined by Wave. This operand only works for standard surfaces.
Sagittal working F/#, computed at the field point defined by Field and the
SFNO
wavelength defined by Wave. See TFNO.
Tangential working F/#, computed at the field point defined by Field and the
TFNO
wavelength defined by Wave. See SFNO.
WFNO Working F/#. See “Working F/#”, and ISFN, SFNO, and TFNO.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1500
Operands for Aberrations
number is defined by Ref Fld. The wavelength number is defined
by Wave. Data is 0 for A, 1 for B, 2 for C, and 3 for D. See also
“DISA”.
Angular aberration radial direction measured in image space
with respect to the centroid at the wavelength defined by Wave.
This quantity is defined as:
ANAC
where l and m are the x and y direction cosines of the ray and the
c subscript indicates the centroid. See “Hx, Hy, Px, and Py”.
Angular aberration radius measured in image space at the
wavelength defined by Wave with respect to the primary
wavelength chief ray. This quantity is defined as:
ANAR
where l and m are the x and y direction cosines of the ray and the
c subscript indicates the chief ray. See “Hx, Hy, Px, and Py”.
Angular aberration x direction measured in image space at the
wavelength defined by Wave with respect to the primary
wavelength chief ray. This quantity is defined as:
ANAX
ANCX
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1501
Operands for Aberrations
Angular aberration y direction measured in image space at the
wavelength defined by Wave with respect to the centroid. This
quantity is defined as:
ANCY
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1502
Operands for Aberrations
Wave divided by the effective focal length. This definition yields
a measure of the angular deviation of the image.
Coma in waves contributed by the surface defined by Surf at the
wavelength defined by Wave. If Surf is zero, the sum for the
COMA entire system is used. This is the third order coma calculated
from the Seidel coefficients, and is not valid for non-paraxial
systems.
Distortion maximum. This specifies an upper bound for the
absolute value of the distortion. DIMX is based on the same
calculation as DISG, and is not related to the Seidel-based
calculations given by DIST. Field can be zero, which specifies that
the maximum field coordinate be used, or any valid field number.
Note the maximum distortion does not always occur at the
maximum field coordinate. DIMX only traces chief rays (Px = Py =
0), and thus Px and Py are not user-defined. The reference field is
always an on-axis field point (Hx = Hy = 0), even if such a field
DIMX point has not been defined in the optical system. See DISG for
more information.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1503
Operands for Aberrations
focal systems) or an absolute deviation in cosine space (for afocal
systems) rather than a percentage. This operand is useful for
designing f-theta lenses.
Generalized distortion, either in percent or as an absolute
distance. This operand computes the distortion for any ray in the
pupil, from anywhere in the field, at the wavelength defined by
Wave, using the field point defined by Field as a reference. The
method used and assumptions made for DISG calculations are
common to all operands that calculate distortion. DISG cannot
be calculated if the field units are angles and the maximum angle
equals or exceeds 90 degrees. DISG assumes the predicted
magnification is not symmetric.
DISG H=θ/θM
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1504
Operands for Aberrations
generalized to return reasonable results even for non-
rotationally symmetric systems; see “Field Curvature/Distortion”.
See AXCL.
Optical path difference with respect to chief ray in waves at the
OPDC
wavelength defined by Wave. See “Hx, Hy, Px, and Py” .
Optical path difference with respect to the mean OPD over the
pupil at the wavelength defined by Wave. OPDM has the same
OPDM
restrictions that TRAC does; see TRAC for a detailed discussion.
See “Hx, Hy, Px, and Py”.
Optical path difference with respect to the mean OPD over the
pupil with tilt removed at the wavelength defined by Wave.
OPDX OPDX has the same restrictions that TRAC does; see TRAC for a
detailed discussion.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1505
Operands for Aberrations
definition is used if Zone is zero. An alternate definition due to
Prof. Roland Shack which supports computation of OSC as a
function of pupil zone and uses only real rays is available. This
definition is used if Zone is not zero. In this case, Zone
corresponds to the Py coordinate of the real marginal ray. The
two methods will give very similar results for systems with
modest F/#’s and aberrations when Zone is 1.0 for the alternate
definition. This operand has no meaning if the system is not
axially symmetric.
Petzval curvature in inverse lens units at the wavelength defined
PETC
by Wave. Not valid for non-paraxial systems.
Petzval radius of curvature in lens units at the wavelength
PETZ
defined by Wave. Not valid for non- paraxial systems.
RMS spot radius with respect to the centroid in lens units. This
operand uses a Gaussian quadrature method that is accurate for
systems with unvignetted circular pupils. Ring is used to specify
RSCE the number of rings of rays traced. If Wave is zero; then a
wavelength weighted polychromatic calculation is performed;
otherwise, the specified wavelength number will be used. See
“Hx, Hy, Px, and Py”.
RMS spot radius with respect to the chief ray in lens units. This
operand uses a Gaussian quadrature method that is accurate for
systems with unvignetted circular pupils. Ring is used to specify
RSCH the number of rings of rays traced. If Wave is zero; then a
wavelength weighted polychromatic calculation is performed;
otherwise, the specified wavelength number will be used. See
“Hx, Hy, Px, and Py”.
RMS spot radius with respect to the centroid in lens units. This
operand uses a rectangular grid of rays to estimate the RMS. This
operand considers vignetting. A Samp value of n will trace an n x
RSRE n grid per pupil quadrant. If Wave is zero; then a wavelength
weighted polychromatic calculation is performed; otherwise, the
specified wavelength number will be used. See “Hx, Hy, Px, and
Py”.
RMS spot radius with respect to the chief ray in lens units. This
operand uses a rectangular grid of rays to estimate the RMS. This
operand considers vignetting. A Samp value of n will trace an n x
RSRH n grid per pupil quadrant. If Wave is zero; then a wavelength
weighted polychromatic calculation is performed; otherwise, the
specified wavelength number will be used. See “Hx, Hy, Px, and
Py”.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1506
Operands for Aberrations
RMS wavefront error with respect to the centroid in waves. This
operand uses a Gaussian quadrature method that is accurate for
systems with unvignetted circular pupils. Ring is used to specify
the number of rings of rays traced. If Wave is zero; then a
RWCE wavelength weighted polychromatic calculation is performed;
otherwise, the specified wavelength number will be used.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1507
Operands for Aberrations
two extreme wavelengths defined by Minw and Maxw. The
distance is measured along the Z axis. Zone defines the zone for
which the real marginal axial color is computed. Zone
corresponds to the Py coordinate of the real marginal ray.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1508
Operands for Aberrations
Transverse aberration y direction measured in image space at the
TRAY wavelength defined by Wave with respect to the chief ray.
Note that if you use multiple ZERN operands which only differ in
the Term value, they should be placed on adjacent lines in the
editor so OpticStudio only does the fitting once; otherwise, the
computation is slower. Multiple Zernike terms are always used in
the fitting process, even if only one coefficient is requested. The
maximum number of terms used in the computation depends on
the Type and the Term settings. The minimum number of terms
used for all types is 11. This means that Term is only used if set
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1509
Operands for Aberrations
greater than or equal to 11. If Type is standard or annular, the
maximum term number computed is set equal to the largest
term requested by any Term value in adjacent ZERN operands.
MTF Data
If Grid is zero, a fast, sparse sampling integration method is used to compute the
MTF. The fast Geometric MTF algorithm is only accurate for systems with circular
or elliptical pupils with modest or no apodization. For systems that violate this
assumption, set Grid equal to 1. The fast sampling method used by GMTA, GMTS,
and GMTT is not directly related to the Geometric MTF Analysis feature. Because
only a single spatial frequency is required, the method of computation used by
the MTF operands is different, and generally much faster, than the algorithm used
by the analysis feature. To select the alternate grid-based algorithm used by the
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1510
Geometric MTF analysis feature, set Grid equal to 1. The grid-based algorithm is
usually slower than the default algorithm if the MTF is reasonably good (greater
than 5%), but the grid algorithm converges faster if the aberrations are very large
and the resulting MTF is very low.
If both the tangential and sagittal MTF are needed; place the GMTT and GMTS
operands on adjacent lines and they will be computed simultaneously. The
Geometric MTF, though approximate, can usually be computed more quickly than
the Diffraction MTF, and is therefore useful for optimization. See “Performing an
optimization”.
GMTS Geometric MTF sagittal response. See GMTA.
GMTT Geometric MTF tangential response. See GMTA.
Moore-Elliott Contrast, average of sagittal and tangential. This operand uses the
Moore-Elliott Contrast method to optimize the MTF at a given spatial frequency.
See “Optimizing for MTF” for more information on the Moore-Elliott Contrast
method. The parameters are:
Freq: The spatial frequency in cycles per millimeter in focal systems and cycles per
afocal unit (see “Afocal Mode Units”) in afocal systems.
See “Hx, Hy, Px, and Py”. Also see related operands MECS and MECT.
MECS Moore-Elliott Contrast, sagittal response. See MECA for details.
MECT Moore-Elliott Contrast, tangential response. See MECA for details.
Modulation square-wave transfer function, average of sagittal and tangential. See
MSWA
MTFA for details.
MSWS Modulation square-wave transfer function, sagittal. See MTFA for details.
MSWT Modulation square-wave transfer function, tangential. See MTFA for details.
Diffraction modulation transfer function, average of sagittal and tangential. The
parameters are: Samp: Higher sampling yields higher accuracy at the expense of
computation time. To confirm the computation has acceptable accuracy, start at
1, and increment the sampling until the results change by less than the desired
accuracy. Note that extreme precision is not required for good optimization
results; three significant figures is usually adequate. There are two algorithms
available for computing the MTF. If Grid is zero (recommended), a fast, sparse
MTFA
sampling integration method is used to compute the MTF. The fast sampling
method used by MTFA, MTFS, and MTFT is not directly related to the MTF
Analysis feature. Because only a single spatial frequency is required, the method
of computation used by the MTF operands is different, and generally much faster,
than the algorithm used by the analysis feature. To select the alternate grid-based
algorithm used by the MTF analysis feature, set Grid equal to 1. The grid-based
algorithm is usually slower than the default algorithm if the MTF is reasonably
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1511
good (greater than 5%), but the grid algorithm converges faster if the aberrations
are very large and the resulting MTF is very low.
Freq: The spatial frequency in MTF units (see “MTF Units”). If the sampling is set
too low for accurate computation of the MTF, then the MTF operands all return
zero.
If both the tangential and sagittal MTF are needed; place the MTFT and MTFS
operands on adjacent lines and they will be computed simultaneously. See
“Performing an optimization”.
Data Type: Specifies the data to be returned. An input of 0 will return the
modulation amplitude; an input of 1 will return the real part; an input of 2 will
return the imaginary part; an input of 3 will return the phase in degree. This input
is only available for the MTFA, MTFS, and MTFT operands (and not the equivalent
square-wave operands).
Samp: The pupil sampling, where 1 yields 32 x 32, 2 yields 64 x 64 etc. The
sampling is assumed to be the same for both pupil and image.
Freq: The spatial frequency in MTF units (see “MTF Units”). If the sampling is set
too low for accurate computation of the MTF, then the MTF operands all return
MTHA
zero.
All Conf?: Set to 0 to use the current configuration (defined by the last CONF
operand preceding this operand), and 1 to sum over all configurations. See
“Huygens MTF” for a full discussion of this option.
Ima Delta: The image delta in micrometers used for the computation. If zero, the
default image delta is used.
If both the tangential and sagittal MTF are needed; place the MTHT and MTHS
operands on adjacent lines and they will be computed simultaneously. See
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1512
“Performing an optimization”.
MTHS Huygens Modulation transfer function, sagittal. See MTHA for details.
MTHT Huygens Modulation transfer function, tangential. See MTHA for details.
Samp: The pupil sampling, where 1 yields 32 x 32, 2 yields 64 x 64 etc. The
sampling is assumed to be the same for both pupil and image.
STRH All Conf?: Set to 0 to use the current configuration (defined by the last CONF
operand preceding this operand), and 1 to sum over all configurations. See
“Huygens PSF” for a full discussion of this option.
By default, the image delta used in the Huygens PSF computation for the
evaluation of this operand is 2x smaller than the nominal default image delta. See
“Huygens PSF” on for the formula used to calculate the nominal default image
delta. This is done to zoom in on the peak of the PSF, allowing for a more accurate
computation of the Strehl ratio. As a result, the value reported will, in general, be
different than the value reported using the nominal default image delta in the
Huygens PSF analysis.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1513
NAME Description
Diffraction Encircled Energy (distance). This operand computes the distance to the
fraction of diffraction encircled, ensquared, x only, or y only (enslitted) energy
defined by Frac. For focal mode, the units are micrometers. For afocal mode, the
units are afocal mode units. The other parameters are:
DENC Type: 1 for encircled, 2 for x only, 3 for y only, and 4 for ensquared.
Refp: The reference point/algorithm to use. For FFT encircled energy, use Refp =
0 for chief ray, 1 for centroid, and 2 for vertex. For Huygens encircled energy, use
Refp = 3 for chief ray, 4 for centroid, and 5 for vertex. When using the Huygens
method, I Samp refers to the Huygens image sampling (1 for 32 x 32, 2 for 64 x
64, etc.) and I Delta refers to the Huygens image delta. For a detailed description
of the Huygens image sampling and image delta, see “Encircled Energy”.
If the sampling is too low, the radius returned is 1e+10. See also DENF, GENC and
XENC.
Diffraction Encircled Energy (fraction). This operand computes the fraction of
diffraction encircled, ensquared, x only, or y only (enslitted) energy at a given
distance from the reference point defined by Dist. For focal mode, the distance
units are micrometers. For afocal mode, the distance units are afocal mode units.
The options and settings are identical to DENC, except Dist, which here is used as
DENF
the distance at which the fraction of energy is desired. See also DENC, GENC,
GENF, and XENC.
If the Dist value defined is beyond the point where the encircled energy is very
close to 100%, the fraction returned is 1e+10; this is done for optimization
efficiency.
Edge Response Function Position. This operand computes the x or y position of
the point at which the edge response function reaches a certain relative value. For
details on the edge response function calculation, see “Geometric Line/Edge
Spread”. The Sampling value is 1 for
32x32, 2 for 64x64, etc. Wave is the wavelength number or 0 for polychromatic.
ERFP Field is the field number. Type determines that data to be returned. If Type is 0
or 1, the x position (for edges parallel to the local y axis) or y position (for edges
parallel to the local x axis) relative to the chief ray in lens units is returned. If Wave
is zero, the primary wavelength chief ray is the reference point. If Type is 2 or 3,
the x or y position in lens units relative to the surface vertex is returned. Fraction
is the relative value of the edge response curve, and must be between 0.01 and
0.99. Max Radius is the maximum radial size of the integration window in
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1514
micrometers. If Max Radius is zero a default value is used, and this is the
recommended setting in most cases.
Note that the edge response function is normally defined with the “bright” side of
the edge being on the + side of the integration coordinate, which means the
edge response goes to 1 as the coordinate becomes more positive. To compute
results for the reversed edge orientation, with the bright side on the negative side
of the coordinate, use the value (1-fraction) instead of (fraction). For example, to
get the 80% response coordinate for a reversed edge, use Fraction = 0.20.
If afocal mode is used, all returned values are in afocal analysis units.
Geometric Encircled Energy (distance). This operand computes the distance to the
fraction of geometric encircled, ensquared, x only, or y only (enslitted) energy
defined by Frac. For focal mode, the units are micrometers. For afocal mode, the
units are afocal mode units. The other parameters are:
Type: 1 for encircled, 2 for x only, 3 for y only, and 4 for ensquared.
Refp: The reference point to use. Use 0 for chief ray, 1 for centroid, 2 for vertex,
and 3 for middle of the spot.
No Diff Lim: If 0, the results are scaled by the diffraction limit, otherwise, no
accounting of diffraction is done.
Type is 1 for encircled, 2 for x only, 3 for y only, 4 for ensquared, 5 for x
distribution, and 6 for y distribution. When using Type 2 or 3, the distance
calculated is the"full" slit width containing the fraction of energy defined by Frac.
This is the "full" slit width of the [-x, x] or [-y, y] range respectively, centered on
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1515
the chosen reference point. For example, if Dist = 20 µm, this means that the
fraction of energy is contained in a slit width of +/- 10 µm.
Frac is the fraction of energy desired, and must be between zero and 1, exclusive.
Frac is ignored for type 5 or 6; for these types the returned valued is the full width
half max independent of Frac.
The Type is 1 for encircled, 2 for x only, 3 for y only, and 4 for ensquared. When
using Type 2 or 3, the fraction of energy in the PSF is calculated in the [-x, x] or [-y,
y] range respectively, centered on the chosen reference point. This is the full slit
XENF width given by Dist. For example, if Dist = 20 µm, the fraction of energy is
calculated for a slit width of +/- 10µm.
The options and settings are identical to XENC, except Dist, which here is used as
the distance at which the fraction of energy is desired.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1516
center thickness of the surface defined by Surf to be greater than the
specified target value. See also MNCT.
Center thickness less than. This boundary operand constrains the center
CTLT thickness of the surface defined by Surf to be less than the specified
target value. See also MXCT.
Center thickness value. Constrains the center thickness of the surface
CTVA
defined by Surf to be equal to the specified target value.
Curvature greater than. This boundary operand constrains the curvature
CVGT
of the surface defined by Surf to be greater than the target value.
Curvature less than. This boundary operand constrains the curvature of
CVLT the surface defined by Surf
5 – X coordinate for the point on the surface with the minimum curvature
value.
6 – Y coordinate for the point on the surface with the minimum curvature
value.
7 – X coordinate for the point on the surface with the maximum curvature
value.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1517
8 – Y coordinate for the point on the surface with the maximum curvature
value.
14 – Tilt about X (a) of off-axis coordinate system, from the surface’s local
coordinate system
15 – Tilt about Y (b) of off-axis coordinate system, from the surface’s local
coordinate system
16 – Tilt about Z (g) of off-axis coordinate system, from the surface’s local
coordinate system
1 – 33 x 33 (default)
2 – 65 x 65
3 – 129 x 129
4 – 257 x 257
5 – 513 x 513
6 – 1025 x 1025
7 – 2049 x 2049
8 – 4097 x 4097
9 – 8193 x 8193
10 – 16385 x 16385
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1518
the new off-axis coordinate system.
l Remove = 0 (default) no data is removed. Remove = 1 the base
radius of curvature is removed from the data before calculation.
Remove = 2 the best-fit sphere is removed from the data before
calculation.
l BFS selects which type of best-fit sphere to remove from the data
if Remove is set to 2. BFS = 0 (default) for minimum volume best-
fit sphere. BFS = 1 for Minimum RMS best-fit sphere. BFS = 2 for
Minimum RMS best-fit sphere with offset. The offset allows the
calculation to shift the vertex of the BFS away from the data value
at the vertex if it results in a lower RMS.
l Orientation selects the direction of the curvature calculation. Ori-
entation = 0 (default) calculated along the tangential direction.
Orientation = 1 calculated along the sagittal direction. Orientation
= 2 calculated along the X-axis direction. Orientation = 3 cal-
culated along the Y-axis direction. Orientation = 4 calculated as
the orientation that results in the maximum curvature value.
Diameter greater than. This boundary operand constrains the diameter of
the surface defined by Surf to be greater than the specified target value.
This operand has a mode flag. Mode = 0 (default) to use Mech Semi-Dia
DMGT
and Mode = 1 to use Clear Semi-Dia value displayed on the Lens Data
Editor. The diameter is simply two times the value of the selected semi-
diameter.
Diameter less than. This boundary operand constrains the diameter of the
surface defined by Surf to be less than the specified target value. This
DMLT operand has a mode flag. Mode = 0 (default) to use Mech Semi-Dia and
Mode = 1 to use Clear Semi-Dia value displayed on the Lens Data Editor.
The diameter is simply two times the value of the selected semi-diameter.
Diameter value. This operand constrains the diameter of the surface
defined by Surf to be equal to the specified target value. This operand
DMVA has a mode flag. Mode = 0 (default) to use Mech Semi-Dia and Mode =
1 to use Clear Semi-Dia value displayed on the Lens Data Editor. The
diameter is two times the value of the selected semi-diameter.
The phase data in waves at the primary system wavelength of the surface
defined by Surf. Phase data includes the RMS, PV, Minimum, or Maximum
phase value across a specified surface as well as the X or Y coordinates of
Min phase value, or the X or Y coordinates of the Max phase value. This
operand has data, sampling, and remove flags.
DPHS
The options for the Data input will be:
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1519
4 – Maximum phase value over the surface.
5 – X coordinate for the point on the surface with the minimum phase
value.
6 – Y coordinate for the point on the surface with the minimum phase
value.
7 – X coordinate for the point on the surface with the maximum phase
value.
8 – Y coordinate for the point on the surface with the maximum phase
value.
1 – 33 x 33 (default)
2 – 65 x 65
3 – 129 x 129
4 – 257 x 257
5 – 513 x 513
6 – 1025 x 1025
7 – 2049 x 2049
8 – 4097 x 4097
9 – 8193 x 8193
10 – 16385 x 16385
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1520
The options for the Data input will be:
5 – X coordinate for the point on the surface with the minimum sag value.
6 – Y coordinate for the point on the surface with the minimum sag value.
7 – X coordinate for the point on the surface with the maximum sag
value.
8 – Y coordinate for the point on the surface with the maximum sag
value.
14 – Tilt about X (a) of off-axis coordinate system, from the surface’s local
coordinate system.
15 – Tilt about Y (b) of off-axis coordinate system, from the surface’s local
coordinate system.
16 – Tilt about Z (g) of off-axis coordinate system, from the surface’s local
coordinate system.
1 – 33 x 33 (default)
2 – 65 x 65
3 – 129 x 129
4 – 257 x 257
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1521
5 – 513 x 513
6 – 1025 x 1025
7 – 2049 x 2049
8 – 4097 x 4097
9 – 8193 x 8193
10 – 16385 x 16385
5 – X coordinate for the point on the surface with the minimum slope
value.
6 – Y coordinate for the point on the surface with the minimum slope
value.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1522
7 – X coordinate for the point on the surface with the maximum slope
value.
8 – Y coordinate for the point on the surface with the maximum slope
value.
14 – Tilt about X (a) of off-axis coordinate system, from the surface’s local
coordinate system.
15 – Tilt about Y (b) of off-axis coordinate system, from the surface’s local
coordinate system.
16 – Tilt about Z (g) of off-axis coordinate system, from the surface’s local
coordinate system.
1 – 33 x 33 (default)
2 – 65 x 65
3 – 129 x 129
4 – 257 x 257
5 – 513 x 513
6 – 1025 x 1025
7 – 2049 x 2049
8 – 4097 x 4097
9 – 8193 x 8193
10 – 16385 x 16385
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1523
where the origin of the coordinate system falls at the vertex of the
off-axis part. The X and Y inputs will then refer to coordinates in
the new off-axis coordinate system.
l Remove = 0 (default) no data is removed. Remove = 1 the base
radius of curvature is removed from the data before calculation.
Remove = 2 the best-fit sphere is removed from the data before
calculation.
l BFS selects which type of best-fit sphere to remove from the data
if Remove is set to 2. BFS = 0 (default) for minimum volume best-
fit sphere. BFS = 1 for Minimum RMS best-fit sphere. BFS = 2 for
Minimum RMS best-fit sphere with offset. The offset allows the
calculation to shift the vertex of the BFS away from the data value
at the vertex if it results in a lower RMS.
l Orientation selects the direction of the slope calculation. Ori-
entation = 0 (default) calculated along the tangential direction.
Orientation = 1 calculated along the sagittal direction. Orientation
= 2 calculated along the X-axis direction. Orientation = 3 cal-
culated along the Y-axis direction. Orientation = 4 calculated as
the orientation that results in the maximum slope value.
Edge thickness greater than. This boundary operand constrains the edge
thickness of the surface defined by Surf to be greater than the specified
target value. The edge thickness is calculated along the +y axis if Code is
ETGT zero, the +x axis if Code is 1, the -y axis if Code is 2, and the -x axis if
Code is 3. This operand has a mode flag. Mode = 0 (default) to use Mech
Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed on the
Lens Data Editor. See also MNET.
Edge thickness less than. This boundary operand constrains the edge
thickness of the surface defined by Surf to be less than the specified
target value. The edge thickness is calculated along the +y axis if Code is
ETLT zero, the +x axis if Code is 1, the -y axis if Code is 2, and the -x axis if
Code is 3. This operand has a mode flag. Mode = 0 (default) to use Mech
Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed on the
Lens Data Editor. See also MXET.
Edge thickness value. Constrains the edge thickness of the surface
defined by Surf to be equal to the specified target value. The edge
thickness is calculated along the +y axis if Code is zero, the +x axis if
ETVA Code is 1, the -y axis if Code is 2, and the -x axis if Code is 3. This
operand has a mode flag. Mode = 0 (default) to use Mech Semi-Dia and
Mode = 1 to use Clear Semi-Dia value displayed on the Lens Data Editor.
See also MNET.
Full thickness greater than. This boundary operand constrains the full
FTGT thickness of surface Surf to be greater than the specified target value.
The full thickness is computed at 200 points between the vertex and edge
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1524
along the +y radial direction, including the sag of the surface and the sag
of the next surface. This operand has a mode flag. Mode = 0 (default) to
use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed
on the Lens Data Editor. The operand is useful for constraining surfaces
which do not have their minimum or maximum thickness at the center or
edge, but at some intermediate zone. See FTLT.
FTLT Full thickness less than. See FTGT.
Minimum center thickness air. This boundary operand constrains each of
the center thicknesses of surfaces from Surf1 to Surf2 which have air (i.e.
MNCA no glass) as the glass type to be greater than the specified target value.
See also MNCT and MNCG. This operand controls multiple surfaces
simultaneously.
Minimum center thickness glass. This boundary operand constrains each
of the thicknesses of surfaces from Surf1 to Surf2 which have a non-air
MNCG
glass type to be greater than the target value. See also MNCT and MNCA.
This operand controls multiple surfaces simultaneously.
Minimum center thickness. This boundary operand constrains each of the
center thicknesses of surfaces from Surf1 to Surf2 to be greater than the
MNCT
specified target value. See also MNCG and MNCA. This operand controls
multiple surfaces simultaneously.
Minimum curvature. This boundary operand constrains each of the
curvatures of surfaces from Surf1 to Surf2 to be greater than the
MNCV
specified target value. See also MXCV. This operand controls multiple
surfaces simultaneously.
Minimum edge thickness air. This boundary operand constrains each of
the edge thicknesses of surfaces from Surf1 to Surf2 which have air (i.e.
no glass) as the glass type to be greater than the specified target value.
See also MNET, MNEG, ETGT, and XNEA. This operand controls multiple
surfaces simultaneously. The boundary applies to the top “+y” edge of
the surface only; see XNEA for constraining non-rotationally symmetric
MNEA surfaces.
Zone, if non zero, scales the radial aperture at which the thickness is
computed. A Zone value of 0.5 would compute the thickness at 0.5 times
the semi-diameter. This operand has a mode flag. Mode = 0 (default) to
use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed
on the Lens Data Editor.
Minimum edge thickness glass. This boundary operand constrains each
of the edge thicknesses of surfaces from Surf1 to Surf2 which have a
non-air glass type to be greater than the specified target value. See also
MNEG
MNET, MNEA, ETGT, and XNEG. This operand controls multiple surfaces
simultaneously. The boundary applies to the top “+y” edge of the surface
only; see XNEG for constraining non-rotationally symmetric surfaces.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1525
Zone, if non zero, scales the radial aperture at which the thickness is
computed. A Zone value of 0.5 would compute the thickness at 0.5 times
the semi-diameter. This operand has a mode flag. Mode = 0 (default) to
use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed
on the Lens Data Editor.
Minimum edge thickness. This boundary operand constrains each of the
edge thicknesses of surfaces from Surf1 to Surf2 to be greater than the
specified target value. See also MNEG, MNEA, ETGT, and XNET. This
operand controls multiple surfaces simultaneously. The boundary applies
to the top “+y” edge of the surface only; see XNET for constraining non-
MNET rotationally symmetric surfaces.
Zone, if non zero, scales the radial aperture at which the thickness is
computed. A Zone value of 0.5 would compute the thickness at 0.5 times
the semi-diameter. This operand has a mode flag. Mode = 0 (default) to
use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed
on the Lens Data Editor.
Minimum .This boundary operand constrains the deviation of the
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1526
surfaces.
Zone, if non zero, scales the radial aperture at which the thickness is
computed. A Zone value of 0.5 would compute the thickness at 0.5 times
the semi-diameter. This operand has a mode flag. Mode = 0 (default) to
use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed
on the Lens Data Editor.
Maximum edge thickness glass. This boundary operand constrains each
of the edge thicknesses of surfaces from Surf1 to Surf2 which have a
non-air glass type to be less than the target value. See also MXET, MXEA,
ETLT, and XXEG. This operand controls multiple surfaces simultaneously.
The boundary applies to the top “+y” edge of the surface only; see XXEG
MXEG for constraining non- rotationally symmetric surfaces.
Zone, if non zero, scales the radial aperture at which the thickness is
computed. A Zone value of 0.5 would compute the thickness at 0.5 times
the semi-diameter. This operand has a mode flag. Mode = 0 (default) to
use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed
on the Lens Data Editor.
Maximum edge thickness. This boundary operand constrains each of the
edge thicknesses of surfaces from Surf1 to Surf2 to be less than the
specified target value. See also “MXEG”, “MXEA”, “ETLT”, and “XXET”. This
operand controls multiple surfaces simultaneously. The boundary applies
to the top “+y” edge of the surface only; see XXET for constraining non-
MXET rotationally symmetric surfaces.
Zone, if non zero, scales the radial aperture at which the thickness is
computed. A Zone value of 0.5 would compute the thickness at 0.5 times
the semi-diameter. This operand has a mode flag. Mode = 0 (default) to
use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed
on the Lens Data Editor.
Minimum clear semi-diameter or semi-diameter. Constrains the clear
semi-diameter or semi-diameter to be larger than the specified target
MNSD
over the surface range between Surf1 and Surf2. This operand controls
multiple surfaces simultaneously.
Maximum clear semi-diameter or semi-diameter. Constrains the clear
MXSD semi-diameter or semi-diameter to be less than the specified target over
the surface range from Surf1 to Surf2.
Minimum mechanical semi-diameter. Constrains the mechanical semi-
diameter to be larger than the specified target over the surface range
OMMI
between Surf1 and Surf2. This operand controls multiple surfaces
simultaneously.
Maximum mechanical semi-diameter. Constrains the mechanical semi-
OMMX diameter to be less than the specified target over the surface range from
Surf1 to Surf2.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1527
Mechanical Semi-Diameter. This operand constrains the mechanical
OMSD semi-diameter of the surface defined by Surf to be equal to the specified
target value.
Sum of glass thicknesses from Surf1 to Surf2. Note that the sum is
TGTH
inclusive, it is not the thickness between the two surfaces. See TTHI.
Total thickness greater than. This boundary operand constrains the total
thickness, including surface sags of the surface defined by Surf and the
immediately following surface at their respective clear semi-diameter or
semi-diameter values, to be greater than the specified target value. The
TTGT thickness is calculated along the +y axis if Code is zero, the +x axis if
Code is 1, the -y axis if Code is 2, and the -x axis if Code is 3. This
operand automatically changes the sign on thicknesses in mirror spaces
to always yield a positive value for physically possible lenses. See TTLT
and TTVA.
Sum of thicknesses of surfaces from Surf1 to Surf2. Note that the sum is
TTHI
inclusive, it is not the thickness between the two surfaces. See TGTH.
TTLT Total thickness less than. See TTGT.
TTVA Total thickness value. See TTGT.
Minimum edge thickness for the range of air surfaces defined by Surf1
and Surf2. This operand checks the edge thickness at numerous points
around the perimeter of the surface, and tests if all points are at least the
minimum specified thickness. This operand controls multiple surfaces
simultaneously. See MNEA.
XNEA
Zone, if non zero, scales the radial aperture at which the thickness is
computed. A Zone value of 0.5 would compute the thickness at 0.5 times
the semi-diameter. This operand has a mode flag. Mode = 0 (default) to
use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed
on the Lens Data Editor.
Minimum edge thickness for the range of surfaces defined by Surf1 and
Surf2. This operand checks the edge thickness at numerous points
around the perimeter of the surface, and tests if all points are at least the
minimum specified thickness. This operand controls multiple surfaces
simultaneously. See MNET.
XNET
Zone, if non zero, scales the radial aperture at which the thickness is
computed. A Zone value of 0.5 would compute the thickness at 0.5 times
the semi-diameter. This operand has a mode flag. Mode = 0 (default) to
use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed
on the Lens Data Editor.
Minimum edge thickness for the range of glass surfaces defined by Surf1
XNEG and Surf2. This operand checks the edge thickness at numerous points
around the perimeter of the surface, and tests if all points are at least the
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1528
minimum specified thickness. This operand controls multiple surfaces
simultaneously. See MNEG.
Zone, if non zero, scales the radial aperture at which the thickness is
computed. A Zone value of 0.5 would compute the thickness at 0.5 times
the semi-diameter. This operand has a mode flag. Mode = 0 (default) to
use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed
on the Lens Data Editor.
Maximum edge thickness for the range of air surfaces defined by Surf1
and Surf2. This operand checks the edge thickness at numerous points
around the perimeter of the surface, and tests if all points are no more
than the maximum specified thickness. This operand controls multiple
surfaces simultaneously. See MXEA.
XXEA
Zone, if non zero, scales the radial aperture at which the thickness is
computed. A Zone value of 0.5 would compute the thickness at 0.5 times
the semi-diameter. This operand has a mode flag. Mode = 0 (default) to
use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed
on the Lens Data Editor.
Maximum edge thickness for the range of glass surfaces defined by Surf1
and Surf2. This operand checks the edge thickness at numerous points
around the perimeter of the surface, and tests if all points are no more
than the maximum specified thickness. This operand controls multiple
surfaces simultaneously. See MXEG.
XXEG
Zone, if non zero, scales the radial aperture at which the thickness is
computed. A Zone value of 0.5 would compute the thickness at 0.5 times
the semi-diameter. This operand has a mode flag. Mode = 0 (default) to
use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed
on the Lens Data Editor.
Maximum edge thickness for the range of surfaces defined by Surf1 and
Surf2. This operand checks the edge thickness at numerous points
around the perimeter of the surface, and tests if all points are no more
than the maximum specified thickness. This operand controls multiple
surfaces simultaneously. See MXET.
XXET
Zone, if non zero, scales the radial aperture at which the thickness is
computed. A Zone value of 0.5 would compute the thickness at 0.5 times
the semi-diameter. This operand has a mode flag. Mode = 0 (default) to
use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed
on the Lens Data Editor.
This operand controls the variation in the total thickness of the range
surfaces defined by Surf1 and Surf2 over multiple configurations. It is
ZTHI
similar to the TTHI operand, except it is an inequality operator. The target
value specified is the maximum allowed difference between the TTHI at
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1529
each defined configuration. For example, if there are 3 configurations
where TTHI 3 8 would evaluate to
17, 19, and 18.5, respectively, ZTHI will return 2 (i.e. 19-17) if the target is
less than 2. Otherwise, ZTHI returns the target value. To keep all zoom
configurations the same length, use a target of 0.
5 – X coordinate for the point on the surface with the minimum curvature value.
6 – Y coordinate for the point on the surface with the minimum curvature value.
7 – X coordinate for the point on the surface with the maximum curvature value.
8 – Y coordinate for the point on the surface with the maximum curvature value.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1530
10 – Z Offset of the best-fit sphere vertex from the local coordinate system
14 – Tilt about X (a) of off-axis coordinate system, from the surface’s local
coordinate system
15 – Tilt about Y (b) of off-axis coordinate system, from the surface’s local
coordinate system
16 – Tilt about Z (g) of off-axis coordinate system, from the surface’s local
coordinate system
1 – 33 x 33 (default)
2 – 65 x 65
3 – 129 x 129
4 – 257 x 257
5 – 513 x 513
6 – 1025 x 1025
7 – 2049 x 2049
8 – 4097 x 4097
9 – 8193 x 8193
10 – 16385 x 16385
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1531
Remove is set to 2. BFS = 0 (default) for minimum volume best-fit sphere.
BFS = 1 for Minimum RMS best-fit sphere. BFS = 2 for Minimum RMS
best-fit sphere with offset. The offset allows the calculation to shift the ver-
tex of the BFS away from the data value at the vertex if it results in a lower
RMS.
l Orientation selects the direction of the curvature calculation. Orientation
= 0 (default) calculated along the tangential direction. Orientation = 1 cal-
culated along the sagittal direction. Orientation = 2 calculated along the
X-axis direction. Orientation = 3 calculated along the Y-axis direction. Ori-
entation = 4 calculated as the orientation that results in the maximum
curvature value.
The phase data in waves at the primary system wavelength of the surface defined
by Surf. Phase data includes the RMS, PV, Minimum, or Maximum phase value
across a specified surface as well as the X or Y coordinates of Min phase value, or
the X or Y coordinates of the Max phase value. This operand has data, sampling,
and remove flags.
5 – X coordinate for the point on the surface with the minimum phase value.
6 – Y coordinate for the point on the surface with the minimum phase value.
DPHS
7 – X coordinate for the point on the surface with the maximum phase value.
8 – Y coordinate for the point on the surface with the maximum phase value.
1 – 33 x 33 (default)
2 – 65 x 65
3 – 129 x 129
4 – 257 x 257
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1532
5 – 513 x 513
6 – 1025 x 1025
7 – 2049 x 2049
8 – 4097 x 4097
9 – 8193 x 8193
10 – 16385 x 16385
5 – X coordinate for the point on the surface with the minimum sag value.
DSAG 6 – Y coordinate for the point on the surface with the minimum sag value.
7 – X coordinate for the point on the surface with the maximum sag value.
8 – Y coordinate for the point on the surface with the maximum sag value.
10 – Z Offset of the best-fit sphere vertex from the local coordinate system.
14 – Tilt about X (a) of off-axis coordinate system, from the surface’s local
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1533
coordinate system.
15 – Tilt about Y (b) of off-axis coordinate system, from the surface’s local
coordinate system.
16 – Tilt about Z (g) of off-axis coordinate system, from the surface’s local
coordinate system.
1 – 33 x 33 (default)
2 – 65 x 65
3 – 129 x 129
4 – 257 x 257
5 – 513 x 513
6 – 1025 x 1025
7 – 2049 x 2049
8 – 4097 x 4097
9 – 8193 x 8193
10 – 16385 x 16385
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1534
The options for the Data input will be:
5 – X coordinate for the point on the surface with the minimum slope value.
6 – Y coordinate for the point on the surface with the minimum slope value.
7 – X coordinate for the point on the surface with the maximum slope value.
8 – Y coordinate for the point on the surface with the maximum slope value.
10 – Z Offset of the best-fit sphere vertex from the local coordinate system.
14 – Tilt about X (a) of off-axis coordinate system, from the surface’s local
coordinate system.
15 – Tilt about Y (b) of off-axis coordinate system, from the surface’s local
coordinate system.
16 – Tilt about Z (g) of off-axis coordinate system, from the surface’s local
coordinate system.
1 – 33 x 33 (default)
2 – 65 x 65
3 – 129 x 129
4 – 257 x 257
5 – 513 x 513
6 – 1025 x 1025
7 – 2049 x 2049
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1535
8 – 4097 x 4097
9 – 8193 x 8193
10 – 16385 x 16385
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1536
used (see "Off-axis" below). This operand has mode, off-axis, remove, best-fit
sphere (BFS), and Orientation flags.
l Data = 0 (default) display the surface phase. Data = 1 display the tilt term
within the phase when Remove is set to 2. Data = 2 display the power
SPHS term within the phase when Remove is set to 3.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1537
Semi-Dia value displayed on the Lens Data Editor.
l Off-axis = 0 (default) the computation is calculated with respect to the sys-
tem coordinates and Off-axis = 1 the computation is calculated with
respect to a tilted and decentered coordinate system, where the origin of
the coordinate system falls at the vertex of the off-axis part. The X and Y
inputs will then refer to coordinates in the new off-axis coordinate system.
l Remove = 0 (default) no data is removed. Remove = 1 the base radius of
curvature is removed from the data before calculation. Remove = 2 the
best-fit sphere is removed from the data before calculation.
l BFS selects which type of best-fit sphere to remove from the data if
Remove is set to 2. BFS = 0 (default) for minimum volume best-fit sphere.
BFS = 1 for Minimum RMS best-fit sphere. BFS = 2 for Minimum RMS
best-fit sphere with offset. BFS = 3 for Minimum volume best-fit sphere,
reverse direction.
The offset allows the calculation to shift the vertex of the BFS away from
the data value at the vertex if it results in a lower RMS.
SSLP
l Remove = 0 (default) no data is removed. Remove = 1 the base radius of
curvature is removed from the data before calculation. Remove = 2 the
best-fit sphere is removed from the data before calculation.
l BFS selects which type of best-fit sphere to remove from the data if
Remove is set to 2. BFS = 0 (default) for minimum volume best-fit sphere.
BFS = 1 for Minimum RMS best-fit sphere. BFS = 2 for Minimum RMS
best-fit sphere with offset. BFS = 3 for Minimum volume best-fit sphere,
reverse direction.
The offset allows the calculation to shift the vertex of the BFS away from
the data value at the vertex if it results in a lower RMS.
l Orientation selects the direction of the slope calculation. Orientation = 0
(default) calculated along the tangential direction (radially outward). Ori-
entation = 1 calculated along the sagittal direction (orthogonal to radially
outward). Orientation = 2 calculated along the X-axis direction. Ori-
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1538
entation = 3 calculated along the Y-axis direction.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1539
absolute value found is returned.
If data is 4-7, the returned value is the x, y, x-y, or maximum x-y curvature,
respectively.
If data is 8-9, the returned value is the absolute value of (R*Sc), where R is the
radial coordinate and Sc is the sagittal curvature, or the maximum of this value,
respectively.
Surface Derivative. Computes the first or second derivative of the surface sag
(along the local Z
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1540
Constraints on Glass Data
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1541
PANA, PANB, PANC, PARA, PARB, PARC, PARR, PARX, PARY, PARZ, PATX, PATY, YNIP
NAME Description
Paraxial ray x-direction surface normal at the ray-surface intercept at the
wavelength defined by Wave. This is the x component of the surface normal
PANA
vector at the intersection point of the specified paraxial ray and the surface
defined by Surf, in the local coordinate system. See “Hx, Hy, Px, and Py”.
Paraxial ray y-direction surface normal at the ray-surface intercept at the
wavelength defined by Wave. This is the y component of the surface normal
PANB
vector at the intersection point of the specified paraxial ray and the surface
defined by Surf, in the local coordinate system. See “Hx, Hy, Px, and Py”.
Paraxial ray z-direction surface normal at the ray-surface intercept at the
wavelength defined by Wave. This is the z component of the surface normal
PANC
vector at the intersection point of the specified paraxial ray and the surface
defined by Surf, in the local coordinate system. See “Hx, Hy, Px, and Py”.
Paraxial ray x-direction cosine of the ray after refraction from the surface defined
PARA by Surf at the wavelength defined by Wave.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1542
times the index times the angle of incidence at the surface defined by Surf at the
wavelength defined by Wave. This quantity is related to the narcissus
contribution of the specified surface. See Applied Optics, Vol. 21, 18, p3393.
All Conf?: Set to 0 to use the current configuration (defined by the last
CONF operand preceding this operand), and 1 to sum over all
configurations. See “Huygens PSF” for a full discussion of this option.
This feature always uses the default image delta. The evaluation surface is
always the image surface (see IMSF). When CEHX is followed by a CEHY
with identical settings, both are computed with the same ray set to save
time.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1543
Surf: The surface number to use (use 0 for the image surface).
Surf: The surface number to use (use 0 for the image surface).
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1544
This is the slope of the ray fan plot at the specified pupil coordinate at the
wavelength defined by Wave.
If Surf is 0, the surface specified by the saved settings will be used. If Surf
is greater than zero, then the data will be computed at the specified
surface.
IMAE
If Field is 0, the field number specified by the saved settings will be used. If
Field is greater than zero, then the data will be computed at the specified
field.
If Field Size is 0, the Field Size specified by the saved settings will be used.
If Field Size is greater than zero, then the data will be computed using the
specified Field Size.
Data is 0 for efficiency, 1 for X-centroid, 2 for Y-centroid, or 3-5 for X-, Y-
or Radial-direction RMS, respectively. All values other than efficiency are in
lens units.
If Wave is 0, the wave number specified by the saved settings file will be
used. If Wave is greater than zero, then the data will be computed using
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1545
the specified wavelength number.
Surf: The surface number to use. Use Surf = 0 for all surfaces (default).
Wave: The wavelength number to use. Use Wave = 0 for all wavelengths
(default).
Field: The integer field number to use. Use Field = 0 for all fields (default).
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1546
Maximum real ray angle of exitance. This boundary operand constrains the
maximum ray exit angle over a range of surfaces. The angles are measured
in degrees between the surface normal and the exiting ray at the surface
MXRE range defined by Surf1 through Surf2 at the wavelength defined by
Wave. If Wave is zero the primary wavelength is used. Note the angle of
exitance is always positive. See also MNRE, MNRI, and MXRI. See “Hx, Hy,
Px, and Py”.
Maximum real ray angle of incidence. This boundary operand constrains
the maximum ray incidence angle over a range of surfaces. The angles are
measured in degrees between the surface normal and the incident ray at
MXRI the surface range defined by Surf1 through Surf2 at the wavelength
defined by Wave. If Wave is zero the primary wavelength is used. Note the
angle of incidence is always positive. See also MNRE, MNRI, and MXRE. See
“Hx, Hy, Px, and Py”.
Optical path length. This is the distance, in lens units, the specified ray
travels to the surface defined by Surf at the wavelength defined by Wave.
The distance is measured from the object for finite conjugates; otherwise
OPTH the distance is referenced to the first surface. The optical path accounts for
the index of refraction of the media, and for phase adding surfaces such as
gratings and binary optics. See PLEN.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1547
RAGB Global ray y-direction cosine. See RAGA.
RAGC Global ray z-direction cosine. See RAGA.
Global ray x-coordinate. This is the coordinate in lens units in the global
coordinate system at the surface defined by Surf at the wavelength
RAGX defined by Wave. The origin of the global coordinate system is at the
global reference surface.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1548
Real ray x-direction surface normal at the ray-surface intercept at the
RENA surfaced defined by Surf at the wavelength defined by Wave.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1549
Grid Optimization constraints for the TrueFreeForm™ surface constraints. This
operand computes various values from the shape of a TrueFreeForm™ surface.
Surf is the surface number. The Data value determines what value is computed by
the operand as follows:
1: Minimum Z value.
2: Maximum Z value.
Once the Data has been computed, the Mode value determines how the operand
behaves. The Mode parameter works as follows:
2: Returns the data value only if the data value is less than the target value,
otherwise the target value is returned. This mode is used to enforce a “greater
than” boundary on the data.
3: Returns the data value only if the data value is greater than the target value,
otherwise the target value is returned. This mode is used to enforce a “less than”
boundary on the data.
If Refocus? is 0, the specified surface becomes the new image surface and is not
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1550
modified in any way. If Refocus? is 1, then a dummy plane surface will follow the
specified surface, and a paraxial focus solve will be used to place this dummy
surface at the focus of the specified surface. This option is most useful for
optimizing aberrations at a virtual focus for intermediate surfaces that are not
already at focus.
Note this operand only temporarily changes a copy of the lens data use for
evaluating the merit function and has no impact on the original lens data. Care
should be taken when the selected surface precedes the original stop surface. For
information on how this operand is implemented see “Evaluating results at
intermediate surfaces”.
Primary wavelength. This is used to change the primary wavelength number to
PRIM the wavelength defined by Wave during merit function evaluation. This operand
does not use the target or weight columns.
Sets the vignetting factors for the current configuration. The Precision is either 0,
1, or 2; for high, medium, or low precision, respectively. The SVIG operand can
take a significant time to execute at high precision, although the resulting
optimization is generally superior.
SVIG
Note that the operands SVIG and CVIG only modify the vignetting factors for
evaluating subsequent optimization operands. When the end of the merit
function is reached, the vignetting factors will be restored to their original values.
See also “CVIG”.
Wavelength. This operand returns the wavelength defined by Wave in
WLEN
micrometers.
Clears the vignetting factors. This operand clears the current vignetting factors for
CVIG
the remainder of the operands in the current configuration. See also “SVIG”.
Field Data Modify. This operand allows temporary modification of field position
data. The operand allows new field coordinates and vignetting factors (except for
tangential angle, which cannot be modified by this operand) for any field
coordinate. All subsequent operands will use the modified field data. The original
field data is restored when a FDRE operand is reached with the same field number
argument, or a CONF operand is reached (regardless of the configuration number
FDMO referenced by the CONF operand), or after the last operand in the merit function
is reached.
Hx, Hy: The normalized field coordinates for the new field position.
VDX, VDY, VCX, VCY: The vignetting factor data for the new field position. See
“Vignetting factors”.
Field Data Restore. See FDMO.
FDRE
Field: The field number to restore.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1551
General Math Operands
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1552
by Op# less than the target value.
Operand value. This operand constrains the value of the operand defined
OPVA
by Op# to be equal to the target value.
Sums the values of all operands between the two operands defined by
OSUM
Op#1 and Op#2. See SUMM.
Multiplies the value of the operand defined by Op# by the factor defined
PROB
by Factor.
PROD Product of two operands (Op#1 X Op#2). See PROB.
Quadratic sum. This operand squares and then adds all operands between
QSUM the two operands defined by Op#1 and Op#2, then takes the square root
of the sum. See also SUMM, OSUM, EQUA.
RECI Returns the reciprocal of the value of operand Op#1. See also “DIVI”.
SQRT Square root of the operand defined by Op#.
SUMM Sum of two operands (Op#1 + Op#2). See OSUM.
Sine of the value of the operand defined by Op#. If Flag is 0, then the units
SINE
are radians, otherwise, degrees.
Tangent of the value of the operand defined by Op#. If Flag is 0, then the
TANG
units are radians, otherwise, degrees.
Absolute value of operand greater than. This is used to make the absolute
ABGT
value of the operand defined by Op# greater than the target value.
Absolute value of operand less than. This is used to make the absolute
ABLT
value of the operand defined by Op# less than the target value.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1553
Gaussian Beam Data
S1toW: The distance from Surface 1 to the waist location in lens units. See
the Gaussian beam feature for details.
M2 Factor: The M Squared value for the beam. See the Gaussian beam
feature for details.
Gaussian beam (paraxial) position, which is the distance from the waist to the
GBPP
surface, in the optical space following the specified surface. See GBPD.
Gaussian beam (paraxial) radius of curvature in the optical space following
GBPR
the specified surface. See GBPD.
Gaussian beam (paraxial) size in the optical space following the specified
GBPS
surface. See GBPD.
Gaussian beam (paraxial) waist in the optical space following the specified
GBPW
surface. See GBPD.
Gaussian beam (paraxial) Rayleigh range in the optical space following the
GBPZ
specified surface. See GBPD.
Gaussian beam (skew) divergence in the optical space following the specified
surface. The input beam is aligned along the chief ray of the field defined by
Field. The other parameters are:
Out#: The surface at which to compute the Skew Gaussian Beam data.
GBSD
Wave: The wavelength number to use.
W0: The input beam waist size in lens units. If W0 is positive, then the
computation is for the y- direction beam, otherwise, it is for the x-direction.
For details on the Skew Gaussian Beam feature, see “Skew Gaussian Beam”.
Gaussian beam (skew) position, which is the distance from the waist to the
GBSP
surface, in the optical space following the specified surface. See GBSD.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1554
Gaussian beam (skew) radius in the optical space following the specified
GBSR
surface. See GBSD.
Gaussian beam (skew) size in the optical space following the specified
GBSS
surface. See GBSD.
Gaussian beam (skew) waist in the optical space following the specified
GBSW
surface. See GBSD.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1555
complete description of the parameter “n”.
This operand is similar to InGT except it constrains the current value of the index
InVA of refraction. See
The Surf1 and Surf2 values define the first and second surface numbers to define
GAOI the ghost path. Note the first bounce surface number must be larger than the
second bounce surface number. The primary wavelength is always used. Surf3
determines the surface at which the angle of incidence is computed and has to be
greater than Surf2. When Surf3 is negative, its absolute value directly specifies
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1556
the surface number in the ghost system. See “Ghost Focus Generator” for more
information of ghost systems. By default, the SetVig = 0. When SetVig = 1,
vignetting factors are set for the ghost system when calculating the angle of
incidence. Note that setting vignetting factors will cause beams to fully pass all
surface apertures when possible by shifting and shrinking the beams. See
“Vignetting.”
Note that if Surf2 is a mirror in the original system, the beam cannot reach the
image surface in ghost system. Therefore Surf3 can only be 0 or negative. Surf3
= 0 represents the last surface in the ghost system, which is the object surface in
the original system.
The operand computes any one specific or all possible ghost pupil image
locations and returns one over the absolute value of the distance from the image
surface to the closest pupil ghost. The operand is defined in this manner so it can
be targeted to zero and weighted and optimized to reduce ghost pupil affects. If
the Surf1 and Surf2 parameters are set to specific surface numbers, that specific
ghost path is computed, if either or both of the Surf1 and Surf2 values are -1,
then all possible surface combinations are considered. For example, if Surf1 is 12
GPIM
and Surf2 is -1, then all double bounces that first bounce off surface 12 and then
11, 10, 9, etc. are considered. If both numbers are negative, all possible ghosts are
considered.
This same operand also can be used for detecting and controlling image ghosts
(which are distinct from pupil ghosts) by changing Mode from 0 to 1, or to
control ghost pupil magnification (the ratio of the ghost exit pupil diameter to
entrance pupil diameter), by setting Mode to 2.
The WFB and WSB columns will list the worst combination found for reference
and possible further analysis. Only surfaces with index changes are considered as
possible ghost generators. First bounces off mirrors are ignored.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1557
may return meaningless results if the field or aperture data are defined in a way
that changes the ghost path. No warning is issued in these cases. For example,
using GPRT while using image height for field points or using image space F/# for
the system aperture type will likely return useless results. The recommended
approach is to use field angles or object heights, use entrance pupil diameter, and
place the stop prior to the first bounce surface. To study the double bounce
system in detail see “Ghost Focus Generator”.
Data: This controls what data is returned as well as the algorithm to use. If Data is
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1558
0, the fast algorithm is used and the power coupling is returned. If Data is 1, the
Huygens algorithm is used and the power coupling is returned. If Data is 2 or 4,
the fast algorithm is used and the real or imaginary part of the amplitude
coupling is returned, respectively. If Data is 3 or 5, the Huygens algorithm is used
and the real or imaginary part of the amplitude coupling is returned, respectively.
Surf: This controls the end surface used in the POP calculation. If Surf is zero,
then the saved ending surface number will be used; otherwise, the specified
surface will be used as the ending surface.
Wave: This controls the wavelength used in the POP calculation. If Wave is zero,
then the saved wavelength number will be used; otherwise, the specified
wavelength number will be used.
Data: This controls what data is returned. If Data is 0 the total power coupling is
returned. If Data is 1, the amplitude coupling for the Ex field is returned. If Data is
2 or 3, the real or imaginary part of the amplitude coupling for the Ex field is
returned, respectively. If Data is 4, the amplitude coupling for the Ey field is
returned. If Data is 5 or 6, the real or imaginary part of the amplitude coupling for
the Ey field is returned, respectively. If the beam is unpolarized the Ey values wil
FICP
be zero.
Data inputs 1-6 request a polarized POP calculation, but if the input beam is
unpolarized, the field coupling efficiency amplitudes and phases are not
physically well-defined. Therefore, values of 0.0 will be returned if the input beam
is unpolarized.
To use this operand, first define the settings on the POP analysis feature as
desired, then press Save on the settings box. The operand FICP will return the
same efficiency as computed by the POP feature.
Field: This controls the field number used in the POP calculation. If Field is zero,
then the saved field number will be used; otherwise, the specified field number
will be used.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1559
Relative Illumination Operand
Pol?: Set to 0 to ignore polarization and 1 to consider it. See also EFNO.
Effective F/#. This operand computes the Effective F/# of the field point defined
by Field. For a discussion of Effective F/# see “Effective F/#”. The other parameters
are:
EFNO Samp: The grid size. A value of 10 would yield a 10 x 10 grid of rays.
Pol?: Set to 0 to ignore polarization and 1 to consider it. See also RELI.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1560
User defined operands
UDOC
NAME Description
User defined operand. Used for optimizing numerical results computed in
UDOC externally compiled programs written using the ZOS-API. See “Optimizing with
programs written using ZOS-API”. See also ZPLM.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1561
Operands for constraints on non-sequential object data
FREZ, NPGT, NPLT, NPVA, NPXG, NPXL, NPXV, NPYG, NPYL, NPYV, NPZG, NPZL, NPZV,
NSRM, NTXG, NTXL, NTXV, NTYG, NTYL, NTYV, NTZG, NTZL, NTZV
NAME Description
Freeform Z object constraints. This operand computes various values from the
shape of a Freeform
Z object described in “Freeform Z”. Surf is the surface number of the NSC group,
use
1 for NSC program mode. Object is the object number, which must be a
Freeform Z object for this
operand to compute any data. The Data value determines what value is
computed by the operand
as follows:
4: Minimum y value. This value is for the entire length of the solid, not just at
FREZ control points.
5: Maximum y value. This value is for the entire length of the solid, not just at
control points.
Once the Data has been computed, the Mode value determines how the
operand behaves. If Mode is 1, the FREZ operand returns the data. If Mode is 2,
the operand returns the data value only if the data value is less than the target
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1562
value, otherwise the target value is returned. This mode is used to enforce a
“greater than” boundary on the data. If Mode is 3, the operand returns the data
value only if the data value is greater than the target value, otherwise the target
value is returned. This mode is used to enforce a “less than” boundary on the
data.
Non-sequential parameter greater than. Surf defines the surface number of the
NPGT NSC group (always 1 in pure NSC systems). Object defines the object number in
the NSC group. The parameter number is defined by Param.
NPLT Non-sequential parameter less than. See NPGT.
NPVA Non-sequential parameter value. See NPGT.
Non-sequential object position x greater than. Surf defines the surface number
of the NSC group (always 1 in pure NSC systems). Object defines the object
number in the NSC group.
If Ref? is 1, the coordinates are relative to the origin of the NSC coordinate
system or entry port. If Ref? is 2, then the coordinates are relative to the global
coordinate reference surface.
NPXL Non-sequential object position x less than. See NPXG.
NPXV Non-sequential object position x value. See NPXG.
NPYG Non-sequential object position y greater than. See NPXG.
NPYL Non-sequential object position y less than. See NPXG.
NPYV Non-sequential object position y value. See NPXG.
NPZG Non-sequential object position z greater than. See NPXG.
NPZL Non-sequential object position z less than. See NPXG.
NPZV Non-sequential object position z value. See NPXG.
Non-sequential Rotation Matrix component. Surf defines the surface number of
the NSC group (always 1 in pure NSC systems). Object defines the object
number in the NSC group.
If Ref? is 0, the coordinates are relative to the reference object. The rotation
matrix will always be the identity matrix when using this reference.
NSRM If Ref? is 1, the coordinates are relative to the origin of the NSC coordinate
system or entry port. If Ref? is 2, then the coordinates are relative to the global
coordinate reference surface.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1563
NTYG Non-sequential object tilt about y greater than. See NPXG.
NTYL Non-sequential object tilt about y less than. See NPXG.
NTYV Non-sequential object tilt about y value. See NPXG.
NTZG Non-sequential object tilt about z greater than. See NPXG.
NTZL Non-sequential object tilt about z less than. See NPXG.
NTZV Non-sequential object tilt about z value. See NPXG.
This operand must come before the NSTR operand in the Merit Function.
Non-sequential coherent data. Surf defines the surface number of the NSC group
(always 1 in pure NSC systems). Det# refers to the object number of the desired
detector.
If Pix# is a positive integer, then the data from the specified pixel is returned. If
NSDC
Pix# is zero, then the sum of the data for all pixels for that detector object is
returned.
Data is 0 for real, 1 for imaginary, 2 for amplitude, and 3 for power. See “User
defined operands” for complete details.
Non-sequential incoherent intensity data. Surf defines the surface number of the
NSC group (always 1 in pure NSC systems). Det# refers to the object number of
the desired detector. If Det# is zero, then all detectors are cleared. If Det# is less
than zero, then the detector defined by the absolute value of Det# only is cleared.
Note that one NSDD operand clearing all detectors must be present prior to any
subsequently defined NSDD operands.
NSDD
For Detector Rectangles, Detector Surfaces, and all faceted detectors: If Pix# is a
positive integer greater than zero, then the data from the specified pixel is
returned. Otherwise, the following data is returned depending upon the value of
Pix#:
0: Total flux in position space for all pixels when Data = 0. Average flux/area in
position space when Data = 1. Total flux in angle space for all pixels when Data =
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1564
2. Note, by default, the angle space of Detector Rectangle is fully defined by -90 ~
90 degrees in both X and Y directions, and thus the value of Data = 0 and 2 will be
same.
-3: Number of total rays striking the detector for all pixels. Data is no used when
Pix# is set to this value.
-4: Standard deviation (RMS from the mean) of all the non-zero pixel data.
-6, -7, -8: The x, y, or z coordinate of the position or angle Irradiance or Intensity
centroid, respectively. Note for Detector Rectangle, the value for Data = 0 and 1
will be same because all pixels have same size.
-9,-10, -11, -12, -13: The weighted RMS radius, x, y, z, or xy cross term distance or
angle of all the pixel data with respect to the centroid. These are the square root
of the variance or second moments r^2, x^2, y^2, z^2, and xy, respectively.
where wi is a weight equal to the value of the pixel based on Data, xi is the x-
coordinate of the pixel and x* is the weighted mean.
Note for Detector Rectangle, the value for Data = 0 and 1 will be same because all
pixels have same size. Calculations for y* are analogous to those for x*.
-14, -15: The Geometric MTF in X or Y direction. Results will only be available for
Data = 0 or Data = 1, and the results will be the same for both Data inputs.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1565
Spatial Frequency is used to specify the spatial frequency (in cycles/millimeter) at
which the MTF data is calculated. The Spatial Frequency parameter is only
considered when applied to a Detector Rectangle and Pix# is set to -14 or -15.
Data is 0 for flux, 1 for flux/area, 2 for flux/solid angle pixel, 3 for normalized flux,
4 for absorbed flux, and 5 for absorbed flux/area. Note Data = 2 is only available
for Detector Rectangle, which records data in angle space. Only values 0 and 1
(for flux and flux/area) are supported for faceted detectors. A value of 3 is only
supported when Pix# is a positive integer; in this case the returned flux for the
pixel is normalized to the peak flux for all consecutive NSDD operands in the
Merit Function Editor which refer to the same surface and detector. A value of 3
should generally be used only as a part of the NSC Bitmap Merit Function (see
“NSC Bitmap Merit Function Tool”).
For Detector Rectangles only: If Pix# is not a positive integer, then a number of
edge pixels may be ignored in the calculation if desired. The number of edge
pixels that will be ignored is given by the # Ignored input. For non-zero values of
# Ignored, the number of pixels accounted for in the calculation will be reduced
along all boundaries of the detector. For example, if a detector has 100 pixels in X
and 200 pixels in Y and the # Ignored value is 2, then the calculation will be based
upon detector data from 96 pixels in X and 196 pixels in Y, with data from the last
2 edge pixels along the left, right, bottom and top boundaries all ignored. The
only calculation not affected by the # Ignored input is the number of rays striking
the detector, as given by Pix # = -3 (in addition to all values calculated for positive
integer inputs to Pix #).
For Detector Volumes: Pix# is interpreted as the voxel number. For Data values of
0, 1, or 2, the returned value is incident flux, absorbed flux, or absorbed flux per
unit volume, respectively. If Pix# is zero, the value returned is the sum for all
pixels.
For Object Is A Detector: There are two additional options for data. Data is 4 for
absorbed flux and 5 for absorbed flux/area.
For Detector Color objects, use NSDE instead. For Detector Polar objects, use
NSDP.
If Pix# is a positive integer greater than zero, then the data from the specified
pixel is returned. Otherwise, the following data is returned depending upon the
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1566
value of Pix#: 0: Sum of all data for all pixels on the detector. For chromaticity
coordinates this is the average over all pixels in the detector that have non-zero
lumen values. If Pix# is zero the <area> values described below are the area of
the entire detector, measured in analysis units for position space data or solid
angle in steradians for angle space data.
Data is an integer code that defines the type of data to return, defined as follows:
2: power/area in <aprefix> watts per <area> where <aprefix> is the analysis units
prefix. If Angle?
is 0 <area> is the area in analysis units. If Angle? is 1 then <area> is solid angle in
steradians.
9/10/11: CIE 1931 tristimulus X/Y/Z value in lumens per <area>. If Angle? is 0
<area> is the area in analysis units. If Angle? is 1 then <area> is solid angle in
steradians.
12/13: Color Rendering Index (CRI) and Correlated Color Temperature (CCT), the
latter value in Kelvin. These values are only returned if the option to “Record
Spectral Data” has been selected for the Detector Color object (only available in
OpticStudio-Premium) and if the Pix# and Angle? are both zero. The returned
values are based on the variation of flux with wavelength over the entire detector.
14/15/16: Normalized CIE 1931 tristimulus X/Y/Z value. Identical to the values
returned by Data 9, 10, and 11, but normalized to the peak tristimulus Y value for
all consecutive NSDE operands in the Merit Function Editor which refer to the
same surface and detector. Generally used only as a part of the NSC Bitmap Merit
Function (see “NSC Bitmap Merit Function Tool”). Only valid if Pix# is a positive
integer and Angle? is zero.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1567
17/18/19/20/21: The Centroid X, Y and RMS radius, X, Y in specified Spectral Bin.
See description of Wavelength Column for specifying the Spectral Bin. See
Detector Settings in Type section of the Object Properties for defining Spectral
Range of Bins.
Wavelength specifies which spectral bin's data is calculated for centroid X/Y and
RMS radius/X/Y. If the value of Wavelength is inside one bin's spectral range, the
bin's data will be selected for calculation. See "Record Spectral Data" for details of
spectral binning.
If Pix# is not a positive integer, then a number of edge pixels may be ignored in
the calculation if desired. The number of edge pixels that will be ignored is given
by the # Ignored input. For non- zero values of # Ignored, the number of pixels
accounted for in the calculation will be reduced along all boundaries of the
detector. For example, if a detector has 100 pixels in X and 200 pixels in Y and the
# Ignored value is 2, then the calculation will be based upon detector data from
96 pixels in X and 196 pixels in Y, with data from the last 2 edge pixels along the
left, right, bottom and top boundaries all ignored. Calculations that are not
affected by the # Ignored input are the number of rays striking the detector, as
given by Pix # = -3, and the CRI and CCT values, as given by Data = 12 and Data
= 13, respectively (the # Ignored input also does not affect any values calculated
for positive integer inputs to Pix #).
If the source units are joules, then the data 1 and 2 are in joules and data 3 and 4
are in talbots. See “Units”. See also NSDD and NSDP.
Non-sequential Detector Polar object data. Surf defines the surface number of
the NSC group (always 1 in pure NSC systems). Det# refers to the object number
of the desired detector. If Det# is zero, then all detectors are cleared. If Det# is
less than zero, then the detector defined by the absolute value of Det# only is
cleared.
If Pix# is a positive integer greater than zero, then the data from the specified
pixel is returned. Otherwise, the following data is returned depending upon the
value of Pix#:
NSDP
0: Sum of all data for all pixels on the detector. For chromaticity coordinates this is
the average over all pixels in the detector that have non-zero lumen values.
-4: The radial RMS in degrees of the distribution with respect to 0 degrees. If Pix#
is set equal to -
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1568
4, then the only valid inputs for Data are 1 or 3. All other inputs will return a value
of zero.
Data is an integer code that defines the type of data to return, defined as follows:
If the source units are joules, then the data 1 and 2 are in joules and data 3 and 4
are in talbots. See “Units”. See also NSDD and NSDE.
Non-sequential LightningTrace. This operand traces mesh rays as defined by the
LightningTrace analysis. Surf is the surface number of the Non-sequential surface.
Src# refers to the object number of the desired source from which to trace mesh
rays. If Src# is zero, rays will be traced from all sources. Ray Samp defines the
sampling to use in defining the ray mesh: 0 = Low (1X), 1
= 4X, 2 = 16X, 3 = 64X, 4 = 256X, 5 = 1024X. Edge Samp defines the sampling to
use for resolving the ray mesh around the edges of objects, with the same
NSLT interpretation for the numeric inputs as for Ray Samp (but with inputs only going
from 0 to 4). RT? defines whether mesh rays should be traced (when RT? = 0) or
whether all analysis rays should be traced using conventional ray tracing (when
RT? = 1). If RT? = 1, then this operand will act just like the NSTR operand with
polarization, splitting, and scattering all turned off.
An NSDD, NSDE, or NSDP operand with Det# set equal to 0 must be included in
the merit function prior to this operand.
See “The LightningTrace Control” for more information. See also NSTR.
Non-sequential single ray trace. Src# refers to the object number of the desired
source. This source must be defined to trace just a single analysis ray. If Splt? is
non-zero, then splitting is on. If Pol? is non-zero then polarization will be used. If
NSRA splitting is on polarization is automatically selected.
Scattering is always turned off for this feature, since scattering introduces random
paths for the child rays, which is not suitable for optimization. Errors are always
considered.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1569
If multiple NSRA operands trace the same ray are adjacent in the merit function
editor, the ray will only be traced once for efficiency.
Seg# refers to the segment number that contains the data to be returned. Use -1
for the last segment.
Use Data values 10-15 for path-to, intensity, phase of, phase at, index, and
starting phase, respectively. Note that the phase at value is not modulo 2*pi, as is
the case with ZRD files.
Use Data values 16-17 for the sum of the path, or optical path, respectively, in
lens units from the source to the end of the specified segment. These values do
not include the phase of diffractive surfaces.
Use Data values 21-26 for Ex real, Ex imaginary, Ey real, Ey imaginary, Ez real, and
Ez imaginary, respectively. Polarization must be on for real and imaginary data to
be returned.
Use Data value 27-29 for the phase of Ex, Ey, and the phase difference between
Ex and Ey, respectively. All values are in radians. Polarization must be on for valid
data to be returned.
Use Data values 31-39 for the coordinate data defined by Data values 1-9
converted to coordinates relative to the global coordinate reference surface.
Source # refers to the element number to use if the source is an array; see the
“Sources” settings in the Object Properties for the numbering scheme.
Note the segments NSRA is not listed in same order as in ZRD. For example, for a
same ray, the segment with Seg# =17 in NSRA is not same to the 17th segment
listed in ZRD.
Note the phase_at (Data = 13) is referenced to the center of the pixel where the
ray hits on the detector. See more explanations in section "Ray database (ZRD)
files".
For more information on these data items see “The ZRD Uncompressed Full Data
Format (UFD)”.
Non-sequential Ray Database. “ZRD file” defines the name of the ZRD file to be
saved. (up to 140 characters)
NSRD If the “ZRD format” setting is a positive integer, it defines the format of the ZRD
file:
0: Uncompressed Full Data
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1570
1: Compressed Basic Data
2: Compressed Full Data
If “ZRD format” is set to -1 then any subsequent NSTR operands will not create a
ZRD file.
This operand must come before the NSTR operand in the Merit Function.
NSRM See NSRM in “Constraints on non-sequential object data”
Non-sequential roadway lighting data.
Data defines the desired roadway lighting data to be returned. Use 0 for average
luminance, 1 for overall uniformity of luminance, 2 for longitudinal uniformity of
luminance, 3 for threshold increment,
4 for surround ratio, 5 for average illuminance, 6 for minimum illuminance, and 7
for uniformity of
defined for the roadway lighting analysis. Arrange defines the luminaire
NSRW arrangement along the roadway. Use 0 for single-side, 1 for double-sided, and 2
for staggered. Surf. Class defines the
road surface classification. Use 0 for R1, 1 for R2, 2 for R3, and 3 for R4.
The first NSRW with unique settings must be immediately preceded by an NSTW
operand in order to compute data. NSRW operands with the same settings
(except Data) must be placed on adjacent lines. These subsequent operands will
simply return data cached by the first NSRW operand. This operand is intended to
be used as part of the NSC Roadway Merit Function Tool.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1571
12: The face number of the object the ray struck.
In the general case, a ray may strike the same object multiple times. By default,
NSST will return the data for the last intercept on the specified object. To select a
specific intercept, add 1000 to the Data value for each time the ray strikes the
object. For example, to compute the y coordinate value of the ray on the third
time the ray strikes an object, use a Data value of 3001. If the ray does not strike
the object, or does not strike the object the specified number of times, the
operand returns a value of zero, but no warning or error is issued.
All coordinates and cosines are in the coordinate system of the Non-sequential
surface. An NSDC, NSDD, NSDE, or NSDP operand with Det# set equal to 0 must
be included in the merit function prior to this operand. See also NSTR.
Non-sequential trace. Src# refers to the object number of the desired source. If
Src# is zero, all sources will be traced. If Splt? is non-zero, then splitting is on. If
Scat? is non-zero, then scattering is on. If Pol? is non-zero then polarization will
be used. If splitting is on polarization is automatically selected. If IgEr? is non-
zero, then errors will be ignored. See “Optimizing with sources and detectors in
NSTR
non-sequential mode” for complete details.
An NSDD, NSDE, or NSDP operand with Det# set equal to 0 must be included in
the merit function prior to this operand.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1572
Constraints on Construction Optics for Optically
Fabricated Holograms
If there are more than one optically fabricated hologram surfaces in the playback
system being optimized, the Cons# may be incremented by 2 to specify the
second surface parameters be used, or by 4 to indicate the third hologram surface
construction optics be used, and so on. For example, a Cons# of 7 would indicate
construction system 1 on the fourth optically fabricated hologram surface
present.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1573
by CODA is polarization state specific.
The polarized ray may be traced from any field point in object space defined by
Field to any point in the pupil, to the surface defined by Surf. If Surf is zero, the
ray is traced to the image surface. The wavelength is defined by Wave while Px
and Py define the normalized pupil coordinate. The absolute value of Data
determines what data is returned as follows:
121, 122, 123: The major axis, minor axis, and angle in degrees of the polarization
ellipse
If the data is related to the coating (1-7), and Data is negative, the data is for the
“S” polarization, otherwise the data is for the “P” polarization.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1574
Boundary operand that constrains the coating index offset of the coating layer
CIVA
defined by Layr for the surface defined by Surf to be equal to the target value.
To use this operand, first define the settings on the POP analysis feature as
desired, then press Save on the settings box. The operand will return data based
upon the selected settings.
If Surf is zero, then the saved ending surface number will be used; otherwise, the
specified surface will be used as the ending surface. If Wave is zero, then the
saved wavelength number will be used; otherwise, the specified wavelength
number will be used. If Field is zero, then the saved field number will be used;
otherwise, the specified field number will be used.
Data determines what data the POP feature will compute and return as follows:
0: The total fiber coupling. This is the product of the system efficiency and the
receiver efficiency.
8, 9, 10: The pilot beam position, Rayleigh range, beam waist (y).
11, 12, 13: The local X, Y, Z coordinates of the center of the beam array on the end
surface (this is a reference point and is not related to the amplitude of the beam).
21, 22: The X, Y coordinates of the centroid of the intensity distribution in local
coordinates relative to the center of the beam. The orientation of the X/Y axes for
this result are not necessarily the same as the orientation of the end surface.
23, 24, 25, 26: The X, Y beam width and the X, Y M-squared values, respectively.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1575
For data 23, 24 with default Xtr1 value set to 0 beam widths are calculated in the
lab coordinate system. When Xtr1 value set to 1 beam widths are calculated in
the direction of its principle axes. Note when calculating M-squared value for
asymmetric beams, the "Separate X, Y" must be checked when clicking the "Save"
button in the POP analysis setting dialog. See “Beam with and M-squared”.
27: The square root of second moment of the beam for x2, θx2, xθx, and xθy for
Xtr1 values 0, 1, 2, and 3, respectively.
28: The square root of second moment of the beam for y2, θy2, yθy, and yθx for
Xtr1 values 0, 1, 2, and 3, respectively.
29: The square root of second moment of the beam for xy and θxθy for Xtr1
values 0 and 1, respectively.
30, 31, 32: The mean, RMS and PTV irradiance variation, respectively, of the non-
zero amplitude portion of the beam. These operands should only be used when
the beam has nearly uniform irradiance and has just been clipped by a surface
aperture.
33, 34, 35: The mean, RMS and PTV phase variation in radians, respectively, of the
non-zero amplitude portion of the beam. These operands should only be used
when the beam has nearly uniform irradiance and has just been clipped by a
surface aperture.
40, 41, 42: The fraction of the total power enclosed within a circle of radius
specified by the Xtr1 value in lens units, referenced to the beam centroid (40),
chief ray (41), or surface vertex (42).
50, 51, 52: The radius in lens units of the circle at which the fraction of the total
power enclosed is equal to the value specified by the Xtr1 value. The circle is
centered on the beam centroid (50), chief ray (51), or surface vertex (52).
60, 61, 62, 63: The fiber coupling receiver efficiency amplitude and phase in
radians for the Ex field (60 and 61) and the Ey field (62 and 63). These values do
not consider system efficiency (see Data type 1 above). Data inputs 60-63
request a polarized POP calculation, but if the input beam is unpolarized, the field
coupling efficiency amplitudes and phases are not physically well-defined.
Therefore, values of 0.0 will be returned if the input beam is unpolarized.
The Xtr1 and Xtr2 values are only used by selected data numbers which are
reserved for future expansion of this feature.
If adjacent POPD operands all have the same Surf, Wave, Field, Xtr1, and Xtr2
values, then the POP analysis is done just once and all data returned at one time.
Note the POPD operands must be on adjacent rows in the MFE for this efficiency
to be implemented.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1576
Physical Optics Propagation Data. For important details see the section on
“Physical Optics Propagation”.
To use this operand, first define the settings on the POP analysis feature as
desired, then press
Save on the settings box. The operand will return data based upon the selected
settings.
If Surf is zero, then the saved ending surface number will be used; otherwise, the
specified surface will be used as the ending surface. If Wave is zero, then the
saved wavelength number will be used; otherwise, the specified wavelength
number will be used. If Field is zero, then the saved field number will be used;
otherwise, the specified field number will be used.
Data determines what data the POP feature will compute and return as follows:
POPI
0, 1, 2: The total (Ex + Ey), Ex only, or Ey only Irradiance.
The Pix# refers to the desired pixel of the beam. The pixel number is greater than
or equal to zero, and less than nx*ny, where nx and ny are the number of columns
and rows, respectively. The pixel number is generally defined as p = x + y*nx
where x is the integer row number and y is the integer column number, and 0 <=
x < nx and 0 <= y < ny.
If adjacent POPI operands all have the same Surf, Wave, and Field values, then
the POP analysis is done just once and all data returned at one time. Note the
POPI operands must be on adjacent rows in the MFE for this efficiency to be
implemented.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1577
2 - Vertex offset from BFS in lens units
5 - The maximum slope (dz/dr) difference between the surface and BFS
(dimensionless)
7 - RMS of the slope (dz/dr) difference between the surface and BFS
(dimensionless)
The MinR and MaxR are the minimum and maximum radial coordinate over
which the BFS data is computed. If both values are zero, the minimum radial
coordinate used is zero and the maximum radial coordinate used is the clear
semi-diameter or semi-diameter of the surface.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1578
Thermal Coefficient of expansion less than. This boundary operand constrains
TCLT
the TCE of the surface defined by Surf to be less than the specified target value.
Thermal Coefficient of expansion value. This boundary operand constrains the
TCVA TCE of the surface defined by Surf to be equal to the specified target value. For
glass surfaces, see “GTCE”.
Obsolete Operands
Obsolete Operands
NAME Description
PnGT This operand is obsolete, use PMGT instead.
PnLT This operand is obsolete, use PMLT instead.
PnVA This operand is obsolete, use PMVA instead.
NAME Description
The ABCD values used by the grid distortion feature to compute generalized
distortion. See “Grid Distortion”. The reference field number is defined by Ref Fld.
ABCD
The wavelength number is defined by Wave. Data is 0 for A, 1 for B, 2 for C, and 3
for D. See also “DISA”.
Absolute value of operand greater than. This is used to make the absolute value
ABGT
of the operand defined by Op# greater than the target value.
Absolute value of operand less than. This is used to make the absolute value of
ABLT
the operand defined by Op# less than the target value.
ABSO Absolute value of the operand defined by Op#.
Arc cosine of the value of the operand defined by Op#. If Flag is 0, then the units
ACOS
are radians, otherwise, degrees.
Angular magnification. This is the ratio of the image to object space paraxial chief
AMAG ray angles at the wavelength defined by Wave. Not valid for non-paraxial
systems.
Angular aberration radial direction measured in image space with respect to the
ANAC centroid at the wavelength defined by Wave. This quantity is defined as:
ε = SQRT[(l-lc)2 + (m-mc)2]
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1579
where l and m are the x and y direction cosines of the ray and the c subscript
indicates the centroid. See "Hx, Hy, Px, and Py".
Angular aberration radius measured in image space at the wavelength defined by
Wave with respect to the primary wavelength chief ray. This quantity is defined
as:
ANAR
ε = SQRT[(l-lc)2 + (m-mc)2]
where l and m are the x and y direction cosines of the ray and the c subscript
indicates the chief ray. See"Hx, Hy, Px, and Py".
Angular aberration x direction measured in image space at the wavelength
defined by Wave with respect to the primary wavelength chief ray. This quantity is
ANAX defined as:
ε = l-lcwhere l is the x direction cosine of the ray and the c subscript indicates the
chief ray. See "Hx, Hy, Px, and Py".
Angular aberration y direction measured in image space at the wavelength
defined by Wave with respect to the primary wavelength chief ray. This quantity is
ANAY defined as:
ε = m-mc where m is the y direction cosine of the ray and the c subscript indicates
the chief ray. See "Hx, Hy, Px, and Py".
Angular aberration x direction measured in image space at the wavelength
defined by Wave with respect to the centroid. This quantity is defined as:
ε = l-lc
ANCX where l is the x direction cosine of the ray and the c subscript indicates the
centroid. ANCX has the same restrictions that TRAC does; see TRAC for a detailed
discussion. See “Hx, Hy, Px, and Py” in "Modifying the merit function" on
page 1676.
Angular aberration y direction measured in image space at the wavelength
defined by Wave with respect to the centroid. This quantity is defined as:
ε = m-mc
ANCY where m is the y direction cosine of the ray and the c subscript indicates the
centroid. ANCY has the same restrictions that TRAC does; see TRAC for a detailed
discussion. See “Hx, Hy, Px, and Py” in "Modifying the merit function" on
page 1676.
Arcsine of the value of the operand defined by Op#. If Flag is 0, then the units are
ASIN
radians, otherwise, degrees.
Astigmatism in waves contributed by the surface defined by Surf at the
wavelength defined by Wave. If Surf is zero, the sum for the entire system is used.
ASTI
This is the third order astigmatism calculated from the Seidel coefficients, and is
not valid for non-paraxial systems.
Arctangent of the value of the operand defined by Op#. If Flag is 0, then the units
ATAN
are radians, otherwise, degrees.
Axial color, measured in lens units for focal systems and diopters for afocal
AXCL systems. This is the image separation between the two wavelengths defined by
Wave1 and Wave2. If Zone is zero, paraxial rays are used to determine the
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1580
paraxial image locations. If Zone is greater than 0.0 and less than or equal to 1.0,
real marginal rays are used to determine the image locations. In this case, Zone
corresponds to the Py coordinate of the real marginal ray.
See "Hx, Hy, Px, and Py".
Best Fit Sphere (BFS) data. For a complete description, see “Sag Table”. BFSD uses
the Minimum Volume criterion. The data is computed for the surface defined by
Surf. The value returned depends upon the value of Data as follows:
0 - BFS curvature in inverse lens units
1 - BFS radius of curvature in lens units
2 - Vertex offset from BFS in lens units
3 - Maximum depth of material to remove in lens units
4 - Total volume of material to use in cubic lens units
BFSD 5 - The maximum slope (dz/dr) difference between the surface and BFS
(dimensionless)
6 - RMS of the depth of material to remove in lens units
7 - RMS of the slope (dz/dr) difference between the surface and BFS
(dimensionless)
The MinR and MaxR are the minimum and maximum radial coordinate over
which the BFS data is computed. If both values are zero, the minimum radial
coordinate used is zero and the maximum radial coordinate used is the clear
semi-diameter or semi-diameter of the surface.
Biocular Convergence. Returns the convergence between two eye configurations
in milliradians. The left and right eye configurations are specified using the Left
and Right values. The other parameters are:
Wave: The wavelength number to use.
BIOC UseCos: If 0 field units are degrees, otherwise field is in direction cosine units.
Xang/Yang: The X and Y angle or cosines at which to compute the convergence.
If the chief rays from both configurations at the specified angles do not pass
through to the image without vignetting, an error is reported. See
“Divergence/Convergence” for more information and important assumptions.
Biocular Dipvergence. Returns the dipvergence between two eye configurations
BIOD
in milliradians. See BIOC above for details.
BIPF Unused.
Does nothing. Used for separating portions of the operand list. A comment line
BLNK may optionally be typed in the space to the right of the operand name; this
comment will be displayed in the editor as well as in the merit function listing.
Blank thickness. Computes the minimum thickness of the glass blank required to
create the volume following the surface defined by Surf. The sag of the surface
and the one following are computed at 200 radial points along axes defined by
BLTH the Code value. Use Code = 0 for +Y axis, 1 for +X axis, 2 for -Y axis, 3 for -X axis,
and 4 for all four axes. This operand has a mode flag. Mode = 0 (default) to use
Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed on the Lens
Data Editor.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1581
Boresight error. Boresight error is defined as the radial chief ray coordinate traced
for the on axis field and wavelength defined by Wave divided by the effective
BSER
focal length. This definition yields a measure of the angular deviation of the
image.
Cardinal Point data. This operand will return the location of the 6 cardinal points
for object space and 6 cardinal points for image space, including principal, anti-
principal, nodal, anti-nodal and focal planes, in Lens units. The calculation is
performed for any defined wavelength and either the X-Z or Y-Z plane
orientations. Object space positions are measured with respect to the surface
defined as Surf1, and the image space positions are measured with respect to the
surface defined as Surf2. The index in both the object space and image space is
considered.
Surf1: The starting surface number of the group to compute the cardinal points
for.
Surf2: The ending surface number of the group to compute the cardinal points
for.
Orientation: The orientation to use for computing the cardinal plane locations (0
– YZ plane or 1 – XZ plane).
CARD The value returned depends upon the value of Data as follows:
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1582
value. Use Surf = 0 for all surfaces, Layr = 0 for all layers.
Boundary operand that constrains the coating extinction offset of the coating
CELT layer defined by Layr for the surface defined by Surf to be less than the target
value. Use Surf = 0 for all surfaces, Layr = 0 for all layers.
Huygens PSF centroid X position. This operand uses the Huygens PSF to
determine the x coordinate of the centroid for any field point. The centroid
accounts for all apodization and apertures, and optionally polarization. The
parameters for this operand are:
Wave: The wavelength number to use (0 for polychromatic, otherwise use the
monochromatic wavelength number).
Field: The integer field number to use.
Pol?: Set to 0 to ignore polarization and 1 to consider it.
CEHX Pupil Samp: Use 1 for 32x32, 2 for 64x64, etc.
Image Samp: Use 1 for 32x32, 2 for 64x64, etc.
All Conf?: Set to 0 to use the current configuration (defined by the last CONF
operand preceding this operand), and 1 to sum over all configurations. See
"Huygens PSF" on page 1078 for a full discussion of this option.
This feature always uses the default image delta. The evaluation surface is always
the image surface (see IMSF). When CEHX is followed by a CEHY with identical
settings, both are computed with the same ray set to save time.
See also CENX, CENY, CNPX, CNPY, CNAX, and CNAY.
CEHY Huygens PSF centroid Y position. See CEHX.
Centroid X position. This operand uses a grid of rays to determine the x
coordinate of the centroid of all rays from a single field point. The centroid
accounts for apodization and apertures, and optionally polarization. The
parameters for this operand are:
Surf: The surface number to use (use 0 for the image surface).
Wave: The wavelength number to use (0 for polychromatic, otherwise use the
CENX
monochromatic wavelength number).
Field: The integer field number to use.
Pol?: Set to 0 to ignore polarization and 1 to consider it.
Samp: The grid size. A value of 10 would yield a 10 x 10 grid of rays.
When CENX is followed by a CENY with identical settings, both are computed
with the same ray set to save time.
CENY Centroid Y position. See CENX.
Boundary operand that constrains the coating extinction offset of the coating
CEVA layer defined by Layr for the surface defined by Surf to be equal to the target
value.
Boundary operand that constrains the coating index offset of the coating layer
CIGT defined by Layr for the surface defined by Surf to be greater than the target
value. Use Surf = 0 for all surfaces, Layr = 0 for all layers.
Boundary operand that constrains the coating index offset of the coating layer
CILT
defined by Layr for the surface defined by Surf to be less than the target value.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1583
Use Surf = 0 for all surfaces, Layr = 0 for all layers.
Boundary operand that constrains the coating index offset of the coating layer
CIVA
defined by Layr for the surface defined by Surf to be equal to the target value.
Construction merit function value. This operand calls the merit functions defined
in either of the two construction systems used to define an optically fabricated
hologram. The Cons# is either 1 or 2, for the first or second construction system,
respectively. The Op# is either 0, which will return the entire merit function value
from the construction system; or it is an integer which defines the operand row #
from which to extract the value from. For example, if Cons# is 2 and Op# is 7,
CMFV CMFV will return the value of merit function operand 7 in construction file 2.
If there are more than one optically fabricated hologram surfaces in the playback
system being optimized, the Cons# may be incremented by 2 to specify the
second surface parameters be used, or by 4 to indicate the third hologram
surface construction optics be used, and so on. For example, a Cons# of 7 would
indicate construction system 1 on the fourth optically fabricated hologram
surface present.
Boundary operand that constrains the coating multiplier of the coating layer
CMGT defined by Layr for the surface defined by Surf to be greater than the target
value. Use Surf = 0 for all surfaces, Layr = 0 for all layers.
Boundary operand that constrains the coating multiplier of the coating layer
CMLT defined by Layr for the surface defined by Surf to be less than the target value.
Use Surf = 0 for all surfaces, Layr = 0 for all layers.
Boundary operand that constrains the coating multiplier of the coating layer
CMVA
defined by Layr for the surface defined by Surf to be equal to the target value.
Centroid angular x direction. This operand computes the X angle in radians
relative to the local Z axis of the centroid of rays from any field point. The
centroid accounts for apodization and apertures, and optionally polarization.
Surf: The surface number to use (use 0 for the image surface).
Wave: The wavelength number to use (0 for polychromatic, otherwise use the
monochromatic wavelength number).
CNAX
Hx/Hy: See normalized field coordinates to use.
Pol?: Set to 0 to ignore polarization and 1 to consider it.
Samp: The grid size. A value of 10 would yield a 10 x 10 grid of rays.
When CNAX is followed by a CNAY with identical settings, both are computed
with the same ray set to save time.
See also CNAY, CNPX, CNPY, CENX, CENY, CEHX, CEHY.
CNAY Centroid angular y direction. See CNAX.
CNPX Similar to CNAX, but computes the centroid position rather than angle.
CNPY Similar to CNAY, but computes the centroid position rather than angle.
Coating Data. This feature traces a polarized ray using the system global
polarization state (see “Polarization”). Even if the global polarization state is set to
CODA
“unpolarized”, the defined polarization state is used because the data computed
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1584
by CODA is polarization state specific.
The polarized ray may be traced from any field point in object space defined by
Field to any point in the pupil, to the surface defined by Surf. If Surf is zero, the
ray is traced to the image surface. The wavelength is defined by Wave while Px
and Py define the normalized pupil coordinate. The absolute value of Data
determines what data is returned as follows:
0: The relative transmitted polarized intensity (see 8)
1, 2, 3: The intensity reflectance R, transmittance T, absorption A
4,5: The field amplitude transmittance real, imaginary
6,7: The field amplitude reflectance real, imaginary
8: The relative transmitted unpolarized intensity (see 0)
101, 102: E field out X real, imaginary
103, 104: E field out Y real, imaginary
105, 106: E field out Z real, imaginary
110: The phase difference between Ex and Ey; Pxy
111, 112, 113: The E field phase Px, Py, Pz
121, 122, 123: The major axis, minor axis, and angle in degrees of the polarization
ellipse
If the data is related to the coating (1-7), and Data is negative, the data is for the
“S” polarization, otherwise the data is for the “P” polarization.
See "Hx, Hy, Px, and Py".
Boundary operand that constrains the conic of the surface defined by Surf to be
COGT
greater than the specified target value.
Boundary operand that constrains the conic of the surface defined by Surf to be
COLT
less than the specified target value.
Coma in waves contributed by the surface defined by Surf at the wavelength
defined by Wave. If Surf is zero, the sum for the entire system is used. This is the
COMA
third order coma calculated from the Seidel coefficients, and is not valid for non-
paraxial systems.
Configuration. This operand is used to change the configuration number to the
configuration defined by Cfg# during merit function evaluation. This permits
CONF
optimization across multiple configurations with a single merit function. This
operand does not use the target or weight columns.
Constant value. This is used to enter in constant values for use in other operand
CONS
computations. The value will be identical to the target value.
COSA Unused.
Cosine of the value of the operand defined by Op#. If Flag is 0, then the units are
COSI
radians, otherwise, degrees.
COVA Conic value. Returns the conic constant of the surface defined by Surf.
Center thickness greater than. This boundary operand constrains the center
CTGT thickness of the surface defined by Surf to be greater than the specified target
value. See also MNCT.
CTLT Center thickness less than. This boundary operand constrains the center thickness
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1585
of the surface defined by Surf to be less than the specified target value. See also
MXCT.
Center thickness value. Constrains the center thickness of the surface defined by
CTVA
Surf to be equal to the specified target value.
Curvature greater than. This boundary operand constrains the curvature of the
CVGT
surface defined by Surf to be greater than the target value.
Clears the vignetting factors. This operand clears the current vignetting factors
CVIG
for the remainder of the operands in the current configuration. See also “SVIG”.
Curvature less than. This boundary operand constrains the curvature of the
CVLT
surface defined by Surf to be less than the target value.
Cylinder volume. This operand computes the volume in cubic lens units of the
smallest cylinder that will contain the range of surfaces defined by Surf1 and
Surf2. Only the vertex positions and semi- diameters are used in the calculation,
CVOL
not the sag. This operand has a mode flag. Mode = 0 (default) to use Mech Semi-
Dia and Mode = 1 to use Clear Semi-Dia value displayed on the Lens Data Editor.
The range of surfaces should not include any coordinate breaks.
Curvature value. This operand constrains the curvature of the surface defined by
CVVA
Surf to be equal to the specified target value.
The curvature data in lens units of the surface defined by Surf. Curvature data
includes the Mean, PV, Minimum, or Maximum curvature value across a specified
surface as well as the X or Y coordinates of Min curvature value, or the X or Y
coordinates of the Max curvature value. This operand has data, sampling, off-axis,
remove, best-fit sphere (BFS), and Orientation flags.
5 – X coordinate for the point on the surface with the minimum curvature value.
6 – Y coordinate for the point on the surface with the minimum curvature value.
7 – X coordinate for the point on the surface with the maximum curvature value.
8 – Y coordinate for the point on the surface with the maximum curvature value.
10 – Z Offset of the best-fit sphere vertex from the local coordinate system
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1586
12 – Y decenter of off-axis coordinate system from the surface’s local coordinate
system
14 – Tilt about X (a) of off-axis coordinate system, from the surface’s local
coordinate system
15 – Tilt about Y (b) of off-axis coordinate system, from the surface’s local
coordinate system
16 – Tilt about Z (g) of off-axis coordinate system, from the surface’s local
coordinate system
1 – 33 x 33 (default)
2 – 65 x 65
3 – 129 x 129
4 – 257 x 257
5 – 513 x 513
6 – 1025 x 1025
7 – 2049 x 2049
8 – 4097 x 4097
9 – 8193 x 8193
10 – 16385 x 16385
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1587
l Orientation selects the direction of the curvature calculation. Orientation
= 0 (default) calculated along the tangential direction. Orientation = 1 cal-
culated along the sagittal direction. Orientation = 2 calculated along the
X-axis direction. Orientation = 3 calculated along the Y-axis direction. Ori-
entation = 4 calculated as the orientation that results in the maximum
curvature value.
Diffraction Encircled Energy (distance). This operand computes the distance to
the fraction of diffraction encircled, ensquared, x only, or y only (enslitted) energy
defined by Frac. For focal mode, the units are micrometers. For afocal mode, the
units are afocal mode units. The other parameters are:
Samp: The pupil sampling, where 1 yields 32 x 32, 2 yields 64 x 64 etc.
Wave: The wavelength number to use (use 0 for polychromatic).
Field: The field number.
Type: 1 for encircled, 2 for x only, 3 for y only, and 4 for ensquared.
DENC
Refp: The reference point/algorithm to use. For FFT encircled energy, use Refp =
0 for chief ray, 1 for centroid, and 2 for vertex. For Huygens encircled energy, use
Refp = 3 for chief ray, 4 for centroid, and 5 for vertex. When using the Huygens
method, I Samp refers to the Huygens image sampling (1 for 32 x 32, 2 for 64 x
64, etc.) and I Delta refers to the Huygens image delta. For a detailed description
of the Huygens image sampling and image delta, see “Encircled Energy”.
If the sampling is too low, the radius returned is 1e+10. See also DENF, GENC and
XENC.
Diffraction Encircled Energy (fraction). This operand computes the fraction of
diffraction encircled, ensquared, x only, or y only (enslitted) energy at a given
distance from the reference point defined by Dist. For focal mode, the distance
units are micrometers. For afocal mode, the distance units are afocal mode units.
The options and settings are identical to DENC, except Dist, which here is used as
DENF
the distance at which the fraction of energy is desired. See also DENC, GENC,
GENF, and XENC.
If the Dist value defined is beyond the point where the encircled energy is very
close to 100%, the fraction returned is 1e+10; this is done for optimization
efficiency.
DIFF Difference of two operands (Op#1 - Op#2).
Distortion maximum. This specifies an upper bound for the absolute value of the
distortion. DIMX is based on the same calculation as DISG, and is not related to
the Seidel-based calculations given by DIST. Field can be zero, which specifies
that the maximum field coordinate be used, or any valid field number. Note the
maximum distortion does not always occur at the maximum field coordinate.
DIMX DIMX only traces chief rays (Px = Py = 0), and thus Px and Py are not user-
defined. The reference field is always an on-axis field point (Hx = Hy = 0), even if
such a field point has not been defined in the optical system. See DISG for more
information.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1588
If Absolute is 0, the value returned is in units of percentage. If Absolute is 1, the
distortion is given as an absolute length rather than a percentage.
If the field is defined in terms of angles, the normalized field coordinates Hx and
Hy are defined as:
H=θ/θM
DISG
where θ is the absolute angle measured from the central on-axis field, and θM is
the maximum field angle (see “Maximum field”).
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1589
Distortion in waves contributed by the surface defined by Surf at the wavelength
defined by Wave. This is the third order distortion calculated from the Seidel
coefficients (see “Seidel Coefficients”), and is not valid for non-paraxial systems.
DIST If Surf is zero, the distortion is given in percent instead (see “Field
Curvature/Distortion” for a detailed definition).
If Absolute is set to 1, and the surface number is zero, the distortion is given as an
absolute length rather than a percentage. See also DISG.
Divides the value of any prior operand defined by Op# by any factor defined by
DIVB
Factor.
DIVI Division of first by second operand (Op#1 / Op#2). See also “RECI”.
Delta N. Computes the difference between the maximum and minimum index of
refraction on axis for a gradient index surface defined by Surf. The wavelength
DLTN used is defined by Wave. The minimum and maximum z coordinates used are
computed by accounting for the sag of both ends of the surface. See the section
“Using gradient index operands”.
Default merit function start. This operand is a flag to indicate where the default
merit function should be appended, if one is subsequently created. The row
DMFS
number after this operand will appear as the default “Start At” row on the default
merit function dialog box.
Diameter greater than. This boundary operand constrains the diameter of the
surface defined by Surf to be greater than the specified target value. This operand
DMGT has a mode flag. Mode = 0 (default) to use Mech Semi-Dia and Mode = 1 to use
Clear Semi-Dia value displayed on the Lens Data Editor. The diameter is simply
two times the value of the selected semi-diameter
Diameter less than. This boundary operand constrains the diameter of the surface
defined by Surf to be less than the specified target value. This operand has a
DMLT mode flag. Mode = 0 (default) to use Mech Semi-Dia and Mode = 1 to use Clear
Semi-Dia value displayed on the Lens Data Editor. The diameter is simply two
times the value of the selected semi-diameter.
Diameter value. This operand constrains the diameter of the surface defined by
Surf to be equal to the specified target value. This operand has a mode flag.
DMVA Mode = 0 (default) to use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia
value displayed on the Lens Data Editor. The diameter is simply two times the
value of the selected semi-diameter.
The phase data in waves at the primary system wavelength of the surface defined
by Surf. Phase data includes the RMS, PV, Minimum, or Maximum phase value
across a specified surface as well as the X or Y coordinates of Min phase value, or
the X or Y coordinates of the Max phase value. This operand has data, sampling,
DPHS
and remove flags.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1590
2 – PV phase value over the surface.
5 – X coordinate for the point on the surface with the minimum phase value.
6 – Y coordinate for the point on the surface with the minimum phase value.
7 – X coordinate for the point on the surface with the maximum phase value.
8 – Y coordinate for the point on the surface with the maximum phase value.
1 – 33 x 33 (default)
2 – 65 x 65
3 – 129 x 129
4 – 257 x 257
5 – 513 x 513
6 – 1025 x 1025
7 – 2049 x 2049
8 – 4097 x 4097
9 – 8193 x 8193
10 – 16385 x 16385
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1591
1 – RMS sag value over the surface (default).
5 – X coordinate for the point on the surface with the minimum sag value.
6 – Y coordinate for the point on the surface with the minimum sag value.
7 – X coordinate for the point on the surface with the maximum sag value.
8 – Y coordinate for the point on the surface with the maximum sag value.
10 – Z Offset of the best-fit sphere vertex from the local coordinate system.
14 – Tilt about X (a) of off-axis coordinate system, from the surface’s local
coordinate system.
15 – Tilt about Y (b) of off-axis coordinate system, from the surface’s local
coordinate system.
16 – Tilt about Z (g) of off-axis coordinate system, from the surface’s local
coordinate system.
1 – 33 x 33 (default)
2 – 65 x 65
3 – 129 x 129
4 – 257 x 257
5 – 513 x 513
6 – 1025 x 1025
7 – 2049 x 2049
8 – 4097 x 4097
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1592
9 – 8193 x 8193
10 – 16385 x 16385
6 – Y coordinate for the point on the surface with the minimum slope value.
7 – X coordinate for the point on the surface with the maximum slope value.
8 – Y coordinate for the point on the surface with the maximum slope value.
10 – Z Offset of the best-fit sphere vertex from the local coordinate system.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1593
system.
14 – Tilt about X (a) of off-axis coordinate system, from the surface’s local
coordinate system.
15 – Tilt about Y (b) of off-axis coordinate system, from the surface’s local
coordinate system.
16 – Tilt about Z (g) of off-axis coordinate system, from the surface’s local
coordinate system.
1 – 33 x 33 (default)
2 – 65 x 65
3 – 129 x 129
4 – 257 x 257
5 – 513 x 513
6 – 1025 x 1025
7 – 2049 x 2049
8 – 4097 x 4097
9 – 8193 x 8193
10 – 16385 x 16385
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1594
l Orientation selects the direction of the slope calculation. Orientation = 0
(default) calculated along the tangential direction. Orientation = 1 cal-
culated along the sagittal direction. Orientation = 2 calculated along the
X-axis direction. Orientation = 3 calculated along the Y-axis direction. Ori-
entation = 4 calculated as the orientation that results in the maximum
slope value.
Derivative of transverse x-aberration with respect to x-pupil coordinate. This is
DXDX the slope of the ray fan plot at the specified pupil coordinate at the wavelength
defined by Wave. See "Hx, Hy, Px, and Py".
Derivative of transverse x-aberration with respect to y-pupil coordinate. This is
DXDY the slope of the ray fan plot at the specified pupil coordinate at the wavelength
defined by Wave. See "Hx, Hy, Px, and Py".
Derivative of transverse y-aberration with respect to x-pupil coordinate. This is
DYDX the slope of the ray fan plot at the specified pupil coordinate at the wavelength
defined by Wave. See "Hx, Hy, Px, and Py".
Derivative of transverse y-aberration with respect to y-pupil coordinate. This is
DYDY the slope of the ray fan plot at the specified pupil coordinate at the wavelength
defined by Wave. See "Hx, Hy, Px, and Py".
Effective focal length in lens units. The wavelength used is defined by Wave. This
EFFL
is paraxial, and may not be accurate for non-paraxial systems.
Effective focal length in air in lens units. This is calculated from the surface
EFLA
defined by Surf to the next. The wavelength used is defined by Wave.
Effective focal length in the local x plane of the range of surfaces defined by Surf1
EFLX
and Surf2 at the primary wavelength.
Effective focal length in the local y plane of the range of surfaces defined by Surf1
EFLY
and Surf2 at the primary wavelength.
Effective F/#. This operand computes the Effective F/# of the field point defined
by Field. For a discussion of Effective F/# see “Effective F/#”. The other parameters
are:
EFNO
Samp: The grid size. A value of 10 would yield a 10 x 10 grid of rays.
Wave: The wavelength number to use.
Pol?: Set to 0 to ignore polarization and 1 to consider it. See also RELI.
End execution. Terminates the computation of the merit function. All remaining
ENDX
operands are ignored.
Entrance pupil position in lens units, with respect to the first surface. This is the
ENPP
paraxial pupil position, valid only for centered systems.
EPDI Entrance pupil diameter in lens units.
Edge Response Function Position. This operand computes the x or y position of
the point at which the edge response function reaches a certain relative value. For
details on the edge response function calculation, see “Geometric Line/Edge
ERFP
Spread”. The Sampling value is 1 for
32x32, 2 for 64x64, etc. Wave is the wavelength number or 0 for polychromatic.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1595
Field is the field number. Type determines that data to be returned. If Type is 0 or
1, the x position (for edges parallel to the local y axis) or y position (for edges
parallel to the local x axis) relative to the chief ray in lens units is returned. If Wave
is zero, the primary wavelength chief ray is the reference point. If Type is 2 or 3,
the x or y position in lens units relative to the surface vertex is returned. Fraction
is the relative value of the edge response curve, and must be between 0.01 and
0.99. Max Radius is the maximum radial size of the integration window in
micrometers. If Max Radius is zero a default value is used, and this is the
recommended setting in most cases.
Note that the edge response function is normally defined with the “bright” side of
the edge being on the + side of the integration coordinate, which means the
edge response goes to 1 as the coordinate becomes more positive. To compute
results for the reversed edge orientation, with the bright side on the negative side
of the coordinate, use the value (1-fraction) instead of (fraction). For example, to
get the 80% response coordinate for a reversed edge, use Fraction = 0.20.
If afocal mode is used, all returned values are in afocal analysis units.
Equal operand. This operand constrains all operands within the range of
operands defined by Op#1 and Op#2 to have the same value within the tolerance
specified by the target. The value of this operand is computed by finding the
EQUA
average of the range of values, and then summing the absolute value of the
errors between each operand and the average if the error exceeds the target
value. See SUMM and OSUM.
Edge thickness greater than. This boundary operand constrains the edge
thickness of the surface defined by Surf to be greater than the specified target
value. The edge thickness is calculated along the +y axis if Code is zero, the +x
ETGT
axis if Code is 1, the -y axis if Code is 2, and the -x axis if Code is 3. This operand
has a mode flag. Mode = 0 (default) to use Mech Semi-Dia and Mode = 1 to use
Clear Semi-Dia value displayed on the Lens Data Editor. See also MNET.
Edge thickness less than. This boundary operand constrains the edge thickness of
the surface defined by Surf to be less than the specified target value. The edge
thickness is calculated along the +y axis if Code is zero, the +x axis if Code is 1,
ETLT
the -y axis if Code is 2, and the -x axis if Code is 3. This operand has a mode flag.
Mode = 0 (default) to use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia
value displayed on the Lens Data Editor. See also MXET.
Edge thickness value. Constrains the edge thickness of the surface defined by
Surf to be equal to the specified target value. The edge thickness is calculated
along the +y axis if Code is zero, the +x axis if Code is 1, the -y axis if Code is 2,
ETVA
and the -x axis if Code is 3. This operand has a mode flag. Mode = 0 (default) to
use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed on the
Lens Data Editor. See also MNET.
Exit pupil diameter in lens units. This is the paraxial pupil diameter, valid only for
EXPD
centered systems.
EXPP Exit pupil position in lens units, with respect to the image surface. This is the
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1596
paraxial pupil position, valid only for centered systems.
Generalized field curvature, sagittal. The field curvature value for any field point,
at the wavelength defined by Wave. The value is generalized to return reasonable
FCGS
results even for non-rotationally symmetric systems; see “Field
Curvature/Distortion. See "Hx, Hy, Px, and Py".
FCGT Generalized field curvature, tangential; see FCGS.
Field curvature in waves contributed by the surface defined by Surf at the
wavelength defined by Wave. If Surf is zero, the sum for the entire system is used.
FCUR
This is the third order field curvature calculated from the Seidel coefficients, and
is not valid for non-paraxial systems.
Field Data Modify. This operand allows temporary modification of field position
data. The operand allows new field coordinates and vignetting factors (except for
tangential angle, which cannot be modified by this operand) for any field
coordinate. All subsequent operands will use the modified field data. The original
field data is restored when a FDRE operand is reached with the same field number
argument, or a CONF operand is reached (regardless of the configuration number
FDMO
referenced by the CONF operand), or after the last operand in the merit function
is reached.
Field: The field number to modify.
Hx, Hy: The normalized field coordinates for the new field position.
VDX, VDY, VCX, VCY: The vignetting factor data for the new field position. See
“Vignetting factors”.
FDRE Field Data Restore. See FDMO. Field: The field number to restore.
Fiber coupling efficiency for single mode fibers. The calculated value is the total
coupled energy efficiency, relative to unity. The parameters of this operand are:
Samp: The pupil sampling, where 1 yields 32 x 32, 2 yields 64 x 64 etc.
Wave: The wavelength number to use.
Field: The integer field position number.
IgSrc: If this parameter is zero, then the object source fiber is considered;
otherwise, the object source fiber is ignored.
Sna: The source fiber NA.
FICL Rna: The receiver fiber NA.
Data: This controls what data is returned as well as the algorithm to use. If Data is
0, the fast algorithm is used and the power coupling is returned. If Data is 1, the
Huygens algorithm is used and the power coupling is returned. If Data is 2 or 4,
the fast algorithm is used and the real or imaginary part of the amplitude
coupling is returned, respectively. If Data is 3 or 5, the Huygens algorithm is used
and the real or imaginary part of the amplitude coupling is returned, respectively.
Pol?: Set to 0 to ignore polarization and 1 to consider it.
See “Fiber Coupling Efficiency” for details. See also FICP.
Fiber coupling as computed using the Physical Optics Propagation (POP)
FICP algorithm, using whatever the current default settings are for the POP feature.
Surf: This controls the end surface used in the POP calculation. If Surf is zero,
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1597
then the saved ending surface number will be used; otherwise, the specified
surface will be used as the ending surface.
Wave: This controls the wavelength used in the POP calculation. If Wave is zero,
then the saved wavelength number will be used; otherwise, the specified
wavelength number will be used.
Data: This controls what data is returned. If Data is 0 the total power coupling is
returned. If Data is 1, the amplitude coupling for the Ex field is returned. If Data is
2 or 3, the real or imaginary part of the amplitude coupling for the Ex field is
returned, respectively. If Data is 4, the amplitude coupling for the Ey field is
returned. If Data is 5 or 6, the real or imaginary part of the amplitude coupling for
the Ey field is returned, respectively. If the beam is unpolarized the Ey values wil
be zero.
Data inputs 1-6 request a polarized POP calculation, but if the input beam is
unpolarized, the field coupling efficiency amplitudes and phases are not
physically well-defined. Therefore, values of 0.0 will be returned if the input beam
is unpolarized.
To use this operand, first define the settings on the POP analysis feature as
desired, then press Save on the settings box. The operand FICP will return the
same efficiency as computed by the POP feature.
Field: This controls the field number used in the POP calculation. If Field is zero,
then the saved field number will be used; otherwise, the specified field number
will be used.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1598
2: Maximum z increment. This is the biggest difference between adjacent z
control points.
3: Minimum z increment. This is the smallest difference between adjacent z
control points.
4: Minimum y value. This value is for the entire length of the solid, not just at
control points.
5: Maximum y value. This value is for the entire length of the solid, not just at
control points.
6: Maximum y increment. This is the biggest difference between adjacent y
control points.
7: Minimum y increment. This is the smallest difference between adjacent y
control points.
8: Volume of the object in lens units cubed.
9: Monotonic deviation. This is the largest change in adjacent y values whose sign
deviates from the sign of the first y change going from 0 to positive z
coordinates.
10: Minimum slope.
11: Maximum slope.
Once the Data has been computed, the Mode value determines how the operand
behaves. If Mode is 1, the FREZ operand returns the data. If Mode is 2, the
operand returns the data value only if the data value is less than the target value,
otherwise the target value is returned. This mode is used to enforce a “greater
than” boundary on the data. If Mode is 3, the operand returns the data value only
if the data value is greater than the target value, otherwise the target value is
returned. This mode is used to enforce a “less than” boundary on the data.
Full thickness greater than. This boundary operand constrains the full thickness of
surface Surf to be greater than the specified target value. The full thickness is
computed at 200 points between the vertex and edge along the +y radial
direction, including the sag of the surface and the sag of the next surface. This
FTGT
operand has a mode flag. Mode = 0 (default) to use Mech Semi-Dia and Mode =
1 to use Clear Semi-Dia value displayed on the Lens Data Editor. The operand is
useful for constraining surfaces which do not have their minimum or maximum
thickness at the center or edge, but at some intermediate zone. See FTLT.
FTLT Full thickness less than. See FTGT.
Ghost angle of incidence. This operand calculates the angle of incidence of a ray
in degrees at any surface after a double-bounce ghost reflection.
The Surf1 and Surf2 values define the first and second surface numbers to define
the ghost path. Note the first bounce surface number must be larger than the
GAOI second bounce surface number. The primary wavelength is always used. Surf3
determines the surface at which the angle of incidence is computed and has to be
greater than Surf2. When Surf3 is negative, its absolute value directly specifies the
surface number in the ghost system. See “Ghost Focus Generator” for more
information of ghost systems. By default, the SetVig = 0. When SetVig = 1,
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1599
vignetting factors are set for the ghost system when calculating the angle of
incidence. Note that setting vignetting factors will cause beams to fully pass all
surface apertures when possible by shifting and shrinking the beams. See
“Vignetting.”
Note that if Surf2 is a mirror in the original system, the beam cannot reach the
image surface in ghost system. Therefore Surf3 can only be 0 or negative. Surf3 =
0 represents the last surface in the ghost system, which is the object surface in the
original system.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1600
Gaussian beam (skew) size in the optical space following the specified surface.
GBSS
See GBSD.
Gaussian beam (skew) waist in the optical space following the specified surface.
GBSW
See GBSD.
Glass cost. This operand returns the relative cost factor as listed in the glass
GCOS
catalog for the glass on the surface defined by Surf.
Geometric Encircled Energy (distance). This operand computes the distance to
the fraction of geometric encircled, ensquared, x only, or y only (enslitted) energy
defined by Frac. For focal mode, the units are micrometers. For afocal mode, the
units are afocal mode units. The other parameters are:
Samp: The pupil sampling, where 1 yields 32 x 32, 2 yields 64 x 64 etc.
Wave: The wavelength number to use (use 0 for polychromatic).
GENC Field: The field number.
Type: 1 for encircled, 2 for x only, 3 for y only, and 4 for ensquared.
Refp: The reference point to use. Use 0 for chief ray, 1 for centroid, 2 for vertex,
and 3 for middle of the spot.
No Diff Lim: If 0, the results are scaled by the diffraction limit, otherwise, no
accounting of diffraction is done.
See also GENF, DENC, DENF, and XENC.
Geometric Encircled Energy (fraction). This operand computes the fraction of
geometric encircled, ensquared, x only, or y only (enslitted) energy at a given
GENF distance from the reference point defined by Dist. The options and settings are
identical to GENC, except Dist, which here is used as the distance at which the
fraction of energy is desired. See also GENC, DENC, DENF, and XENC.
GLCA Global x-direction orientation vector component of the surface defined by Surf.
GLCB Global y-direction orientation vector component of the surface defined by Surf.
GLCC Global z-direction orientation vector component of the surface defined by Surf.
Global Coordinate Rotation Matrix component at the surface defined by Surf. The
GLCR 3 x 3 R matrix has 9 components. If Data is 1, GLCR returns R[1][1], if Data is 2,
GLCR returns R[1][2], etc... through Data = 9 returning R[3][3].
GLCX Global vertex x-coordinate of the surface defined by Surf.
GLCY Global vertex y-coordinate of the surface defined by Surf.
GLCZ Global vertex z-coordinate of the surface defined by Surf.
Geometric MTF average of sagittal and tangential response. The parameters are:
Samp: Higher sampling yields higher accuracy at the expense of computation
time. To confirm the computation has acceptable accuracy, start at 1, and
increment the sampling until the results change by less than the desired accuracy.
GMTA Note that extreme precision is not required for good optimization results; three
significant figures is usually adequate.
Wave: The wavelength number to use (use 0 for polychromatic).
Field: The field number.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1601
Freq: The spatial frequency in MTF units (see “MTF Units”).
!Scl: If zero, then the diffraction limit will be used to scale the results
(recommended) otherwise, no scaling is done.
If Grid is zero, a fast, sparse sampling integration method is used to compute the
MTF. The fast Geometric MTF algorithm is only accurate for systems with circular
or elliptical pupils with modest or no apodization. For systems that violate this
assumption, set Grid equal to 1. The fast sampling method used by GMTA, GMTS,
and GMTT is not directly related to the Geometric MTF Analysis feature. Because
only a single spatial frequency is required, the method of computation used by
the MTF operands is different, and generally much faster, than the algorithm used
by the analysis feature. To select the alternate grid-based algorithm used by the
Geometric MTF analysis feature, set Grid equal to 1. The grid-based algorithm is
usually slower than the default algorithm if the MTF is reasonably good (greater
than 5%), but the grid algorithm converges faster if the aberrations are very large
and the resulting MTF is very low.
If both the tangential and sagittal MTF are needed; place the GMTT and GMTS
operands on adjacent lines and they will be computed simultaneously. The
Geometric MTF, though approximate, can usually be computed more quickly
than the Diffraction MTF, and is therefore useful for optimization. See
“Performing an optimization”.
Geometric MTF minimum of sagittal and tangential response. See GMTA for
GMTN
details.
GMTS Geometric MTF sagittal response. See GMTA.
GMTT Geometric MTF tangential response. See GMTA.
Geometric MTF maximum of sagittal and tangential response. See GMTA for
GMTX
details.
TrueFreeForm surface constraints. This operand computes various values from
the shape of a TrueFreeForm surface. Surf is the surface number. The Data value
determines what value is computed by the operand as follows:
1: Minimum Z value.
2: Maximum Z value.
Once the Data has been computed, the Mode value determines how the operand
behaves. The Mode parameter works as follows:
2: Returns the data value only if the data value is less than the target value,
otherwise the target value is returned. This mode is used to enforce a “greater
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1602
than” boundary on the data.
3: Returns the data value only if the data value is greater than the target value,
otherwise the target value is returned. This mode is used to enforce a “less than”
boundary on the data.
Skips all operands between the GOTO operand line and the operand number
GOTO
defined by Op#. Execution of the merit function will start again at the Op# line.
Ghost pupil image. GPIM controls the location of ghost pupils (and optionally
ghost images) relative to the image surface. Double-bounce ghosts form images
of the pupil, and if these images are formed near the focal plane they will
contaminate the image with unwanted light. This is the cause of the familiar “sun
flare” images of the pupil seen through camera lenses pointed near the sun.
The operand computes any one specific or all possible ghost pupil image
locations and returns one over the absolute value of the distance from the image
surface to the closest pupil ghost. The operand is defined in this manner so it can
be targeted to zero and weighted and optimized to reduce ghost pupil affects. If
the Surf1 and Surf2 parameters are set to specific surface numbers, that specific
ghost path is computed, if either or both of the Surf1 and Surf2 values are -1,
GPIM then all possible surface combinations are considered. For example, if Surf1 is 12
and Surf2 is -1, then all double bounces that first bounce off surface 12 and then
11, 10, 9, etc. are considered. If both numbers are negative, all possible ghosts are
considered.
This same operand also can be used for detecting and controlling image ghosts
(which are distinct from pupil ghosts) by changing Mode from 0 to 1, or to
control ghost pupil magnification (the ratio of the ghost exit pupil diameter to
entrance pupil diameter), by setting Mode to 2.
The WFB and WSB columns will list the worst combination found for reference
and possible further analysis. Only surfaces with index changes are considered as
possible ghost generators. First bounces off mirrors are ignored.
See also GPRT, GPRX, GPRY, GPSX, and GPSY.
Ghost ray transmission. This operand computes the unpolarized transmission of
any ray from object to image surface for a double-bounce ghost path. The Surf1
and Surf2 values define the first and second surface numbers to define the ghost
path. Note the first bounce surface number must be larger than the second
bounce surface number. The primary wavelength is always used.
GPRT makes no changes to the field or aperture specifications, and therefore
may return meaningless results if the field or aperture data are defined in a way
GPRT
that changes the ghost path. No warning is issued in these cases. For example,
using GPRT while using image height for field points or using image space F/# for
the system aperture type will likely return useless results. The recommended
approach is to use field angles or object heights, use entrance pupil diameter,
and place the stop prior to the first bounce surface. To study the double bounce
system in detail see “Ghost Focus Generator”.
See "Hx, Hy, Px, and Py".
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1603
Ghost ray real x coordinate. This operand is similar to GPRT, see that discussion
GPRX for assumptions and limitations. The returned value is the x coordinate of the real
ray on the image surface.
Ghost ray real y coordinate. This operand is similar to GPRT, see that discussion
GPRY for assumptions and limitations. The returned value is the y coordinate of the real
ray on the image surface.
Ghost ray paraxial x coordinate. This operand is similar to GPRT, see that
GPSX discussion for assumptions and limitations. The returned value is the x coordinate
of the paraxial ray on the image surface.
Ghost ray paraxial y coordinate. This operand is similar to GPRT, see that
GPSY discussion for assumptions and limitations. The returned value is the y coordinate
of the paraxial ray on the image surface.
Gradient index minimum index. This boundary operand sets the minimum
allowable index of refraction value for the gradient index surface defined by Surf
GRMN at the wavelength defined by Wave. The index is checked at six places: the front
vertex, front +y top, front +x side, rear vertex, rear +y top, and the rear +x side.
See also InGT, InLT and GRMX.
Gradient index maximum index. This boundary operand sets the maximum
allowable index of refraction value for the gradient index surface defined by Surf
GRMX at the wavelength defined by Wave. The index is checked at six places: the front
vertex, front +y top, front +x side, rear vertex, rear +y top, and the rear +x side.
See also InGT, InLT and GRMN.
Glass TCE. This operand returns the Thermal Coefficient of Expansion Alpha1 as
GTCE listed in the glass catalog for the glass on the surface defined by Surf. For non-
glass surfaces, see “TCVA”.
HACG Unused.
Test for the hyperhemisphere condition. OpticStudio traces the specified ray at
the wavelength defined by Wave to the surface defined by Surf, and computes
the x, y, and z intercept coordinates. Then, the x and y coordinates only are used
in the sag expression for that surface to see what z coordinate results. If the z
HHCN coordinates are not the same, then HHCN returns 1, otherwise it returns zero.
This operand can be used to prevent optimizations from reaching solutions that
require hyperhemispheric surface shapes.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1604
IMAE will return the desired data as computed by the image analysis feature.
If Surf is 0, the surface specified by the saved settings will be used. If Surf is
greater than zero, then the data will be computed at the specified surface.
If Field is 0, the field number specified by the saved settings will be used. If Field is
greater than zero, then the data will be computed at the specified field.
If Field Size is 0, the Field Size specified by the saved settings will be used. If Field
Size is greater than zero, then the data will be computed using the specified Field
Size.
Data is 0 for efficiency, 1 for X-centroid, 2 for Y-centroid, or 3-5 for X-, Y- or
Radial-direction RMS, respectively. All values other than efficiency are in lens
units.
If Wave is 0, the wave number specified by the saved settings file will be used. If
Wave is greater than zero, then the data will be computed using the specified
wavelength number.
See the discussion “Optimizing with the IMAE operand”.
Image Surface. This operand dynamically changes which surface is interpreted as
the “image surface” for all subsequent operands. The new image surface is
defined by Surface. The primary usage for this operand is to optimize image
quality at intermediate surfaces. Set Surface to 0 to restore the image surface
back to the original surface.
If Refocus? is 0, the specified surface becomes the new image surface and is not
modified in any way. If Refocus? is 1, then a dummy plane surface will follow the
specified surface, and a paraxial focus solve will be used to place this dummy
IMSF
surface at the focus of the specified surface. This option is most useful for
optimizing aberrations at a virtual focus for intermediate surfaces that are not
already at focus.
Note this operand only temporarily changes a copy of the lens data use for
evaluating the merit function and has no impact on the original lens data. Care
should be taken when the selected surface precedes the original stop surface. For
information on how this operand is implemented see “Evaluating results at
intermediate surfaces”.
Index of refraction. Returns the current index at the surface defined by Surf at the
INDX
wavelength defined by Wave.
Index “n” greater than. This boundary operand constrains the index of refraction
at the wavelength defined by Wave of the gradient index surface defined by Surf
at one of six points inside the gradient index lens. For n=1, the point is the front
vertex, n=2 is the front +y top, n=3 is the front +x side, n=4 is the rear vertex, n=5
is the rear +y top, and n=6 is the rear +x side. In all cases the operand bounds the
InGT index at the specified point to be greater than the specified target value. For
example, “I4GT” constrains the minimum index at the rear vertex of the surface
(i.e. the vertex of the next surface) of the gradient index lens. In all cases the +y
top and +x side distance is defined by the larger of the front and rear clear semi-
diameters or semi-diameters set on the main spreadsheet. See also GRMN and
GRMX, which are similar operands that are easier to use.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1605
Index “n” less than. This operand is similar to InGT except it constrains the
InLT maximum value of the index of refraction rather than the minimum. See InGT for
a complete description of the parameter “n”.
This operand is similar to InGT except it constrains the current value of the index
InVA
of refraction. See InGT for a complete description of the parameter “n”.
ISFN Image space F/#. This operand is the paraxial infinite conjugate F/#. See WFNO.
Image space numerical aperture. This operand is the paraxial image space na at
ISNA
the defined conjugates. See ISFN.
Lateral color. For focal systems, this is the y-distance between the paraxial chief
ray intercepts of the two extreme wavelengths defined by Minw and Maxw,
LACL measured in lens units. For afocal systems, this is the angle in afocal mode units
between the paraxial chief rays of the two extreme wavelengths defined by Minw
and Maxw.
Lagrange (or optical) invariant of system in lens units at the wavelength defined
LINV
by Wave. The paraxial marginal and chief ray data are used to compute this value.
Log base e of an operand. Op# is the row number of the operand value to take
LOGE
the log of. If the value is less than or equal to zero, the value zero is returned.
Log base 10 of an operand. Op# is the row number of the operand value to take
LOGT
the log of. If the value is less than or equal to zero, the value zero is returned.
Longitudinal aberration, measured in lens units for focal systems and diopters for
afocal systems. This is the defocus from the current image to the image at the
wavelength defined by Wave and pupil zone defined by Zone. If Zone is zero,
LONA paraxial rays are used to determine the paraxial image locations. If Zone is greater
than 0.0 and less than or equal to 1.0, real marginal rays are used to determine
the image locations. In this case, Zone corresponds to the Py coordinate of the
real marginal ray. See AXCL.
This boundary operand constrains the slope of the axial gradient index profile
LPTD from changing signs within a gradient index component for the surface defined
by Surf. See the section “Using gradient index operands”.
Returns the largest value within the indicated range of operands defined by Op#1
MAXX
and Op#2. See MINN.
Multi-configuration operand greater than. This is used to constrain values in the
MCOG multi-configuration editor. Op# defines which multi-configuration operand is
used. Cfg# defines which configuration is used.
Multi-configuration operand less than. This is used to constrain values in the
MCOL
multi-configuration editor. See MCOG.
Multi-configuration operand value. This is used to directly target or compute
MCOV
values in the multi- configuration editor. See MCOG.
Moore-Elliott Contrast, average of sagittal and tangential. This operand uses the
Moore-Elliott Contrast method to optimize the MTF at a given spatial frequency.
MECA
See “Optimizing for MTF” for more information on the Moore-Elliott Contrast
method. The parameters are:
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1606
Wave The wavelength number to use.
Freq The spatial frequency in cycles per millimeter in focal systems and cycles per
afocal unit (see “Afocal Mode Units”) in afocal systems.
See "Hx, Hy, Px, and Py". Also see related operands MECS and MECT.
MECS Moore-Elliott Contrast, sagittal response. See MECA for details.
MECT Moore-Elliott Contrast, tangential response. See MECA for details.
MINN Returns the smallest value within the indicated range of operands. See MAXX.
Minimum Abbe number. This boundary operand constrains the Abbe number of
MNAB surfaces from Surf1 to Surf2 to be greater than the specified target value. See also
MXAB. This operand controls multiple surfaces simultaneously.
Minimum angle of incidence. This boundary operand traces the marginal and
chief rays from defined Field and reports the minimum angle at the surface
defined by Surf.
Surf: The surface number to use. Use Surf = 0 for all surfaces (default).
Wave: The wavelength number to use. Use Wave = 0 for all wavelengths
(default).
Field: The integer field number to use. Use Field = 0 for all fields (default).
Symmetry: Define if X or Y symmetry exists to only trace marginal rays along one
axis. Use Symmetry = 0 to trace all the marginal and gut rays (default). Use
MNAI
Symmetry = 1 for y-symmetric systems (only traces gut and y-marginal rays) and
Symmetry = 2 for x-symmetric systems.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1607
Minimum center thickness. This boundary operand constrains each of the center
thicknesses of surfaces from Surf1 to Surf2 to be greater than the specified target
MNCT
value. See also MNCG and MNCA. This operand controls multiple surfaces
simultaneously.
Minimum curvature. This boundary operand constrains each of the curvatures of
MNCV surfaces from Surf1 to Surf2 to be greater than the specified target value. See also
MXCV. This operand controls multiple surfaces simultaneously.
Minimum diameter to thickness ratio. Controls the minimum allowable value on
the ratio of surface diameter to center thickness of surfaces from Surf1 to Surf2.
This operand has a mode flag. Mode = 0 (default) to use Mech Semi-Dia and
MNDT
Mode = 1 to use Clear Semi-Dia value displayed on the Lens Data Editor. Only
surfaces with non-unity index of refraction are considered. See also MXDT. This
operand controls multiple surfaces simultaneously.
Minimum edge thickness air. This boundary operand constrains each of the edge
thicknesses of surfaces from Surf1 to Surf2 which have air (i.e. no glass) as the
glass type to be greater than the specified target value. See also MNET, MNEG,
ETGT, and XNEA. This operand controls multiple surfaces simultaneously. The
boundary applies to the top “+y” edge of the surface only; see XNEA for
MNEA
constraining non-rotationally symmetric surfaces. Zone, if non zero, scales the
radial aperture at which the thickness is computed. A Zone value of 0.5 would
compute the thickness at 0.5 times the semi-diameter. This operand has a mode
flag. Mode = 0 (default) to use Mech Semi-Dia and Mode = 1 to use Clear Semi-
Dia value displayed on the Lens Data Editor.
Minimum edge thickness glass. This boundary operand constrains each of the
edge thicknesses of surfaces from Surf1 to Surf2 which have a non-air glass type
to be greater than the specified target value. See also MNET, MNEA, ETGT, and
XNEG. This operand controls multiple surfaces simultaneously. The boundary
applies to the top “+y” edge of the surface only; see XNEG for constraining non-
MNEG
rotationally symmetric surfaces. Zone, if non zero, scales the radial aperture at
which the thickness is computed. A Zone value of 0.5 would compute the
thickness at 0.5 times the semi-diameter. This operand has a mode flag. Mode =
0 (default) to use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value
displayed on the Lens Data Editor.
Minimum edge thickness. This boundary operand constrains each of the edge
thicknesses of surfaces from Surf1 to Surf2 to be greater than the specified target
value. See also MNEG, MNEA, ETGT, and XNET. This operand controls multiple
surfaces simultaneously. The boundary applies to the top “+y” edge of the
MNET surface only; see XNET for constraining non-rotationally symmetric surfaces.
Zone, if non zero, scales the radial aperture at which the thickness is computed. A
Zone value of 0.5 would compute the thickness at 0.5 times the semi-diameter.
This operand has a mode flag. Mode = 0 (default) to use Mech Semi-Dia and
Mode = 1 to use Clear Semi-Dia value displayed on the Lens Data Editor.
MNIN Minimum index at d-light. This boundary operand constrains the Nd value of
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1608
surfaces from Surf1 and Surf2 to be greater than the specified target value. See
also MXIN. This operands controls multiple surfaces simultaneously.
Minimum ΔPg, F . This boundary operand constrains the deviation of the partial
dispersion of surfaces between Surf1 and Surf2 to be greater than the specified
MNPD
target value. See also MXPD. This operand controls multiple surfaces
simultaneously.
Minimum real ray angle of exitance. This boundary operand constrains the
minimum ray exit angle over a range of surfaces. The angles are measured in
degrees between the surface normal and the exiting ray at the surface range
MNRE
defined by Surf1 through Surf2 at the wavelength defined by Wave. If Wave is
zero the primary wavelength is used. Note the angle of exitance is always
positive. See also MXRE, MNRI, and MXRI. See “Hx, Hy, Px, and Py”.
Minimum real ray angle of incidence. This boundary operand constrains the
minimum ray incidence angle over a range of surfaces. The angles are measured
in degrees between the surface normal and the incident ray at the surface range
MNRI
defined by Surf1 through Surf2 at the wavelength defined by Wave. If Wave is
zero the primary wavelength is used. Note the angle of incidence is always
positive. See also MNRE, MXRE, and MXRI. See "Hx, Hy, Px, and Py".
Minimum clear semi-diameter or semi-diameter. Constrains the clear semi-
diameter or semi-diameter to be larger than the specified target over the surface
MNSD
range between Surf1 and Surf2. This operand controls multiple surfaces
simultaneously.
Modulation square-wave transfer function, average of sagittal and tangential. See
MSWA
MTFA for details.
Modulation square-wave transfer function, minimum of sagittal and tangential.
MSWN
See MTFA for details.
MSWS Modulation square-wave transfer function, sagittal. See MTFA for details.
MSWT Modulation square-wave transfer function, tangential. See MTFA for details.
Modulation square-wave transfer function, maximum of sagittal and tangential.
MSWX
See MTFA for details.
Diffraction modulation transfer function, average of sagittal and tangential. The
parameters are:
Samp: Higher sampling yields higher accuracy at the expense of computation
time. To confirm the computation has acceptable accuracy, start at 1, and
increment the sampling until the results change by less than the desired accuracy.
Note that extreme precision is not required for good optimization results; three
MTFA significant figures is usually adequate. There are two algorithms available for
computing the MTF. If Grid is zero (recommended), a fast, sparse sampling
integration method is used to compute the MTF. The fast sampling method used
by MTFA, MTFS, and MTFT is not directly related to the MTF Analysis feature.
Because only a single spatial frequency is required, the method of computation
used by the MTF operands is different, and generally much faster, than the
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1609
algorithm used by the analysis feature. To select the alternate grid-based
algorithm used by the MTF analysis feature, set Grid equal to 1. The grid-based
algorithm is usually slower than the default algorithm if the MTF is reasonably
good (greater than 5%), but the grid algorithm converges faster if the aberrations
are very large and the resulting MTF is very low.
Wave: The wavelength number to use (use 0 for polychromatic).
Field: The field number.
Freq: The spatial frequency in MTF units (see “MTF Units”). If the sampling is set
too low for accurate computation of the MTF, then the MTF operands all return
zero.
If both the tangential and sagittal MTF are needed; place the MTFT and MTFS
operands on adjacent lines and they will be computed simultaneously. See
“Performing an optimization”.
Data Type: Specifies the data to be returned. An input of 0 will return the
modulation amplitude; an input of 1 will return the real part; an input of 2 will
return the imaginary part; an input of 3 will return the phase. This input is only
available for the MTFA, MTFS, and MTFT operands (and not the equivalent
square-wave operands).
Modulation transfer function, minimum of sagittal and tangential. See MTFA for
MTFN
details.
MTFS Modulation transfer function, sagittal. See MTFA for details.
MTFT Modulation transfer function, tangential. See MTFA for details.
Modulation transfer function, maximum of sagittal and tangential. See MTFA for
MTFX
details.
Huygens Modulation transfer function, average of sagittal and tangential. This
operand computes the diffraction MTF using the Huygens method (see “Huygens
MTF”). The parameters are:
Samp: The pupil sampling, where 1 yields 32 x 32, 2 yields 64 x 64 etc. The
sampling is assumed to be the same for both pupil and image.
Wave: The wavelength number to use (use 0 for polychromatic).
Field: The field number.
Freq: The spatial frequency in MTF units (see “MTF Units”). If the sampling is set
too low for accurate computation of the MTF, then the MTF operands all return
MTHA zero.
Pol?: Set to 0 to ignore polarization and 1 to consider it.
All Conf?: Set to 0 to use the current configuration (defined by the last CONF
operand preceding this operand), and 1 to sum over all configurations. See
“Huygens MTF” for a full discussion of this option.
Ima Delta: The image delta in micrometers used for the computation. If zero, the
default image delta is used.
If both the tangential and sagittal MTF are needed; place the MTHT and MTHS
operands on adjacent lines and they will be computed simultaneously. See
“Performing an optimization”.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1610
Huygens modulation transfer function, minimum of sagittal and tangential. See
MTHN
MTHA for details.
MTHS Huygens Modulation transfer function, sagittal. See MTHA for details.
MTHT Huygens Modulation transfer function, tangential. See MTHA for details.
Huygens modulation transfer function, maximum of sagittal and tangential. See
MTHX
MTHA for details.
Maximum Abbe number. This boundary operand constrains the Abbe number of
MXAB surfaces from Surf1 to Surf2 to be less than the specified target value. See also
MNAB. This operand controls multiple surfaces simultaneously.
Maximum angle of incidence. This boundary operand traces the marginal and
MXAI chief rays from defined Field and reports the maximum angle at the surface
defined by Surf. See MNAI for more details about the input parameters.
Maximum center thickness air. This boundary operand constrains each of the
thicknesses of surfaces from Surf1 to Surf2 which have air (i.e. no glass) as the
MXCA
glass type to be less than the target value. See also MXCT and MXCG. This
operand controls multiple surfaces simultaneously.
Maximum center thickness glass. This boundary operand constrains each of the
center thicknesses of surfaces from Surf1 to Surf2 which have a non-air glass type
MXCG
to be less than the target value. See also MXCT and MXCA. This operand controls
multiple surfaces simultaneously.
Maximum center thickness. This boundary operand constrains each of the center
thicknesses of surfaces from Surf1 to Surf2 to be less than the specified target
MXCT
value. See also MXCG and MXCA. This operand controls multiple surfaces
simultaneously.
Maximum curvature. This boundary operand constrains each of the curvatures of
MXCV surfaces from Surf1 to Surf2 to be less than the specified target value. See also
MNCV. This operand controls multiple surfaces simultaneously.
Maximum diameter to thickness ratio. Controls the maximum allowable value on
the ratio of surface diameter to center thickness from Surf1 to Surf2. This operand
has a mode flag. Mode = 0 (default) to use Mech Semi-Dia and Mode = 1 to use
MXDT
Clear Semi-Dia value displayed on the Lens Data Editor. Only surfaces with non-
unity index of refraction are considered. See also MNDT. This operand controls
multiple surfaces simultaneously.
Maximum edge thickness air. This boundary operand constrains each of the edge
thicknesses of surfaces from Surf1 to Surf2 which have air (i.e. no glass) as the
glass type to be less than the specified target value. See also MXET, MXEG, ETLT,
and XXEA. This operand controls multiple surfaces simultaneously. The boundary
MXEA applies to the top “+y” edge of the surface only; see XXEA for constraining non-
rotationally symmetric surfaces. Zone, if non zero, scales the radial aperture at
which the thickness is computed. A Zone value of 0.5 would compute the
thickness at 0.5 times the semi-diameter. This operand has a mode flag. Mode =
0 (default) to use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1611
displayed on the Lens Data Editor.
Maximum edge thickness glass. This boundary operand constrains each of the
edge thicknesses of surfaces from Surf1 to Surf2 which have a non-air glass type
to be less than the target value. See also MXET, MXEA, ETLT, and XXEG. This
operand controls multiple surfaces simultaneously. The boundary applies to the
top “+y” edge of the surface only; see XXEG for constraining non- rotationally
MXEG
symmetric surfaces. Zone, if non zero, scales the radial aperture at which the
thickness is computed. A Zone value of 0.5 would compute the thickness at 0.5
times the semi-diameter. This operand has a mode flag. Mode = 0 (default) to
use Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed on the
Lens Data Editor.
Maximum edge thickness. This boundary operand constrains each of the edge
thicknesses of surfaces from Surf1 to Surf2 to be less than the specified target
value. See also “MXEG”, “MXEA”, “ETLT”, and “XXET”. This operand controls
multiple surfaces simultaneously. The boundary applies to the top “+y” edge of
MXET the surface only; see XXET for constraining non-rotationally symmetric surfaces.
Zone, if non zero, scales the radial aperture at which the thickness is computed. A
Zone value of 0.5 would compute the thickness at 0.5 times the semi-diameter.
This operand has a mode flag. Mode = 0 (default) to use Mech Semi-Dia and
Mode = 1 to use Clear Semi-Dia value displayed on the Lens Data Editor.
Maximum index at d-light. This boundary operand constrains the Nd value of
MXIN surfaces between Surf1 and Surf2 to be less than the specified target value. See
also MNIN. This operand controls multiple surfaces simultaneously.
Maximum Δ Pg, F . This boundary operand constrains the deviation of the partial
dispersion of surfaces between Surf1 and Surf2 to be less than the specified
MXPD
target value. See also MNPD. This operand controls multiple surfaces
simultaneously.
Maximum real ray angle of exitance. This boundary operand constrains the
maximum ray exit angle over a range of surfaces. The angles are measured in
degrees between the surface normal and the exiting ray at the surface range
MXRE
defined by Surf1 through Surf2 at the wavelength defined by Wave. If Wave is
zero the primary wavelength is used. Note the angle of exitance is always
positive. See also MNRE, MNRI, and MXRI. See "Hx, Hy, Px, and Py".
Maximum real ray angle of incidence. This boundary operand constrains the
maximum ray incidence angle over a range of surfaces. The angles are measured
in degrees between the surface normal and the incident ray at the surface range
MXRI
defined by Surf1 through Surf2 at the wavelength defined by Wave. If Wave is
zero the primary wavelength is used. Note the angle of incidence is always
positive. See also MNRE, MNRI, and MXRE. See "Hx, Hy, Px, and Py".
Maximum clear semi-diameter or semi-diameter. Constrains the clear semi-
MXSD diameter or semi-diameter to be less than the specified target over the surface
range from Surf1 to Surf2.
NORD Normal distance to the next surface. This operand computes the surface normal
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1612
vector at the coordinate defined by X and Y on the surface defined by Surf, then
returns the distance to the next surface measured along the normal vector.
Normal vector x component. This operand returns the x component of the
surface normal vector at the coordinate defined by X and Y on the surface
NORX
defined by Surf. If Global is zero, the vector is in surface local coordinates, if
Global is 1, the vector is in global coordinates.
Normal vector y component. This operand returns the y component of the
surface normal vector at the coordinate defined by X and Y on the surface
NORY
defined by Surf. If Global is zero, the vector is in surface local coordinates, if
Global is 1, the vector is in global coordinates.
Normal vector z component. This operand returns the z component of the
surface normal vector at any coordinate defined by X and Y on the surface
NORZ
defined by Surf. If Global is zero, the vector is in surface local coordinates, if
Global is 1, the vector is in global coordinates.
Non-sequential PAF file. “PAF File” defines the name of the PAF file to be saved
NPAF (up to 140 characters).
This operand must come before the NSTR operand in the Merit Function.
Non-sequential parameter greater than. Surf defines the surface number of the
NPGT NSC group (always 1 in pure NSC systems). Object defines the object number in
the NSC group. The parameter number is defined by Param.
NPLT Non-sequential parameter less than. See NPGT.
NPVA Non-sequential parameter value. See NPGT.
Non-sequential object position x greater than. Surf defines the surface number of
the NSC group (always 1 in pure NSC systems). Object defines the object number
NPXG in the NSC group.
If Ref? is 1, the coordinates are relative to the origin of the NSC coordinate
system or entry port. If Ref? is 2, then the coordinates are relative to the global
coordinate reference surface.
NPXL Non-sequential object position x less than. See NPXG.
NPXV Non-sequential object position x value. See NPXG.
NPYG Non-sequential object position y greater than. See NPXG.
NPYL Non-sequential object position y less than. See NPXG.
NPYV Non-sequential object position y value. See NPXG.
NPZG Non-sequential object position z greater than. See NPXG.
NPZL Non-sequential object position z less than. See NPXG.
NPZV Non-sequential object position z value. See NPXG.
Non-sequential coherent data. Surf defines the surface number of the NSC group
NSDC (always 1 in pure NSC systems). Det# refers to the object number of the desired
detector.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1613
If Pix# is a positive integer, then the data from the specified pixel is returned. If
Pix# is zero, then the sum of the data for all pixels for that detector object is
returned.
Data is 0 for real, 1 for imaginary, 2 for amplitude, and 3 for power. See “User
defined operands” for complete details.
Non-sequential incoherent intensity data. Surf defines the surface number of the
NSC group (always 1 in pure NSC systems). Det# refers to the object number of
the desired detector. If Det# is zero, then all detectors are cleared. If Det# is less
than zero, then the detector defined by the absolute value of Det# only is cleared.
Note that one NSDD operand clearing all detectors must be present prior to any
subsequently defined NSDD operands.
For Detector Rectangles, Detector Surfaces, and all faceted detectors: If Pix# is a
positive integer greater than zero, then the data from the specified pixel is
returned. Otherwise, the following data is returned depending upon the value of
Pix#:
0: Total flux in position space for all pixels when Data = 0. Average flux/area in
position space when Data = 1. Total flux in angle space for all pixels when Data =
2. Note, by default, the angle space of Detector Rectangle is fully defined by -90
~ 90 degrees in both X and Y directions, and thus the value of Data = 0 and 2 will
be same.
-3: Number of total rays striking the detector for all pixels. Data is no used when
Pix# is set to this value.
-4: Standard deviation (RMS from the mean) of all the non-zero pixel data.
-6, -7, -8: The x, y, or z coordinate of the position or angle Irradiance or Intensity
centroid, respectively. Note for Detector Rectangle, the value for Data = 0 and 1
will be same because all pixels have same size.
-9,-10, -11, -12, -13: The weighted RMS radius, x, y, z, or xy cross term distance or
angle of all the pixel data with respect to the centroid. These are the square root
of the variance or second moments r^2, x^2, y^2, z^2, and xy, respectively.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1614
where wi is a weight equal to the value of the pixel based on Data, xi is the x-
coordinate of the pixel and x* is the weighted mean.
Note for Detector Rectangle, the value for Data = 0 and 1 will be same because all
pixels have same size. Calculations for y* are analogous to those for x*.
-14, -15: The Geometric MTF in X or Y direction. Results will only be available for
Data = 0 or Data = 1, and the results will be the same for both Data inputs.
Data is 0 for flux, 1 for flux/area, 2 for flux/solid angle pixel, 3 for normalized flux,
4 for absorbed flux, and 5 for absorbed flux/area. Note Data = 2 is only available
for Detector Rectangle, which records data in angle space. Only values 0 and 1
(for flux and flux/area) are supported for faceted detectors. A value of 3 is only
supported when Pix# is a positive integer; in this case the returned flux for the
pixel is normalized to the peak flux for all consecutive NSDD operands in the
Merit Function Editor which refer to the same surface and detector. A value of 3
should generally be used only as a part of the NSC Bitmap Merit Function (see
“NSC Bitmap Merit Function Tool”).
For Detector Rectangles only: If Pix# is not a positive integer, then a number of
edge pixels may be ignored in the calculation if desired. The number of edge
pixels that will be ignored is given by the # Ignored input. For non-zero values of
# Ignored, the number of pixels accounted for in the calculation will be reduced
along all boundaries of the detector. For example, if a detector has 100 pixels in X
and 200 pixels in Y and the # Ignored value is 2, then the calculation will be based
upon detector data from 96 pixels in X and 196 pixels in Y, with data from the last
2 edge pixels along the left, right, bottom and top boundaries all ignored. The
only calculation not affected by the # Ignored input is the number of rays striking
the detector, as given by Pix # = -3 (in addition to all values calculated for
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1615
positive integer inputs to Pix #).
For Detector Volumes: Pix# is interpreted as the voxel number. For Data values of
0, 1, or 2, the returned value is incident flux, absorbed flux, or absorbed flux per
unit volume, respectively. If Pix# is zero, the value returned is the sum for all
pixels.
For Object Is A Detector: There are two additional options for data. Data is 4 for
absorbed flux and 5 for absorbed flux/area.
For Detector Color objects, use NSDE instead. For Detector Polar objects, use
NSDP.
If Pix# is a positive integer greater than zero, then the data from the specified
pixel is returned. Otherwise, the following data is returned depending upon the
value of Pix#: 0: Sum of all data for all pixels on the detector. For chromaticity
coordinates this is the average over all pixels in the detector that have non-zero
lumen values. If Pix# is zero the <area> values described below are the area of
the entire detector, measured in analysis units for position space data or solid
angle in steradians for angle space data.
Data is an integer code that defines the type of data to return, defined as follows:
2: power/area in <aprefix> watts per <area> where <aprefix> is the analysis units
prefix. If Angle? is 0 <area> is the area in analysis units. If Angle? is 1 then <area>
is solid angle in steradians.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1616
is 0 <area> is the area in analysis units. If Angle? is 1 then <area> is solid angle in
steradians.
9/10/11: CIE 1931 tristimulus X/Y/Z value in lumens per <area>. If Angle? is 0
<area> is the area in analysis units. If Angle? is 1 then <area> is solid angle in
steradians.
12/13: Color Rendering Index (CRI) and Correlated Color Temperature (CCT), the
latter value in Kelvin. These values are only returned if the option to “Record
Spectral Data” has been selected for the Detector Color object (only available in
OpticStudio-Premium) and if the Pix# and Angle? are both zero. The returned
values are based on the variation of flux with wavelength over the entire detector.
14/15/16: Normalized CIE 1931 tristimulus X/Y/Z value. Identical to the values
returned by Data 9, 10, and 11, but normalized to the peak tristimulus Y value for
all consecutive NSDE operands in the Merit Function Editor which refer to the
same surface and detector. Generally used only as a part of the NSC Bitmap Merit
Function (see “NSC Bitmap Merit Function Tool”). Only valid if Pix# is a positive
integer and Angle? is zero.zero.
Wavelength specifies which Spectral Bin's data is calculated for centroid X/Y and
RMS radius/X/Y. If the value of Wavelength is inside one Bin's Spectral Range, the
Bin's data will be selected for calculation. See "Record Spectral Data" for details of
Spectral Binning.
If Pix# is not a positive integer, then a number of edge pixels may be ignored in
the calculation if desired. The number of edge pixels that will be ignored is given
by the # Ignored input. For non- zero values of # Ignored, the number of pixels
accounted for in the calculation will be reduced along all boundaries of the
detector. For example, if a detector has 100 pixels in X and 200 pixels in Y and the
# Ignored value is 2, then the calculation will be based upon detector data from
96 pixels in X and 196 pixels in Y, with data from the last 2 edge pixels along the
left, right, bottom and top boundaries all ignored.
Calculations that are not affected by the # Ignored input are the number of rays
striking the detector, as given by Pix # = -3, and the CRI and CCT values, as given
by Data = 12 and Data = 13, respectively (the # Ignored input also does not affect
any values calculated for positive integer inputs to Pix #). If the source units are
joules, then the data 1 and 2 are in joules and data 3 and 4 are in talbots. See
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1617
“Units”. See also NSDD and NSDP.
Non-sequential Detector Polar object data. Surf defines the surface number of
the NSC group (always 1 in pure NSC systems). Det# refers to the object number
of the desired detector. If Det# is zero, then all detectors are cleared. If Det# is
less than zero, then the detector defined by the absolute value of Det# only is
cleared.
If Pix# is a positive integer greater than zero, then the data from the specified
pixel is returned. Otherwise, the following data is returned depending upon the
value of Pix#:
0: Sum of all data for all pixels on the detector. For chromaticity coordinates this
is the average over all pixels in the detector that have non-zero lumen values.
-1: Maximum data.
-2: Minimum data.
-3: Number of rays striking the detector.
-4: The radial RMS in degrees of the distribution with respect to 0 degrees. If Pix#
NSDP is set equal to -
4, then the only valid inputs for Data are 1 or 3. All other inputs will return a value
of zero.
Data is an integer code that defines the type of data to return, defined as follows:
1: power in <sprefix> watts where <sprefix> is the source units prefix.
2: power/solid angle in <sprefix> watts per steradian where <sprefix> is the
source units prefix.
3: power in <sprefix> lumen where <sprefix> is the source units prefix.
4: power/solid angle in <sprefix> lumens per steradian where <sprefix> is the
source units prefix.
5/6: CIE 1931 chromaticity coordinate x/y.
7/8: CIE 1976 chromaticity coordinate u’/v’.
9/10/11: CIE 1931 tristimulus X/Y/Z value in lumens/steradian.
If the source units are joules, then the data 1 and 2 are in joules and data 3 and 4
are in talbots. See “Units”. See also NSDD and NSDE.
Non-sequential LightningTrace. This operand traces mesh rays as defined by the
LightningTrace analysis. Surf is the surface number of the Non-sequential surface.
Src# refers to the object number of the desired source from which to trace mesh
rays. If Src# is zero, rays will be traced from all sources. Ray Samp defines the
sampling to use in defining the ray mesh: 0 = Low (1X), 1 = 4X, 2 = 16X, 3 = 64X, 4
= 256X, 5 = 1024X. Edge Samp defines the sampling to use for resolving the ray
mesh around the edges of objects, with the same interpretation for the numeric
NSLT
inputs as for Ray Samp (but with inputs only going from 0 to 4). RT? defines
whether mesh rays should be traced (when RT? = 0) or whether all analysis rays
should be traced using conventional ray tracing (when RT? = 1). If RT? = 1, then
this operand will act just like the NSTR operand with polarization, splitting, and
scattering all turned off.
An NSDD, NSDE, or NSDP operand with Det# set equal to 0 must be included in
the merit function prior to this operand.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1618
See “The LightningTrace Control” for more information. See also NSTR.
Non-sequential single ray trace. Src# refers to the object number of the desired
source. This source must be defined to trace just a single analysis ray. If Splt? is
non-zero, then splitting is on. If Pol? is non-zero then polarization will be used. If
splitting is on polarization is automatically selected.
Scattering is always turned off for this feature, since scattering introduces random
paths for the child rays, which is not suitable for optimization. Errors are always
considered.
If multiple NSRA operands trace the same ray are adjacent in the merit function
editor, the ray will only be traced once for efficiency.
Seg# refers to the segment number that contains the data to be returned. Use -1
for the last segment.
Use Data values 10-15 for path-to, intensity, phase of, phase at, index, and
starting phase, respectively. Note that the phase at value is not modulo 2*pi, as is
the case with ZRD files.
NSRA
Use Data values 16-17 for the sum of the path, or optical path, respectively, in
lens units from the source to the end of the specified segment. These values do
not include the phase of diffractive surfaces.
Use Data values 21-26 for Ex real, Ex imaginary, Ey real, Ey imaginary, Ez real, and
Ez imaginary, respectively. Polarization must be on for real and imaginary data to
be returned.
Use Data value 27-29 for the phase of Ex, Ey, and the phase difference between
Ex and Ey, respectively. All values are in radians. Polarization must be on for valid
data to be returned.
Use Data values 31-39 for the coordinate data defined by Data values 1-9
converted to coordinates relative to the global coordinate reference surface.
Source # refers to the element number to use if the source is an array; see the
“Sources” settings in the Object Properties for the numbering scheme.
Note the segments NSRA is not listed in same order as in ZRD. For example, for a
same ray, the segment with Seg# =17 in NSRA is not same to the 17th segment
listed in ZRD.
Note the phase_at (Data = 13) is referenced to the center of the pixel where the
ray hits on the detector. See more explanations in section "Ray database (ZRD)
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1619
files".
For more information on these data items see “The ZRD Uncompressed Full Data
Format (UFD)”.
Non-sequential Ray Database. “ZRD file” defines the name of the ZRD file to be
saved. (up to 140 characters)
If the “ZRD format” setting is a positive integer, it defines the format of the ZRD
file:
0: Uncompressed Full Data
NSRD
1: Compressed Basic Data
2: Compressed Full Data
If “ZRD format” is set to -1 then any subsequent NSTR operands will not create a
ZRD file.
This operand must come before the NSTR operand in the Merit Function.
Non-sequential Rotation Matrix component. Surf defines the surface number of
the NSC group (always 1 in pure NSC systems). Object defines the object number
in the NSC group.
If Ref? is 0, the coordinates are relative to the reference object. The rotation
matrix will always be the identity matrix when using this reference.
NSRM
If Ref? is 1, the coordinates are relative to the origin of the NSC coordinate
system or entry port. If Ref? is 2, then the coordinates are relative to the global
coordinate reference surface.
The 3 x 3 R matrix has 9 components. If Data is 1, NSRM returns R[1][1], if Data is
2, NSRM returns R[1][2], etc... through Data = 9 returning R[3][3].
Non-sequential roadway lighting data.
Data defines the desired roadway lighting data to be returned. Use 0 for average
luminance, 1 for overall uniformity of luminance, 2 for longitudinal uniformity of
luminance, 3 for threshold increment,
4 for surround ratio, 5 for average illuminance, 6 for minimum illuminance, and 7
for uniformity of
horizontal illuminance. The arguments # Lanes, Lane Width, Spacing, and Offset
are all as
defined for the roadway lighting analysis. Arrange defines the luminaire
NSRW arrangement along the roadway. Use 0 for single-side, 1 for double-sided, and 2
for staggered. Surf. Class defines the
road surface classification. Use 0 for R1, 1 for R2, 2 for R3, and 3 for R4.
See “Roadway Lighting” for more information.
The first NSRW with unique settings must be immediately preceded by an NSTW
operand in order to compute data. NSRW operands with the same settings
(except Data) must be placed on adjacent lines. These subsequent operands will
simply return data cached by the first NSRW operand. This operand is intended to
be used as part of the NSC Roadway Merit Function Tool.
See “NSC Roadway Merit Function Tool” for more information.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1620
Non-sequential single ray trace. This operand traces a single sequential ray
through the system to any specified Non-sequential surface, and returns various
data about the ray within the Non- Sequential surface. Surf is the surface number
of the Non-sequential surface. Wave is the wavelength number. For a definition
of Hx, Hy, Px, and Py, see “Hx, Hy, Px, and Py”. Data determines what data NSST
will compute and return as follows:
0, 1, 2: The x, y, or z coordinate at the ray-object intercept point.
3, 4, 5: The x, y, or z direction cosines of the ray after reflection/refraction from the
surface.
6, 7, 8: The x, y, or z direction cosines of the ray up to the ray-object intercept
point.
9, 10, 11: The surface normal at the ray-object intercept point.
NSST
12: The face number of the object the ray struck.
Object specifies which object the desired data is for.
In the general case, a ray may strike the same object multiple times. By default,
NSST will return the data for the last intercept on the specified object. To select a
specific intercept, add 1000 to the Data value for each time the ray strikes the
object. For example, to compute the y coordinate value of the ray on the third
time the ray strikes an object, use a Data value of 3001. If the ray does not strike
the object, or does not strike the object the specified number of times, the
operand returns a value of zero, but no warning or error is issued.
All coordinates and cosines are in the coordinate system of the Non-sequential
surface. An NSDC, NSDD, NSDE, or NSDP operand with Det# set equal to 0 must
be included in the merit function prior to this operand. See also NSTR.
Non-sequential trace. Src# refers to the object number of the desired source. If
Src# is zero, all sources will be traced. If Splt? is non-zero, then splitting is on. If
Scat? is non-zero, then scattering is on. If Pol? is non-zero then polarization will
be used. If splitting is on polarization is automatically selected. If IgEr? is non-
NSTR zero, then errors will be ignored. See “Optimizing with sources and detectors in
non-sequential mode” for complete details.
An NSDD, NSDE, or NSDP operand with Det# set equal to 0 must be included in
the merit function prior to this operand.
See also NSST.
Non-sequential roadway lighting raytrace. This operand is solely for optimizing
roadway lighting applications in conjunction with the NSRW operand and the
NSC Roadway Merit Function. If Splt? is non-zero, then splitting is on. If Scat? is
non-zero, then scattering is on. If Pol? is non-zero then polarization will be used.
If splitting is on polarization is automatically selected. If IgEr? is non-zero, then
NSTW
errors will be ignored. Origin is the row number of the origin object. MH is the
mounting height used in the calculation.
See “Roadway Lighting” for more information.
NSTW should be immediately followed by an NSRW operand to compute data.
This operand is intended to be used as part of the NSC Roadway Merit Function
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1621
Tool.
See “NSC Roadway Merit Function Tool” for more information.
NTXG Non-sequential object tilt about x greater than. See NPXG.
NTXL Non-sequential object tilt about x less than. See NPXG.
NTXV Non-sequential object tilt about x value. See NPXG.
NTYG Non-sequential object tilt about y greater than. See NPXG.
NTYL Non-sequential object tilt about y less than. See NPXG.
NTYV Non-sequential object tilt about y value. See NPXG.
NTZG Non-sequential object tilt about z greater than. See NPXG.
NTZL Non-sequential object tilt about z less than. See NPXG.
NTZV Non-sequential object tilt about z value. See NPXG.
Object space numerical aperture. This is only useful for finite conjugate systems,
OBSN
and is calculated on axis at the primary wavelength.
This operand indicates an unused entry in the operand list. OOFF operands are
automatically converted to BLNK operands upon evaluation of the merit function.
OOFF
OOFF is only used to indicate that the merit function operand type was not
recognized.
Optical path difference with respect to chief ray in waves at the wavelength
OPDC
defined by Wave. See "Hx, Hy, Px, and Py".
Optical path difference with respect to the mean OPD over the pupil at the
OPDM wavelength defined by Wave. OPDM has the same restrictions that TRAC does;
see TRAC for a detailed discussion. See "Hx, Hy, Px, and Py".
Optical path difference with respect to the mean OPD over the pupil with tilt
OPDX removed at the wavelength defined by Wave. OPDX has the same restrictions
that TRAC does; see TRAC for a detailed discussion. See "Hx, Hy, Px, and Py".
Operand greater than. This is used to make the value of the operand defined by
OPGT
Op# greater than the target value.
Operand less than. This is used to make the value of the operand defined by Op#
OPLT
less than the target value.
Optical path length. This is the distance, in lens units, the specified ray travels to
the surface defined by Surf at the wavelength defined by Wave. The distance is
measured from the object for finite conjugates. This distance is meaningless for
infinite conjugates, and the optical path length starts to be calculated from a
OPTH
reference phase plane tangent to the chief ray intercept at the first surface. The
optical path accounts for the index of refraction of the media, and for phase
adding surfaces such as gratings and binary optics. See PLEN. See "Hx, Hy, Px, and
Py".
Operand value. This operand constrains the value of the operand defined by Op#
OPVA
to be equal to the target value.
Offense against the sine condition (OSC) at the wavelength defined by Wave.
OSCD There are two definitions for OSC supported. The first definition is as described in
Welford, Aberrations of Optical Systems (see “References on Lens Design”). This
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1622
definition is used if Zone is zero. An alternate definition due to Prof. Roland Shack
which supports computation of OSC as a function of pupil zone and uses only
real rays is available. This definition is used if Zone is not zero. In this case, Zone
corresponds to the Py coordinate of the real marginal ray. The two methods will
give very similar results for systems with modest F/#’s and aberrations when Zone
is 1.0 for the alternate definition. This operand has no meaning if the system is
not axially symmetric.
Sums the values of all operands between the two operands defined by Op#1 and
OSUM
Op#2. See SUMM.
Paraxial ray x-direction surface normal at the ray-surface intercept at the
wavelength defined by Wave. This is the x component of the surface normal
PANA
vector at the intersection point of the specified paraxial ray and the surface
defined by Surf, in the local coordinate system. See "Hx, Hy, Px, and Py".
Paraxial ray y-direction surface normal at the ray-surface intercept at the
wavelength defined by Wave. This is the y component of the surface normal
PANB
vector at the intersection point of the specified paraxial ray and the surface
defined by Surf, in the local coordinate system. See "Hx, Hy, Px, and Py".
Paraxial ray z-direction surface normal at the ray-surface intercept at the
wavelength defined by Wave. This is the z component of the surface normal
PANC
vector at the intersection point of the specified paraxial ray and the surface
defined by Surf, in the local coordinate system. See "Hx, Hy, Px, and Py".
Paraxial ray x-direction cosine of the ray after refraction from the surface defined
PARA
by Surf at the wavelength defined by Wave. See "Hx, Hy, Px, and Py".
Paraxial ray y-direction cosine of the ray after refraction from the surface defined
PARB
by Surf at the wavelength defined by Wave. See "Hx, Hy, Px, and Py".
Paraxial ray z-direction cosine of the ray after refraction from the surface defined
PARC
by Surf at the wavelength defined by Wave. See "Hx, Hy, Px, and Py".
Paraxial ray radial coordinate in lens units at the surface defined by Surf at the
wavelength defined by Wave. This is the radial distance from the local axis to the
PARR
intersection of the surface defined by Surf and the specified paraxial ray, in the
local coordinate system. See "Hx, Hy, Px, and Py".
Paraxial ray x-coordinate in lens units at the surface defined by Surf at the
PARX
wavelength defined by Wave. See "Hx, Hy, Px, and Py
Paraxial ray y-coordinate in lens units at the surface defined by Surf at the
PARY
wavelength defined by Wave. See "Hx, Hy, Px, and Py".
Paraxial ray z-coordinate in lens units at the surface defined by Surf at the
PARZ
wavelength defined by Wave. See "Hx, Hy, Px, and Py".
Paraxial ray x-direction ray tangent. This is the tangent of the angle the paraxial
PATX ray makes in the X-Z plane after refraction from surface defined by Surf at the
wavelength defined by Wave. See "Hx, Hy, Px, and Py".
Paraxial ray y-direction ray tangent. This is the tangent of the angle the paraxial
PATY ray makes in the Y-Z plane after refraction from surface defined by Surf at the
wavelength defined by Wave. See "Hx, Hy, Px, and Py".
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1623
Petzval curvature in inverse lens units at the wavelength defined by Wave. Not
PETC
valid for non-paraxial systems.
Petzval radius of curvature in lens units at the wavelength defined by Wave. Not
PETZ
valid for non- paraxial systems.
Paraxial image height at the paraxial image surface at the wavelength defined by
PIMH
Wave. Not valid for non-paraxial systems.
Path length. This operand computes the total optical path length (including index
of refraction and phase surfaces) between surfaces Surf1 and Surf2 for the
PLEN specified ray, which is always traced at the primary wavelength. PLEN is
essentially the difference between two OPTH operands. See OPTH. See "Hx, Hy,
Px, and Py".
Paraxial magnification. This is the ratio of the paraxial chief ray height on the
paraxial image surface to the object height at the wavelength defined by Wave.
PMAG
Only useful for finite conjugate systems. Note the paraxial image surface is used
even if the system is not at paraxial focus.
Parameter greater than. This boundary operand constrains the value of the
parameter defined by Param for the surface defined by Surf to be greater than
PMGT the target value. The parameter values have different meanings depending upon
the surface type. See the Chapter “Surface Types” for a description of the
parameter values.
Parameter less than. This boundary operand constrains the value of the
parameter defined by Param for the surface defined by Surf to be less than the
PMLT target value. The parameter values have different meanings depending upon the
surface type. See the Chapter “Surface Types” for a description of the parameter
values.
Parameter value. This boundary operand constrains the value of the parameter
defined by Param for the surface defined by Surf to be equal to the target value.
PMVA
The parameter values have different meanings depending upon the surface type.
See the Chapter “Surface Types” for a description of the parameter values.
PnGT This operand is obsolete, use PMGT instead.
PnLT This operand is obsolete, use PMLT instead.
PnVA This operand is obsolete, use PMVA instead.
Physical Optics Propagation Data. For important details see “About Physical
Optics Propagation”.
To use this operand, first define the settings on the POP analysis feature as
desired, then press Save on the settings box. The operand will return data based
upon the selected settings.
POPD
If Surf is zero, then the saved ending surface number will be used; otherwise, the
specified surface will be used as the ending surface. If Wave is zero, then the
saved wavelength number will be used; otherwise, the specified wavelength
number will be used. If Field is zero, then the saved field number will be used;
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1624
otherwise, the specified field number will be used.
Data determines what data the POP feature will compute and return as follows:
0: The total fiber coupling. This is the product of the system efficiency and the
receiver efficiency.
8, 9, 10: The pilot beam position, Rayleigh range, beam waist (y).
11, 12, 13: The local X, Y, Z coordinates of the center of the beam array on the end
surface (this is a reference point and is not related to the amplitude of the beam).
21, 22: The X, Y coordinates of the centroid of the intensity distribution in local
coordinates relative to the center of the beam. The orientation of the X/Y axes for
this result are not necessarily the same as the orientation of the end surface.
23, 24, 25, 26: The X, Y beam width and X, Y M-squared values, respectively. For
data 23, 24 with default Xtr1 value set to 0 beam widths are calculated in the lab
coordinate system. When Xtr1 value set to 1 beam widths are calculated in the
direction of its principle axes. Note when calculating M-squared value for
asymmetric beams, the "Separate X, Y" must be checked when clicking the "Save"
button in the POP analysis setting dialog. See “Beam width and M-squared”.
27: The square root of second moment of the beam for x2, θx2, xθx, and xθy for
Xtr1 values 0, 1, 2, and 3, respectively.
28: The square root of second moment of the beam for y2, θy2, yθy, and yθx for
Xtr1 values 0, 1, 2, and 3, respectively.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1625
29: The square root of second moment of the beam for xy and θxθy for Xtr1
values 0 and 1, respectively.
30, 31, 32: The mean, RMS and PTV irradiance variation, respectively, of the non-
zero amplitude portion of the beam. These operands should only be used when
the beam has nearly uniform irradiance and has just been clipped by a surface
aperture.
33, 34, 35: The mean, RMS and PTV phase variation in radians, respectively, of the
non-zero amplitude portion of the beam. These operands should only be used
when the beam has nearly uniform irradiance and has just been clipped by a
surface aperture.
40, 41, 42: The fraction of the total power enclosed within a circle of radius
specified by the Xtr1 value in lens units, referenced to the beam centroid (40),
chief ray (41), or surface vertex (42).
50, 51, 52: The radius in lens units of the circle at which the fraction of the total
power enclosed is equal to the value specified by the Xtr1 value. The circle is
centered on the beam centroid (50), chief ray (51), or surface vertex (52).
60, 61, 62, 63: The fiber coupling receiver efficiency amplitude and phase in
radians for the Ex field (60 and 61) and the Ey field (62 and 63). These values do
not consider system efficiency (see Data type 1 above). Data inputs 60-63 request
a polarized POP calculation, but if the input beam is unpolarized, the field
coupling efficiency amplitudes and phases are not physically well-defined.
Therefore, values of 0.0 will be returned if the input beam is unpolarized.
The Xtr1 and Xtr2 values are only used by selected data numbers which are
reserved for future expansion of this feature.
If adjacent POPD operands all have the same Surf, Wave, Field, Xtr1, and Xtr2
values, then the POP analysis is done just once and all data returned at one time.
Note the POPD operands must be on adjacent rows in the MFE for this efficiency
to be implemented.
Physical Optics Propagation Data. For important details see “About Physical
Optics Propagation”.
POPI
To use this operand, first define the settings on the POP analysis feature as
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1626
desired, then press
Save on the settings box. The operand will return data based upon the selected
settings.
If Surf is zero, then the saved ending surface number will be used; otherwise, the
specified surface will be used as the ending surface. If Wave is zero, then the
saved wavelength number will be used; otherwise, the specified wavelength
number will be used. If Field is zero, then the saved field number will be used;
otherwise, the specified field number will be used.
Data determines what data the POP feature will compute and return as follows:
0, 1, 2: The total (Ex + Ey), Ex only, or Ey only Irradiance.
3, 4, 5, 6: Ex-real, Ex-Imaginary, Ey-real, Ey-imaginary.
7, 8: Ex, Ey phase in radians. Undefined Data values will return 0.
The Pix# refers to the desired pixel of the beam. The pixel number is greater than
or equal to zero, and less than nx*ny, where nx and ny are the number of columns
and rows, respectively. The pixel number is generally defined as p = x + y*nx
where x is the integer row number and y is the integer column number, and 0 <=
x < nx and 0 <= y < ny.
If adjacent POPI operands all have the same Surf, Wave, and Field values, then the
POP analysis is done just once and all data returned at one time. Note the POPI
operands must be on adjacent rows in the MFE for this efficiency to be
implemented.
Power at a field point. Computes the power or effective focal length (EFL) after
refraction from the surface defined by Surf at the wavelength defined by Wave
for any point in the field. For the Data parameter, use 0 for spherical, 1 for
cylinder, 2 for max, 3 for min, 4 for tangential, 5 for sagittal, 6 for y, 7 for x, and 8
for astigmatic power in diopters. To get the EFL values, add 9 to these codes. For
POWF
example, for tangential EFL use Data = 13. For cylinder, the EFL value is the
difference between the maximum and minimum focal lengths. For astigmatic, the
EFL is the difference between the x and y direction focal lengths (x-y). For a full
description of this type of analysis, see “Power Field Map”. See "Hx, Hy, Px, and
Py".
Power at a point in the pupil. Computes the power or effective focal length (EFL)
after refraction from the surface defined by Surf at the wavelength defined by
Wave for any point in the field, at any point in the pupil. For the Data parameter,
use 0 for spherical, 1 for cylinder, 2 for max, 3 for min, 4 for tangential, 5 for
sagittal, 6 for y, 7 for x, and 8 for astigmatic power in diopters. To get the EFL
POWP
values, add 9 to these codes. For example, for tangential EFL use Data = 13. For
cylinder, the EFL value is the difference between the maximum and minimum
focal lengths. For astigmatic, the EFL is the difference between the x and y
direction focal lengths (x-y). For a full description of this type of analysis, see
“Power Pupil Map”. See "Hx, Hy, Px, and Py".
The surface power (in inverse lens units) of the surface defined by Surf at the
POWR
wavelength defined by Wave. This operand only works for standard surfaces.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1627
Primary wavelength. This is used to change the primary wavelength number to
PRIM the wavelength defined by Wave during merit function evaluation. This operand
does not use the target or weight columns.
Multiplies the value of the operand defined by Op# by the factor defined by
PROB
Factor.
PROD Product of two operands (Op#1 X Op#2). See PROB.
QOAC Unused.
Quadratic sum. This operand squares and then adds all operands between the
QSUM two operands defined by Op#1 and Op#2, then takes the square root of the sum.
See also SUMM, OSUM, EQUA.
Real ray angle of exitance. This is the angle in degrees between the surface
RAED normal and the ray after refraction or reflection for the surface defined by Surf at
the wavelength defined by Wave. See also RAID. See "Hx, Hy, Px, and Py".
Real ray angle of exitance. This is the cosine of the angle between the surface
RAEN normal and the ray after refraction or reflection at the surface defined by Surf at
the wavelength defined by Wave. See also RAIN. See "Hx, Hy, Px, and Py".
Global ray x-direction cosine of the ray after refraction from the surface defined
by Surf at the wavelength defined by Wave.
RAGA
See "Hx, Hy, Px, and Py".
The origin of the global coordinate system is at the global reference surface.
RAGB Global ray y-direction cosine. See RAGA.
RAGC Global ray z-direction cosine. See RAGA.
Global ray x-coordinate. This is the coordinate in lens units in the global
coordinate system at the surface defined by Surf at the wavelength defined by
RAGX
Wave. The origin of the global coordinate system is at the global reference
surface. See "Hx, Hy, Px, and Py".
RAGY Global ray y-coordinate. See RAGX.
RAGZ Global ray z-coordinate. See RAGX.
Real ray angle of incidence. This is the angle in degrees between the surface
normal and the incident ray at the surface defined by Surf at the wavelength
RAID
defined by Wave. Note the angle of incidence is always positive. See also RAED.
See "Hx, Hy, Px, and Py".
Real ray angle of incidence. This is the cosine of the angle between the surface
RAIN normal and the ray before refraction at the surface defined by Surf at the
wavelength defined by Wave. See also RAEN. See "Hx, Hy, Px, and Py".
Ray angle in radians with respect to z axis. The angle is measured with respect to
RANG the local Z axis of the surface defined by Surf at the wavelength defined by Wave.
See "Hx, Hy, Px, and Py".
Real ray x-direction cosine of the ray after refraction from the surface defined by
REAA
Surf at the wavelength defined by Wave. See "Hx, Hy, Px, and Py".
REAB Real ray y-direction cosine of the ray after refraction from the surface defined by
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1628
Surf at the wavelength defined by Wave. See "Hx, Hy, Px, and Py".
Real ray z-direction cosine of the ray after refraction from the surface defined by
REAC
Surf at the wavelength defined by Wave. See "Hx, Hy, Px, and Py".
Real ray radial coordinate in lens units at the surface defined by Surf at the
REAR
wavelength defined by Wave. See "Hx, Hy, Px, and Py".
Real ray x-coordinate in lens units at the surface defined by Surf at the
REAX
wavelength defined by Wave. See "Hx, Hy, Px, and Py".
Real ray y-coordinate in lens units at the surface defined by Surf at the
REAY
wavelength defined by Wave. See "Hx, Hy, Px, and Py".
Real ray z-coordinate in lens units at the surface defined by Surf at the
REAZ
wavelength defined by Wave. See "Hx, Hy, Px, and Py".
RECI Returns the reciprocal of the value of operand Op#1. See also “DIVI”.
Relative illumination. This operand computes the relative illumination of the field
point defined by Field relative to the (0, 0) field point. Note that in some systems,
the illumination increases off axis, and for these systems the RI may be greater
than one since the RELI operand uses (0, 0) as a reference field point. Vignetting
RELI
factors are always removed for this calculation. The other parameters are:
Samp: The grid size. A value of 10 would yield a 10 x 10 grid of rays.
Wave: The wavelength number to use.
Pol?: Set to 0 to ignore polarization and 1 to consider it. See also EFNO.
Real ray x-direction surface normal at the ray-surface intercept at the surfaced
RENA
defined by Surf at the wavelength defined by Wave. See "Hx, Hy, Px, and Py".
Real ray y-direction surface normal at the ray-surface intercept at the surface
RENB
defined by Surf at the wavelength defined by Wave. See "Hx, Hy, Px, and Py".
Real ray z-direction surface normal at the ray-surface intercept at the surface
RENC
defined by Surf at the wavelength defined by Wave. See "Hx, Hy, Px, and Py".
Real ray x-direction ray tangent (slope) at the surface defined by Surf at the
RETX
wavelength defined by Wave. See "Hx, Hy, Px, and Py".
Real ray y-direction ray tangent (slope) at the surface defined by Surf at the
RETY
wavelength defined by Wave. See "Hx, Hy, Px, and Py".
Reasonable glass. This operand restricts the deviation the index, Abbe, and
deviation of the partial dispersion values may take from actual glasses in the
RGLA currently loaded glass catalogs. See “Optimizing zoom and multi-configuration
lenses” for a complete discussion including a description of Wn, Wa and Wp. The
constraint is active over the surface range specified by Surf1 and Surf2.
RMS spot radius with respect to the centroid in lens units. This operand uses a
Gaussian quadrature method that is accurate for systems with unvignetted
circular pupils. Ring is used to specify the number of rings of rays traced. If Wave
RSCE
is zero; then a wavelength weighted polychromatic calculation is performed;
otherwise, the specified wavelength number will be used. See "Hx, Hy, Px, and
Py".
RSCH RMS spot radius with respect to the chief ray in lens units. This operand uses a
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1629
Gaussian quadrature method that is accurate for systems with unvignetted
circular pupils. Ring is used to specify the number of rings of rays traced. If
Wave is zero; then a wavelength weighted polychromatic calculation is
performed; otherwise, the specified wavelength number will be used. See "Hx, Hy,
Px, and Py".
RMS spot radius with respect to the centroid in lens units. This operand uses a
rectangular grid of rays to estimate the RMS. This operand considers vignetting.
RSRE A Samp value of n will trace an n x n grid per pupil quadrant. If Wave is zero; then
a wavelength weighted polychromatic calculation is performed; otherwise, the
specified wavelength number will be used. See "Hx, Hy, Px, and Py".
RMS spot radius with respect to the chief ray in lens units. This operand uses a
rectangular grid of rays to estimate the RMS. This operand considers vignetting.
RSRH A Samp value of n will trace an n x n grid per pupil quadrant. If Wave is zero; then
a wavelength weighted polychromatic calculation is performed; otherwise, the
specified wavelength number will be used. See "Hx, Hy, Px, and Py".
RMS wavefront error with respect to the centroid in waves. This operand uses a
Gaussian quadrature method that is accurate for systems with unvignetted
circular pupils. Ring is used to specify the number of rings of rays traced. If
RWCE
Wave is zero; then a wavelength weighted polychromatic calculation is
performed; otherwise, the specified wavelength number will be used. See "Hx, Hy,
Px, and Py".
RMS wavefront error with respect to the chief ray in waves. This operand uses a
Gaussian quadrature method that is accurate for systems with unvignetted
circular pupils. Ring is used to specify the number of rings of rays traced. If
RWCH
Wave is zero; then a wavelength weighted polychromatic calculation is
performed; otherwise, the specified wavelength number will be used. See "Hx, Hy,
Px, and Py".
RMS wavefront error with respect to the centroid in waves. This operand uses a
rectangular grid of rays to estimate the RMS. This operand considers vignetting.
RWRE A Samp value of n will trace an n x n grid per pupil quadrant. If Wave is zero; then
a wavelength weighted polychromatic calculation is performed; otherwise, the
specified wavelength number will be used. See "Hx, Hy, Px, and Py".
RMS wavefront error with respect to the chief ray in waves. This operand uses a
rectangular grid of rays to estimate the RMS. This operand considers vignetting.
RWRH A Samp value of n will trace an n x n grid per pupil quadrant. If Wave is zero; then
a wavelength weighted polychromatic calculation is performed; otherwise, the
specified wavelength number will be used. See "Hx, Hy, Px, and Py".
The sag in lens units of the surface defined by Surf at X = the clear semi-diameter
SAGX
or semi-diameter, and Y = 0. See also SSAG.
The sag in lens units of the surface defined by Surf at Y = the clear semi-diameter
SAGY
or semi-diameter, and X = 0. See also SSAG.
The curvature in lens units of the surface defined by Surf at the coordinate
SCRV
defined by X and Y, as measured in Lens Units within the coordinate system being
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1630
used (see "Off-axis" below). This operand has mode, off-axis, remove, best-fit
sphere (BFS), and Orientation flags.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1631
sagittal direction.
Sagittal working F/#, computed at the field point defined by Field and the
SFNO
wavelength defined by Wave. See TFNO.
Sine of the value of the operand defined by Op#. If Flag is 0, then the units are
SINE
radians, otherwise, degrees.
SKIN Skip if not symmetric. See SKIS.
Skip if symmetric. If the lens is rotationally symmetric, then computation of the
SKIS
merit function continues at the operand defined by Op#.
SMIA-TV Distortion. Field is the zero distortion reference field position, or use
zero to indicate the field position (0, 0). Wave is the wavelength number, or use
SMIA
zero for the primary wavelength. X- Width and Y-Width are the full field width in
field units. For more information see “SMIA-TV Distortion”.
Spherochromatism in lens units. This is the difference between the real marginal
axial color and the paraxial axial color of the two extreme wavelengths defined by
SPCH Minw and Maxw. The distance is measured along the Z axis. Zone defines the
zone for which the real marginal axial color is computed. Zone corresponds to the
Py coordinate of the real marginal ray. Not valid for non-paraxial systems.
Spherical aberration in waves contributed by the surface defined by Surf at the
wavelength defined by Wave. If Surf is zero, the sum for the entire system is used.
SPHA
This is the third order spherical aberration calculated from the Seidel coefficients,
and is not valid for non-paraxial systems.
The phase in waves at the primary system wavelength of the surface defined by
Surf at the coordinate defined by X and Y, as measured in Lens Units. This
operand has data and remove flags.
l Data = 0 (default) display the surface phase. Data = 1 display the tilt term
within the phase when Remove is also set to 2. Data = 2 display the power
SPHS term within the phase when Remove is also set to 3.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1632
system coordinates and Off-axis = 1 the computation is calculated with
respect to a tilted and decentered coordinate system, where the origin of
the coordinate system falls at the vertex of the off-axis part. The X and Y
inputs will then refer to coordinates in the new off-axis coordinate system.
l BFS selects which type of best-fit sphere to remove from the data if
Remove is set to 2. BFS = 0 (default) for minimum volume best-fit sphere.
BFS = 1 for Minimum RMS best-fit sphere. BFS = 2 for Minimum RMS
best-fit sphere with offset. BFS = 3 for Minimum volume best-fit sphere,
reverse direction.
The offset allows the calculation to shift the vertex of the BFS away from
the data value at the vertex if it results in a lower RMS.
Note that sampling is set to 33x33. See also DSAG, SAGX, SAGY.
The slope in lens units of the surface defined by Surf at the coordinate defined by
X and Y, as measured in Lens Units within the coordinate system being used (see
"Off-axis" below). This operand has mode, off-axis, remove, best-fit sphere (BFS),
and Orientation flags.
l BFS selects which type of best-fit sphere to remove from the data if
Remove is set to 2. BFS = 0 (default) for minimum volume best-fit sphere.
BFS = 1 for Minimum RMS best-fit sphere. BFS = 2 for Minimum RMS
best-fit sphere with offset. BFS = 3 for Minimum volume best-fit sphere,
reverse direction.
The offset allows the calculation to shift the vertex of the BFS away from
the data value at the vertex if it results in a lower RMS.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1633
Orientation = 1 calculated along the sagittal direction (orthogonal to
radially outward). Orientation = 2 calculated along the X-axis direction.
Orientation = 3 calculated along the Y-axis direction.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1634
Thermal Coefficient of expansion value. This boundary operand constrains the
TCVA TCE of the surface defined by Surf to be equal to the specified target value. For
glass surfaces, see “GTCE”.
Tangential working F/#, computed at the field point defined by Field and the
TFNO
wavelength defined by Wave. See SFNO.
Sum of glass thicknesses from Surf1 to Surf2. Note that the sum is inclusive, it is
TGTH not the thickness between the two surfaces. This sum includes all non-air
materials. To account for air gaps, see TTHI.
Total mass. Computes the mass of the glass lenses within the range of surfaces
from Surf1 to Surf2. This operand has a mode flag. Mode = 0 (default) to use
Mech Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed on the Lens
TMAS Data Editor. The mass of a surface considers the volume enclosed up to the
following surface; therefore to compute the mass of a single element the first and
last surface numbers should be the same. See “Comments on computing element
volumes” for a discussion of how element masses and volumes are computed.
Tolerance data. Data is 0 for RSS estimated change in performance, 1 for nominal
performance, and 2 for estimated performance (nominal plus estimated change).
File is the integer number corresponding to the tolerance settings file to use.
TOLR Config# is -2 for the configuration defined by the last CONF operand, -1 for all
configurations, 0 to use the configuration set in the tolerance settings file and 1
or greater for a specific configuration number. For details, see “Optimizing
tolerance sensitivity” .
TOTR Total track (length) of lens in lens units. See “Total track”.
Transverse aberration radial direction measured in image space with respect to
the centroid for the wavelength defined by Wave. Unlike most other operands,
TRAC critically depends upon the placement of other TRAC operands within the
Merit Function Editor to work correctly. TRAC operands must be grouped
together by field position and wavelength. OpticStudio traces all TRAC rays with a
TRAC
common field point together, and then uses the collective data to compute the
centroid of all the rays. Each ray individually is then referenced to the computed
centroid. This operand should only be entered into the Merit Function Editor by
the Sequential Merit Function tool, and is not recommended for use directly by
the user. See “Hx, Hy, Px, and Py”.
The x component of the TRAR only. TRAD has the same restrictions that TRAC
TRAD
does; see TRAC for a detailed discussion.
The y component of the TRAR only. TRAE has the same restrictions that TRAC
TRAE
does; see TRAC for a detailed discussion.
Transverse aberration radius measured at the surface defined by Surf at the
TRAI wavelength defined by Wave with respect to the chief ray. Similar to TRAR, except
a surface other than the image surface may be specified. See "Hx, Hy, Px, and Py".
TRAN Unused.
TRAR Transverse aberration radial direction measured in image space at the
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1635
wavelength defined by Wave with respect to the chief ray. See ANAR. See "Hx, Hy,
Px, and Py".
Transverse aberration x direction measured in image space at the wavelength
TRAX
defined by Wave with respect to the chief ray. See "Hx, Hy, Px, and Py".
Transverse aberration y direction measured in image space at the wavelength
TRAY
defined by Wave with respect to the chief ray. See "Hx, Hy, Px, and Py.
Transverse aberration x direction measured in image space with respect to the
TRCX centroid. TRCX has the same restrictions that TRAC does; see TRAC for a detailed
discussion.
Transverse aberration y direction measured in image space with respect to the
TRCY centroid. TRCY has the same restrictions that TRAC does; see TRAC for a detailed
discussion.
Total thickness greater than. This boundary operand constrains the total
thickness, including surface sags of the surface defined by Surf and the
immediately following surface at their respective semi-diameter values, to be
greater than the specified target value. The thickness is calculated along the +y
TTGT axis if Code is zero, the +x axis if Code is 1, the -y axis if Code is 2, and the -x axis
if Code is 3. This operand has a mode flag. Mode = 0 (default) to use Mech Semi-
Dia and Mode = 1 to use Clear Semi-Dia value displayed on the Lens Data Editor.
This operand automatically changes the sign on thicknesses in mirror spaces to
always yield a positive value for physically possible lenses. See TTLT and TTVA.
Sum of thicknesses of surfaces from Surf1 to Surf2. Note that the sum is inclusive,
TTHI
it is not the thickness between the two surfaces. See TGTH.
TTLT Total thickness less than. See TTGT.
TTVA Total thickness value. See TTGT.
User defined operand. Used for optimizing numerical results computed in
UDOC externally compiled programs written using the ZOS-API. See “Optimizing with
programs written using ZOS-API”. See also ZPLM.
If present in the merit function, this operand instructs OpticStudio to assume
USYM radial symmetry exists in the lens even if OpticStudio detects symmetry does not
exist. This speeds execution of the merit function in some special cases.
Volume of element(s) in cubic cm. Computes the volume of the lenses and air
spaces for the range of surfaces defined by Surf1 and Surf2. This operand has a
mode flag. Mode = 0 (default) to use Mech Semi-Dia and Mode = 1 to use Clear
Semi-Dia value displayed on the Lens Data Editor. The volume of a surface
VOLU
includes the volume enclosed up to the following surface; therefore to compute
the volume of a single element the first and last surface numbers should be the
same. See “Comments on computing element volumes” for a discussion of how
element masses and volumes are computed.
WFNO Working F/#. See “Working F/#”, and ISFN, SFNO, and TFNO.
Wavelength. This operand returns the wavelength defined by Wave in
WLEN
micrometers.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1636
Extended source encircled energy (distance). This operand computes the distance
in micrometers to the specified fraction of extended source geometric encircled
energy, using whatever the current default settings are. To use this operand, first
define the settings on the extended source encircled energy feature as desired,
then press Save on the settings box. The only settings that are overwritten are
those set by Type, Wave and Max Radius.
Type is 1 for encircled, 2 for x only, 3 for y only, 4 for ensquared, 5 for x
distribution, and 6 for y distribution. When using Type 2 or 3, the distance
calculated is the"full" slit width containing the fraction of energy defined by Frac.
XENC
This is the "full" slit width of the [-x, x] or [-y, y] range respectively, centered on
the chosen reference point. For example, if Dist = 20 µm, this means that the
fraction of energy is contained in a slit width of +/- 10 µm.
Wave is the input wavenumber.
Frac is the fraction of energy desired, and must be between zero and 1, exclusive.
Frac is ignored for type 5 or 6; for these types the returned valued is the full width
half max independent of Frac. Max Radius is the maximum distance in radial
distance in micrometers. If this value is zero, the default setting is used.
See also XENF, DENC, DENF, GENC, and GENF.
Extended source encircled energy (fraction). This operand computes the fraction
of extended source geometric encircled, ensquared, x only, or y only (enslitted)
energy at a given distance from the reference point.
The Type is 1 for encircled, 2 for x only, 3 for y only, and 4 for ensquared. When
using Type 2 or 3, the fraction of energy in the PSF is calculated in the [-x, x] or [-
y, y] range respectively, centered on the chosen reference point. This is the full slit
XENF
width given by Dist. For example, if Dist = 20 µm, the fraction of energy is
calculated for a slit width of +/- 10µm.
Wave is the input wavenumber.
The options and settings are identical to XENC, except Dist, which here is used as
the distance at which the fraction of energy is desired.
See also XENC, GENC, GENF, DENC, and DENF.
Minimum edge thickness for the range of air surfaces defined by Surf1 and Surf2.
This operand checks the edge thickness at numerous points around the
perimeter of the surface, and tests if all points are at least the minimum specified
thickness. This operand controls multiple surfaces simultaneously. See MNEA.
XNEA
Zone, if non zero, scales the radial aperture at which the thickness is computed. A
Zone value of 0.5 would compute the thickness at 0.5 times the semi-diameter.
This operand has a mode flag. Mode = 0 (default) to use Mech Semi-Dia and
Mode = 1 to use Clear Semi-Dia value displayed on the Lens Data Editor.
Minimum edge thickness for the range of glass surfaces defined by Surf1 and
Surf2. This operand checks the edge thickness at numerous points around the
XNEG perimeter of the surface, and tests if all points are at least the minimum specified
thickness. This operand controls multiple surfaces simultaneously. See MNEG.
Zone, if non zero, scales the radial aperture at which the thickness is computed. A
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1637
Zone value of 0.5 would compute the thickness at 0.5 times the semi-diameter.
This operand has a mode flag. Mode = 0 (default) to use Mech Semi-Dia and
Mode = 1 to use Clear Semi-Dia value displayed on the Lens Data Editor.
Minimum edge thickness for the range of surfaces defined by Surf1 and Surf2.
This operand checks the edge thickness at numerous points around the
perimeter of the surface, and tests if all points are at least the minimum specified
thickness. This operand controls multiple surfaces simultaneously. See MNET.
XNET
Zone, if non zero, scales the radial aperture at which the thickness is computed. A
Zone value of 0.5 would compute the thickness at 0.5 times the semi-diameter.
This operand has a mode flag. Mode = 0 (default) to use Mech Semi-Dia and
Mode = 1 to use Clear Semi-Dia value displayed on the Lens Data Editor.
Maximum edge thickness for the range of air surfaces defined by Surf1 and Surf2.
This operand checks the edge thickness at numerous points around the
perimeter of the surface, and tests if all points are no more than the maximum
specified thickness. This operand controls multiple surfaces simultaneously. See
XXEA MXEA.
Zone, if non zero, scales the radial aperture at which the thickness is computed. A
Zone value of 0.5 would compute the thickness at 0.5 times the semi-diameter.
This operand has a mode flag. Mode = 0 (default) to use Mech Semi-Dia and
Mode = 1 to use Clear Semi-Dia value displayed on the Lens Data Editor.
Maximum edge thickness for the range of glass surfaces defined by Surf1 and
Surf2. This operand checks the edge thickness at numerous points around the
perimeter of the surface, and tests if all points are no more than the maximum
specified thickness. This operand controls multiple surfaces simultaneously. See
XXEG MXEG. Zone, if non zero, scales the radial aperture at which the thickness is
computed. A Zone value of 0.5 would compute the thickness at 0.5 times the
semi-diameter. This operand has a mode flag. Mode = 0 (default) to use Mech
Semi-Dia and Mode = 1 to use Clear Semi-Dia value displayed on the Lens Data
Editor.
Maximum edge thickness for the range of surfaces defined by Surf1 and Surf2.
This operand checks the edge thickness at numerous points around the
perimeter of the surface, and tests if all points are no more than the maximum
specified thickness. This operand controls multiple surfaces simultaneously. See
XXET MXET.
Zone, if non zero, scales the radial aperture at which the thickness is computed. A
Zone value of 0.5 would compute the thickness at 0.5 times the semi-diameter.
This operand has a mode flag. Mode = 0 (default) to use Mech Semi-Dia and
Mode = 1 to use Clear Semi-Dia value displayed on the Lens Data Editor.
YNI-paraxial. This number is the product of the paraxial marginal ray height times
the index times the angle of incidence at the surface defined by Surf at the
YNIP
wavelength defined by Wave. This quantity is related to the narcissus
contribution of the specified surface. See Applied Optics, Vol. 21, 18, p3393.
ZERN Zernike Fringe coefficient. The parameters are:
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1638
Term: The Zernike term number (1 - 37 for fringe, 1 - 231 for standard or annular).
The Term value, if negative or zero, may also be used to return other data from
the Zernike fitting as follows:
Note that if you use multiple ZERN operands which only differ in the Term value,
they should be placed on adjacent lines in the editor so OpticStudio only does
the fitting once; otherwise, the computation is slower. Multiple Zernike terms are
always used in the fitting process, even if only one coefficient is requested. The
maximum number of terms used in the computation depends on the Type and
the Term settings. The minimum number of terms used for all types is 11. This
means that Term is only used if set greater than or equal to 11. If Type is standard
or annular, the maximum term number computed is set equal to the largest term
requested by any Term value in adjacent ZERN operands.
Note that a "ZERN error" message may occasionally appear, usually caused by
insufficient RAM or if OpticStudio is unable to compute the OPD. There are a
number of other situations that can trigger this error message. If you suspect
none of the above reasons apply to your case, please contact technical support.
Used for optimizing numerical results computed in ZPL macros. See “User defined
ZPLM
operands”.
This operand controls the variation in the total thickness of the range surfaces
defined by Surf1 and Surf2 over multiple configurations. It is similar to the TTHI
ZTHI
operand, except it is an inequality operator. The target value specified is the
maximum allowed difference between the TTHI at each defined configuration. For
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1639
example, if there are 3 configurations where TTHI 3 8 would evaluate to 17, 19,
and 18.5, respectively, ZTHI will return 2 (i.e. 19-17) if the target is less than 2.
Otherwise, ZTHI returns the target value. To keep all zoom configurations the
same length, use a target of 0.
The buttons in the Merit Function Editor Toolbar are listed below.
Update This option recomputes the merit function. All operands are evaluated, and the new
values are displayed.
Save Merit Function Saves the current merit function in a *.MF file. This step is only required if
the merit function is to be subsequently loaded into another lens. OpticStudio automatically
stores the merit function with the lens when the entire lens is saved.
Load Merit Function Loads a merit function previously stored in a *.MF file or in a *.ZMX file.
Either file type may be selected; only the merit function portion of the file will be loaded into
the spreadsheet. The current merit function is destroyed.
Insert Merit Function Inserts a merit function previously stored in a *.MF file. Select the row
at which to insert the merit function and the file to insert. The existing merit function is
preserved.
Optimization Wizard Opens the “Wizards and Operands” tool to set up the merit function
with the most common requirements. Can be edited subsequently.
Merit Function Listing Generates a text listing in a separate window of the merit function and
shows the split between the user added operands (those operands placed before the DMFS
operand) and the default merit function (all operands after the DMFS operand).
Go To Operand Opens a dialog box to find and jump to a specific operand type, comment,
number, or bookmark. See “Go to Surface” for more information.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1640
Toggle Express View Toggles Express View on and off. For more information on Express View,
please refer to the section entitled Express View.
Reset Column Order Resets column order to the default settings (see “Editors”).
Reset Column Widths Resets column widths to a standard size (see “Editors”).
Optimization Wizard
The Optimization Wizard is available in the Automatic Optimization section of the Optimize
tab, or by expanding the bar labeled “Wizards and Operands” above the Merit Function Editor
data. The Optimization Wizard displays a dialog box which allows selection of the merit
function type and relative ray density.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1641
The merit function is a numerical representation of how closely an optical system meets a
specified set of goals. OpticStudio uses a list of operands which individually represent different
constraints or goals for the system. Operands represent goals such as image quality, focal
length, magnification, and many others.
The merit function is proportional to the square root of the weighted sum of the squares of the
difference between the actual and target value of each operand in the list. The merit function is
defined this way so a value of zero is ideal. The optimization algorithm will attempt to make
the value of this function as small as possible, and so the merit function should be a
representation of what you want the system to achieve.
Several different types of merit functions are available. The default merit function is
constructed using 4 key choices: The optimization type, criterion, reference point, and
integration method. The choices are described in the sections below.
PTV Is an abbreviation for Peak-To-Valley. There are rare cases where the RMS is not as
important as the maximum extent of the aberrations. For example, if all the rays need to land
within a circular region on a detector or fiber. In these cases, the PTV may be a better indicator
of performance. This merit function type attempts to minimize the PTV extent of the errors.
However, the numerical value of the merit function is not the actual peak-to-valley error.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1642
Notes on RMS Merit Functions
Note that optimization using the RMS spot radius merit function will in general yield a
different optimum design than the RMS wavefront merit function. The basic reason they are
different is that ray aberrations are proportional to the derivative of the wave aberrations.
Therefore, it is unreasonable to expect that the minimum of one corresponds to the minimum
of the other. A general rule of thumb to use is that if the system is close to diffraction limited
(say a PTV wavefront error of less than two waves) then use wavefront error. Otherwise, use
spot radius.
Generally speaking, the merit functions which use the centroid as a reference are superior to
those that use the chief ray. Most diffraction based performance measures, such as MTF or
encircled energy, improve when the RMS wavefront error referenced to the centroid decreases.
However, it is always best to re-optimize a final design with the various merit functions to
verify which one provides the best performance for the system being designed. For example,
the RMS wavefront centroid reference often yields better low frequency MTF response, but
worse medial frequency response, than the RMS chief ray reference optimization does.
For PTV merit functions, the merit function numerical value is proportional but not equal to the
actual PTV of the aberration. The merit function will however minimize the PTV when the merit
function is minimized.
PTV merit function for spot size may not exactly optimize the geometric spot size, which is
shown as "GEO" in Spot Diagram window. The PTV merit function for spot size will optimize
the approximate geometric area of the spot. In contrast, the GEO output from the Spot
diagram is the maximum distance of any of the rays sampled from the selected reference
point. These are two different metrics representing the geometric size of the spot. In general
they will have a strong correlation, but optimizing for one of them will not necessarily produce
the optimum value for the other.
Contrast Optimizes the MTF of the system using the Moore-Elliott Contrast method, also
called Contrast Optimization. See the “Optimizing for MTF” for more information about the
Moore-Elliott Contrast method.
Spot: Computes both the x and y extent of the transverse ray aberrations in image space. The x
and y components are considered separately, and both are optimized together. The signs of
the aberrations are retained, which yields better derivatives for optimization. Alternatively, if
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1643
both X Weight and Y Weight input are set to 0, computes the spot size based on radial
transverse ray aberration.
Angular Computes both the x and y extent of the angular aberrations in image space. The x
and y components are considered separately, and both are optimized together. The signs of
the aberrations are retained, which yields better derivatives for optimization. Intended for
afocal systems. See “Afocal Image Space”
Chief The RMS or PTV computation of the data is referenced to the chief ray at the primary
wavelength. For wavefront optimization, reference to the chief ray subtracts out the mean
wavefront over the entire pupil, but not x-tilt or y-tilt. Note the exact point at which the OPD is
defined to be zero is arbitrary; this is the reason the chief ray reference subtracts out the mean
wavefront. If the data is wavefront, the operand used is OPDM.
Unreferenced This option is only available if the data is wavefront. If the wavefront is
unreferenced, then the OPD data with respect to the chief ray is used without subtracting the
mean wavefront or tilt. If the data is wavefront, the operand used is OPDC.
Ignore Lateral Color By default, OpticStudio references all RMS or PTV computations to a
common reference point for each field. All of the rays are traced for all wavelengths for each
field point, and the primary wavelength chief ray or the centroid of all the rays is used as the
reference point. If “Ignore Lateral color” is selected, then OpticStudio computes an
independent reference point for each wavelength as well. This is useful for designing systems
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1644
that intentionally divide the beam by wavelength, such as a prism or spectrometer system. This
option will cause the merit function to optimize each color spot independently.
Gaussian Quadrature
The GQ algorithm uses a carefully selected and weighted ray set to accurately compute the
RMS or PTV error over a uniformly illuminated entrance pupil (strictly speaking, the PTV
algorithm is not a GQ algorithm, but it is very similar). The weighting for all rays is applied
according to the weights set on the wavelength and field in the System Explorer and by the GQ
merit function algorithm. For RMS merit functions, the weighting and ray set selection used is
based on a method described in a paper by G. W. Forbes, JOSA A 5, p1943, 1988. For the PTV
merit functions, the ray set is based on solutions to the Chebyshev polynomials, described in
Numerical Recipes, Cambridge University Press (1989). If you are interested in detailed
information on the basis and accuracy of these methods, see these references. GQ is much
more accurate than any other known method, and requires fewer rays. Therefore, you get the
best of both worlds: greater speed and greater accuracy.
The only drawback to GQ is that the algorithm assumes the pupil is a circle, or more generally,
an ellipse. For non-elliptical pupils, GQ does not work accurately. For example, if there are
surface apertures in the optical system that vignette enough rays to alter the effective shape of
the pupil significantly, GQ should not be used.
One notable exception is when using circular pupils with central obscurations, such as a
Newtonian telescope. In this case, an input value may be given to indicate the fraction of the
pupil that is obscured (the “Obscuration”). The method used to account for obscuration of the
circular pupil within the GQ algorithm is described in B.J. Bauman and H. Xiao, “Gaussian
quadrature for optical design with non-circular pupil and fields, and broad wavelengths”, Proc.
SPIE, Vol. 7652, p76522S-1 (2010). While, in general, modest central obscurations do not affect
the RMS significantly because the aberrations tend to be smaller in the central zone of the
pupil, the use of a finite “Obscuration” factor within the GQ algorithm allows for a fully
accurate representation of the obscuration in the merit function calculation.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1645
Note also that GQ works fine when used with vignetting factors, since the ray pattern is
redistributed from a circle to an ellipse. More details on the use of vignetting factors in
conjunction with GQ may be found in the Knowledge Base article entitled “How to use
Vignetting Factors”.
Rings The “Rings” setting determines how many rays are traced at each field and at each
wavelength. For on-axis fields (zero degrees field angle in a rotationally symmetric system), the
number of rays is equal to the number of rings. For all other fields in symmetric systems, the
number of rays traced per ring is equal to half the number of “arms” (defined in the next
paragraph). Only half the rays are traced because the left-right symmetry of the system is
exploited. Each set of rays is traced for each defined wavelength. For example, if you have one
on-axis field, two off-axis fields, three wavelengths, four rings, and six arms selected, the
number of rays traced is 3 * (4 + 4*3 + 4*3) = 84. For systems without rotational symmetry, the
number of rays per ring is the number of arms independent of field. In the prior example, this
means 3 * 3 * 4 * 6 = 216 rays. OpticStudio automatically calculates these numbers for you; the
only reason it is described here is so you will understand how the default merit function is
defined. Optimization runs are longer if more rays are traced.
Arms The “Arms” setting determines how many radial arms of rays in the pupil are traced. By
default six equally spaced (in angle) arms are traced (or three if the system is rotationally
symmetric). This number may be changed to eight, ten, or twelve. For most common optical
systems, six is sufficient.
You should select the number of rings and the number of arms according to the order of
aberrations present in your system. The highest order of aberration the GQ algorithm can
accurately integrate is (2*n - 1) where n is the number of rings. If an optical design will be
limited by 5th order ray aberrations n should be at least 3. A simple way of determining the
correct number of rings is to select the minimum number, one. Then go to the optimization
dialog box and note the merit function. Now go back to the default merit function tool, and
select two rings. If the merit function changes by more than a few percent, go back and select
three, and so on until the merit function does not change significantly (perhaps 1%). Repeat
the procedure for the number of arms (six arms is almost always plenty). Selecting more rings
or arms than required will not improve the optimization performance; it will only slow the
algorithm down needlessly. Tracing more rays than required will not help you find better
solutions!
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1646
Selecting more rings or arms than required will not improve the optimization
performance; it will only slow the algorithm down needlessly.
Obscuration The “Obscuration” setting determines the fraction of the circular pupil that is
vignetted, i.e. the fraction of the pupil through which rays cannot be traced. The default value
is 0, i.e. the default assumes no obscuration. The maximum possible value is 1, which would
indicate a fully-obscured pupil through which no rays could be traced. To avoid a situation in
which no rays are defined in the merit function, OpticStudio will reset the input value to 0 if the
user sets the (absolute value of the) input value to be > = 1.
Note: the obscuration fraction of the circular pupil is done as a linear fraction, not as a fraction
of the pupil area. This means the pupil area that is obscured is the square of the input value.
The obscuration is centered on the circular pupil.
Rectangular Array
The RA algorithm traces a grid of rays through the pupil. The advantage to the RA algorithm is
the ability to accurately account for the effects of vignetting in the merit function. This is useful
in systems such as obscured telescopes and camera lenses which intentionally clip
troublesome rays. The disadvantage to the RA algorithm is speed and accuracy. Usually, more
rays are required to achieve a given degree of accuracy than the GQ algorithm. The bottom
line: don't use RA unless you are using surface apertures.
The RA algorithm requires specification of the “Grid” size, and the “Delete Vignetted”
option.
Grid Determines the number of rays to be used. The grid size can be 4x4 (16 rays per field per
wavelength), 6x6 (36 rays per field per wavelength) etc. Rays on the grid are automatically
omitted if they fall outside the entrance pupil, so the actual number of rays used will be lower
than the grid size squared. Selecting a larger grid size generally yields more accurate results at
the expense of slower execution. However, there may be an advantage in choosing a large grid
density, and then selecting the "Delete Vignetted" checkbox (described in the next paragraph).
The reason is that a large grid density will fill the pupil with rays, and then the operands which
are vignetted will be deleted. The result is a reasonable number of rays which accurately reflect
the aperture of the system.
Delete Vignetted If selected, each ray in the merit function will be traced through the system,
but if it is vignetted by a surface aperture, if it misses any surface, or if it is total internal
reflected at any surface, then the ray is deleted from the merit function. This keeps the total
number of rays in the merit function to a minimum. The disadvantage is that if the vignetting
changes as the design is optimized, then the merit function may have to be regenerated. It is
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1647
always a better choice to use the vignetting factors and then use the GQ algorithm than to
delete vignetted rays if possible. Vignetting factors can be adjusted, if required, during
optimization using SVIG in the merit function.
Note that OpticStudio will attempt to trace any ray defined in the merit function regardless if
that ray is vignetted or not. For example, if the chief ray height is targeted using REAY, and
there is a central obscuration that vignettes the chief ray, OpticStudio will still trace the ray and
use the operand results as long as the ray can be traced. OpticStudio does not check to see if
defined rays are vignetted, because this introduces substantial overhead during optimization.
In general, avoid vignetting of rays by surface apertures, and use vignetting factors to shape
the beam size when possible. To optimize on the fraction of unvignetted rays, a macro must be
defined to perform the required computations. However, this method is very prone to
stagnation during optimization because small changes in lens parameters lead to discrete
changes in the merit function as rays abruptly jump from being vignetted to not being
vignetted.
Optimization Goal
Best Nominal Performance The system is optimized to its best possible nominal design
without consideration for tolerancing sensitivity.
Weight sets the weight of the overall contribution from the HYLD operands with respect to the
rest of the merit function. Setting the HYLD weight very low yields the best nominal
performance. If the HYLD operands are weighted very heavily, then the optimization tends to
produce designs that do not focus light at all, as the rays will tend to be normal at every
surface. The best weight depends on multiple factors: how tight the expected tolerances are,
what the desired manufacturing yield is, what type of nominal merit function is used, and the
unique properties of the system [1].
Reference:
[1] Kenneth E. Moore, "Optimization for as-built performance," Proc. SPIE 10925, Photonic
Instrumentation Engineering VI, 1092502 (4 March 2019);
Boundary Values
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1648
Individual Boundary Settings Individual boundary constraints may be automatically
generated and included in the default merit function by checking the air and/or glass
boundary values on.
Glass If selected, then MNCG, MXCG, and MNEG operands will be added to the merit function
to constrain the minimum center thickness, maximum center thickness, and minimum edge
thickness for each surface. Only glass surfaces will contribute to the merit function if needed.
Air MNCA, MXCA, and MNEA operands will be added to the merit function to constrain the
minimum center thickness, maximum center thickness, and minimum edge thickness for each
surface. Only air surfaces will contribute to the merit function if needed.
The automatic individual boundary constraint feature is meant to save some manual entry of
routine boundary constraints on optical systems with or without mirrors. More complex lenses,
such as those with complex coordinate breaks, or multi-configurations usually require
additional boundary constraints to be added to the merit function manually.
Black Boxes and Non Sequential Component surfaces are ignored during the optimization.
Adding a mirror or switching a surface from mirror to not a mirror requires rebuilding the merit
function.
Other Settings
Assume Axial Symmetry If selected, then the default merit function will exploit the left-right
and rotational symmetry of the lens when constructing and evaluating the merit function.
Fewer rays will be traced, accelerating the optimization with no loss of accuracy. In systems
with coordinate breaks or non-rotationally symmetric systems, the default is unselected, which
means symmetry will not be exploited. Overriding the default system symmetry is useful,
however, if you are designing a lens that OpticStudio thinks is non-symmetric, but the lack of
symmetry does not affect the aberrations. For example, if tilted but flat fold mirrors are
present, these mirrors do not eliminate the left-right symmetry of the system, but OpticStudio
will by default assume symmetry does not exist. Some gradient index surfaces also use non-
symmetric index variation terms which are often zero (they are used only for tolerancing).
Select the checkbox to accelerate the optimization in these cases. See also the “USYM”
operand description. If the merit function will be used for tolerancing, check this option off,
because even symmetric lenses generally become non-symmetric during tolerancing.
Add Favorite Operands When checked, OpticStudio will add the merit function defined in
FAVORITE.MF above the DMFS line in the default merit function. This merit function file must
be placed in the <data>\MeritFunction folder (see “Folders”).
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1649
Start At This option is used to add the default merit function at a specific position within the
Merit Function Editor operand list. To control what the default start at value will be, see the
DFMS operand definition. Use a value of 0 to start at the end of the current merit function.
Relative X Weight The relative X weight is the additional weighting to be placed on the X
component of the aberrations when computing the PTV or RMS SPOT or ANGULAR merit
functions. This setting has no effect on the other merit functions. If the relative X weight is less
than relative Y weight, then the Y components are weighted more heavily; if the relative weight
is greater than relative Y weight, then the X components are weighted more heavily. If left at
the default value (relative X weight and relative Y weight equal unity); then the components are
equally weighted. Weighting one component more heavily is useful for systems which
intentionally form slit images, such as spectrometers. If relative X weight is set to zero then the
X components will not be optimised and no operands for these will be included in the merit
function. If both the Relative X Weight and the Relative Y Weight are set to 0, the Merit
Function generated will be based on radial transverse ray aberration, instead of X+Y ray
aberration.
Relative Y Weight The relative Y weight is the additional weighting to be placed on the Y
component of the aberrations when computing the PTV or RMS SPOT or ANGULAR merit
functions. See “Relative X Weight”. If both the Relative X Weight and the Relative Y Weight are
set to 0, the Merit Function generated will be based on radial transverse ray aberration, instead
of X+Y ray aberration.
Relative S Weight The relative S weight is the additional weighting to be placed on the
sagittal component of the phase differences when computing the Contrast merit function
compared to the tangential component. See “Relative X Weight”.
Relative T Weight The relative T weight is the additional weighting to be placed on the
tangential component of the phase differences when computing the Contrast merit function
compared to the sagittal component. See “Relative X Weight”.
Overall Weight When switching between different default merit function types, such as RMS
spot and RMS wavefront error, the numerical magnitude of the default merit function can
change dramatically. This may make it tedious to manually adjust the weights of operands that
are not part of the default merit function. The overall weight is a factor that scales all the
weights in the default merit function. Under most circumstances, this weight may be left at
one.
Spatial Frequency The spatial frequency at which to optimize when computing the Contrast
default merit function.
Button Functions
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1650
OK Closes the Optimization Wizard tool and adds the generated merit function to the exiting
merit function at the specified starting line.
Apply Adds the generated merit function to the exiting merit function at the specified starting
line.
Save Settings Saves the settings in the Optimization Wizard dialogue box. After the settings
are changed or reset, the saved settings are re-loaded by clicking the “Load Settings” button.
Load Settings Loads the Optimization Wizard settings that were last saved.
Optimize!
The “Optimize!” button is available in the Automatic Optimization section of the Optimize tab.
This button displays the Local Optimization tool for automatic optimization of the current
optical system.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1651
Settings:
Orthogonal Descent (OD) uses an orthonormalization of the variables and discrete sampling
of solution space to reduce the merit function. The OD algorithm does not compute numerical
derivatives of the merit function. For systems with inherently noisy merit functions, such as
non-sequential systems, OD will usually outperform DLS. For a discussion of a similar
algorithm, see S. Kudaev, P. Schreiber, “Automated optimization of non-imaging optics for
luminaries”, in Optical Design and Engineering II; Laurent Mazuray, Rolf Wartmann, Eds., Proc.
SPIE 5962, p. 87-95 (2005).
Note that both DLS and OD are local optimization algorithms whose final results depend upon
the starting point. For global optimization, see “Global Optimizers”.
# of Cores Selects the number of cores over which to spread the optimization task. More than
1 may be selected, even on a single CPU computer, in which case the single CPU will time share
the multiple simultaneous tasks. The default is the number of processors detected by the
operating system.
Cycles Select the number of optimization cycles. 1 Cycle Executes a single optimization cycle, 5
Cycles Executes 5 optimization cycles, etc. Inf. Cycles Executes optimization cycles in an infinite,
continuous loop until “Stop” is pressed.
Selecting Automatic will cause the optimizer to run until no progress is being made.
Automatic mode is highly recommended. The time required to run a given optimization cycle
varies enormously with the number of variables, the complexity of the system, the number of
solves, the number of operands, and of course the computer speed. If the cycle is taking too
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1652
long, or if it appears to be hung up, or if you feel the design is not progressing adequately,
click on Stop to end the optimization run.
Auto Update If checked, OpticStudio will automatically update and redraw all open windows
at the end of each optimization cycle. This allows monitoring of the optimization progress
using any analysis feature. Note that the fastest rate at which the windows can update is once
every 5 seconds, in order to maintain responsivity of the user interface during the updates.
Stop Stops a running optimization, and returns control back to the dialog box.
Exit Closes the Local Optimization dialog box. Exit is not enabled while the optimization is
running. When it is enabled, selecting Exit will cause the dialog box to close and the system will
be updated with the current values from the optimization.
Discussion:
The Local Optimization (or simply, “Optimization”) feature provided by OpticStudio is quite
powerful, and is capable of improving lens designs given a reasonable starting point and a set
of variable parameters. Variables can be curvatures, thicknesses, glasses, conics, parameter
data, extra data, and any of the numeric multi-configuration data. OpticStudio uses either an
actively damped least squares or an orthogonal descent algorithm. The algorithms are capable
of optimizing a merit function composed of weighted target values; these target values are
called “operands”. OpticStudio has several different default merit functions which can be
changed easily using the Merit Function Editor. For details on this procedure see “Modifying
the merit function.”
When the optimization begins, OpticStudio first updates the system merit function. If any of
the operands cannot be computed, the optimization cannot begin, and an error message will
be displayed. Operands cannot be computed if they require the tracing of rays which miss
surfaces or which undergo total internal reflection (TIR) at an index boundary. If such an error
message appears, usually the starting lens prescription is in error, or the ray targets are
incorrectly defined (this will not happen with the default merit functions, but might happen
with user defined rays). OpticStudio can automatically recover if the merit function cannot be
evaluated during the course of optimization; only the starting system need be adequate to
compute all operands in the merit function.
See Optimization Overview for a full discussion of building merit functions, setting variables,
and using the optimization feature.
See also
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1653
Remove All Variables
The Remove All Variables button is available in the Automatic Optimization section of the
Optimize tab. This button provides a quick way to remove all of the variables defined in the
current lens.
Discussion:
Variables are removed by setting each of the values to “fixed” at the current value.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1654
The Set All Radii Variable button is available in the Automatic Optimization section of the
Optimize tab. This button provides a quick way to make all radii variable.
Discussion:
Variables are only set on curved surfaces that define the boundary between two different
media. A variable radius is designated with a “V” listed next to the Radius column in the Lens
Data window.
The Set All Thickness Variable button is available in the Automatic Optimization section of the
Optimize tab. This button provides a quick way to make all thicknesses variable.
Discussion:
Variables are only set on finite non-zero thicknesses. A variable thickness is designated with a
“V” listed next to the Thickness column in the Lens Data window.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1655
For more information on Global Optimization, see Global Optimization
Global Optimizer
The Global Optimizer is available in the Global Optimizers section of the Optimize tab. This
feature initiates a search for the global optimum, which is the best possible design for a given
merit function and set of variables.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1656
For more information see “The Global Optimization algorithm” in Optimization Overview.
Settings:
Algorithm The algorithm control allows selection of either Damped Least Squares (DLS) or
Orthogonal Descent (OD). The DLS algorithm is preferred for most imaging systems, while OD
is preferred for systems with noisy, low precision merit functions, such as illumination systems.
For more information, see “Performing an optimization”.
# of Cores Selects the number of cores over which to spread the optimization task. More than
1 may be selected, even on a single CPU computer, in which case the single CPU will time share
the multiple simultaneous tasks. The default is the number of processors detected by the
operating system.
OpticStudio copies the initial file into new OpticStudio format files called GLOPT_xxxx_
001.ZMX through GLOPT_xxxx_nnn.ZMX where xxxx is a number associated to the instance of
OpticStudio and nnn is the maximum number of files to save. If the Global Optimizer is run
simultaneouly on multiple instances of OpticStudio, then the number xxxx will allow to
distinguish between the files saved from different instances.
OpticStudio will then begin looking at various combinations of lens parameters extracted from
the ranges you have defined. The optimization will proceed on a newly generated lens until
OpticStudio concludes the new lens has been sufficiently optimized.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1657
As each new lens is generated, OpticStudio will compare the merit function of the new lens to
the best lenses found so far, and will place it in the correct location in the best lenses list,
renaming other lens files as required. If the lens has a higher merit function than all of the
lenses on the best list, then it is discarded. The cycle repeats indefinitely. Each time a new lens
is found which is better than the worst in the list of best lenses, it is placed in the correct place
in the list. After hundreds of lenses have been replaced (which may require many tens of
thousands of lenses to be evaluated) the resulting set will hopefully contain some very good
designs, or at least some promising forms.
The global optimization dialog box will also display the merit functions of the ten best lenses
found so far. If the number of lenses to save is greater than ten, these files are stored on disk,
but the merit functions are not displayed.
The algorithm also periodically returns to lenses in the best list to see if they can be improved
upon. Occasionally some lenses will be improved and placed back in the list. If this happens,
the older design being replaced is rejected if it has the same basic form as the new lens. This is
done to keep some diversity in the best list, otherwise all the lenses will be of nearly identical
form.
Auto Update If checked, all open windows will be updated every time a lower merit function is
found. Note that the fastest rate at which the windows can update is once every 5 seconds, in
order to maintain responsivity of the user interface during the updates.
Resume Is very similar to the Start button, however, Resume will first load the existing GLOPT_
xxxx_nnn files and place their current merit functions in the best list.
Thus, Resume begins the search from where a previous run ended. Resume does not erase the
existing best files, whereas Start erases the files and begins a new search entirely based upon
the lens currently in the Lens Data Editor. If Resume is selected when a completely unrelated
file is in the Lens Data Editor, OpticStudio will attempt to optimize the lens using the current
data in the Lens Data and Merit Function Editors, but will use the old GLOPT files respective
merit functions for comparison purposes.
Stop Stops a running optimization, and returns control back to the dialog box. Depending
upon what the algorithm is doing, it may exit immediately, or it may require several seconds.
Once the algorithm has terminated, you can click on Exit.
You can now open any of the GLOPT_xxxx_nnn.ZMX files for further analysis.
Exit Closes the Global Optimization dialog box. Exit is not enabled while the optimization is
running. When it is enabled, selecting Exit will cause the dialog box to close and the system will
be updated with the best current values from the optimization.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1658
Hammer Optimizer
The Hammer Optimizer is available in the Global Optimizers section of the Optimize tab. This
feature automates the repetitive optimization of a design to escape local minima in the merit
function.
For more information see the “Hammer Optimization algorithm” in Optimization Overview.
Settings:
Algorithm Choose either Damped Least Squares (DLS) or Orthogonal Descent (OD). The DLS
algorithm is preferred for most imaging systems, while OD is preferred for systems with noisy,
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1659
low-precision merit functions, such as illumination systems. For more information, see
“Performing an optimization”.
# of Cores Selects the number of cores over which to spread the optimization task. More than
1 may be selected, even on a single CPU computer, in which case the single CPU will time share
the multiple simultaneous tasks. The default is the number of processors detected by the
operating system.
Auto Update If checked, all open windows will be updated every time a lower merit function is
found. Note that the fastest rate at which the windows can update is once every 5 seconds, in
order to maintain responsivity of the user interface during the updates.
Start Begins the Hammer Optimization loop. Hammer Optimization will take the lens and
exhaustively attempt to refine it by making adjustments and optimizations. Each time the lens
is improved, it will be saved to disk in a temporary file.
Automatic Calls the conventional (local) damped least squares (DLS) or orthogonal descent
(OD) optimizer and runs it in Automatic mode. Sometimes it is useful to optimize a lens before
calling Hammer Optimization if the lens has not already been optimized.
Exit Closes the Hammer Optimization dialog box. Exit is not enabled while the optimization is
running. When it is enabled, selecting Exit will cause the dialog box to close and the system will
be updated with the current values from the optimization.
The Hammer Optimization screen shows the starting merit function, and the best merit
function found so far. Although good results can occasionally be had in several minutes, the
algorithm should be allowed to run for several hours, and preferably overnight. To terminate
the search, select Stop, then Exit.
If OpticStudio abnormally terminates, the last saved file can be found in the temporary file. The
temporary file name is constructed from the starting lens file name. If the lens being optimized
is stored in the file:
“C:\Zemax\SAMPLES\MYFILE_HAMMER.ZMX”.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1660
Glass Substitution Template (global
optimizers group)
The Glass Substitution Template is available in the Global Optimizers section of the Optimize
tab. This feature limits the range of acceptable glasses to choose based on cost and other
constraints when using the Hammer and Global Optimizers.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1661
Settings:
Use Glass Substitution Template If checked, the defined parameters are used to restrict the
glasses available for substitution by the global optimizer.
Exclude Glasses With Incomplete Data If checked, glasses with incomplete template data
will not be selected by the global optimizer. Only data corresponding to non-zero template
values are tested before excluding a glass.
Standard, Preferred, Obsolete, Special These checkboxes indicate the acceptable status
settings of glasses. These options are additive. For example, if both Standard and Obsolete are
checked, then either Standard or Obsolete glasses are acceptable, Note a single glass may
have only one status.
Maximum Relative Cost The maximum relative cost. The cost of Schott BK7 is 1.0, all other
glasses are more expensive, and have larger relative costs. Use zero to ignore relative cost, or
uncheck the box next to this item.
Maximum Climatic Resistance (CR) The maximum allowed value of the CR code. Use zero to
ignore CR or uncheck the box next to this item.
Maximum Stain Resistance (FR) The maximum allowed value of the FR code. Use zero to
ignore FR, or uncheck the box next to this item.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1662
Maximum Acid Resistance (SR) The m`1aximum allowed value of the SR code. Use zero to
ignore SR, or uncheck the box next to this item.
Maximum Alkali Resistance (AR) The maximum allowed value of the AR code. Use zero to
ignore AR, or uncheck the box next to this item.
Maximum Phosphate Resistance (PR) The maximum allowed value of the PR code. Use zero
to ignore PR, or uncheck the box next to this item.
Load Loads the current settings from a previously saved *.GST file.
Save As New Glass Catalog Saves all the glasses that meets the current criteria into a new
glass catalog.
Discussion:
If “Use Glass Substitution Template” is unchecked, any glass defined in the current catalogs
may be selected if not explicitly excluded (by having “exclude substitution” checked in the
glass catalog) and if the wavelength range is suitable for the current lens. For glasses that do
not include the cost or resistance codes, a “?” will be displayed in the glass catalog. If no cost
or resistance data is provided for a glass, the glass will not be selected if “Exclude Glasses With
No Data” is checked. Template data is stored along with the lens file; so the template
parameters are lens file specific. If no glass meets the specified template parameters, the glass
substitution status is automatically removed.
The glass substitution template is also used when converting from model to real glasses. When
converting model glasses to real glasses, it is possible that no glass can be found that meets
the template specification. If this happens, OpticStudio will first ignore the “Exclude Glasses
With No Data” selection and then try again to find a suitable glass. If still no glass can be found
that meets the criteria, then OpticStudio ignores the template entirely and tries again. If still no
suitable glass can be found, glass number 1 in the catalog, whatever properties it may have,
will be used, even if the glass does not have a suitable wavelength range or is far from the
model glass parameters.
Individual tests for Relative Cost, CR, FR, SR, AR, and PR may be activated and deactivated by
checking the box next to each description.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1663
Optimization Tools Group
These are the optimization tools.
The Find Best Asphere tool is available in the Optimization Tools section of the Optimize tab.
This feature replaces spherical surfaces with aspherical surfaces and reoptimizes the design to
determine which surface would benefit the most from aspherization.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1664
Settings:
First/Last Surface These controls set the range of surfaces to consider adding an asphere to.
Asphere Type Choose an asphere defined by a conic or an even polynomial asphere to the
specified maximum order.
Start Begins the analysis. After an analysis is complete or stopped, selecting Start again will
discard the previous results and search again for the best asphere using the current surface
range and asphere type selections.
Keep and Exit Retains the best asphere found and exits.
Discussion:
This feature automates the process of determining which spherical surface, if re-optimized to
be an aspheric surface, would provide the lowest merit function. Each surface is evaluated to
see if it is a candidate asphere. To be considered, the surface must be of type Standard, have
no conic value, define a boundary between air and glass (cemented surfaces usually make poor
aspheres), have a curvature that is either variable or controlled by a marginal ray angle or F/#
solve, and have a curvature that is not under control of the Multi-configuration Editor. Surfaces
that do not meet this test are ignored.
When a candidate surface is identified, the surface is converted into an asphere of the user-
selected type. The aspheric terms are set as variables for optimization. The local damped-least
squares optimizer is then called to optimize the modified system. If the resulting system has
the lowest merit function yet found, the system is retained. The procedure repeats until all
surfaces have been tested. Finally, this feature reports which surface, when converted to an
asphere, provided the lowest merit function. Note the currently defined merit function is used,
and all data that are variable are re-optimized during this process. The current merit function
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1665
should be appropriate for an aspheric design, which may require higher sampling than a non-
aspheric design for good optimization.
Note that like all local optimization results, there is no way to know if the solution found is the
optimum “global minimum” for that combination of merit function, variables, and design
parameters. For this reason, once the best candidate asphere is determined, it is usually a good
idea to run the Hammer Optimization on the resulting design to see if any further gains are
possible.
The Convert Asphere Types tool is available in the Optimization Tools section of the Optimize
tab. This feature converts an aspheric surface from one type of asphere to another, and
computes the coefficients that best match the sag of the existing surface type. The even,
extended, and Q-type (Forbes) aspheres are supported.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1666
Settings:
Asphere Type Choose one of the supported asphere surface models to convert to.
Number of Terms The number of aspheric terms to use in the conversion, or automatic to
allow OpticStudio to make a reasonable guess.
Discussion:
This feature automates the process of converting from one type of asphere to another.
Currently the even, extended, and Q-type aspheres are supported. OpticStudio automatically
determines the proper order for the new asphere based upon the order of the old asphere, or
a specific number of terms may be selected. The conversion is done by a least squares fitting
so that the new asphere provides the minimum RMS difference in the surface sag between the
old and new aspheres. Only the clear semi-diameter or semi-diameter of the surface is used in
determining the region over which the fit is done, and for aspheres that use the normalization
radius, the clear semi-diameter or semi-diameter is used for this normalization radius. If the
radius or conic of the starting asphere are either non-zero or variable, then these parameters
are also made variable in the fitting process and the new asphere may modify these values. The
residual RMS surface sag error in lens units is reported at the end of the fitting process. If the
asphere conversion is valid, this should be a very small number relative to the clear semi-
diameter or semi-diameter of the surface. If the residual is too large, a higher setting for the
number of terms may be used to reduce the residual error.
Settings:
Surfaces The lens surfaces to match. Choose All or Variables. If All is chosen, all glass elements
with glass surfaces are matched. If Variables is chosen, all glass elements that have variable
radius status are matched.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1668
EFL Tolerance (%) The maximum EFL tolerance that matched stock lenses can deviate from
the defined lens. This value is the EFL difference divided by the EFL of the defined lens
expressed as a percent.
EPD Tolerance (%) The maximum EPD tolerance that matched stock lenses can deviate from
the diameter of the defined lens. The EPD of matched lenses will not be smaller than the
diameter of the defined lens. This value is the EPD difference divided by the diameter of the
defined lens expressed as a percent.
# Opt. Cycles The number of cycles of DLS to use when optimizing air thicknesses. This option
is only available when air thickness compensation is enabled.
Save Best Combination If selected, the best combination of lenses will be saved in the current
directory with the name {lens_name}_SLM.
Discussion:
This feature automates the process of finding suitable stock lens replacements for as designed
lenses in an optical system. OpticStudio will search through the selected vendor catalogs for
matches for the selected lens elements. The EFL tolerance setting and EPD tolerance setting
are used to limit the stock lenses considered. Additional limiting criteria defined internally are
shape factor, wavelength range, and number of elements. When OpticStudio finds a potential
match, the stock lens data is copied into the original system and the merit function is
evaluated. A list of the top matches for each component and the resulting merit function are
displayed in the text listing results. In addition, the best combinations of the top matches are
evaluated to find the best combination of stock lenses. These results are also listed in the text
results.
In the stock lens matching tool, OpticStudio will use the following shape factor to determine
whether the stock lens is flipped.
If the product of the lens shape and the stock shape is negative, that means the two shape
factors have a different sign. The stock lens will be flipped firstly before further considering it
for substitution in the design. If the original lens shape factor is exactly zero, or if the product
of the lens shape and the stock shape is positive, the lens matching algorithm will not flip the
stock lens.
This feature is intended to be used with spherical singlets and cemented, multi-element lenses.
Air-spaced doublets and other multi-element lenses will be matched as individual elements.
Aspheric, GRIN, and toroidal surfaces are not supported. The matching process can be time-
consuming depending on the number of elements to match, the number of vendors selected,
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1669
and the complexity of the merit function. A progress indicator is shown in the title bar of the
dialog to give an indication of the matching progress, though it is not possible to pre-
determine the exact time it will take to complete the matching. If the process is taking too
long, the terminate button may be used to abort the process.
Note that many stock lenses use encrypted coatings provided with the default COATING.DAT
file. If a different coating file is used, it is necessary to copy over the stock lens encrypted
coatings found at the end of COATING.DAT. OpticStudio will issue a warning if a coating file
other than COATING.DAT is used with this tool. This tool will only work with newer, binary
format lens catalog (ZMF) files; older ZMF files may be in text format. All current vendor
catalogs and catalogs created with the Make Private Lens Catalog tool are in binary format.
The Test Plate Fitting tool is available in the Optimization Tools section of the Optimize tab.
This tool provides automatic fitting of radii to a vendor test plate list. Only radii which are
variable prior to executing this tool are fit.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1670
Settings:
Method of Fit Selects the fitting order, which may affect the quality of the fit. See below.
Discussion:
The current merit function is used as a figure of merit during the fitting process. To match a
particular radius, make the radii variable on the lens data, or make the CRVT operand
corresponding to the radii variable on the multi-configuration editor. As many radii as desired
can be matched at one time. OpticStudio will attempt to fit all radii with variable status, even if
the radii correspond to surfaces that are not spheres, such as toroids, cylinders, or other
aspheric surfaces. To prevent fitting of the radii on these surfaces, remove the variable flag
before performing the fitting.
Now select the test plate fitting tool. Select which vendor test plate file is to be used. The
fitting method may be selected as follows:
Try All Methods: Try all of the following methods, and uses whichever one yields the lowest
merit function.
Best To Worst: Fits the radii with the closest test plate match (measured in fringes) first.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1671
Press OK to begin the fitting. Before any fitting is performed, OpticStudio will do a local
optimization on the starting system. If it is not fully optimized, the starting radii may differ
from what is shown in the lens data editor. OpticStudio then proceeds to search the test plate
list for the closest match (in fringes) between all of the radii and all of the test plates. Each test
plate must be of the correct shape (convex or concave or both, as required) and must have
sufficient diameter to test the clear aperture of the lens surface (as determined by the clear
semi-diameter or semi-diameter value on the Lens Data Editor). The test plate has sufficient
diameter if the diameter is at least 3/4 of the clear aperture diameter of the lens surface (if the
test plate diameter is defined as zero, this test is not applied and any semi-diameter value is
accepted). The surface being fitted must also have an edge sag no more than 0.2 mm different
than the test plate at the clear semi-diameter or semi-diameter of the surface. In practice this is
hundreds of fringes of power and test plates that do not meet this test would likely increase
the merit function unacceptably.
The radius of the test plate that best fits one of the radii is then substituted in for the actual
radius. The variability of the chosen radius is removed, and the lens is reoptimized. For this
reason it is important to allow compensators such as spacings to be variable as well as the radii
to be fit. The reoptimization will adjust all remaining variables, including the remaining radii.
Note the optimization will use the current merit function. After optimization, if there are any
variable radii remaining, the procedure repeats. Note that the radii are not fit in general in the
order they appear in the lens data or multi-configuration editors.
During the fitting process, the number of radii remaining and the current merit function will be
presented. After all of the radii have been fit, a report will be presented. The report will provide
the vendor identification information, and a list of the radii that were changed and which
vendor test plate ID numbers were selected.
There is no way to know if the test plates selected are optimal. If there are a large number of
test plates in the test plate list, and the values are reasonably continuous without large gaps,
the fitting will usually be quite good.
If the merit function increases unacceptably during the fitting process, either a different vendor
test plate list should be used, the design needs to be modified, or some of the lenses may have
to have custom test plates made.
Usually, the last radii to be fit are the likely candidates for custom test plates. The report shows
the order in which the radii were fit.
Using the “Try All Methods” option will yield the lowest overall merit function, since all 4
methods are tried and the only the one yielding the lowest merit function is retained. However,
there may be some algorithm other than the 4 listed that might yield a better fit.
There are occasions where the algorithm is unable to find any suitable test plate match for a
given radius. This can occur when no test plate with a large enough diameter is sufficiently
close to the desired radii. If this occurs, a message stating “NO MATCH FOUND!” will be
printed in the report file, and that radii will subsequently be ignored. Usually this means test
plates for this radii will have to be custom made.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1672
All test plate data is provided by the respective vendors, and no warranty is provided as to the
accuracy or completeness of the data. For details on the latest vendor test plate lists, contact
the vendor. New test plate files may be added to OpticStudio. The test plate data files end in
the extension .TPD, and must be placed in the <data>\Testplate folder (see “Folders”). The text
files use the following format:
! Header line 1
! Header line 2
! etc... up to 15 lines of header info is supported
partname radius diameter code
partname radius diameter code
partname radius diameter code
partname radius diameter code
etc...
where partname is an ID number or name for the test plate, radius is the radius of curvature in
millimeters, diameter is the actual plate diameter in millimeters, and code is an integer value.
The code should be -1 for concave only, 0 for both concave and convex, and 1 for convex only.
All four values must be on one line, separated by spaces or tabs. No spaces or tabs are allowed
in the partname parameter. Each test plate (or pair) should be on one line, and the lines
separated by carriage returns. The numeric values can be in free format, but must be in
millimeters. The maximum number of test plates allowed per file is 30,000. The header lines
can be used for any purpose, and typically indicate the vendor’s name, address, phone, e-mail,
and other contact data. The “!” is replaced by a space when OpticStudio lists the data out on
test plate lists and fitting reports.
The Test Plate Lists tool is available in the Optimization Tools section of the Optimize tab. This
tool displays in a text window a list of test plates from a specific vendor.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1673
Settings:
File Name To change the name of the test plate file, expand the settings in the upper left
corner of the window. The file must be in the <data>\Testplate folder (see “Folders”)
Discussion:
All units on the report are in mm. The CC and CX columns indicate the availability of concave
and convex test plates, respectively.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1674
Optimization Overview
The Local Optimization (or simply, “Optimization”) feature provided by OpticStudio is quite
powerful, and is capable of improving lens designs given a reasonable starting point and a set
of variable parameters. Variables can be curvatures, thicknesses, glasses, conics, parameter
data, extra data, and any of the numeric multi-configuration data. OpticStudio uses either an
actively damped least squares or an orthogonal descent algorithm. The algorithms are capable
of optimizing a merit function composed of weighted target values; these target values are
called “operands”. There are several different default merit functions, described in a
subsequent section. These merit functions can be changed easily using the Merit Function
Editor. For details on this procedure see “Modifying the merit function”.
Optimization requires three steps: 1) a reasonable system which can be traced, 2) specification
of the variables, and 3) a merit function. A reasonable system is a rather loose concept which
means that poorly conceived designs are not likely to be transformed into exceptional designs
by the optimization algorithm (although there are exceptions). The variables, and there must
be at least one for the optimization algorithm to be able to make any progress, are specified
on the various editors, as described in the next section.
The algorithm used by the optimization feature described in this chapter is designed to find
the “local” minimum of the specified merit function. However, OpticStudio also has the
capability to search for a “global” minimum of the merit function. The global minimum is the
lowest possible value for the merit function, and if the merit function is selected appropriately,
this implies the best possible solution to the problem. The global optimization feature is not
for novice users, and is not appropriate for interactive designing. For details see “Global
Optimization”.
During optimization, the “Number of Cycles” is displayed on the dialogs for both local and
global optimizers, while the “Number of Systems” is only shown on the dialog of the global
optimizers (Global Search and Hammer). This is because while the Number of Systems
provides an indication of how much of solution space has been covered during global
optimization (a process that will otherwise run indefinitely), this number is not a meaningful
metric for analyzing the performance of the local optimization. An increase in the Number of
Systems by one simply means that OpticStudio has calculated the merit function for one
combination of proposed variables, while an increase in the Number of Cycles by one means
that the optimizer has evaluated the merit function for several systems and found a path to
move towards the local minima in solution space. The number of system evaluations included
in one cycle is related to the number of variables; as more variables are defined, more systems
will need to be included in each optimization cycle, thus increasing the optimization time.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1675
Selecting optimization variables
Variables for optimization are specified by pressing Ctrl-Z when the highlighted bar is on the
parameter to be varied in the Lens Data Editor. See the “Lens Data Editor” section of The Setup
Tab. Note that Ctrl-Z is a toggle. The Multi-Configuration Editor also contains numeric data
that may be made variable by using Ctrl-Z. Glasses cannot be made variable directly because
they are discrete. To optimize glasses, see the “Global Optimizers” section of The Optimize Tab.
Operands are set by typing the name in the first column and then filling in the remaining data
fields. There are multiple fields that may be required to define an operand. The fields are called
Int1 and Int2 for the two integer values, and Data1 through Data6 for up to 6 double precision
values. Not all of the operands use all of the fields provided.
Many of the operands use Data1 through Data4 for the values of Hx, Hy, Px, and Py; these are
the normalized field and pupil coordinates (see “Normalized field coordinates”). Note that
OpticStudio does not check to see if the specified Hx, Hy, Px, and Py coordinates are within the
unit circle. For example a pupil coordinate of (1, 1) is actually outside the entrance pupil, but
you will not get an error message when tracing these rays unless the rays cannot physically be
traced.
The target is the desired value of the specified parameter. The difference between the target
and the value of the operand is squared, and summed over all operands to yield the merit
function. The value of the target and the operand itself is unimportant in optimization, only the
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1676
difference between the two. The larger the difference, the greater the contribution to the merit
function.
The weight is the relative importance of that parameter. The weight can be any number,
positive or negative. However, the optimizer will act somewhat differently if the weight is
negative, zero, or positive.
Percent Contribution
This column lists the relative contribution of each operand to the overall merit function as a
percentage. This column is not user editable.
When the weight is negative, the operand will be treated as a Lagrangian multiplier. The
Lagrangian multipliers force the optimization algorithm to find a solution which exactly meets
the specified constraint, regardless of the effect on the other operands. This is sometimes
useful to exactly meet an optimization target, such as focal length or magnification. In some
respects, this is similar to a weight of “infinity”, however it is implemented in a way that is
numerically more stable.
Because there is generally a non-linear relationship between the variables and the operand
targets, OpticStudio may not converge to the exact target value in a single optimization cycle;
however, multiple cycles will usually converge to the Lagrangian targets with extremely high
precision in a few cycles if a solution exists. It is possible to define Lagrangian targets that
cannot be met with the variables provided, especially if there is more than one Lagrangian
target defined. For purposes of computing the overall merit function value, OpticStudio will
use the absolute value of the weight.
For best results, use Lagrangian multipliers sparingly, if at all. Better optimization and adequate
accuracy is usually just as easily achieved using heavier weights on those operands which
require exact (or nearly so) values. If a Lagrangian multiplier operand does not exactly
converge with a modest weight, such as -1, try a larger magnitude negative weight, such as -
1000. This will allow the merit function to decrease while meeting the target exactly.
Lagrangian multipliers should not be used with boundary operands, such CTGT, because
appropriate derivatives cannot always be computed for these types of operands.
When the weight is zero, the optimization algorithm calculates but ignores the operand. This is
very useful for computing a result that does not have a specific target, but might be used
elsewhere in the merit function; or if the value is used as a check or monitored parameter.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1677
If the weight is greater than zero, then the operand will be treated as an “aberration” to be
minimized along with the merit function. The vast majority of operands should have positive
weights.
where W is the absolute value of the weight of the operand, V is the current value, T is the
target value, and the subscript i indicates the operand number (row number in the
spreadsheet). The sum index “i” is normally over all operands in the merit function, however
the merit function listing feature (see “Merit Function Listing”) sums the user defined and
default operands separately.
Because of the dimensional differences between parameters such as effective focal length
(tens of millimeters or more) and RMS spot radius (micrometers), usually a weighting of one is
sufficient for quantities measured in lens units. However, the residual value of the effective
focal length with this weighting is not likely to be zero. Increasing the weighting will bring the
resulting system closer to the desired effective focal length. This effect is often noticeable
when defining ETGT (edge thickness greater than) operands. Usually ETGT with a target of zero
will often yield a value just slightly less than zero. Rather than increase the weight, it is much
simpler to provide a target value of 0.1, or some such number.
After making changes to the operand list, the current values of each operand can be updated
using the Update button in the toolbar. This is also useful for checking to see what the current
values of each operand are, and which has the greatest contribution to the merit function. The
percent contribution is defined as
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1678
where the index j indicates the sum over all operands.
The rule is if the boundary is violated, the actual value is shown; if it is not violated, the value is
set to the target and is therefore ignored by the optimization algorithm. If during optimization
the boundary becomes violated, then the value will automatically be updated and the
optimization algorithm will attempt to correct the offending parameter.
The boundary operands which constrain a range of surfaces are slightly more complicated.
These multiple surface operands return values which represent the total effect of all violated
boundaries within the specified surface range. For example, the operand MNCT 1 10 will
constrain the minimum center thickness of surfaces 1 through 10. If the target is 3.0, which
defines the boundary, then the difference between the value of the operand and the target is
the sum of the difference between 3.0 and the thicknesses of all surfaces between 1 and 10
whose center thickness is less than 3.0. If only one surface in the range has a center thickness
less than 3.0, say 2.5, then the operand has a value of 2.5. If a second surface is added that has
a thickness less than 3.0, say 2.2, then the operand will have a value of 1.7 (2.5 minus .8; the .8
is 3.0 - 2.2). The total difference between the target of the operand and the value is 3.0 - 1.7 or
1.3. This difference of 1.3 is due to the violation of 0.5 by the first surface and another 0.8 by
the second surface.
If calculating the value of these boundary operands seems confusing, don't worry; OpticStudio
does all the calculations for you. All you need to do is to specify the boundary type (such as
MNCT or MNET) the boundary range (surface 1 through 10, or whatever) and the desired value
(3 mm or whatever). If all the boundary constraints are met, then the operand value is equal to
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1679
the target, otherwise, the value will be different and the merit function will increase. The
increased merit function will cause the optimization algorithm to seek a reduction of the
operand contribution.
If a boundary operand does not seem to work, there are several things to check:
1. Make sure the variables you have defined can have some effect on the boundary oper-
ands. A common mistake is to specify MNCT and have some “frozen” thickness within
the surface range. If the thickness violates the boundary and it is not variable, OpticStu-
dio can't fix it. The operands DO NOT ignore violated but frozen boundaries.
2. If there is a small residual error, try increasing the boundary value. For example, if
MNCT is used with a target of 0.0, and the value is a small number (like -.001) the prob-
lem is not that the operand doesn't work, it is that the residual error is too small to
increase the merit function significantly. It is usually better to increase the target to 0.1,
or some other number, rather than to increase the weight. Increasing the weight will
only lead to a smaller violation (like -.0000001) rather than meeting the boundary.
3. Check to see if there is a reasonable contribution to the merit function. You can easily
check this with the percent contribution column. By looking at the percent contribution
column, verify that the operand in question has enough influence on the total merit
function. If it does not, increase the weight, or see the preceding paragraph for advice
on changing the target.
Performing an optimization
To begin optimization, click the Optimize! Button in the Automatic Optimization section of the
Optimize Tab.
OpticStudio allows very general operand definitions. There are two tricks to creating these
operands. First, use certain operands with zero-weighting to define the parameters you need,
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1680
and second, use the operational operands to define relationships between them. For example,
suppose you require that the thickness of surface 3 and the thickness of surface 4 sum to 10.
There is an operand that does this, TTHI. The command structure would look like this:
However, for illustration only, note that there is an alternate way of calculating the same thing:
Operand 1 uses the Center Thickness VAlue (CTVA) command to extract the value of the
thickness of surface 3. Similarly, operand 2 is used to extract the thickness of surface 4. The
zero weighting on both operands means the optimization algorithm ignores the constraint; it
is only used as an intermediate step. Operand 3 now sums two operands: number 1 and
number 2. The result is the sum of the thicknesses of surfaces 3 and 4 is the value of operand 3,
and this has a non-zero weight. The optimization algorithm will attempt to drive the sum to 10.
Why go to all the trouble of this three-step process if a single TTHI command would do the
same thing? The reason is that this approach can be extended to develop very general
operands. For example, suppose you wanted the radius of curvature of surface 5 to be
centered on the vertex of surface 8. Study the following commands to see if you understand
how this is done:
The CVVA command extracts the curvature of surface 5, the curvature we want to control. TTHI
5 7 calculates the distance from surface 5 to surface 8 (note we only sum to surface 7 to get to
surface 8, since the thickness of surface 8 gives the distance to surface 9). Since the curvature
of the surface is the reciprocal of the radius, the product of the curvature and the distance
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1681
must be one; hence the target is 1 for operand 3. Operand 3 is also the only weighted operand
in the sequence.
Now consider the requirement that the thickness of surface 5 must be greater than twice the
radius of curvature of surface 4 plus the conic constant of surface 2 (this is nonsensical, but
illustrative of the flexibility in the approach):
Operand 1 extracts the (center) thickness of surface 5. Operand 2 extracts the value of the
curvature of surface 4. Operand 3 sets a constant of two, and operand 4 divides the value 2 by
the curvature (yielding twice the radius of curvature). COVA extracts the conic, and SUMM ads
operands 2 and 4. Operand 7 takes the difference of the thickness and twice the radius plus the
conic. Since we want the former to exceed the latter, we set an operand greater than
constraint; the only one to have a non-zero weighting.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1682
Optimizing Tolerance Sensitivity
(optimization overview)
The idea of optimizing a lens for reduced tolerance sensitivity is that a very low merit function
is not useful if the as-built performance is significantly degraded by tolerance sensitivity.
Therefore, the optimal design has a reasonable nominal performance but is relatively
insensitive to manufacturing defects. The theory is there may be a potential trade-off between
performance and tolerance sensitivity.
Tolerance sensitivity in an optical design comes from many sources, including angles of
incidence of rays on surfaces, aberration balancing, and the nature of the potential fabrication
defects. The interaction of multiple defects makes accurate tolerance prediction a difficult
statistical problem. For a complete discussion of tolerance analysis, see the chapter
“TOLERANCING”.
The optimization operand TOLR can in principle be used to optimize for reduced sensitivity to
tolerances. To use TOLR, first optimize a design for reasonable starting performance. Then,
define the relevant tolerance operands, limits, compensators, and criterion as described in the
chapter on Tolerancing. Save the options of the tolerance dialog box; OpticStudio uses these
saved options to compute the data returned by TOLR. TOP files are created by saving the
tolerance options from the tolerance dialog. To use the most recently saved tolerance settings,
set the file number on the TOLR operand to zero. To use a specific saved settings file, use an
integer value between 1 and 999. The saved settings file name must be of the format
TOLRnnn.TOP, where nnn is the 3 digit integer specified on the TOLR operand file argument.
For example, if the desired tolerance settings are saved in a file named TOLR005.TOP, the
integer file value should be 5. Note only files with the correctly formatted name may be
referenced and used by TOLR. The TOP files must be stored in the <data>\Configs folder (see
“Folders”). The only criterion that is not allowed is “Merit Function” since that would create an
infinite loop. If a script tolerance criterion is being used, do not load any merit functions within
the script that contain TOLR operands, as this may also create an infinite loop that OpticStudio
cannot detect.
TOLR takes a single “data” integer. If data is 0, TOLR returns the estimated change in
performance. If data is 1, TOLR returns the nominal performance. If data is 2, TOLR returns the
predicted performance, which is the sum of the nominal and estimated performance change.
The first instance of TOLR (the first row in which TOLR appears) is the only instance for which
the tolerance analysis is actually run, so that TOLR only runs once for each merit function
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1683
evaluation. The other values computed by TOLR are saved and can be retrieved by using data
values other than 0 on subsequent calls to TOLR. Other values of data are currently unused and
may be used for future expansion of this feature.
The practical difficulty of optimization of tolerance sensitivity lies in the computation time.
Complicated lenses may have hundreds of tolerance operands, and complex criterion may take
considerable time to compute. When using TOLR, the sensitivity analysis may be computed
thousands or even millions of times, which can make the use of TOLR impractical. The
following tips should be used to improve the efficiency of the tolerance analysis and make
TOLR efficient:
-Test and verify the tolerance sensitivity analysis outside of optimization before using TOLR.
-Use “Sensitivity” and not “Inverse Sensitivity”. Inverse sensitivity is slower and meaningless for
optimization.
-Use “Paraxial Focus” for the “Comp” control if possible... optimization of the compensator
values requires an “optimization within an optimization” that is slow and memory intensive;
although it is supported if required.
-OpticStudio will automatically ignore the Monte Carlo portion of the tolerance analysis.
-Do not use “Merit Function” as the tolerance criterion, as this will create an infinite loop.
The faster the tolerance sensitivity runs, the faster TOLR and thus the optimization will execute.
However, there are problems for which only the flexibility of a user defined program is
sufficient for defining the data computed by an operand. There are two ways of achieving this:
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1684
The use of ZPL macros is simpler, well integrated with OpticStudio, and requires very little
programming experience. ZPL macro optimization is generally a better choice for simpler
macros that execute fairly quickly.
Externally defined programs are more complex to program, require an external C or other
language compiler, and at least some programming experience. However, externally defined
programs can be vastly more complex than what is supported by the ZPL macro language, and
usually run faster. Complex calculations will benefit more from being externally compiled than
simple calculations.
Both the ZPL and the externally compiled methods of implementing UDO's are described in
detail below.
ZPLM is simple to use. The Mac# and Data values are used to specify the macro number and
data field number, respectively. The macro number is used to indicate which ZPL macro should
be executed, while the data field number indicates which value computed by the macro should
be optimized.
The macro number must be an integer between 0 and 99. If the Mac# value is 17, for example,
then the macro to be executed must be named ZPL17.ZPL. The macro name must always use a
two digit representation of the macro number. If the macro number was 6, then the macro to
be executed would be ZPL06.ZPL. The ZPL macro file must reside in the folder for ZPL macros;
see “Folders”.
The data field number may be any number between 0 and 50, inclusive. This number refers to a
position in a global array associated with the lens in memory. During execution of the macro,
the macro keyword OPTRETURN specifies which data field number stores the results of the
macro calculation. There are 51 different data fields, so that a single macro call can be used to
optimize up to 51 different values simultaneously. For example, suppose you needed a macro
which computed the total length of the lens from surface 1 to the image surface (this is in
effect a user-defined version of the TOTR operand). The macro might look like this:
n = NSUR()
x = 0
FOR i = 1, n, 1
x = x + THIC(i)
NEXT
OPTRETURN 0, x
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1685
Note the use of the OPTRETURN keyword. This keyword stores the resulting value for “x” in the
global array position 0. Suppose this macro was named ZPL15.ZPL. To optimize the resulting
value for x, the ZPLM merit function operand would be added to the Merit Function Editor,
with Mac# = 15 and Data = 0. After updating the merit function, the “value” would be the
same as that returned by TOTR, and it can be optimized in the same way.
ZPLM also permits the use of the data in the Merit Function Editor columns. These data fields
can be read by the ZPL macro using the PVHX, PVHY, PVPX, PVPY, PVEX, and PVEY ZPL
functions. “PV” is a mnemonic for “Pass Value”.
There is one very important thing to know about the data field number. If it is zero, then the
macro is executed and the value from OPTRETURN 0 is returned. However, if the data field
number is not zero, then the macro is not executed, but any previous value stored from an
earlier call to the macro is used instead. The advantage to this convention is substantial. If the
macro computes many values, all of which need to be optimized, the macro only needs to be
called once, yet multiple ZPLM operands can access the data. This is much more efficient than
calling the macro multiple times.
For example, suppose a macro named ZPL11.ZPL computes three values, all of which require
optimization. In the macro, the values are stored using OPTRETURN:
OPTRETURN 0, x
OPTRETURN 1, y
OPTRETURN 2, z
Then three ZPLM operands in the merit function can extract the data and perform the
optimization with a single call to the macro:
ZPLM 11 0
ZPLM 11 1
ZPLM 11 2
The macro ZPL11.ZPL is only called during the evaluation of the ZPLM 11 0 operand. Note the
data columns can only be used if the Int2 value is zero, since only in this case is the macro
evaluated.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1686
not restore the lens being evaluated to the state it was in prior to the evaluation of the ZPLM
specified macro. If however the macro is intentionally used to alter the lens data prior to
evaluation of subsequent operands, two macros should be executed. The first should modify
the data as required, and the second should restore the data to the original condition. Both
macros can be listed in the merit function editor, with the intervening operands executing on
the altered lens data.
Macro commands that manipulate the user interface, such as CLOSEWINDOW, WINL(), and
GETT() are not effective. The reason for this restriction is that these commands pull information
from the single system copy reflected in the user interface. Thus, even though the ZPLM macro
updates the system copies, the primary system copy that the user interface displays will not be
updated.
The operand UDOC is used to call an external client program from within the merit function.
The client program performs the required computations, possibly by using the ZOS-API to
make multiple calls back to the OpticStudio server, and finally returns the result to OpticStudio
via the API. The computed data is then placed in the “value” column of the Merit Function
Editor and thus may be optimized in the usual way.
UDOC is simple to use. The Prog# and Data values are used to specify the client program
number and data field number, respectively. The client program number is used to indicate
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1687
which client program should be executed, while the data field number indicates which value
computed by the client program should be optimized.
The client program number must be an integer between 0 and 99. If Prog# is 17, for example,
then the client program number to be executed must be named UDOC17.EXE. The client
program name must always use a two digit representation of the client program number. If the
client program number was 6, then the client program to be executed would be UDOC06.EXE.
The client program file must reside in the <data>\ZOS-API\Operands folder (see “Folders”).
When reaching a UDOC operand with a data field number of zero (more on the data field
number shortly), OpticStudio will call the client program. The data values are passed via the
ZOS-API. A C# example of a UDOC operand can be found in the User Operand sub-section of
the section About the ZOS-API. In short, the four Data arguments passed to the UDOC
operand can be found on the IZOSAPI_Application interface:
Once execution in the client has begun, the client program must conduct the following critical
steps:
The ZOS-API link is established in the same manner as that of a User Analysis or User
Extension, and nearly identical to a Standalone application. Templates for creating a ZOS-API
based UDO operand can be found in the ZOS-API Application Builders section of the
Programming tab; currently User Operand templates are only available for C++ and C#.
The data is then computed, optionally using any of the available ZOS-API calls. Once the data
is computed, up to 1001 values may be sent back to the server, and ultimately to the optimizer
within OpticStudio, by setting the results data:
int dataLength = TheApplication.OperandResults.Length;
double[] results = new double[dataLength];
// Fill the output results…
// Now assign the locally calculated result back to the
Application.
TheApplication.OperandResults.Data = results;
It is critical that the client program shut down when it completes, as OpticStudio will wait for
the client program to terminate before continuing. OpticStudio has no way of knowing how
long the computation may take, and so OpticStudio will “hang” until it receives the data. If the
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1688
client program never closes OpticStudio will never complete execution of the operand, and will
hang forever. Note that if the client program crashes OpticStudio will continue as if the
operand result was invalid.
The index of the result data returned is the same as the Data field in the editor. This data is
stored with the lens system for later use by UDOC operands. There are 1001 different data
fields, so that a single client program call can be used to optimize up to 1001 different values
simultaneously. The data field number indicates which of the returned values should be placed
in the “value” column for that UDOC operand.
There is one very important thing to know about the Data number when used on the Merit
Function Editor UDOC operand. If it is zero, then the client program is executed and the value
from data position 0 is placed in the value column. However, if the data field number is not
zero, then the client program is not executed, but any previous value stored from an earlier call
to the client program is used instead. The advantage to this convention is substantial. If the
client program computes many values, all of which need to be optimized, the client program
only needs to be called once, yet multiple UDOC operands can access the data. This is much
more efficient than calling the client program multiple times.
The Merit Function Editor also supports a timeout argument for UDOC. This value sets the
maximum amount of time in milliseconds OpticStudio should wait for a UDOC to compute the
requested data and return control to OpticStudio. The default value of zero will set the timeout
to 50,000 milliseconds. Values larger than 50,000 may be used if needed, but it is of course
difficult for optimization to make substantial progress if the evaluation of the merit function
takes such a long time. Values shorter than 50,000 may also be used to improve the response
of OpticStudio if the UDOC client application is not working properly. Note that it is normally
the case that UDOC data is computed quickly and the timeout limit is only used to handle
unexpected error conditions or unusually long computations. If the UDOC completes the
requested computation in less time than the timeout limit, the control still returns to
OpticStudio immediately.
Note that the UDOC operand works on a copy of the lens system, so changes can be freely
made without affecting any other part of OpticStudio.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1689
merit function algorithm will skip the zero weighted fields or wavelengths when constructing
the merit function. This results in fewer rays being traced, speeding execution.
For example, if the lens is being evaluated at five field points, it is possible that only the first,
third, and fifth field need be included in the merit function. Of course, later in the design
process all fields may need to be included and the default merit function reconstructed.
There are a few other tricks to improve performance. Avoid setting boundary operands on
variables unless the optimized solution persists on implausible designs. Boundary operands
add computational overhead. Use solves instead of explicit operands whenever possible. For
example, use a curvature solve to control the focal length rather than an operand if possible.
Optimization is inseparable from the art of modern lens design, and only practice will make a
designer a proficient user of optimization algorithms. Users who are expert at other software
optimization algorithms will probably find OpticStudio easier to use, and with a little practice,
the mechanics of using the interface will slip into the subconscious, and the designer can
concentrate upon the design itself. If you are new to computerized optimization of lenses,
there is no better way to learn than to practice.
Unfortunately, this often requires considerable experience, and even more often, excessive
tedium. An experienced designer uses a combination of intuition, analysis, and luck in
searching for new, better, design forms. OpticStudio provides an automated capability for
performing this global optimum search; the feature is described the “Global Optimization”
section of “The Optimize Tab” help file.
Sequential Optimization
The following sections are considerations for optimization in Sequential UI Mode.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1690
Pitfalls with the Default Merit Function
To set up the default merit function, see the “Optimization Wizard” section of “The Optimize
Tab”
The default merit function is easy to set up (with the Optimization Wizard), numerically
efficient, and suitable for a large number of optimization problems. However, most optical
designs require extensions or modifications to the default as the design progresses.
OpticStudio offers significant flexibility in the definition of the merit function, as described in
the following sections.
Note that if the field or wavelength values or weights are changed, you must reconstruct the
default merit function. If you are using the RA algorithm, reconstruct the default merit function
if the vignetting influence changes appreciably during optimization.
If field or wavelength values or weights are changed, reconstruct the merit function.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1691
This new Contrast Optimization technique allows for robust and efficient optimization on the
system MTF at a given spatial frequency. The method minimizes the wavefront differences
between pairs of rays separated by a pupil shift corresponding to the targeted spatial
frequency, which maximizes the MTF.
A given point on the MTF can be calculated as the autocorrelation of the complex pupil
function (the complex wavefront in the exit pupil). Most optical software uses this calculation
method because it is more computationally efficient than calculating the full MTF as the FFT of
the PSF intensity.
The autocorrelation calculation is essentially a convolution. This involves shifting the complex
pupil, multiplying the shifted and unshifted pupils, summing the terms, and taking the
modulus to get the MTF.
The amount of pupil shift corresponds to the spatial frequency (ξ) of the final MTF value. For a
circular pupil, a shift of Δ = D/2 causes the shifted and unshifted apertures to just touch and
the MTF value to go to zero. That shift corresponds to the cutoff frequency. Smaller shifts are
linearly scaled from this value using Equation 2.
Considering a generic 3x3 pupil function, we can write down the shifted and unshifted pupil
functions, p(x,y) and p(x-Δ,y).
Carrying out the convolution calculation and taking the modulus results in a series of cosines.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1692
The argument of the cosines is the phase difference in the pupils across a distance Δ. To
maximize the MTF values, then, the argument of the cosines should be minimized. In other
words, the phase differences across any distance Δ in the pupil should be minimized to
maximize the MTF.
This equation can be used to build an optimization merit function. Multiple sets of two rays,
separated by Δ in the pupil, are traced to find the phase difference between the two rays. The
optimization will attempt to drive all phase differences to zero. This is similar to reducing
wavefront slope, but it is carried out at the particular spatial frequency corresponding to Δ.
The diffraction based MTF operands (MSWT, MSWS, MSWA, MSWN, MSWX, MTFT, MTFS,
MTFA, MTFN, MTFX, MTHT, MTHS, MTHA, MTHN, and MTHX) and the geometric MTF
operands GMTA, GMTS, GMTT, GMTN, and GMTX provide a capability to directly optimize the
MTF (see the list of operands for MTF data).
This is a powerful capability, however, using MTF operands requires some care.
The MTF cannot be computed accurately if the aberrations are too large. Any optical system
for which the MTF plot produces invalid data will also produce meaningless data during
optimization. Large aberrations also tend to produce MTF curves that drop to zero at some
spatial frequencies, and then the MTF increases again at higher spatial frequencies. Local
optimization of the MTF at frequencies beyond the first zero in the MTF curve is usually
ineffective because the MTF must actually decrease before increasing as the aberrations
improve, and the local optimizer is always looking for incremental improvement. The MTF
operands should not be used if the starting MTF is beyond the first zero in the MTF curve at
the desired spatial frequency. If the aberrations are large, MTF optimization is likely not
required nor useful. An alternate approach is to first optimize using RMS wavefront error.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1693
Systems with low RMS wavefront error will have reasonable MTF performance. After the design
is very nearly in the final form, then MTF optimization may be used for a final “touch-up”.
MTF optimization is slower than RMS spot or RMS wavefront error optimization. Diffraction
MTF is slower than Geometric MTF; however, the Geometric MTF is an approximation that is
only reasonably valid for systems with circular or elliptical pupils and little or no apodization.
Huygens based MTF can be many orders of magnitude slower than RMS optimization, and is
thus not recommended for optimization. The slow execution speed may be noticeable when
updating the Merit Function Editor display, and entering and exiting the optimization dialog
box.
Note that if you use both MTFT and MTFS (or GMTT and GMTS) for the same field and
wavelength data, they should be placed on adjacent lines in the editor; otherwise, the MTF is
computed twice. If the sampling is too low, or the aberrations too large for accurate
computation of the MTF, then the MTF operands return zero rather than a meaningless
number.
To use the model glass method, first change the glass of the appropriate surface to a “Model”
solve type using Lens Data Editor. See “Material Solves” for information on this setting. For
information on model glasses, see the Using Model Glasses section of Using Material Catalogs.
With the “Model” solve type, OpticStudio will make a suitable guess for the index, Abbe
number, and partial dispersion; you only need to change the values if you wish.
As stated in the “Material Solves” section referenced above, unconstrained glass optimization
usually will lead to very high index materials being selected. This is because surfaces with high
refractivity (a large difference in index across the boundary) need less curvature than low
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1694
refractivity surfaces to have the same optical power. Lower curvature surfaces introduce less
aberration.
Unfortunately, high index materials are expensive, heavy, harder to fabricate, and may be
brittle, delicate, or susceptible to stains and scratches. Also, very high index materials do not
always exist; there are few glasses (for the visible spectrum) available with an index higher than
about 1.9. The Abbe number also is limited to the range of roughly 20 to 80. Therefore, it is
essential to limit the index (Nd) and Abbe (Vd) numbers to reasonable ranges during
optimization. The partial dispersion deviation (ΔPg,F) also must be limited in range.
There are two ways to limit the Nd, Vd, and ΔPg,F values. The simplest way is to add the RGLA
operand somewhere in the operand list. The RGLA operand measures the “distance” on the
glass map between the index, Abbe number, and partial dispersion of the model glass to the
closest glass in the currently loaded catalogs. For example, if you are optimizing the index and
Abbe and you have specified that the Schott and Hoya catalogs are used (specified in the
System Explorer), the RGLA operand computes the “distance” to each glass in these catalogs. If
the smallest “distance” is less than the target value specified for the RGLA operand, then the
boundary condition is met, and the value of the operand is equal to the target. If the closest
glass is farther than the target value, then the RGLA value is the actual “distance”. The
“distance” is defined by the square root of the weighted sum of the squares of the difference
between the index, Abbe, and partial dispersion terms for two glasses. The “distance” between
any two glasses is given by
where the factors Wn, Wa, and Wp weight the various terms. The weighting factors may be user
defined on the RGLA operand parameter list, or if left at zero, will default to 1.0, 1E-04, and
1E+02, respectively.
The best way to use RGLA is to specify the surface range that covers all of the surfaces you are
optimizing. For a target value, start off with 0.05. This will allow the glasses to easily move all
over the glass map, since the spacing between various glasses is usually less than 0.05. After
optimization, decrease the target to roughly 0.02 and reoptimize. This will encourage the
optimized system to choose index and Abbe numbers reasonably near actual glasses.
The other method for constraining index and Abbe values is to use the MNIN, MXIN, MNAB,
and MXAB controls. These operands are mnemonics for Minimum and Maximum Index and
Abbe values, and they are documented in the tables in “Optimization Operands”. These
operands can be used to restrict the optimization to specific rectangles on the glass map. It
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1695
may be useful to use RGLA along with MXIN, for example, to restrict the glass selection to
existing glasses with an index lower than some value.
At some point you will want to convert your variable index data back to a real glass. To convert
from a model glass to the closest real glass, remove the model glass status using Ctlrl-Z, or
choose the glass solve type as “Fixed”. There will usually not be a perfect match between the
optimized Nd and Abbe values and those of an actual glass in the current catalog. However,
OpticStudio will search through the catalog and find the “best fit” glass using a least-squares
criterion similar to the RGLA definition above (the partial dispersion term is omitted). If a glass
substitution template is being used, then the template will also be considered, and only
glasses meeting the template specifications will be considered. For information on templates,
see “Glass Substitution Template” in “The Optimization Tab” help file. The glass in the catalog
which differs the least from the variable index parameters is the glass selected. This glass is
also reported on the “Surface Data” feature (in the Analyze Tab, select Reports, Surface Data).
The index of refraction data shown is that calculated from the Nd and Abbe values, not the
best fit glass. After converting from a model glass to a real glass, another optimization run is
generally required. For systems with delicate chromatic aberration balancing, the best glass
choice might never be found using variable glasses, because the model glass dispersion is
never identical to the dispersion of a real glass.
To make an extra parameter data value a variable, see the Lens Data Editor “Solve Types”
section of “The Setup Tab” help file.
There are also several boundary constraints for use with the extra parameter data values. The
PMVA, PMGT and PMLT operands are parameter value, greater than, or less than, respectively.
The Surf value indicates the surface number to which the operand applies, and Param is used
to specify which of the extra parameter values is to be used.
Note: In previous versions of Zemax and OpticStudio, the operands XDVA, XDGT, and XDLT
were used for constraining extra parameter values. These operands were replaced with the
PMVA, PMGT and PMLT discussed above in more recent releases of OpticStudio.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1696
Optimizing Objects in a Non-sequential
Group with Sequential Rays
Optimizing variables within a non-sequential group is fundamentally no different from
optimizing other numerical parameters. Variables are set in the same way as for parameters in
the Lens Data Editor. However, optimizing non-sequential object properties is difficult because
of the unpredictable way in which rays may (or may not) propagate through a non-sequential
group. For non-sequential objects such as prisms, usually a small change in position or size of
the prism does not dramatically affect the ray path. However, for objects such as light pipes, a
small change in the object definition can dramatically affect the ray path. Rays that once
propagated through an object may miss the object completely if the object position or angle
changes slightly. This usually causes severe errors in the computation of derivatives, and the
optimization performs either poorly or not at all.
Another problem with some non-sequential systems is the exit pupil may not be a reasonable
image of the entrance pupil. For this reason, Rectangular Array rather than Gaussian
Quadrature should be used if the system is a non-imaging system that does not form an image
of the entrance pupil at the exit pupil.
For these systems, optimization may proceed more effectively using the global optimization
algorithms, which do not rely exclusively on derivative computation.
The solution is to replace hard edged apertures with soft-edged apertures placed on a user-
defined surface. A soft-edged aperture has a transmission that is unity over most of the clear
aperture, but near the edge the transmission drops to zero gradually over a small region,
rather than abruptly.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1697
Filter functions for doing this are included with OpticStudio as sample DLL files; see the “User
Defined Surface” section of the “Sequential Surfaces” reference file for details. See in particular
the discussion of the US_FILT4.DLL sample.
IMAE uses the current saved settings for the image analysis feature; except for “show” which is
always set to spot diagram for this computation. See the “Geometric Image Analysis” section of
“The Analyze Tab” help file.
DLTN
DLTN is used to control the maximum total change in index within a gradient index lens. Surf
defines the surface number, and Wave defines the wavelength number. DLTN is defined as:
The min and max index values are computed at the extreme z coordinates, Z min and Z max. Z
min and Z max are the Z coordinates of the minimum and maximum axial positions of the
blank used to make the lens, before the shaping begins. For a convex surface, they correspond
to the vertex. For a concave surface, they correspond to the maximum sag at that surface.
LPTD
LPTD is used to control the profile of the gradient within the material. Surf is used to define
the surface number of the gradient index surface. LPTD is an acronym for LightPath
Technology Delta, and the constraint is used to keep a nonlinear profile monotonically
increasing or decreasing. It only needs to be used when the quadratic or cubic term of the axial
gradient is variable. This operand only affects GRIN 5 surface types.
The LPTD operand should be used with a target of 0. The boundary constraint enforces the
following conditions:
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1698
Z min and Z max are the Z coordinates of the minimum and maximum axial positions of the
blank used to make the lens, before the shaping begins. For a convex surface, they correspond
to the vertex. For a concave surface, they correspond to the maximum sag at that surface. If the
residual value of the operand is less than zero, then the target may be decreased slightly (try
0.1). Changing the target is usually more effective than increasing the weight. The value of the
LPTD operand must be zero for the blank to be fabricated. Always check the gradient profile to
make sure the slope does not change sign.
Global Optimization
The conventional means of optimizing lenses has for decades been the use of the damped
least squares algorithm (DLS). DLS has many attractive features; it is efficient, and it is very
good at finding the "local" minimum of the merit function. In this context, the word local
means the lowest value of the merit function that can be reached from the current position in
solution space without ever increasing the merit function (this is something of an idealization,
in reality DLS can hop over small regions of increased merit function).
To visualize this problem, imagine you are on a hike, and are trying to find the bottom of a
valley from a starting point on the side of a hill. You would like to find the lowest point in the
valley. Suppose you cannot see the valley; it is very foggy and all you can see is the terrain very
close to where you now stand. You can determine which way is downhill, and proceed in that
direction until the slope becomes uphill again; at which point you find a new downhill
direction. You might repeat this procedure over and over until a point is reached where all
directions are uphill. This lowest point is then a local minimum, and the bottom of at least this
valley.
The problem with this method is that once you have arrived at the local minimum, there is no
known way (for the general optimization problem) to determine if there is not a better, lower
minimum somewhere else. For example, if you were to walk uphill in any direction from this
point until you reached a local peak, and then were to proceed onward downhill into the next
valley, you will eventually reach a new local minimum. Is this new minimum lower or higher
than the previous valley? The only way to find out is to take the hike!
You might ask, since computers are so fast, why not just try out every possible configuration to
see which is best? To get a feel for the scope of the problem, consider a cemented doublet lens
with six degrees of freedom (degrees of freedom manifest themselves as variables for
optimization). If you assume that each variable can take on 100 possible values (a coarse
sampling), then there are 1E+12 different possible systems. If each system evaluation requires
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1699
the tracing of 20 rays (a low estimate) and you can trace 1,000,000 rays per surface per second,
then the time required is about 8E+07 seconds, or about 2.5 years. For a four-element lens (16
variables) evaluated at three fields and three wavelengths, using 100 rays for evaluation would
require 1E+32 system evaluations or many billions of times the age of the universe.
There are approaches to the global optimization problem that (thankfully) do not require
unreasonable computational effort. These algorithms include simulated annealing, multistart,
expert systems, neural networks, and others. All of these algorithms have strengths and
weaknesses which are beyond the scope of this chapter.
The second algorithm is called “Hammer Optimization” (lens designers often talk about
hammering on a design to squeeze out the last bit of performance). See the “Hammer
Optimizer” section of “The Optimize Tab” help file. The Hammer Optimization algorithm is
used for exhaustively searching for the optimum solution once a reasonably good starting
point is found, presumably by prior experience or the Global Optimization algorithm. The
Hammer Optimization algorithm only requires a partially optimized lens and merit function in
the form of a ZMX file.
Although the global optimization algorithms are extremely useful, it is important to realize that
there is no guarantee that the true global optimum will always, or even occasionally be found.
Of course, there is no way to even determine if any solution is the global optimum, even if it is
the best you have ever found (remember the universe-lifetimes scale of the problem).
It is important to realize that there is no guarantee that the true global optimum will
always, or even occasionally be found.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1700
Both the Global and Hammer Optimization algorithms require extensive computational effort
to be effective. These algorithms are not intended to be used interactively - that is what Local
Optimization is for. If you set up global optimization, and watch while the computer works, you
are bound to be disappointed. Global Optimization is highly effective when you set the
problem up and let the computer run for many hours, or even several days, but not for ten
minutes. The ideal situation is to set up the problem before stopping work for the night, and
let Global Optimization (or Hammer Optimization, depending upon your requirements) work
overnight. In the morning, you should have useful results to look at.
The very rough design can be parallel plates of glass with a curvature solve on the last surface
to control the focal length. If a solve is not used to control the focal length, then the system
should have at least the approximate focal length desired. Also, the variable parameters must
all be defined. The lens must be saved before initiating Global Optimization. OpticStudio uses
the starting focal length as a scaling parameter, so the initial design should have at least the
approximately correct focal length!
Global Optimization will rarely find the global optimum by itself. The reason is that the Global
Optimization concentrates the effort on finding new, promising design forms rather than
converging exactly on the best possible solution for each form. This latter job is left to a
separate algorithm, called “Hammer Optimization”, described in the following section.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1701
The Hammer Optimization algorithm can also be used effectively on partially optimized
designs that were not generated with Global Optimization.
For more information, see the “Hammer Optimizer” section of “The Optimization Tab” help file.
Unfortunately, for many systems the newly optimized design will perform worse than the
model glass design. Even more frustrating is that the optimal design using real glasses may
have a different form than that found using the model glass.
Traditionally, to find a better combination of glass types, the designer would locate alternate
glasses on the glass map, substitute in the new selections, and reoptimize. If the new solution
was better, the glass choices would be retained; otherwise, a new set of glasses would be
evaluated. The procedure would continue as long as the designer could bear to continue the
search.
To use the substitution feature, set the status of each glass free to change to "substitute" on
the glass solve dialog box (double clicking on any glass name is the quickest way to reach this
dialog box).
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1702
Once the glass substitution status is defined, then invoke either the Hammer or Global
Optimization optimizers. OpticStudio will automatically alter the glass types during the search
for better designs. By default, OpticStudio will choose any glass from any of the currently
active catalogs, which are specified in the System Explorer. Glass substitution does not use
table glasses or MIL number glasses.
Not all "glasses" in the catalogs are actually glasses; some are liquids, gases, crystals, or plastics
that may not be acceptable for use.
Many glasses are very expensive, heavy, brittle, or have other undesirable mechanical
properties.
Perhaps only certain catalogs are desired for the newly chosen glasses; while other catalogs
must still be used for other surfaces in the optical system.
For these reasons, OpticStudio provides several optional methods to restrict the pool of
available glasses used for substitution:
By defining a "template" which places limits on the cost, acid resistance, stain resistance, and
other properties of substituted glasses.
By defining "penalties" in the merit function which discourage selection of glasses with
undesirable properties. The glass solve dialog box permits specification of a catalog name to
use for candidate substituted glasses.
If no catalog name is given (i.e. the catalog field is blank) then glasses may be selected from all
catalogs selected for use in the System Explorer. If a catalog name is given (i.e. Hoya) then only
glasses from that one catalog will be selected. This allows different surfaces to select from
different catalogs, if required. It is also useful for restricting the number of glasses considered
for substitution in a very general way. Note that user defined catalogs may be specified. No
extension should be specified, OpticStudio automatically appends the .AGF extension.
A Glass Substitution Template may be defined to restrict which glasses from all catalogs are
chosen for substitution based upon their cost, AR, SR, FR, CR, and PR code values. See the
“Glass Substitution Template” section in “The Optimize Tab” help file for information on
defining a template.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1703
To prevent only certain glasses from being chosen during optimization, choose “Exclude
Substitution” for the glass that should be avoided on the glass catalog dialog box; see
Description of Catalog Data in the section Using Material Catalogs. The advantage in excluding
glasses is that other glasses in the catalog may still be used, without having to define a
separate catalog.
Penalties are operands in the merit function such as GCOS, GTCE, and INDX which are used to
increase the merit function if glasses have unacceptable properties. This is the least efficient
method, because glasses may still be selected, and the subsequent lens optimized, even if the
resulting merit function ends up being too high to be considered a good solution. However, it
is useful for defining relationships between glasses, such as minimizing the difference of GTCE
between two glasses which form a cemented surface (to prevent the lens from breaking under
thermal stress).
1) If possible, place the stop on the first surface. If your entrance pupil is embedded in the
system, you can model this by using a dummy first surface for the stop and then use a negative
thickness to get to surface 2. This enhances performance because OpticStudio does not need
to calculate where the entrance pupil is. You can make this thickness variable if appropriate.
This technique does not work well for systems which inherently have entrance pupil distortion,
such as wide angle lenses.
2) Use a marginal ray angle solve on the last glass surface curvature to control the effective
focal length instead of the EFFL operand. Dropping one variable decreases the dimensionality
of the problem significantly, and the EFFL operator does require one additional ray trace,
slowing down the merit function evaluation.
3) Use a marginal ray height solve (for zero ray height) on the last thickness before the image
surface. Most lenses are well corrected for the 0.7 pupil zone on axis. You may want to use
another pupil zone if your intuition guides you to. This solve will ensure that every design
generated by Global Optimization is in focus, just as the curvature solve ensures the correct
focal length. These two solves together can improve the performance of the Global
Optimization algorithm by several orders of magnitude. For Hammer optimization, replace the
solve with a variable to allow for optimal defocus.
4) Use the MNCT and MNET operands. These are essential for avoiding negative center and
edge thicknesses. OpticStudio uses these boundary constraints to determine the appropriate
range of each variable in the search. The solutions will wander into these unacceptable regions
of solution space unless you specifically forbid it.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1704
5) Keep your merit function as simple as possible. Using 2 or 3 rings in the default merit
function construction (see the chapter "Optimization") is often a good idea. You can always go
to more rings for the Hammer optimization.
6) Be willing to run several long runs; perhaps one before starting a design problem to get
ideas for design forms, a few more to explore various promising designs, and a last run to
ensure the design you have settled on cannot be improved (Hammer is particularly good at
this last task).
7) Use substitute glasses rather than model glasses, especially when using Hammer. There is
not much point in using Hammer on a design that uses model glasses, because ultimately the
glasses will need to be converted back to real glasses and then optimized again. Substitute
glasses are highly useful, especially late in the design process when the design form has been
determined.
8) The Hammer algorithm may be terminated and then restarted without significant loss of
information. As the algorithm proceeds, it automatically saves any improved designs.
10) Some computes may be programmed to go into “sleep” mode if there is no user activity
for a set amount of time. This feature may need to be disabled to allow OpticStudio to
continue running, even if there is no input from the keyboard or mouse for long periods.
Summary
Finally, it is again stressed that the global optimum search feature may not ever find the global
optimum to any particular problem. It is very good at finding alternative design forms that
would have been tedious to discover by hand. It is a very powerful tool to add to your toolbox;
it is not a substitute for optical design skills.
The Global Optimization algorithm does have a strong random component, and therefore no
two runs will yield the exact same solutions every time. Sometimes the solutions will be worse,
sometimes better, but usually they are just different for runs of similar duration.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (sequential ui mode) 1705
The Optimize Tab (non-
sequential ui mode)
In Non-sequential UI Mode, the Optimize Tab has a more limited number of tools than in
Sequential UI Mode.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1706
The Slider is available in the Manual Adjustment section of the Optimize Tab. The slider control
is used to interactively adjust any system or surface parameter while viewing any analysis
window.
See the description of “Slider” under the “Manual Adjustment” section of “The Optimize Tab”.
Settings:
Use Rays Conventional ray tracing is performed using the total number of analysis rays
defined for all sources to update all detector viewers and (optionally) shaded model plots.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1707
Use LightningTrace (with all 6 levels of sampling supported for LightningTrace) The
LightningTrace analysis is performed to update all detector viewers and (optionally) shaded
model plots. For ray sampling less than 64X, edge sampling of 4X is used, otherwise edge
sampling of 16X is used. See “LightningTrace Control” of “The Analyze Tab”.
The Visual Optimizer is available in the Manual Adjustment section of the Optimize tab. This
feature uses multiple slider controls to allow simultaneous manual adjustment of selected
variable values.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1708
See the description of “Visual Optimizer” under the “Manual Adjustment” section of “The
Optimize Tab”.
Settings:
Use Rays Conventional ray tracing is performed using the total number of analysis rays
defined for all sources to update all detector viewers and (optionally) shaded model plots.
Use LightningTrace (with all 6 levels of sampling supported for LightningTrace) The
LightningTrace analysis is performed to update all detector viewers and (optionally) shaded
model plots. For ray sampling less than 64X, edge sampling of 4X is used, otherwise edge
sampling of 16X is used. See “LightningTrace Control” of “The Analyze Tab”.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1709
Merit Function Editor (optimize tab,
non-sequential)
See the description of “Merit Function Editor” under the “Automatic Optimization” section of
“The Optimize Tab”.
NSC Operands
Optimizing with Sources and Detectors in Non-sequential UI Mode
Optimizing illumination systems or other optical systems that use non-sequential sources and
detectors is supported using the NSDC, NSDD, NSDE, NSDP and NSTR operands.
First, NSDD operands would be used to clear the data in the current detectors. Use NSDD with
the detector number set to zero to clear all energy in all detectors. Usually a single NSDD at
the top of the merit function is all that is needed. NSDD returns a value of zero and has no
effect on the merit function value when used to clear detectors.
Second, NSTR operands are used to trace rays from NSC sources. NSTR i traces analysis rays
from source i; NSTR 0 traces all analysis rays from all sources. Note the number of analysis rays
on the NSC editor determines how many rays are traced and how long the evaluation of the
NSTR operand will take. NSTR always returns a value of zero and has no effect on the merit
function value. The NSTR operand supports options to split, scatter, and use polarization.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1710
Third, a new group of NSDC, NSDD, NSDE, or NSDP operands are used to read out the
detector data. NSDD has four arguments: surface, detector, pixel, and data. Surface is the
surface number of the NSC group (use 1 if the program mode is non-sequential). Detector is
the object number of the detector. Both detector objects and faceted detectors may be used
as detectors. If pixel is an integer greater than zero, the flux, flux/area, or flux/solid angle is
returned for that pixel. Which of the three is determined by the data argument, which should
be 0, 1, or 2 for flux, irradiance, or intensity, respectively. If pixel is 0, the sum of all the flux or
flux/area in the detector is returned. The units of the returned data is determined by the
system units, see “Analysis Units”. To compute other data with NSDD, see the Pix# and Data#
assignments for the NSDD operand in the table below.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1711
-8 1 The z coordinate of the centroid of the flux/area (irradiance) data
The x coordinate of the centroid of the flux/solid angle (intensity)
-6 2
data
The y coordinate of the centroid of the flux/solid angle (intensity)
-7 2
data
The z coordinate of the centroid of the flux/solid angle (intensity)
-8 2
data
The weighted RMS radial distance of all the pixels with respect to
the centroid. The weight is based on flux data. This is the square of
-9 0
the variance or second moment of r^2 based on flux data of all
pixels.
The weighted RMS x distance of all the pixels with respect to the
-10 0 centroid. The weight is based on flux data. This is the square of the
variance or second moment of x^2 based on flux data of all pixels.
The weighted RMS y distance of all the pixels with respect to the
-11 0 centroid. The weight is based on flux data. This is the square of the
variance or second moment of y^2 based on flux data of all pixels.
The weighted RMS z distance of all the pixels with respect to the
-12 0 centroid. The weight is based on flux data. This is the square of the
variance or second moment of z^2 based on flux data of all pixels.
The weighted RMS xy distance of all the pixels with respect to the
-13 0 centroid. The weight is based on flux data. This is the square of the
variance or second moment of xy based on flux data of all pixels.
The weighted RMS radial distance of all the pixels with respect to
the centroid. The weight is based on flux/area data. This is the
-9 1
square of the variance or second moment of r^2 based on flux/area
data of all pixels.
The weighted RMS x distance of all the pixels with respect to the
centroid. The weight is based on flux/area data. This is the square of
-10 1
the variance or second moment of x^2 based on flux/area data of
all pixels.
The weighted RMS y distance of all the pixels with respect to the
centroid. The weight is based on flux/area data. This is the square of
-11 1
the variance or second moment of y^2 based on flux/area data of
all pixels.
The weighted RMS z distance of all the pixels with respect to the
centroid. The weight is based on flux/area data. This is the square of
-12 1
the variance or second moment of z^2 based on flux/area data of
all pixels.
The weighted RMS xy distance of all the pixels with respect to the
-13 1 centroid. The weight is based on flux/area data. This is the square of
the variance or second moment of xy based on flux/area data of all
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1712
pixels.
The weighted RMS radial distance of all the pixels with respect to
the centroid. The weight is based on flux/solid angle data. This is
-9 2
the square of the variance or second moment of r^2 based on
flux/solid angle data of all pixels.
The weighted RMS x distance of all the pixels with respect to the
centroid. The weight is based on flux/solid angle data. This is the
-10 2
square of the variance or second moment of x^2 based on
flux/solid angle data of all pixels.
The weighted RMS y distance of all the pixels with respect to the
centroid. The weight is based on flux/solid angle data. This is the
-11 2
square of the variance or second moment of y^2 based on
flux/solid angle data of all pixels.
The weighted RMS z distance of all the pixels with respect to the
centroid. The weight is based on flux/solid angle data. This is the
-12 2
square of the variance or second moment of z^2 based on
flux/solid angle data of all pixels.
The weighted RMS xy distance of all the pixels with respect to the
centroid. The weight is based on flux/solid angle data. This is the
-13 2
square of the variance or second moment of xy based on flux/solid
angle data of all pixels.
-14 0,1 Geometric MTF in X direction at the specified Spatial Frequency
-15 0,1 Geometric MTF in Y direction at the specified Spatial Frequency
N is a positive integer
Data# = 2 is only available for Detector Rectangle, which records data in angle space.
For Pix# = 0 and -6 to -13, Data# = 0 and 1 will be same because all pixels have same size.
If the object is a faceted detector, or if the pixel number is -1 or 0, only data options 0 and 1
are supported. Similar capability to that described for NSDD exists for coherent data using
NSDC, for detector color data using NSDE, and for detector polar data using NSDP.
The practical difficulty in optimizing these systems is the difficulty of computing derivatives of
detected energy with respect to variable parameters because of the relatively large uncertainty
in computing detected energy. Many rays must be traced to determine illumination patterns
approximately.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1713
The weighted RMS x distance of all the pixels with respect to the centroid is the square root of
the variance x^2. It is equal to:
where
The weighted RMS radial distance of all the pixels with respect to the centroid is equal to:
Note for Detector Rectangle, the value for Data = 0 and 1 will be same because all pixels have
same size.
Note that when launching rays with the NSTR operand, OpticStudio seeds the random number
generator with the identical value every time the merit function is evaluated. This means the
identical set of random numbers are used on every evaluation of the merit function. If no
changes are made to the optical system, the merit function will always evaluate to a consistent
value; a desirable property for the optimization algorithm to function. However, if a change is
made to the system, rays may take different paths and the identical set of random numbers
may be used in different ways; for example, in the computation of scattering paths.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1714
Pixel Numbering for Detectors
For detailed discussions of the pixel numbering used by the various types of detectors, see
Non-sequential Detectors.
See the description of Optimize! under the “Automatic Optimization” section of “The Optimize
Tab”.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1715
These are the Merit Function Wizards, available in the Automatic Optimization section of the
Optimize Tab in Non-sequential UI Mode.
The Wizards can also be accessed by expanding the “Wizards and Operands” bar above the
Merit Function Editor data.
Note that wizards may not be available if the specified objects are not loaded in the NSC
Editor, as shown below.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1716
The Optimization Wizard is available in the Automatic Optimization section of the Optimize
tab, or by expanding the bar labeled “Wizards and Operands” above the Merit Function Editor
data. The Optimization Wizard displays a dialog box which allows selection of options for the
auto merit function. This tool separates the options into detector settings, raytrace settings,
and target computation settings.
The following screenshot was taken with the OpticStudio non-sequential scattering sample file,
“Fluorescence Example.ZMX”:
The merit function is a numerical representation of how closely an optical system meets a
specified set of goals. OpticStudio uses a list of operands which individually represent different
constraints or goals for the system such as total flux, uniformity, and many others.
The merit function is proportional to the square root of the weighted sum of the squares of the
difference between the actual and target value of each operand in the list. The merit function is
defined this way so a value of zero is ideal. The optimization algorithm will attempt to make
the value of this function as small as possible, and so the merit function should be a
representation of what you want the system to achieve.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1717
The easiest way to define a merit function is to use the Non-sequential Optimization Wizard.
This shows the options for the auto merit function, which allows merit function to be built in a
piecewise fashion using the Apply button. This will cause the dialog to stay open so that
additional criteria may be added. The OK button will add the desired criteria and close the
dialog.
NSC merit functions must always contain one operand that clears all detectors before any data
may be returned via other operands. The Optimization Wizard will add an operand to clear all
detectors regardless of the clear detectors setting. This setting optionally clears individual
detectors in the cases where complex tracing and clearing sequences are required in the merit
function. If complex clearing isn’t required, simply leave this setting at the default All.
Start At Settings
The auto merit function will begin at the start row specified. As operands are applied to the
merit function, the start row will update to prevent overwriting previously created operands. If
the overwrite checkbox is enabled, OpticStudio will delete all currently existing operands after
the start row and define the current operands. If disabled, the additional lines will be inserted
at the start row and no lines will be overwritten. The overall weight defines the weight of
operands added. The ability to define merit functions for all or individual configurations is
available.
Raytrace Settings
All or individual sources can be raytraced depending on the source setting. Additionally, the
ability to control splitting, scattering, polarization, and error ignoring are available. See “Ray
Trace Control” of “The Analyze Tab” for more details on these settings. LightningTrace is
available as an alternative to conventional raytracing. This feature is only available in
OpticStudio-Premium. See “LightningTrace Control” of “The Analyze Tab”.
Criteria Settings
Multiple different optimization criteria are supported. The available criteria depend on the
detector type selected and include RMS Spot Radius, RMS Spot X, RMS Spot Y, RMS Angular
Radius, RMS Angular X, RMS Angular Y, Spatial Uniformity, Angular Uniformity, Total Flux,
Centroid X, Centroid Y, Angular X Centroid, and Angular Y Centroid. Only supported criteria
types will be listed in the criterion dialog when selecting different detectors. For the widest
range of available criteria use the detector rectangle. The criterion may be targeted to be equal
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1718
to, greater than, or less than some specified target. The target indicates the desired value of
the criteria in lens units.
The Bitmap Wizard is available in the Automatic Optimization section of the Optimize tab, or
by expanding the bar labeled “Wizards and Operands” above the Merit Function Editor data.
The following screenshot was taken with the OpticStudio non-sequential scattering sample file,
“Fluorescence Example.ZMX”:
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1719
This feature is only available in the Premium and Enterprise editions of Ansys Zemax
OpticStudio.
The NSC Bitmap Wizard allows the use of an image as the target for optimization. In many
applications, the desired distribution of energy isn’t something as simple as uniformity or
maximum power, but a more complex pattern. Additionally, color targets may be desired in
addition to flux targets. If the desired distribution of flux and color can be defined in a
standard image file format, the bitmap merit function can convert this into a merit function.
Currently, only spatial distribution targets are supported.
These settings are identical to the NSC Optimization Wizard’s clear data settings. See “NSC
Optimization Wizard” under the “Automatic Optimization” section of “The Optimize Tab (Non-
sequential UI Mode)”.
Start At Settings
These settings are identical to the NSC Optimization Wizard’s Start At settings. See “NSC
Optimization Wizard” under the “Automatic Optimization” section of “The Optimize Tab (Non-
sequential UI Mode)”.
Raytrace Settings
All or individual sources can be raytraced depending on the source setting. Additionally, the
ability to control splitting, scattering, polarization, and error ignoring are available. See “Ray
Trace Control” of “The Analyze Tab” for more details on these settings. LightningTrace is
available as an alternative to conventional raytracing. See “LightningTrace Control” of “The
Analyze Tab”.
Target Settings
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1720
This tool only supports color and rectangle detectors because the input image must be
converted to spatial optimization targets. Consequently, these types of detectors are the only
ones which will show up in the detector list. The file represents the target spatial distribution.
Supported file formats are BMP, JPG, and PNG, and these files must be located in the
<data>\IMAFiles folder. See “Folders” for more details.
While an image file indicates the desired relative flux distribution, it doesn’t indicate the total
flux. The user must specify this value in lens units using the total flux setting. If the detector
selected is a detector color, the ability to define color targets is available. Otherwise, only flux
will be targeted. Additionally, the input image can be scaled to the resolution of the detector
or the detector resolution can be changed to match the image. The Resample Detector setting
enables the latter, in this case the detector resolution is reset in the Non-Sequential
Component Editor. In all cases, a preview of the targeted image on the detector is shown. This
allows the user to see exactly what OpticStudio will be targeting on the detector. Note that
some aliasing effects may be present due to the size of the dialog preview, the resolution of
the image, and the resolution of the screen. These artifacts are only present in the preview
image, and not in the actual targets defined in the merit function.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1721
The Roadway Lighting Wizard is available in the Automatic Optimization section of the
Optimize tab, or by expanding the bar labeled “Wizards and Operands” above the Merit
Function Editor data.
The following screenshot was taken with the OpticStudio non-sequential scattering sample file,
“Fluorescence Example.ZMX”:
This feature is only available in the Premium and Enterprise editions of Ansys Zemax
OpticStudio.
The Roadway Lighting Wizard is designed to optimize roadway lamps to pass the CIE 140-2000
specifications. For more details on these computations, see “Roadway Lighting” of “The
Analysis Tab”. Using this tool OpticStudio will add one NSTW operand to trace rays from all
active sources and an NSRW operand for each of the eight specifications. Each specification is
a threshold, so OPGT and OPLT operands are used to apply boundary targets. See “NSTW” and
“NSRW” for more details.
Luminaire Settings
These settings are identical to those used in the Roadway Lighting Analysis. See “Roadway
Lighting” of “The Analysis Tab” for details.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1722
Start At Settings
The merit function will begin at the start row specified and delete all existing operands after
that line. The overall weight defines the weight of operands added. The ability to define merit
functions for all or individual configurations is available.
Road Settings
These settings are identical to those used in the Roadway Lighting Analysis. See “Roadway
Lighting” of “The Analysis Tab” for details.
Raytrace Settings
All or individual sources can be raytraced depending on the source setting. Additionally, the
ability to control splitting, scattering, polarization, and error ignoring are available. See “Ray
Trace Control” of “The Analyze Tab” for more details on these settings.
See the description of “Remove All Variables” under the “Automatic Optimization” section of
“The Optimize Tab”.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1723
Global Optimizers Group
(optimize tab, non-sequential)
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1724
See also Global Optimizer.
Ansys Zemax OpticStudio 2023 R2 The Optimize Tab (non-sequential ui mode) 1725
The Tolerance Tab
Tolerance Tab (Sequential UI Mode).
The Tolerance Tab contains tools used to tolerance an optical system. Tolerancing allows you
to see the effect of finite manufacturing and assembly tolerances on the design.
The Production Tools group provides real time cost estimates and tools which tidy up the
system to prepare for manufacturing.
In the Tolerancing group, the Tolerance Data Editor is where you will enter the tolerances you
wish to place on each parameter. The Tolerance Wizard will quickly set up a set of tolerances
which you can then edit.
The Quick Tolerancing group provides tools to get speedy tolerancing predictions early in
the design process, to give the user a directional sense for the as-built performance of their
system.
The Tolerance Data Visualization group provides access to all of the data from a sensitivity
or Monte Carlo run, as well as analyses which provide performance insights at a glance.
The Manufacturing Drawings and Data group creates manufacturing drawings in ISO
10110 format and an OpticStudio-specific format, as well as exporting data about the surface
to cross-check manufacturing setup.
See the “Tolerancing Overview” chapter for more information on how to perform a tolerance
analysis.
The OpticStudio Cost Estimator can be used to obtain price estimates of singlet lenses. To
open the Stand-Alone Tool, go to the Tolerances Ribbon and select the Cost Estimator Button.
The Cost Estimator interface opens with a new empty Cost Estimator project.
Previously exported part lists can be imported from a Cost Estimator session using the File >
Import part list.
To start building a new project, information about the singlet lenses needs to be entered. This
can be done in three ways:
1. New part - Enter part information by manually inputting the various data fields.
2. New from ISO element XML - Import part information from an XML file previously gen-
erated by the ISO Element Drawing tool or from another Cost Estimator project.
3. New from lens file - Import part information from an OpticStudio lens file. A list of valid
singlets from the lens file is accessed from the drop down menu below “New from lens
file” button. Note that singlets cannot have coordinate breaks between the surfaces.
The specifications can be edited for a part by selecting the row in the part list in the top panel
of the window and navigating through the tabs in the middle panel.
Edit Quantities – Vary the number of lens copies for which estimates are requested. Opens
the following dialogue
To save your work in the Cost Estimator in order to later continue or to share with another
OpticStudio user, select File > Save cost estimate project or File > Save cost estimate project as
from the main menu. You can then open the Cost Estimator project file from a different Cost
Estimator session using File > Open cost estimate project from the main menu. This project file
saves all of the lens data you have entered and also the most recently retrieved cost estimates.
See also the “Cost Estimator (system explorer)” settings in the System Explorer, and the Cost
Estimator settings in the “ISO Element Drawing (manufacturing drawings and data group)”.
This feature is only available in the Professional and Premium Editions of OpticStudio.
The Design Lockdown Tool converts all idealized inputs of a system into Real Manufacturing
Inputs of a production system.
Save New System As: When checked, the Design Lockdown Tool creates the specified .ZMX
file to store the production system. When unchecked the Design Lockdown tool overwrites
the current system with the production system.
Round Thicknesses to: Round the thicknesses of all surfaces to the specified precision.
Exclude Pickups during Mandatory Solve Removal: When checked, the Design Lockdown
Tool leaves pickup solves in place after conversion to the production system but removes all
other solves. When unchecked, the Design Lockdown tool removes all solves, including pickup
solves, from the production system. This option is only available for files having a single
Fix Model Glasses: If checked, all Model glasses in the system will be replaced with the closest
glass in the currently loaded catalogs. If unchecked, all Model glasses in the system will be kept
in place.
Discussion
A number of steps are generally required to take a system designed in sequential mode into a
production system. In particular all idealized inputs of the system must be converted into real
manufacturing inputs. The Design Lockdown Tool automates this conversion by:
l Remove all solves if required. See the discussion in Exclude Pickups during Mandatory
Solve Removal. For multiple configuration files also refer to Convert Semi-Diameters to
Maximum Apertures for details. In particular for multiple configuration files:
l If the value of a cell controlled by a solve doesn't change across all con-
figurations, the solve is simply removed.
l If the value of a cell controlled by a solve changes across configurations, the cor-
responding multi-configuration operand is added in the multi-configuration
editor to ensure the value of the cell is consistently maintained in all con-
figurations after running the tool.
l Any multi-configuration operand applied to a solve parameter will be removed
from the multi-configuration editor.
For systems with new configurations, a few operands are not currently supported. A full list of
the operands can be found here: APER, SATP, XFIE, YFIE
If the stop size is set to be larger than the stop size automatically calculated by OpticStudio,
the Design Lockdown Tool will respect the original Aperture Type when converting to Float By
Stop Size. For instance, it is possible to set the Aperture Type to Entrance Pupil Diameter and
use a Fixed Solve on the Stop to represent a mechanical semi-diameter that is larger than the
optical semi-diameter. For cases such as these, the new optical semi-diameter is set to
whatever it needs to be so that the new system retains all the properties of the original, but
with the aperture type switched to Float By Stop Size. For example, if the original system uses
the EPD, we set the stop semi-diameter to be such that the EPD in the new system equals the
EPD in the original. If the stop surface supports mechanical semi-diameters, then OpticStudio
adjusts the chip zone so that the mechanical semi-diameter is set to the original optical semi-
diameter.
1. Ensure the Model glass being used is close to - if not exactly - the same as a glass
within the selected Material Catalog. Preferably, this should be the glass that will be
used during the manufacturing process.
2. Build a unique catalog of glasses based on the Model glass data. Note: this is not
recommended for late-stage design work. When building for manufacture, users
should always use the data specific to the material they intend to manufacture with
instead of an idealized model.
For option 2, there are a few ways to create a user-defined catalog. A useful method is to use
the INDX optimization operand to collect the index of refraction for the Model glass at at least
three wavelengths. Then fit this data to the Conrady dispersion formula and generate a user-
defined material within a user-defined catalog. Replace the Model glass with this new material.
For more guidance on creating unique materials, see the Knowledgebase article "How to add
new materials and glasses in OpticStudio".
This feature is only available in the Premium and Enterprise editions of Ansys Zemax
OpticStudio.
The Critical Ray Generator creates a “critical” set of rays that provide the basis for ensuring that
changes made to the original sequential system in NSC (e.g. by adding components to reduce
stray light effects or by adding optical mounts) are not detrimental. It creates a .CRS file that
The Critical Rayset Generator issues an error and aborts if any of the following are true:
l Scattering is present.
l The aperture is not Float By Stop Size, Object Space NA, or Object Cone Angle.
l Ray-Aiming is off.
l Any surface (other than coordinate breaks and ignored surfaces) has a clear semi-dia-
meter or semi-diameter = 0.
l Multiple configurations are present.
Number of Rays The number of rays specifies the number of rays to be drawn for each
selected field and wavelength. The rays will be evenly distributed along the fan of the pupil, or
around the perimeter if Ring is the selected Ray Pattern. This parameter is ignored if the Ray
Pattern is set to List, or Chief and Marginals. The "number of rays" parameter is based on the
"number of rays" parameter in the shaded model and 3D viewer. There are two differences
between the Critical Ray Generator and the shaded model/ 3D viewer. First, the "Chief and
Marginal" ray pattern always produces 5 rays. Secondly, the "Chief and Ring" ray pattern will
place N - 1 rays in the ring. If rays are vignetted, the number of rays in the CRS file may be less
than the parameter selected here.
Ray Pattern Choose Chief and Marginals, XY Fan, X Fan, Y Fan, Chief and Ring, List, or Grid to
indicate the pattern of rays to trace. The List option indicates that the rays to be traced are
user defined and listed in a file; see the discussion Raylist File Format in the 3D viewer for
more information on the Raylist format.
Ray File The file to be used for user defined rays for the List Ray Pattern. See the discussion
Raylist File Format in the 3D viewer for more information on the Raylist format.
Wavelengths, Primary Only (Otherwise Use ‘All’) When checked, only the primary
wavelength is traced. When unchecked, all wavelengths are traced.
Effective Input Distance This is the distance from the vertex of the dummy surface inserted to
record the starting position of the rays to the vertex of the next surface. It is only available for
infinite conjugate systems. See the discussion below for details.
Status: Vignetted or obscured rays are not saved to the .CRS file. If the system contains
apertures or clear semi-diameter or semi-diameter solves are not Automatic, a warning is
present in the Critical Ray Tracer tool dialogue to warn users that critical rays may get
vignetted in the production system.
Discussion
Once a system has been setup for production, additional components need to be added for
both mechanical packaging of the system and to assist with stray light reduction. These
components can be added in the non-sequential mode of OpticStudio or via LensMechanix. It
is important to the user that the performance of the system is not degraded once these
components are added. A fundamental way to determine this is to look at the behavior of
“critical” rays in the system before and after the addition of such components. The Critical
Rayset Generator allows the user to define the critical ray set through sequential terminology
(e.g. “use chief and marginal rays only”, etc.). Once in non-sequential mode, the user can run
the Critical Ray Tracer on the ray set generated by the Critical Rayset Generator.
The Critical Ray Set Generator generates an ASCII .CRS file chosen by the user that contains all
of the rays in a table. The table has a header line containing the number or rays (N), the units
flag, the date the file was created in the format YYYYMMDD, a rayset flag (enumerating which
of the 7 options were used to define the ray set) and the tilt around x,y, and z for the detectors
used to measure the locations of the final ray segment. The units flag is 0 for meters, 1 for
inches, 2 for centimeters, 3 for feet, and 4 for millimeters. The rayset flag is 0 for an XY fan, 1 for
an X fan, 2 for a Y fan, 3 for a ring and the chief ray, 4 for a list of rays, 6 for a grid of rays, and 8
for the marginals and the chief. If the image plane is in mirror space, there is an extra 180
degree rotation around the X-axis prepended to the other tilts. This insures that the "front" of
the image plane corresponds to the front of the detector used for the Critical Ray Tracer.
There is a second header line which describes each column in the rest of the data. This line is a
comment and is not necessary if the .CRS file is created by hand.
Then there are N rows of data in the table, with each row containing the following columns:
The XYZ position data for the starting point of the ray
The LMN direction cosine data for the starting point of the ray
A flag indicating if the ray is a chief ray, marginal ray, or part of a X Fan, Y Fan, XY Fan, Grid,
Ring, or List
The XYZ position data for the ending point of the ray (at the image plane)
The LMN direction cosine data for the ending point of the ray (at the image plane)
For both the starting and ending point of the ray the XYZ and LMN data is relative to the vertex
of the global reference surface. These are similar to the SDF format in non-sequential mode.
Like an SDF file, a line starting with "!" Is a comment and is ignored.
Because rays that fall within the glue distance of the edge of an object are terminated in non-
sequential mode, when we trace the marginal rays for the critical ray set, we don't trace them
to the exact edge of the pupil in sequential mode. Instead, we trace them to the within 50*(the
default glue distance) for systems that are converted to Float By Stop Size or 1E-6*(Aperture
Value) for systems with Object Space NA or Object Cone Angle aperture types.
Explicit rays in a ray list don't have a field point, so this is listed as "0" in the .CRS file.
A critical ray file can be read into the Source File object in non-sequential mode. This allows
the Critical Ray Set to be traced and analyzed like any other Source File.
This option is only available for infinite conjugate systems. For such systems, the user has to
define the starting location for the rays in the critical ray set, since the rays in NSC cannot start
at infinity. For these systems, the Critical Ray Generator inserts a dummy surface and records
The minimum allowed effective input distance is 10*(Default Glue Distance), which is currently
1E-5, any values entered below that will be converted to 1E-5. For infinite conjugate systems,
explicit rays from a raylist file will start at the XYZ values listed in the file, not the effective input
distance.
If the angle of the input rays relative to the z-axis when projected onto yz-plane or xz-plane is
greater than 90 degrees, then the dummy surface must be curved. The Critical Ray Generator
will set the curvature of the dummy surface equal to the curvature of the first surface that is
not ignored or a coordinate break. Because of the curvature, there is a maximum Effective
Input Distance above which the Critical Ray Generator can’t function. The max distance
depends on the curvature of the dummy surface and the details of the system.
Tolerancing Group
This group contains the tools for tolerancing.
See “Tolerancing Overview” for details. Also see Tolerancing for more information.
See Convert To NSC Group for more information about converting operands to non-
sequential mode.
Tolerance Operands
A tolerance operand has a four letter mnemonic, such as TRAD for Tolerance Radius. Three
integer values, abbreviated Int1, Int2, and Int3, are associated with the mnemonic to identify
the surface or surfaces of the lens to which the tolerance applies. Some tolerance operands use
the Int numbers for purposes other than defining surface numbers as indicated in the
following table.
Each tolerance operand also has a minimum and maximum value. These values refer to the
maximum acceptable change from the nominal value. Each operand also has space for an
optional comment to make the tolerance set easier to read. The available tolerance operands
are listed in the following table, and are described in detail below.
CEDV Sets an extra data value as a compensator. CEDV is deprecated and has been replaced
by CPAR.
COMM This operand is used to print a comment in the tolerance analysis output report
SAVE Saves the file used to evaluate the tolerance on the prior row in the editor
SEED Seeds the random number generator for MC analysis. Choose 0 for random.
STAT Defines statstics used 'on the fly' during Monte Carlo analysis
For each tolerance, a minimum and a maximum value are specified on the Tolerance Data
Editor. The tolerances are described in detail below.
Interpretation of the Min and Max tolerances depends on the Code parameter. If Code is 0, the
Min and Max are the extreme errors in lens units. If Code is 1, the Min and Max are the extreme
errors in percentage of the nominal radius.
For example, if the nominal radius of a surface is 40 mm, and the min and max TRAD values for
that surface are -0.5 and +0.5, the tolerance on the radius will be as follow: if Code is 0, then
the Min and Max are in mm, and the tolerance analysis will be performed with the radius of the
surface set to 39.5 mm and 40.5 mm; if Code is 1, then the Min and Max are in percentage of
40 mm, corresponding to a change in radius of +/- 0.2. Therefore the tolerance analysis will be
performed with the radius of the surface set to 39.8 mm and 40.2 mm.
For example, if the nominal radius of a surface is 100 mm, then the nominal curvature is 0.01
inverse mm. If the min and max TCUR values for that surface are -.001 and +.001 inverse mm,
then the tolerance analysis will be performed with the radius of the surface set to 111.11 mm
and 90.909 mm.
where r is the clear semi-diameter or semi-diameter of the surface. The change in the sag is
related to the error in fringes by
For example:
If TFRN = 1 fringe and TWAV = 0.6328um, the change in the sag will be:
ΔZ = (0.6328/2) x 1 fringe
ΔZ = 0.3164 um
If the clear semi-diameter r is 6mm and the radius of curvature R is 50mm, then it gives:
ΔC = ΔZ x 2 /(r^2)
ΔC = 0.0003164 mm x 2 / (6^2)
ΔC = 1.76E-5 mm-1
R + ΔR = 1/(C + ΔC)
R + ΔR = 1/(0.0200176)
R + ΔR = 49.956 mm
When OpticStudio creates the default tolerances, it is assumed that all variations in thickness
affect only that surface and any surfaces in contact with that element. For example, if the first
lens in a contact doublet has a +1.0 mm change in thickness, the front and rear vertex of the
second lens both shift by +1.0 mm.
To illustrate, imagine a lens where surface 3 was made of BK7, and surface 4 was made of F2,
and surface 5 was air. The nominal thicknesses are 3, 4, and 6 mm, respectively. If a TTHI
operand was defined by the default tolerance algorithm for surface 3, an adjustment would be
defined for surface 5. If the tolerance value was +.1
mm, then during analysis the thicknesses would be changed to 3.1, 4.0, and 5.9, respectively.
Thus, the absolute positions of surfaces 6 through the image surface are unaffected by the
change in thickness on surface 3.
The adjustment is optional; to disable it, set the adjustment to the same surface number as the
tolerance, such as TTHI 3 3. For some lens systems, such as those that are assembled by
stacking spacers in a tube, the adjustment may not be desired.
Int1 is used to define the surface number, Int2 in the adjustment surface number, unless Int2 is
equal to Int1. Min and max are the extreme errors in lens units.
For TSDR, both Min and Max must be greater than or equal to 0.
Surfaces other than the Standard surface type can be toleranced using the TEDX, TEDY, and
TEDR operands.
Decentration is achieved by converting the surface to the Irregular surface type. For more
details of this process, see Tolerancing with the Irregular Surface Type.
The TSDR radial decenter operand is recommended for systems with circular optics and
circular mounts, such as traditional camera lenses or microscope objectives. TSDX and TSDY
Cartesian decenter operands are recommended either for anamorphic systems with a
decoupled X and Y optical axis or for systems with rectangular optics and rectangular mounts.
If Cartesian decenter operands are used with circular optics and circular mounts, there will be a
higher probability the decenters will tend towards the 45° diagonals between the X and Y axis,
possibly leading to skewed tolerancing results.
The min and max values are the tilt in degrees about the local X and Y axis of the lens. For
more information, search the help files for the description of the related TIR operands TIRX and
TIRY.
The analysis of TSTX and TSTY uses the Irregular surface type. For more information, search the
help files for the discussion “Tolerancing with the Irregular surface type”.
TIRX and TIRY are used to specify a tolerance on total indicator runout, or TIR, which measures
the amount of "wedge" in a lens.
The min and max values are twice the amount of "sag" in lens units measured at the maximum
radial aperture of the surface where the maximum radial aperture is defined by the clear semi-
diameter or semi-diameter of the surface. The change in sag as a function of the x or y
normalized coordinate for a TIRX or TIRY value is given by:
For example, if the TIRX tolerance is 0.10 mm, then the change in sag at the maximum +x
aperture of the lens is 0.05 mm, and the deviation at the maximum -x aperture is -.05 mm, for a
"total" TIR of 0.10 mm. A similar discussion applies to TIRY. The min and max values are used to
model the tilt of the surface in each direction. The tilt angle that is actually placed on the
surface is given by
where S is the clear semi-diameter or semi-diameter of the surface. Note that a sag along Y
implies a rotation about the X axis, and a sag along X implies a rotation about the Y axis.
The analysis of TIRX and TIRY uses the Irregular surface type. For more information, search the
help files for the discussion “Tolerancing with the Irregular surface type”.
Modeling irregularity is somewhat more problematic than other types of tolerances. This is
primarily because irregularity by nature is random, and not deterministic such as a change in
radius. Therefore, some assumptions about the nature of the irregularity need to be made in
order to perform the analysis. The assumption OpticStudio makes when using TIRR is that the
irregularity is half spherical aberration, and half astigmatism. This is less restrictive model than
assuming 100% astigmatism, because astigmatism cannot be compensated by focus, and is
therefore a more serious defect in the lens.
The min and max values are the irregularity in units of fringes measured at the maximum radial
aperture of the surface where the maximum radial aperture is defined by the clear semi-
diameter or semi-diameter of the surface. The TWAV operand is used to define the test
wavelength.
OpticStudio assumes fringes are measured in a double pass Newton's rings type test. For
example, a TIRR of “W” fringes would yield a change in sag of the surface of
where λt is the test wavelength (defined by the TWAV operand), ρ is the normalized radial
coordinate, and ρ'y is the normalized and rotated radial coordinate as defined in “Irregular”.
The change in wavefront optical path is related to the change in sag and the index of refraction
of the two media the surface separates:
When computing the Monte Carlo analysis, the angle of the astigmatism is chosen randomly
between 0 and 360 degrees. This allows simulation of randomly oriented astigmatic error,
which is less severe and more realistic than placing all the astigmatism along the y axis of each
element.
TEXI is used to analyze random irregular deviations of small amplitude on a surface that is
either a Standard, Even Aspheric, or Zernike Fringe Sag surface. Analysis of irregularity on
surface types other than Standard, Even Aspheric, or Zernike Fringe Sag is performed through
addition of a Composite Add-on surface on top of the surface being toleranced. For details,
see Tolerancing irregularity with Composite surfaces. The Int1 value indicates the number of
the surface, Int2 defines the maximum Fringe Zernike term (must be between 3 and 37), and
Int3 defines the minimum Fringe Zernike term (must be between 2 and the maximum term).
TEXI uses the Zernike Fringe Sag surface (search the help files for “Zernike Fringe Sag”) to
model the irregularity rather than using the third order aberration formulas used by TIRR.
When using TEXI, the min and max tolerance values are interpreted to be the approximate
magnitude of the zero to peak error of the surface in double-pass fringes at the test
wavelength. The zero to peak is only a very rough measure of the irregularity. Whether the
zero to peak and peak to valley are the same depends upon the particular Zernike term used.
The min tolerance value is automatically set to the negative of the max value; this is done to
yield both positive and negative coefficients on the Zernike Fringe Sag surface. The vagueness
of defining irregularity by the zero to peak measure is the prime disadvantage to TEXI, and the
reason why the newer TEZI operand is the preferred alternative.
OpticStudio computes the coefficients on the individual terms of the Zernike polynomial that
defines the deviation in the shape of the surface using the following formula:
where f is the number of double pass fringes, n is the number of Zernike terms used (note n is
given by Int2 - Int3 + 1), and λ is the test wavelength. The coefficients are scaled by one over
root n to account for the fact that a random collection of Zernike terms will generally sum in an
RSS sense; so the PTV error is not linear with the number of terms. Since it is convenient to
Analysis:
For the sensitivity analysis, if the surface is a Standard, Even Aspheric, or Zernike Fringe Sag
surface, the surface is converted to a Zernike Fringe Sag surface and all the coefficients of the
Zernike polynomial are set to the "c" value from the above equation. Note that since the
maximum surface sag deformation is the same for all Zernike Fringe polynomial terms at the
edge of the aperture, a "c" value of 0.001 when using 20 Zernike terms will yield a maximum
sag deviation of 20c. For all other surface types, the sensitivity analysis will be performed
through addition of a Zernike Fringe Sag Composite Add-on surface on top of the surface
being toleranced. For details, see section: Tolerancing irregularity with Composite surfaces.
For the Monte Carlo analysis, the surface is dealt with as for the sensitivity analysis, but each
polynomial term is assigned a coefficient randomly chosen which lies between the min and
max "c" tolerance values. The random value is chosen using the statistical model selected for
the operand; search the help files for the STAT command for a discussion.
Generally speaking, if lower order terms are used, the irregularity will be of low frequency, with
fewer "bumps" across the surface. If higher order terms are used, there will be higher
frequency irregularity, with more "bumps" across the surface. Note the TIRR irregularity
operand models the lowest frequency form of irregularity, with just a quadratic and quartic
deviation across the surface. TEXI can model much more irregular surfaces, and with 30 or
more terms used, about 5-15 "bumps" will typically be seen over the surface.
Because the Zernike Fringe Sag surface sag expression contains portions of both the Standard
and Even Aspheric surfaces, either of these surface types may be modeled by the Zernike
Fringe Sag surface created with the TEXI operand. If the surface already is a Zernike Fringe Sag
surface, then the deviations are added to the polynomial terms already there. If the surface is
either a Standard or Even Aspheric surface, the normalization radius of the Zernike Fringe Sag
surface is set to the clear semi-diameter or semi-diameter of the surface. If the surface was
already a Zernike Fringe Sag surface, then the min and max tolerances are assumed to be
measured at the normalization radius already defined.
TEXI always ignores Zernike term 1, the piston term, and sets this value to zero.
TEZI uses the Zernike Standard Sag surface (search the help files for “Zernike Standard Sag”) to
model the irregularity on Standard and Even Aspheric surfaces, while Toroidal surfaces use the
Zernike terms already supported by the Toroidal surface. When using TEZI, the max tolerance
value is the exact RMS error of the surface in lens units. The min tolerance value is
automatically set to the negative of the max value; this is done to yield both positive and
negative coefficients for the Zernike terms. The resulting RMS is of course always a positive
number whose magnitude is equal to the max tolerance value.
Analysis:
For the sensitivity analysis, if the surface is a Standard, Even Aspheric, or Toroidal surface, the
surface is converted to a Zernike Standard Sag or Toroidal surface and all the coefficients of
the Zernike polynomial for terms greater than #1 (the "piston" term) are set to a value so that
the square root of the sum of the squares of the coefficients yields the specified RMS value. All
coefficients are set to the same value. For all other surface types, the sensitivity analysis will be
performed through addition of a Zernike Standard Sag Composite Add-on surface on top of
the surface being toleranced. For details, see section: Tolerancing irregularity with Composite
surfaces.
For the Monte Carlo analysis, the surface is dealt with as for the sensitivity analysis, but each
polynomial term is assigned a coefficient randomly chosen between -1.0 and 1.0, and the
resulting coefficients are then normalized to yield the exact RMS tolerance. The random value
is chosen using the statistical model selected for the operand; search the help files for the STAT
command for a discussion.
The number of terms is given by Int2 - Int3 + 1. Generally speaking, if lower order terms are
used, the irregularity will be of low frequency, with fewer "bumps" across the surface. If higher
order terms are used, there will be higher frequency irregularity, with more "bumps" across the
surface. Note the TIRR irregularity operand models the lowest frequency form of irregularity,
with just a quadratic and quartic deviation across the surface. TEZI can model much more
irregular surfaces.
Because the Zernike Standard Sag surface sag expression contains portions of both the
Standard and Even Aspheric surfaces, either of these surface types may be modeled by the
Zernike Standard Sag surface created with the TEZI operand. If the surface is Toroidal, the
Toroidal surface is retained since the Zernike terms are already supported with this surface
type, however, the nominal value of all the Zernike terms must be zero if the nominal surface is
TEZI always ignores Zernike term 1, the piston term, and sets this value to zero.
where P is the parameter value, P’ is the perturbed parameter value, and Δ is the amount of
tolerance perturbation. Min and max are the changes measured in the inverse of whatever
units are used by the parameter.
The change in index is given by an estimate of the differential change in the index at any
wavelength as a function of the d-light index, Abbe, and dPgF.
For TEDR, both Min and Max must be greater than or equal to 0.
For the tolerancing of a single surface of any type, set Surf1 and Surf2 to the same surface
number. For single Standard surfaces the TSDX, TSDY, TSDR operands can also be used.
These operands may be nested. Nesting rules are fully described in the section Nesting rules
for Monte Carlo analysis.
The TEDR radial decenter operand is recommended for systems with circular optics and
circular mounts such as traditional camera lenses or microscope objectives. TEDX and TEDY
Cartesian decenter operands are recommended either for anamorphic systems with a
decoupled X and Y optical axis or for systems with rectangular optics and rectangular mounts.
If Cartesian decenter operands are used with circular optics and circular mounts, there will be a
higher probability the decenters will tend towards the 45° diagonals between the X and Y axis,
possibly leading to skewed tolerancing results.
These tolerances require OpticStudio to insert a coordinate break surface before and after the
lens group, and to use a dummy surface at the end of the group to return to the front vertex.
The entire group may then be pivoted about a point as a unit. For this reason, TETX/Y/Z should
not be used when the range of surfaces defined includes a coordinate break which is related to
a following coordinate break outside the surface range controlled by the TETX/Y/Z by pickup
solves. The hazard is if the two resulting tilt ranges overlap, then the position of the elements
may not be what is intended. If you require this capability, search the help files for the
discussion on TUTX, TUTY, and TUTZ.
TETX and TETY may also be used to model tilt of single surfaces, sometimes called "wedge",
like TSTX and TSTY. TETX and TETY will work for surfaces of any type, including Standard
surfaces and non-Standard surfaces, while TSTX and TSTY only work for Standard surfaces. To
tilt a single surface using TETX or TETY, set Int1 and Int2 to the same surface number.
TETX and TETY by default pivot about the front vertex of a lens group, however it is often
advantageous to pivot about some other point. For example, well-designed lens mounts will
pivot about the nodal point of a lens to maintain focus during alignment. This case is easily
modeled by OpticStudio through the use of a dummy surface at the nodal point. Change the
starting surf (Int1) to be at the nodal point dummy surface, and the pivoting will be about that
point. The first surface may be located anywhere with respect to the rest of the lens group; and
so the tilt may be about any point.
TETX, TETY, and TETZ operands may be nested. For example it is possible to analyze the tilt of
one surface group defined by surfaces 5 through 20; while simultaneously analyzing tilts of
elements defined by surfaces 5-8, 8-12, 14-20, etc. This capability can simulate the alignment
errors of elements within an assembly, as well as the alignment error of the assembly as a
whole. The nesting rules are fully described in the section “Nesting rules for Monte Carlo
analysis”.
For TARR, RollSurf must be a spherical shape, Min must be greater than or equal to 0 and for
sensitivity analysis the system will always be rolled in the +Y axis direction.
Roll is achieved by inserting a pair of coordinate breaks around the elements between Surf1
and Surf2 and rotating them about the center of curvature of RollSurf.
TRLX, TRLY and TRLR operands may be nested. The nesting rules are fully described in the
section Nesting rules for Monte Carlo analysis.
To tolerance on the TIR of rolled element rather than the angle, see the TRLX, TRLY, TRLR
operands.
These operands can be used in the tolerancing of bonded optical elements. Elements may be
cemented off-axis relative to each other creating the roll modeled here.
Min and Max specify the minimum and maximum total indicator runout (TIR) in lens units at
the position of the edge of the Clear Aperture of the untoleranced read surface projected onto
it’s rolled position. In this context, read surface is Surf1 or Surf2 that isn’t RollSurf. For
rotationally symmetric surfaces TIR is calculated exactly as the difference in sag along the axis
of the roll: e.g. for TRLX: TIR = z(+x) - z(-x). Positive and negative TIR indicate roll in opposite
directions.
For TRLR, RollSurf must be a spherical shape, Min must be greater than or equal to 0, and for
sensitivity analysis the system will always be rolled in the +Y axis direction.
Roll is achieved by inserting a pair of coordinate breaks around the elements between Surf1
and Surf2 and rotating them about the center of curvature of RollSurf.
An error message will be displayed if the RollSurf and the read surface have equal radius,
because TIR will always be 0, or if Min and/or Max are too large.
TRLX, TRLY and TRLR operands may be nested. Nesting rules are fully described in the section
Nesting rules for Monte Carlo analysis.
To tolerance on the angle of roll directly rather than TIR, see the TARX, TARY, TARR operands.
These operands can be used in the tolerancing of bonded optical elements. Elements may be
cemented off-axis relative to each other creating the roll modeled here. In a lab this
TNMA defines tolerances on the index Nd and Abbe Vd of NSC material data. Three integer
parameters are required: the NSC surface number (use 1 if the program mode is NSC), the
object number, and a Data code. The Data code is 1 or 2 for the material Nd and Vd values,
respectively. When using TNMA, the change in the material index is computed exactly as for
the sequential glass offset solve, as described in “Glass: Offset”.
When using compensators from this list, you must update your Tolerance...Criteria...Comp
settings before running the tolerance. See Tolerancing for more information. More information
on the tolerance control operands is provided in the following pages.
Also, see General Comments About Min & Max Values on Compensators.
Also, see General Comments About Min & Max Values on Compensators.
Also, see General Comments About Min & Max Values on Compensators.
Int2 = 1, compensator is curvature (1 over the radius); note that min and max values defined
for the compensator should also be in units of curvature
Also, see General Comments About Min & Max Values on Compensators.
The help topic for each surface type contains its parameter numbers. These can be found in the
Sequential Surfaces section.
Also, see General Comments About Min & Max Values on Compensators.
The lens files will be saved in the same folder as the current lens. OpticStudio will save the lens
used to evaluate the min and max values of the preceding tolerance in a ZMX format file. Run
the tolerance file in the usual way, and then load one of the files generated. The file will contain
the prescription data, coordinate breaks, pickups, variables (which are optimally adjusted
compensators), and merit function used to determine the criterion data. This procedure will let
you verify the configuration is in fact what you are trying to model, and will give you insight
into how OpticStudio adjusts your lens prescription to determine the tolerances.
The placement of the SEED operand matters. All tolerance operands listed under a SEED
operand will be affected by the seed value provided. Multiple SEED operands may be placed in
the tolerance data editor, so that different operands may use the same seed every time, while
others may use random seeds.
Operand Type: This option allows the type of operand and other data to be changed. For a
complete description of tolerance operands, see Tolerance operands.
Ignore this Operand During Tolerancing: If this flag is checked, the operand will be ignored
during the tolerance analysis.
Row Color: Selects either default or none for the color for each row in the spreadsheet.
Individual row colors may be set using the row color setting on the operand type dialog box.
Tolerance Save
Saves the current tolerance data in a *.TOL file. This step is only required if the data is to be
subsequently loaded into another lens or stored for archival purposes. OpticStudio
automatically stores the tolerance data with the lens when the entire lens is saved.
Tolerance Load
Loads tolerance data previously stored in a *.TOL file or in a *.ZMX file. Either file type may be
selected; only the tolerance data portion of the file will be loaded into the spreadsheet. The
current tolerance data is destroyed.
Validate
Checks all tolerance operands for proper surface ranges and other common errors.
Tolerance Wizard
Invokes the default tolerances dialog box. See “Defining default tolerances”
Tolerance Listing
Increases all tolerance ranges by a factor of 2. This is a quick way of loosening the tolerances if
they are all too tight.
Tighten 2x
Decreases all tolerance ranges by a factor of 2. This is a quick way of tightening the tolerances
if they are all too loose.
Sort by Surface
Sorts all operands in ascending order first by surface number, then by type. The operands
COMP and CPAR will always be placed at the top of the list. The SAVE operand will
automatically be moved to stay just beneath the same operand it was beneath before sorting,
because the SAVE operand is associated with the previous operand in the list. The STAT
operand, if present, will be placed at the top of the list, and this operand must manually be
moved or reinserted. Since STAT affects all operands which follow in the list, sorting the list will
invalidate the STAT operand. Whenever STAT is used in the body of the tolerance list (to
change the statistics on the fly) then editing of the list to correctly replace the STAT operand
will be required whenever sorting. Note multiple STAT operands may be required if the
operands that originally followed the STAT operand are dispersed through the list by the sort
operation.
Sort by Type
Go To Operand
Use this tool to find and jump to a specific operand type, number, or bookmark. See “Go to
Surface” for more information.
Toggles Express View on and off. For more information on Express View, please refer to the
section entitled Express View.
Help
Paste Cell: Pastes the data for a single cell from the Windows Clipboard to the current cell. The
data must first have been copied to the Windows Clipboard using "Copy Cell" described
above.
Cut Operands: Copies all the data for a single operand or a range of operands to the Windows
Clipboard, then deletes the operands. The operand or range of operands must first be selected
using either of the following techniques:
Using the mouse: Click on the first operand to be selected. Hold down the left mouse button,
and drag the mouse cursor to cover the range of operands desired. The selected operands will
be highlighted in inverse colors. To select only one operand, drag the mouse up or down from
Using the keyboard: Move the cursor to any cell on the desired operand row. Then hold down
the shift key, while moving the cursor up or down until the desired range of operands is
selected. The selected operands will be highlighted in inverse colors. To select only one
operand, move the cursor up or down from the operand desired until two operands are
selected, then move the cursor back to the desired operand.
Copy Operands: Copies all the data for a single operand or a range of operands to the
Windows Clipboard. To select a single operand or a range of operands, see the discussion
under "Cut Operands" above.
Paste Operands: Copies all the data for a single operand or a range of operands from the
Windows Clipboard to the current cursor location in the Tolerance Data Editor. The operand
data must first have been copied to the Windows Clipboard using either "Cut Operands" or
"Copy Operands" described above.
Insert Operand: Inserts a new row in the spreadsheet at the current row. The Insert key will
perform this same function.
Insert After: Inserts a new row in the spreadsheet after the current row. The Ctrl-Insert key
combination will perform this same function.
Delete Operand: Deletes the row at the current cursor location. The Delete key will perform
this same function.
Hide Row: Minimizes the width of the row displaying the cursor.
Hide Column: Minimizes the width of the column displaying the cursor.
Tolerance Wizard
The default tolerances dialog box consists of several sections grouped by tolerance type.
Tolerance Presets
Grade Lists the available manufacturing grades, i.e. Commercial, Precision, and High Precision.
The Generic vendor also includes a Cell Phone Lens option. The Cell Phone Lens option is
based off of default values provided by industry experts.
(Note: Most Tolerance Presets do not contain Element Tolerances. Please enter those values
manually, if assembly tolerances need to be accounted for during the tolerance analysis.)
Surface Tolerances
Radius: If this box is checked, then the default radius tolerances will be included. The default
tolerances may be specified by a fixed distance in lens units, a percentage of the nominal
radius or by fringes of power at the test wavelength (defined by the TWAV operand). This
tolerance is only placed on surfaces which have optical power, which excludes dummy surfaces
which have the same index on both sides. If the surface is plano, then the default tolerance is
specified as a variation in fringes, even if another option is selected.
Decenter X/Y: If checked, decenter tolerances are added to each individual lens surface.
Tolerances are defined as a fixed decenter amount in lens units. OpticStudio uses TSDX and
TSDY for Standard surface decenters, and TEDX and TEDY for non-Standard surfaces.
Tilt (TIR) X/Y: If checked, a tilt or “total indicator runout” tolerance in either lens units or
degrees is added to each lens surface. OpticStudio uses TSTX and TSTY for Standard surface
tilts in degrees, TIRX and TIRY for Standard surface total indicator runout (tilt or wedge) in lens
units, and TETX and TETY for non-Standard surface tilts in degrees. If lens units are selected,
OpticStudio automatically converts the dimension to degrees of tilt if required for the
TSTX/TSTY or TETX/TETY operands. The conversion from total indicator runout in lens units to
tilt is given by
Where S is the clear semi-diameter or semi-diameter of the surface and Δy is the total
indicator runout, with a similar expression for θy.
Element Tolerances
Decenter X/Y: If checked, decenter tolerances are added to each lens group. Tolerances may
be defined as a fixed decenter amount in lens units.
Tilt X/Y: If checked, a tilt tolerance in degrees is added to each lens group and surface. It is
important to note that lens groups are by default tipped about the vertex of the first surface in
the group. See the section “TETX, TETY, TETZ: Tolerance on element tilts” for information on
tipping about some other point.
Index Tolerances
Index: TIND is used to model changes in the index of refraction. The units are change in
relative index.
Abbe: TABB is used to model changes in the Abbe number. The units are percentage of the
catalog Abbe value.
Other controls
Start At Row: This control indicates where in the Tolerance Data Editor the default tolerances
should be placed. If the row number is greater than 1, then the new default tolerances will be
appended starting at the specified row number. If the row number is -1, then the tolerances
will be appended to the end of the current list.
Use Focus Comp: If checked, then a default compensator of the back focus (the thickness
prior to the image surface) will be defined. Using at least one compensator can greatly relax
certain tolerances, however whether or not compensators should be used depends upon the
Start / Stop At Surface: These controls define the range of surfaces to apply the default
tolerances to. There are also six buttons:
OK: Accept these settings and generate the default tolerances, and closte the Wizard.
By default, the Monte Carlo analysis that OpticStudio performs draws random values from a
Gaussian “normal” distribution. Once the default tolerances are defined, they are saved with
the lens file automatically. If additional surfaces are inserted in the Lens Data Editor, the
tolerance surfaces are renumbered automatically.
Tolerancing
The dialog box which appears has several controls which are described below.
Set-Up tab
Mode: Four modes are supported: Sensitivity, Inverse Limit, Inverse Increment, and Skip
Sensitivity.
Sensitivity mode computes the change in the criterion for each of the extreme values of the
tolerances. Inverse Limit computes the value of each tolerance that will yield a criterion being
equal to the value specified by the Limit parameter. The Limit parameter is only available if the
mode is
Inverse Limit. Inverse mode will change the min and max values of the tolerance operands. See
“Inverse sensitivity analysis” .
Inverse Increment computes the value of each tolerance that will yield a change in the criterion
equal to the value specified by the Increment parameter. The Increment parameter is only
available if the mode is Inverse Increment. Inverse mode will change the min and max values of
the tolerance operands. For a description of how change is defined, see “Change” below. See
“Inverse sensitivity analysis” .
Skip Sensitivity will bypass the sensitivity analysis and proceed to the Monte Carlo analysis.
Polynomial: The Polynomial feature has three options: None, 3-Term, and 5-Term. If either 3-
Term or 5-Term is selected, the tolerance sensitivity will be determined at 4 and 6 points,
respectively, spanning the tolerance perturbation range and a polynomial fit of the resulting
criterion as a function of the tolerance perturbation will be computed and displayed. The 5-
Term polynomial is:
Cache: The cache feature can be used to greatly speed up the sensitivity and inverse sensitivity
tolerance analysis, but must be used with some care. The first time the tolerance analysis is run,
all the tolerances, perturbed criterion, and polynomial fit data (if any) is saved in memory. This
cached data may be used to quickly generate the tolerance analysis again. If “Recompute All” is
selected, the cached values are ignored, and all the tolerances are computed in full, and the
new values stored in the cache. If “Recompute Changed” is selected, then only those tolerances
that have been modified are recomputed. Results for unmodified tolerances are extracted from
the cache rather than computed, significantly speeding up the analysis. If “Use Polynomial” is
selected, than the last polynomial fit computed for each tolerance is used to quickly estimate
the perturbed values. OpticStudio will automatically invalidate the cached values if any of the
tolerance settings, such as criterion or Sampling, are modified. However, if any significant
changes are made to the lens file itself, such as modifying surface data, the cached tolerances
may be incorrect but OpticStudio is unable to detect this. Therefore, the cache feature should
only be used in a single session where no changes are being made to the lens. The intention of
this feature is to significantly speed up a sequence of tolerance analysis where changes are
being made to the values of individual tolerances, but no other changes are being made
between tolerance runs. If there is ever a doubt as to the validity of the cached data, set
“Cache” to “Recompute All” and repeat the tolerance analysis. When using the cache,
compensator data is not displayed (although the data presented does consider the affects of
compensation), and separation by fields and configurations is not supported.
Change: Change determines how the change in the criterion and the predicted performance
are computed. If Linear Difference is selected, then the change due to a tolerance is computed
as
Force Ray Aiming On: If the lens being toleranced is already using ray aiming, then ray aiming
will be used when evaluating the tolerances. If ray aiming is not already on, then ray aiming will
only be used if this box is checked. Generally, using ray aiming yields more accurate results but
slower computation speed. For preliminary or rough tolerance work, leave the switch at the
default "off", but for final or precise work, set the switch "on".
# CPU’s: Selects the number of CPU's over which to spread the tolerance analysis task. More
than 1 may be selected, even on a single CPU computer, in which case the single CPU will time
share the multiple simultaneous tasks. The default is the number of processors detected by the
operating system.
Separate Fields/Configs: If checked, the criterion will be computed and displayed for all field
positions in all configurations individually. If unchecked, the criterion will be computed as an
average over all field positions in all configurations. During inverse tolerancing, if Separate
Fields/Configs is unchecked, the inverse analysis is done on the overall tolerance criterion,
which is usually an average of performance over all fields in all configurations. The problem
with using the average performance is that some fields or configurations may be significantly
degraded by tolerance defects while other fields or configurations are not, and the average
may not reveal the severity of the loss of performance at a few fields or configurations. If this
option is checked, then OpticStudio computes the criterion at each field in each configuration
individually, and verifies that each field meets either the Limit or Increment value. For Inverse
Increment mode, OpticStudio computes the nominal performance at every field position and
reduces the tolerances until the criterion at every field is degraded no more than the increment
value. See “Inverse sensitivity analysis”.
Open Tolerance Data Viewer on Completion: This option determines whether the Tolerance
Data Viewer will open on completing the tolerance run. If the box is not checked, the data will
still be available by opening the Tolerance Data Viewer manually.
Save Tolerance Data: If this box is checked, a .ZTD file containing the full tolerance data of the
current run will be saved upon completion.
Criterion tab
RMS spot size (radius, x, or y): The best choice for systems which are not close to the diffraction
limit; for example, systems with more than one wave of aberration. This is the fastest option.
OpticStudio always uses a centroid reference for tolerancing.
RMS wavefront: The best choice for systems which are close to the diffraction limit; for
example, systems with less than one wave of aberration. This is nearly as fast as RMS spot
radius. OpticStudio always uses a centroid reference for tolerancing.
Merit Function: Uses whatever merit function has been defined for the lens. This is useful for
user-defined tolerancing criterion. User-defined merit functions may also be required for
systems with non-symmetric fields, or with significant surface apertures which remove rays. If
the user-defined merit function is used, no boundary constraints on the compensators are
automatically added to the merit function. If the merit function was generated by OpticStudio
as one of the default merit functions, make sure the “Assume Axial Symmetry” option was
checked OFF, see “Assume Axial Symmetry” for a discussion. Separate Fields/Configs is not
supported when using this criterion.
Geometric or Diffraction MTF (average, tangential, or sagittal): The best choice for systems
which require an MTF specification. If average is selected, the average of the tangential and
sagittal responses is used. Diffraction based MTF tolerancing can be problematic if the
tolerances are loose, because the diffraction MTF may not be computable or meaningful if the
OPD errors are too large. This is especially true if the spatial frequency is high enough and the
performance poor enough for the MTF to go to zero at some frequency below the frequency
being analyzed. MTF is the slowest of the default criterion. The frequency at which the MTF is
computed is specified in the "MTF Frequency" control.
Boresight error: Boresight error is defined as the radial chief ray coordinate traced for the on
axis field divided by the effective focal length. This definition yields a measure of the angular
deviation of the image. OpticStudio models boresight error by using just one BSER operand
(see the Optimization chapter for details on BSER). Any element or surface decenters or tilts
will tend to deviate the chief ray and increase the values of the BSER operand. Boresight error
is always computed at the primary wavelength in radians. Boresight error should only be used
with radially symmetric systems. Note boresight error gives no indication of image quality; it is
a measure of the deviation of the axis ray.
RMS Angular radial, x, or y aberrations. This tolerance criterion is best used for afocal systems
(see “Afocal Image Space”). The angular aberrations are based upon the direction cosines of
the output rays.
User Script: A user script is a macro-like command file which defines the procedure to be used
for alignment and evaluation of the lens during tolerancing. For details on this option, see the
section “Using Tolerance Scripts”. Separate Fields/Configs is not supported when using this
criterion.
Increment: When using Inverse Increment mode, this control is active and is used to define
the limit on the change in the criterion for computing inverse tolerances. For example, suppose
the Change is Linear Difference, Criterion is RMS Spot Radius, and the nominal RMS of a
system is 0.035. If Increment is set to
0.01, then OpticStudio will compute the min and max value of each tolerance that degrades
the performance to anRMS of 0.045. The Increment value must be positive to represent a
degradation in performance. When using MTF as a merit, the Increment is still positive, and
OpticStudio automatically interprets this number as a decrease in MTF from the nominal. See
“Inverse sensitivity analysis”. The nominal value for the currently selected criterion may be
computed by pressing the “Check” button adjacent to the Increment edit window.
Sampling: Sampling is used to set how many rays are traced when computing the tolerance
criterion. Higher sampling traces more rays, and gives more accurate results. However, the
execution time increases. If the selected criterion is RMS spot or RMS wavefront, then the
sampling value is an integer that refers to the number of rays traced along a radial arm of the
pupil in the Gaussian quadrature technique (see “Selecting the pupil integration method” for a
description of this technique). The number of arms is always twice the number of rays along
each arm. If MTF is the selected criterion, then the sampling refers to the pupil grid size, with a
sampling of 1 yielding a 32 x 32 grid, sampling of 2 yielding a 64 x 64 grid, etc. Usually, a
sampling of 3 or 4 is sufficient for quality optical systems. Systems with high amounts of
aberration require higher sampling than systems with low aberration. The most reliable
method for determining the best sampling setting is to run the tolerance at a sampling of 3,
then again for a sampling of 4. If the results change moderately, then use the higher setting. If
they change substantially, check the next higher sampling setting. If the results change little,
go back to the lower sampling. Setting the sampling higher than required increases
computation time without increasing accuracy of the results.
MTF Frequency: If MTF is selected as the Merit, then this control is active and is used for
defining the MTF frequency. MTF frequency is measured in MTF Units, see “MTF Units”.
Comp: This control determines how the compensators are evaluated. “Optimize All” will use
the optimization capability of OpticStudio to determine the optimum values of all defined
compensators. Although optimization is accurate, it is slow to execute. There are two different
optimization algorithms available, DLS and OD. If “Optimize All (DLS)” is selected, OpticStudio
will execute one cycle of the Orthogonal Decent algorithm then execute the Damped Least
Config: For multi-configuration lenses, indicates which configuration should be used for
tolerancing. The selected configuration only will be considered, and the configuration number
will be printed on the final report. If "All" is selected, then all configurations will be considered
at once.
Fields: Generally speaking, the field definitions used for optimization and analysis are
inadequate for tolerancing. for example, a rotationally symmetric lens may use field definitions
of 0, 7, and 10 degrees. For tolerancing purposes, the lack of symmetry in the field definitions
may cause inaccurate results when analyzing tilt or decenter tolerances. When constructing a
merit function to use for tolerancing OpticStudio can use three different field settings:
Y-Symmetric: OpticStudio computes the maximum field coordinate, then defines new field
points at +1.0, +0.7, 0.0, -0.7, and -1.0 times the maximum field coordinate, in the Y direction
only. All X field values are set to zero. This is the default for rotationally symmetric lenses.
XY-Symmetric: Similar to Y-Symmetric, except there are 9 field points used. The 5 Y-Symmetric
points are used, and -1.0, -0.7, +0.7, and +1.0 are added in the X axis direction only.
User Defined: Use whatever field definitions exist in the current lens file. This option is required
when using vignetting factors, tolerancing multiple configuration lenses, or using tolerance
scripts. It is also highly recommended when tolerancing non rotationally symmetric lenses or
lenses with complex field weighting that user defined fields be used.
If user defined fields are used, no adjustment of the weights is performed. For the Y-Symmetric
case, the center point has a weight of 2.0, all others have a weight of 1.0. For the XY-Symmetric
case, the center point has a weight of 4.0, all others unity.
Cycles: This determines how rigorously OpticStudio will attempt to optimize compensator
values. If set to Auto, then OpticStudio will call the optimizer in “Auto” mode, which will run the
optimizer until the optimization of the compensators has converged. For rough tolerancing, a
low number, such as 1, 2, or 3, may be used. If the compensators are difficult to optimize, a
higher setting may increase accuracy. If too few optimization cycles are selected, then the
tolerances will be pessimistic; the predicted performance will be worse than the actual
performance. The “Auto” setting is the safest to use. Higher settings increase accuracy at the
expense of run time. This setting is only used if Comp is set to “Optimize All”.
Script: The name of the script, if using the User Script criterion. User scripts must be text files
ending in the extension TSC and be in the <data>\Tolerance folder (see “Folders” ).
Status: This control is used by the tolerance algorithm to provide status messages during
computation of the nominal criterion when "Check" is pressed.
# Monte Carlo Runs: This control is used to specify how many Monte Carlo simulations
should be performed. The default setting of 20 will generate 20 random lenses which meet the
tolerances specified. See the section "Monte Carlo simulations" for more details. The number
of Monte Carlo runs may be set to zero, which will omit the Monte Carlo analysis from the
summary report.
# Monte Carlo Save: This option is used to save a specific number of lens files generated
during the Monte Carlo analysis. The value specifies the maximum number of lens files to be
saved. For example, suppose 20 is selected. After the first Monte Carlo lens is generated, the
lens file will be saved in the file “MC_T0001.ZOS” or “MC_T0001.ZMX” (depending on the file
format of the original lens file). The second Monte Carlo lens file will be generated, then saved
in “MC_T0002.ZOS” or “MC_T0002.ZMX”, and so on. Only the first 20 Monte Carlo lenses will be
saved (the last will be “MC_T0020.ZOS” or “MC_T0020.ZMX”). If fewer than 20 Monte Carlo
runs were requested, then fewer than 20 lenses would be saved. Be sure you have no lens files
with the names “MC_Txxxx.ZOS” or “MC_Txxxx.ZMX”, as OpticStudio will overwrite these files
without warning as the lenses are saved. The purpose of this feature is to allow further study
on the lenses being generated by the Monte Carlo feature. Note that the file names given here
assume that no File Prefix to the Monte Carlo file names was defined; see File Prefix for details.
File Prefix: If a prefix string is provided, then the string will be prepended to the names of the
Monte Carlo files generated. For example, if the prefix string is “Fast_Doublet_” then the first
Monte Carlo file saved will be file name “Fast_Doublet_MC_T0001.ZOS” or “Fast_Doublet_MC_
T0001.ZMX” (depending on the file format of the original lens file), and similar names for the
remaining saved files.
Save Best and Worst Monte Carlo Files: If checked, the best and worst Monte Carlo lens files
generated will be saved. The file names are “prefixMC_BEST” and “prefixMC_WORST” where
“prefix” is the File Prefix string.
Overlay MC Graphics: If checked, each open analysis graphical window (such as a ray fan or
MTF graph) will be updated and overlayed for each Monte Carlo generated lens. The resulting
plots are useful for showing the total range of performance for the simulated lenses. Analysis
graphs which do not automatically change scale and do not depend upon surface numbers are
the most useful, such as MTF, MTF vs. Height, Encircled Energy, and other plots that allow a
user defined fixed scale, such as ray fan plots. Plots which change scale dynamically or require
a fixed range of surfaces, such as layout plots, will not work reliably and are not supported.
Static, Text, and Editor windows are not updated. Overlayed graphic windows will be flagged
Classic tab
Show Descriptions: If checked, a full description of the meaning of each tolerance operator
will be provided in the analysis report. If unchecked, only the tolerance operator abbreviations
will be listed.
Show Compensators: By default, the compensator values are not printed out during the
sensitivity analysis. If this box is checked, then each compensator value will be printed along
with the change in the criterion for each tolerance.
Hide All But Worst: If checked, printing of all the sensitivity data will be turned off. This is
useful for decreasing the size of the output report. The “hide” check box is normally used in
conjunction with the “Show worst” control.
Show worst: The “Show worst” control can be set to sort and display only some number of
tolerance operands; this permits limiting the printout to the most severe tolerances only.
Output To File: If a valid file name is provided, the tolerance analysis output window text will
be saved to the specified file. The path is always the same as the current lens file. Only provide
a file name without a path in this box, such as OUTPUT.TXT. Leave this control blank to not
save the output text.
Other buttons
There are also six buttons on the bottom of the dialog box:
Save: Save the currently selected tolerance options in a user selected file name for future use.
The file ends in the extension TOP and these options may be used by other features.
Cancel: Exits the dialog box without performing the tolerance analysis, restoring the previous
settings.
Apply: Saves the changed options for the session, even if Cancel is subsequently selected.
Once all of the options have been selected, press OK to begin the tolerance analysis. Details on
the method of calculation are provided in the next section.
The “Tolerance Scripts” button expands a menu with options to create a new tolerance script,
or edit an existing script:
A tolerance user script is a macro-like command file which defines the procedure to be used
for alignment and evaluation of the lens during tolerancing. For details on this option, see the
section “Using Tolerance Scripts”.
Tolerance Summary
Quick Sensitivity
Get a quick estimate of the sensitivity of the optical system.
Once all the tolerance operands have been defined, the Quick Sensitivity analysis may be
performed to quickly estimate the sensitivity of an optical system. This tool is similar to the
Tolerancing tool, but while the Tolerancing tool includes several controls to precisely calculate
sensitivity, the Quick Sensitivity tool is instead streamlined for maximum speed.
Settings:
RMS spot size (radius, x, or y): The best choice for systems which are not close to the
diffraction limit; for example, systems with more than one wave of aberration. This is the fastest
option. OpticStudio always uses a centroid reference for tolerancing.
RMS wavefront: The best choice for systems which are close to the diffraction limit; for
example, systems with less than one wave of aberration. This is nearly as fast as RMS spot
radius. OpticStudio always uses a centroid reference for tolerancing.
Boresight error: Boresight error is defined as the radial chief ray coordinate traced for the on
axis field divided by the effective focal length. This definition yields a measure of the angular
deviation of the image. OpticStudio models boresight error by using just one BSER operand
(see the Optimization chapter for details on BSER). Boresight error is always computed at the
primary wavelength in radians. Boresight error should only be used with radially symmetric
systems. Note boresight error gives no indication of image quality; it is a measure of the
deviation of the axis ray.
RMS Angular radial, x, or y aberrations. This tolerance criterion is best used for afocal
systems (see “Afocal Image Space”). The angular aberrations are based upon the direction
cosines of the output rays.
Sampling: Sampling is used to set how many rays are traced when computing the criterion.
Higher sampling traces more rays, and gives more accurate results. However, the execution
time increases. If the selected criterion is RMS spot or RMS wavefront, then the sampling value
is an integer that refers to the number of rays traced along a radial arm of the pupil in the
Gaussian quadrature technique (see “Selecting the pupil integration method” for a description
of this technique). The number of arms is always twice the number of rays along each arm.
Usually, a sampling of 3 or 4 is sufficient for quality optical systems. Systems with high
amounts of aberration require higher sampling than systems with low aberration. The most
reliable method for determining the best sampling setting is to run the analysis at a sampling
of 3, then again for a sampling of 4. If the results change moderately, then use the higher
setting. If they change substantially, check the next higher sampling setting. If the results
change little, go back to the lower sampling. Setting the sampling higher than required
increases computation time without increasing accuracy of the results.
Y-Symmetric: OpticStudio computes the maximum field coordinate, then defines new field
points at +1.0, +0.7, 0.0, -0.7, and -1.0 times the maximum field coordinate, in the Y direction
only. All X field values are set to zero. This is the default for rotationally symmetric lenses.
User Defined: Use whatever field definitions exist in the current lens file. This option is
required when using vignetting factors, tolerancing multiple configuration lenses, or using
tolerance scripts. It is also highly recommended when tolerancing non rotationally symmetric
lenses or lenses with complex field weighting that user defined fields be used.
If user defined fields are used, no adjustment of the weights is performed. For the Y-Symmetric
case, the center point has a weight of 2.0, all others have a weight of 1.0. For the XY-Symmetric
case, the center point has a weight of 4.0, all others unity.
Other buttons
Save: Save the currently selected options as a QS file within the Configs folder. The title of the
QS file will be selected by the user.
OK: Performs the Quick Sensitivity analysis using the current options.
Cancel: Exits the dialog box without performing the Quick Sensitivity analysis, restoring the
previous settings.
Once all of the options have been selected, press OK to begin the Quick Sensitivity analysis.
Quick Yield
Field Generally speaking, the field definitions used for optimization and analysis are
inadequate for tolerancing. for example, a rotationally symmetric lens may use field definitions
of 0, 7, and 10 degrees. For tolerancing purposes, the lack of symmetry in the field definitions
Y-Symmetric: OpticStudio computes the maximum field coordinate, then defines new field
points at +1.0, +0.7, 0.0, -0.7, and -1.0 times the maximum field coordinate, in the Y direction
only. All X field values are set to zero. This is the default for rotationally symmetric lenses.
XY-Symmetric: Similar to Y-Symmetric, except there are 9 field points used. The 5 Y-Symmetric
points are used, and -1.0, -0.7, +0.7, and +1.0 are added in the X axis direction only.
User Defined: Use whatever field definitions exist in the current lens file. This option is required
when using vignetting factors, tolerancing multiple configuration lenses, or using tolerance
scripts. It is also highly recommended when tolerancing non rotationally symmetric lenses or
lenses with complex field weighting that user defined fields be used.
If user defined fields are used, no adjustment of the weights is performed. For the Y-Symmetric
case, the center point has a weight of 2.0, all others have a weight of 1.0. For the XY-Symmetric
case, the center point has a weight of 4.0, all others unity.
Precision The precision level used in the approximation. The options are Standard, High, Very
High. The higher the precision, the slower the calculation.
Pupil Sampling The sampling value for the number of rays traced along a radial arm of the
pupil for Gaussian quadrature.
Compensation The number of compensation cycles being run. Standard is 2, High is 5, Very
High is 10. This analysis uses the equivalent of “Optimize All (DLS)” compensation at all times.
In order to compare results to the Monte Carlo Yield, please make sure the Tolerancing tool is
set up accordingly.
Comp This control determines how the compensators are evaluated. “Optimize All” will use the
optimization capability of OpticStudio to determine the optimum values of all defined
compensators. Although optimization is accurate, it is slow to execute. There are two different
optimization algorithms available, DLS and OD. If “Optimize All (DLS)” is selected, OpticStudio
will execute one cycle of the Orthogonal Decent algorithm then execute the Damped Least
Squares algorithm. If “Optimize All (OD)” is selected, Then the Orthogonal Descent algorithm
only is used. For more information, see “Performing an optimization” . If “Paraxial Focus” is
selected, only the change in paraxial back focus error is considered as a compensator; all other
compensa- tors are ignored. Using Paraxial Focus is very useful for rough tolerancing, and is
significantly faster than using “Optimize All”. If “None” is selected, no compensation will be
performed, and any defined compensators will be ignored.
Discussion
The exact methodology in reconstructing the Monte Carlo outcome is confidential and
proprietary to Zemax, LLC.
Quick Yield has current limitations when the compensation range is not sufficient to mitigate
the Monte Carlo perturbations without reaching the compensator min or max values. In this
case, the calculations will produce erroneous results. This can be avoided by increasing the
compensator bounds.
Quick Yield is also limited in cases where the perturbation effects a highly non-linear. For
example, when a perturbation causes significant beam clipping.
Tolerance Data File The name of the ZTD file to use. OpticStudio will look in the folder where
the current lens is saved and list all files with the ZTD extension found there.
Statistics Clicking the Statistics button will return basic statistical data for every column in the
Tolerance Data Editor.
The data that is stored in the ZTD file includes all tolerance operands, compensators, criteria,
and reported values during a tolerance run. This includes any reported numbers when using a
tolerance script.
Histogram
The analysis displays a histogram of any data saved during a Monte Carlo tolerance run. This
includes all tolerance operands, compensators, and reported operands from a tolerance script.
Operand The tolerance operand, compensator, or reported value to display against the
criterion.
Bin Count This setting determines how many bins are used to span the range from minimum
to maximum criterion.
Min Value The lowest criterion value. Results outside of this value will be summed up into one
bar, representing all results less than the Min Value.
Max Value The highest criterion value. Results outside of this value will be summed up into
one bar, representing all results greater than the Max Value.
This analysis displays a cumulative distribution function, or yield curve, of all the data saved
during a Monte Carlo run. This includes all tolerance operands, compensators, and reported
operands from a tolerance script.
Operand The tolerance operand, compensator, or reported value to display against the
criterion.
This feature creates an ISO 10110 type drawing of surface, singlet, or doublet elements suitable
for use in optical shop fabrication.
Reset All from LDE When the “Reset All from LDE” button is pressed, values for the Radius,
Conic, and Effective Diameter are taken from the Lens Data Editor for all surfaces in the
element. Values for the Diameter and Diameter (flat) will also be taken from the editor for all
surfaces in the element, as these values are available via the Chip Zone and Mechanical Semi
Diameter columns of the editor. The values are populated in the text box between the “In Use”
column and the “-tol” column in the “Surf - Codes 3-4” tabs for each surface (Left, Middle, and
Right). Values for each surface may subsequently be edited, if desired, by un-selecting the
“Automatic” checkbox in the appropriate “Surf - Codes 3-4” tab for that surface.
Reset from TDE When the “Reset from TDE” button is pressed, radius, thickness, index,
surface tilt, and surface decenter tolerances are taken from the Tolerance Data Editor. The
tolerances are automatically reset after changing the surface number or show as settings. Only
TRAD, TCUR, TFRN, TCON, TTHI, TIND, TABB, TSTX, TSTY, TSDX, TSDY, TIRR, TEZI, and TWAV
tolerances are considered. If a tolerance is not provided, the tolerance is set to zero. When the
TEZI operand is defined in the absence of a TWAV operand, then the ISO Element Drawing will
report the RMSx error in fringes with respect to the system's primary wavelength. The TFRN
tolerance is applied to the surface form tolerance code 3/A. Note all tolerance fields may be
edited to suit any requirement.
The ISO 10110 Element Drawing is an interpretation of the drawing specification “ISO 10110
Optics and Optical Instruments -- Preparation of drawings for optical elements and systems: A
User's Guide”, by Ronald K. Kimmel and Robert E. Parks, eds., published by the Optical Society
of America. For more information see OSA’s web site at www.osa.org.
Although the ISO specification only covers the case of single elements, the OpticStudio ISO
drawing also supports surfaces and doublets. However, not all the ISO drawing particulars are
incorporated on a drawing of a cemented doublet. If the doublet drawing results are not
satisfactory, draw the doublet as two separate singlet drawings instead. This feature does not
consider the “Ignore Surface” setting and will draw all requested surfaces, whether they are
ignored or not.
Summary of ISO 10110 symbols and codes OpticStudio does not automatically include
default values for all ISO tolerances; however text fields are provided for user specification of
these tolerances. The text fields have limited width, and if very long strings are placed in the
text fields the text may overrun the columns on the drawing. The following table summarizes
the ISO 10110 symbols and codes used by OpticStudio.
Values for the Radius, Conic and Effective Diameter may also be read from the Lens Data Editor
by selecting the “Reset from LDE” button.
In OpticStudio Premium and Professional values for the Diameter and Diameter (flat) are also
provided from the editor via the Chip Zone and Mechanical Semi Diameter data in the editor.
In OpticStudio values for the Diameter and Diameter (flat) are also provided from the editor via
the Chip Zone and Mechanical Semi Diameter data in the editor.
If the “Automatic” option has been selected, the values obtained from the “Reset from LDE”
button will differ from the values observed in the “In Use” column only if this analysis had been
previously saved in the file in a state to cause the discrepancy.
For OpticStudio Premium and Professional, mapping of the diameter values is as follows:
Effective Diameter = Clear Semi-Diameter or Semi-Diameter value in the Lens Data Editor
Diameter = Clear Semi-Diameter or Semi-Diameter + Chip Zone values in the Lens Data Editor
Diameter (flat) = Mechanical Semi Diameter value in the Lens Data Editor
We highly recommend that users of these editions of OpticStudio define all mechanical
geometry for each lens directly in Lens Data Editor, rather than attempting to define this
geometry in the settings of the ISO drawing.
For OpticStudio Standard, the Diameter and Diameter (flat) values cannot be obtained from
the Lens Data Editor, and must be manually entered by the user. Note that both values must be
at least as large as the Effective Diameter, and that the Diameter (flat) value must always be
larger than (or as large as) the Effective Diameter.
XML Output
For singlet elements, OpticStudio will produce XML output to facilitate sharing ISO 10110 lens
specification data. The XML output is visible on the “XML” tab. In the XML output, element and
To use the cost estimate functionality, the “Show As:” selection must be Singlet.
If the cost estimate provider cannot complete the request for an estimate or if connection
errors occur, the report will display appropriate error messages. Some example error messages
are shown below.
The XML tab contains the data submitted to the cost estimate provider. This output is provided
both for information purposes and because the xml can be saved to file and the later imported
into a Cost Estimate project using the stand-alone Cost Estimate tool or into other ISO Element
Drawing analyses.
For more information, see the stand-alone “Cost Estimator (production tools)” in the
Tolerance tab.
Scale Factor If the scale factor is set to zero, then "Fill Frame" will be selected, which will scale
the element to fill the right half of the element drawing. If a numeric value is entered, then the
plot will be drawn in "real" scale, times the scale factor. For example, a scale factorof 1.0 will
plot the element at actual size on the printer (not the display). A factor of 0.5 will plot the
element at half scale.
Decimals The number of decimals to use in numeric values. Press the "Reset all but surface,
show as, and titles" button to reformat all displayed numbers.
Reset from TDE reads the data from the Tolerance Data Editor for the specified surfaces
concerning the tolerances of Radius, Irregularity, and Thickness.
The data is read from the Tolerance Data Editor operands TRAD, TIRR, and TTHI, and take the
maximum absolute value between the min and max value of the tolerance.
Edit Note File Clicking on this button will invoke the Windows NOTEPAD.EXE editor, which
can then be used to modify the selected note file.
Save As/Load From These two buttons allow saving and reloading of all settings displayed on
the element drawing settings box. The data is stored in a binary format with the extension ELE.
Reset all but... If selected, this button will reset all the default tolerances and apertures for the
specified surfaces, but the current surface, show as, and text titles will remain as they are.
Note Font Size Choose Standard, Medium, Small, or Fine. These are in order of decreasing
font size. The Note Font Size setting only affects the size of the note file that is annotated on
the drawing. Smaller fonts permit larger note files to be displayed.
Date If left blank, the default date format is used. If any text is supplied, the exact text is used.
Drawing Title This field is for any user defined text. The default is the lens title.
Drawing Name All of these fields are for user defined text. Any text may be entered. No
default value.
Revision
Drawn By
Project
Discussion The element drawing settings may be stored for the specific lens file by pressing
the Save button. Unlike most analysis features, the element drawing feature saves all the
settings for each surface separately. For example, the notes and tolerances for surface 1 may
be saved, and then new notes and tolerances for surface 3 may be entered and then saved. To
recall the settings for any specific surface, change the surface number to the desired surface,
and then press the Load button. If a match is found with a previously saved surface, the
settings for that surface will be displayed. This feature makes it easy to regenerate complex
drawings for multiple element systems.
An important feature of the element drawing capability is the ability to load different note files
and place them on the drawing. The default note file “DEFAULT.NOT” is a generic set of notes
which will rarely be useful as is. However, the user can modify the note files (they are text files
which any word processor or text editor can modify) and store them under different names.
For example, you may want to have a .NOT file for each type of optic you design, and then load
the most appropriate note file when the element drawing is generated. The .NOT files must be
placed in the <data>\Miscellaneous folder (see “Folders”).
If the first line of the note files starts with the number 1, then OpticStudio will print the note file
as provided, with no default notes. If the note file starts with any other symbol, the first default
note will be "1) All dimensions in millimeters" or whatever the current lens units are. To use the
default note, start the user supplied notes at note number 2. The line breaks and spacings in
the note file will be replicated exactly on the element drawing.
Whenever a new element drawing is generated, or the “Reset” button is pressed, the default
settings will be regenerated. The default tolerances are taken from the tolerance data editor.
The maximum of the min/max tolerance range is used as the default. For example, if the TTHI
thickness tolerance is -.03, +.05, the tolerance value will be 0.05. Only TTHI, TRAD, and TIRR
tolerances are considered. If a suitable default cannot be generated, the tolerance is set to
zero. Note all tolerance fields are text; and may be edited to suit any requirement.
A handy conversion between radius tolerance and the power tolerance in fringes for a
Newton's rings type optical test against a test plate is given by
Special characters There are useful special characters that may be inserted and edited in the
text fields of the tolerances. The symbols are inserted by pressing and holding Alt on the
keyboard and typing a 4 digit number on the numeric keypad. Some common characters are ±
- Alt 0177, µ - Alt 0181, ® - Alt 0174, © - Alt 0169.
Sag Table
l the sag (z-coordinate) of the selected surface at various Y-coordinate distances from
the vertex
l the computed best fit spherical (BFS) radius
l the sag of the BFS and the difference between the BFS and the surface
l the depth of material that would need to be removed from the BFS to yield the asphere
is also listed.
l The dimensionless slope (dz/dr) of the actual surface and the BFS are given, and the dif-
ference between the two.
This feature can be used to determine the maximum aspheric deviation of a surface. The sag
table is also useful for lens fabrication.
Only the Y-coordinate of the surface is considered, therefore this feature should not be used if
the surface is non-rotationally symmetric.
Step Size The distance between steps measured from the vertex at which the sag is computed.
The default value of zero will automatically choose a reasonable step size.
Best Fit Sphere Criterion The BFS radius and offset will be optimized according to the
criterion selected here.
l “Minimum Volume” will minimize the volume difference between the BFS surface and
the selected lens surface.
l “Minimum RMS (No Offset)” will minimize the RMS difference between the BFS surface
and the selected lens surface while constraining the vertices of the surfaces to have no
offset.
l “Minimum RMS (With Offset)” will minimize the RMS difference between the BFS sur-
face and the selected lens surface while allowing an offset between the vertices.
If the Best Fit Sphere Criterion is set to "Minimum Volume", it also depends on whether the
surface defines a boundary between air and glass, or glass and air. In this case, OpticStudio
always attempts to choose a BFS that will "add" material on the air side of the surface. The
vertex offset and BFS radius will be selected to minimize the volume of material that needs to
be removed from the BFS to yield the asphere surface.
For some surfaces, such as those between glass in a cemented doublet, OpticStudio cannot
determine which side is "air". For these surfaces, if the desired data is not generated by default,
selecting "Reverse Direction" will choose the other side of the surface as the air surface. The
user must check the data and sign convention carefully before any fabrication decisions are
made.
Minimum Radius, Maximum Radius The minimum and maximum radial aperture over which
the fit is performed. This feature is intended to support radial symmetric annular optics. If both
of these values are zero, the Minimum Radius is 0.0 and the Maximum Radius is the clear semi-
diameter or semi-diameter of the surface.
Results
Tolerancing Overview
OpticStudio provides a flexible and powerful tolerance development and sensitivity analysis
capability. The tolerances available for analysis include variations in construction parameters
such as curvature, thickness, position, index of refraction, Abbe number, aspheric constants,
and much more. OpticStudio also supports analysis of decentration of surfaces and lens
groups, tilts of surfaces or lens groups about any arbitrary point, irregularity of surface shape,
and variations in the values of any of the parameter or extra data. Since the parameter and
extra data terms may describe aspheric coefficients, gradient index coefficients, and more, any
of these values may also be made part of the tolerance analysis. The various tolerances may be
used in any combination to estimate alignment and fabrication error effects on system
performance.
Tolerances are defined using operands, such as TRAD, which defines a tolerance on a radius.
The tolerance operands are automatically saved with the lens file. Tolerance operands are
edited on the Tolerance Data Editor, available from the Editors group of the “Setup Tab” or in
the “Tolerance Tab”.
Tolerances may be evaluated by several different criterion, including RMS spot radius, RMS
wavefront error, MTF response, boresight error, user defined merit function, or a script which
defines a complex alignment and evaluation procedure. Additionally, compensators may be
defined to model allowable adjustments made to the lens after fabrication. OpticStudio also
allows limits to be placed on the change of a compensator.
Sensitivity Analysis:
For a given set of tolerances, the change in the criterion is determined for each tolerance
individually. Optionally, the criterion for each field and configuration individually may be
computed.
Inverse Sensitivity:
For a given permissible change in criterion, the limit for each tolerance is individually
computed. Inverse sensitivity may be computed by placing a limit on the change in the
criterion from nominal, or by a limit on the criterion directly. The criterion may be computed as
an average over all fields and configurations, or on each field in each configuration
individually.
The sensitivity and inverse sensitivity analysis considers the effects on system performance for
each tolerance individually. The aggregate performance is estimated by a root-sum-square
calculation. As an alternative way of estimating aggregate effects of all tolerances, a Monte
Carlo simulation is provided. This simulation generates a series of random lenses which meets
the specified tolerances, then evaluates the criterion. No approximations are made other than
the range and magnitude of defects considered. By considering all applicable tolerances
simultaneously and exactly, highly accurate simulation of expected performance is possible.
The Monte Carlo simulation can generate any number of designs, using normal, uniform,
parabolic, or user defined statistics.
1. Define an appropriate set of tolerances for the lens. Usually, the default tolerance gen-
eration feature described in the “Tolerance Wizard” section of the “Tolerance Tab” help
file is a good place to start. Tolerances are defined and modified on the Tolerance Data
Editor, available in the Editors group of the “Setup Tab” or in the “Tolerance Tab”.
2. Modify the default tolerances or add new ones to suit the system requirements.
3. Add compensators and set allowable ranges for the compensators. The default com-
pensator is the back focal distance, which controls the position of the image surface.
Other compensators, such as image surface tilt, may be defined. There is no limit to the
number of compensators that may be defined.
4. Select an appropriate criterion, such as RMS spot radius, wavefront error, MTF, or
boresight error. More complex criterion may be defined using a user defined merit func-
tion, or for comprehensive flexibility, a tolerance script, which is described later.
5. Select the desired mode, either sensitivity or inverse sensitivity. For inverse sensitivity,
choose criterion limits or increments, and whether to use averages or compute each
field individually.
6. Perform an analysis of the tolerances.
7. Review the data generated by the tolerance analysis, and consider the budgeting of tol-
erances. If required, modify the tolerances and repeat the analysis.
The overwhelming advantages of using the Irregular surface type are speed, simplicity, and
flexibility. Any Standard surface type can be converted to an Irregular surface type without the
need for dummy surfaces or coordinate breaks. Furthermore, the aggregate effects of tilt,
decenter, and irregularity may all be modeled simultaneously using the Monte Carlo analysis.
Defining Compensators
Many different types of compensators may be defined; thicknesses (most commonly used),
curvature, conic constants, any parameter or extra data value, of any surface or surfaces. Multi-
configuration operands may also be defined as compensators. The parameter values are useful
for using tilts and decenters of particular components for compensation. The surface to be
tilted must already be defined as a coordinate break (or perhaps a tilted surface), with any
appropriate pickup solves as required.
The image surface focus is specified as a compensator by default. You may add or delete
compensators to customize the analysis to your particular situation, and may use as many
compensators as you like. Generally, using more compensators will loosen tolerances, and
complicate the actual alignment of the system. To analyze compensators within the Tolerance
Data Editor, Optimize All must be selected in the Tolerance...Criteria tab under the Comp
settings. See Tolerancing for more details.
All compensators are defined using the COMP, CPAR, CEDV, and CMCO tolerance operands.
Defining compensators is described in the section "Tolerance control operands".
When using a script to define the tolerance procedure, the compensators may be altered and
different sets of compensators may be defined at different stages of the simulated alignment
procedure. For more details, see Using Tolerance Scripts.
OpticStudio then removes all of the variables. Solves are left in place, however, solves may
cause problems during tolerancing; search the help files for “Tolerancing with solves” for more
information.
OpticStudio then uses the Criterion, Field, MTF Frequency, and Sampling settings on the
tolerance dialog box to define an appropriate merit function for the tolerancing. Since this is
done to the temporary file only, the original merit function defined for the lens is not
disturbed.
Boundary constraints are added to the merit function to limit the compensators to the min and
max boundaries specified using the COMP and CPAR commands. If using a user defined merit
function, or if the "Comp" control is set to "Paraxial Focus", boundary constraints on the
compensators are ignored.
If “Comp” is set to “Optimize All”, OpticStudio then calls the optimization function to find the
best values for the defined compensators. Otherwise, the back focal position is set to paraxial
focus. The resulting lens file is then saved for subsequent use by the tolerancing algorithm.
The criterion of this lens is considered to be the “nominal”. Note that the nominal criterion
value generally will not be the same as the criterion value that is reported on the optimization
or merit function editor windows, because OpticStudio constructs a new merit function just for
use in tolerancing. OpticStudio then proceeds with either sensitivity, inverse, or Monte Carlo
analysis as described in subsequent sections.
Evaluating Compensators
OpticStudio has two methods for evaluating compensators selected by the “Comp” control:
either “Optimize All” or “Paraxial Focus”. If “Paraxial Focus” is selected, then several
assumptions are made which greatly speeds up the tolerance evaluation. First, all defined
compensators and compensator boundary constraints are ignored. Back focus is implemented
as a compensator using a paraxial focus error solve. This means the focus is adjusted to
maintain the amount of defocus in the nominal lens design, without attempting to reoptimize
the back focus precisely. These assumptions greatly speed up the tolerance evaluation. If
“Optimize All” is selected, then OpticStudio uses the slower but more accurate optimization
algorithm to find the best value for all the compensators.
"Paraxial Focus" mode is fast, accurate, and should be used if back focus is the only
compensator, and the system is well described by paraxial rays, such as systems with rotational
symmetry. "Paraxial Focus" should not be used when the system is highly non-symmetric or
Sensitivity Analysis
For the sensitivity analysis, each tolerance is evaluated independently using the following
algorithm:
The parameter whose tolerance is being evaluated is adjusted to the extreme minimum value.
For example, if the tolerance being evaluated is TRAD, and the nominal value is 100 mm, with a
minimum tolerance of -0.1 mm, the radius is set to 99.9. If the tolerance is an element tilt or
decenter tolerance, dummy coordinate breaks are inserted as required to model the
perturbation. For surface tilts and decenters, such as TSDX, TSDY, TSTX, TSTY, TIRX, or TIRY, the
Irregular surface type is used if the surface is initially of type Standard.
The value of the sensitivity analysis is that the tolerances which are too loose will, in general,
have greater contributions to the increase in the criterion than other tolerances. This technique
allows the designer to identify surfaces which are highly sensitive to certain errors, such as tilts
or decenters. Different surfaces also will, in general, have very different sensitivities to the
various errors. The sensitivity analysis aids in identification of which tolerances need to be
tightened, and which might be loosened. It is also valuable for finding the optimum (and
minimum) number of compensators, and the required range of adjustment. There are in fact
many more applications for this feature; for example, designing lens mounts to maximize
compensation leverage.
The amount of output can be overwhelming, especially for lenses with many elements and a
corresponding large number of tolerances. Often, the sensitivity to the tolerances varies widely
over all the possible tolerances. The "Show worst" control is extremely useful for summarizing
The average of the min and max squared change is taken because the min and the max
tolerance cannot both occur simultaneously, and so summing the squares would result in an
overly pessimistic prediction. The final predicted, as-built performance is then computed. If the
Change is computed using Linear Difference, the final criterion is defined as:
where N is the nominal criterion. If the Change is computed using RSS Difference, the final
performance is:
For example, if the mode is Inverse Limit, the Criterion is RMS spot radius, the nominal criterion
is 0.035, and the Max Criterion is 0.050, OpticStudio will adjust the tolerances until the criterion
is 0.050. If the mode is Inverse Increment, the Criterion is RMS spot radius, the nominal
criterion is 0.035, and the Increment is 0.010, OpticStudio will adjust the tolerances until the
merit is 0.045. For Inverse Limit, the Max Criterion must be greater than the nominal, except for
MTF Criterion, in which case the Max Criterion must be less than the nominal, or an error
message will be generated and the analysis terminated. For Inverse Increment, the Increment
must always be positive.
For the inverse sensitivity iteration to converge to the desired tolerance, the criterion must
smoothly and monotonically change with the tolerance value. For criterion such as RMS spot
radius, this is normally the case. However, some criterion, most notably the MTF related
tolerance criterion, may have multiple peaks and valleys as the tolerance value is changed. This
is usually caused by the starting tolerance being too loose. If the inverse sensitivity cannot
iterate to the desired criterion, reduce the starting tolerance limit and repeat the analysis.
If the option to “Separate Fields/Configs” is not selected, the criterion OpticStudio uses to
perform the inverse analysis is the overall criterion, which is typically an average over all fields
and configurations. The problem with using the average performance is that some fields or
configurations may be significantly degraded by tolerance defects while other fields or
configurations are not, and the average may not reveal the severity of the loss of performance
at a few fields or configurations. If “Separate Fields/Configs” is checked, then OpticStudio
computes the criterion at each field in each configuration individually, and verifies that each
field meets either the Max Criterion or Increment value. For Inverse Increment mode,
OpticStudio computes the nominal performance at every field position and reduces the
tolerances until the criterion at every field is degraded no more than the increment value.
If the starting value of the tolerance yields performance better than the Max Criterion or
Increment value would dictate, the tolerance is not adjusted. This means the tolerance will
never be loosened; it can only be tightened during inverse sensitivity analysis. For example, if
the nominal is 0.035, and the Max Criterion is 0.050, and the initial tolerance yields a criterion
of 0.040, the tolerance will not increase. To compute the actual limit, the tolerance must first be
loosened on the Tolerance Data Editor, and then inverse sensitivity repeated. This is done to
prevent looser than necessary tolerances. Generally, tolerances that are looser than some
reasonable value do not decrease manufacturing costs.
Note that the inverse sensitivity is computed for each tolerance individually. The overall
degradation in performance estimate will still be given by the RSS of all the individual
increases. Inverse tolerancing can be disabled for individual operands; which prevents the
inverse tolerance algorithm from tightening tolerances even if the estimated performance
exceeds the specified limits. The option to disable inverse tolerancing is on the "Operand
Type" dialog box listed under the "Edit" menu of the Tolerance Data Editor.
The Monte Carlo Analysis simulates the effect of all perturbations simultaneously.
For each Monte Carlo cycle, all of the parameters which have specified tolerances are randomly
set using the defined range of the parameter and a statistical model of the distribution of that
parameter over the specified range. By default, all parameters are assumed to follow the same
normal distribution with a total width of four standard deviations between the extreme
minimum and maximum allowed values. For example, a radius of 100.00 mm with a tolerance
of +4.0/ - 0.0 mm will be assigned a random radius between 100.00 and 104.00 mm, with a
normal distribution centered on 102.00 mm and a standard deviation of 1.0 mm.
This default model may be changed using the STAT command. Each tolerance operand may
have a separate definition for the statistics, or operands with the same statistical distribution
form may be grouped together. All tolerance operands which follow a STAT command use the
statistical distribution defined by that STAT command. As many STAT commands as desired
may be placed in the tolerance data editor.
The STAT command accepts two arguments, Int1 and Int2. Int1 should be set equal to 0 for
normal, 1 for uniform, 2 for parabolic, and 3 for user defined statistics. For normal statistics
only, the Int2 value should be set to the number of standard deviations between the mean and
extreme values of the parameter.
The modification is that the randomly selected value x (measured as an offset from the
midpoint between the two extreme tolerances) is restricted to lie within "n" standard
deviations of zero. The default value of "n" is two, however "n" may be changed using the Int2
argument of the STAT command defined earlier. This is done to ensure that no selected value
will exceed the specified tolerances. The standard deviation is set to half the range of the
tolerances divided by n. For example, if "n" is 2, and a thickness is nominally 100 mm with a
tolerance of plus 3 or minus 1 mm, then the selected value will be drawn from a normal
distribution with a 101 mm mean and a range of plus or minus 2 mm, with a standard
deviation of 1.0. If "n" is 5, then the standard deviation will be 0.4. The larger "n" is, the more
likely the selected value will be closer to the mean value of the tolerance extremes. The smaller
"n" is, the more the normal looks like the uniform distribution.
For the radial roll operands: TEDR, TSDR, TARR, and TRLR, if either Max or Min is 0 then the
distribution will be centered at 0. The random radial direction of the roll ensures that this
remains a symmetric distribution.
if
The Δ value is one half of the difference between the max and min tolerance values. Note that
the randomly selected value will lie somewhere between the specified extreme tolerances with
uniform probability.
where Δ is defined exactly the same as for the uniform distribution. The parabolic distribution
yields selected values that are more likely to be at the extreme ends of the tolerance range,
rather than near the middle, as for the normal distribution.
For the radial roll operands: TEDR, TSDR, TARR, and TRLR, if either Max or Min is 0 then the
distribution will be centered at 0. The random radial direction of the roll ensures that this
remains a symmetric distribution.
where the T values are tabulated for some number of discrete X values. This general
distribution may be numerically integrated, and from the integral of the tabulated values an
estimated X may be randomly generated with the statistics matching that of the tabulated
distribution.
where the X values are monotonically increasing floating point numbers between 0.0 and 1.0,
inclusively, and the T values are the probabilities of getting that X value. Note OpticStudio uses
a probability distribution that covers the range from 0.0 to 1.0, and so the first X1 value defined
For each tolerance operand subsequently defined (until another STAT command is reached)
the defined min and max values will determine the actual range of the random variable X. For
example, if a value of 100.0 has a tolerance of -0.0 and +2.0, the probability distribution will
extend over the range of 100.0 to 102.0.
Once the data is defined in a file, the file extension must be *.UDD and the file must be placed
in the <data>\Tolerance folder (for details, search the help files for “Folders”), and the file
name (with extension) must be placed in the comments column of the tolerance data editor on
the same line as the STAT command. The STAT type must be set to “3”.
The file name of the user defined probability distribution must be placed in the
comments column of the tolerance data editor for the STAT operand.
0.0 0.0
0.1 0.5
0.2 1.0
0.3 0.5
0.4 0.0
0.5 0.5
0.8 4.0
1.0 5.0
Note the X data values do not need to be evenly spaced; finer spacing may be used in regions
of rapid change in probability. This distribution has two peaks, and the higher peak is highly
skewed to the maximum side of the distribution.
The user defined statistical distribution is very flexible, and may be used to model any
probability distribution, including skewed, multiply peaked, or measured statistical probability
data. Multiple distributions may be defined and used in the same tolerance analysis.
For each cycle, the compensators are adjusted and then the criterion and compensator values
are printed. After all of the Monte Carlo trials a statistical summary is provided.
The value of the Monte Carlo analysis is estimating the performance of the lens considering all
of the tolerances simultaneously. Unlike the sensitivity analysis, which identifies the "worst
offenders" in the system, the Monte Carlo analysis estimates the real-world performance of a
system which meets the tolerances specified. The statistical summary provided may be highly
useful for lens systems which are mass-produced. Lenses which are one of a kind, of course do
not follow these statistics because of the inadequate sampling. However, the Monte Carlo
analysis is still useful because it indicates the probability that a single lens will meet the
required specification.
Tolerances such as TEDX, TEDY, TETX, and TETY require OpticStudio to insert coordinate breaks
before and after the surface group, and then tilt or decenter the group as a whole. The tilts and
decenters performed by the first coordinate break must be “undone” by the second coordinate
break. This can only be accomplished if the vertices of the first and second coordinate breaks
are at the same location in 3D space. OpticStudio ensures this condition through the use of
pickup and position solves.
This method will fail if the surface ranges specified by multiple tolerance operands overlap. For
example, if there is a TETX on surfaces 3-8, and then a subsequent TETX on surfaces 5-12, the
first coordinate break which tilts the 5-12 group will change the location of the surfaces 5-8,
and the second coordinate break of the first group will be moved. In this case, OpticStudio
cannot ensure the coordinate breaks will work as intended. In fact, overlapping coordinate
breaks do not have a unique interpretation, and it is difficult to imagine an optical system
where they even have a meaningful physical interpretation.
Tolerances may be nested however, because nesting implies an unambiguous order to the tilts
and decenters. For example, a TETX on 5-12 followed by a TETX on 5-9 and a TETX on 10-12 is
perfectly reasonable. This order would simulate the tilting of an assembly, composed of
multiple elements, each of which may be tilted within the assembly itself.
2) The outermost pair of surfaces in each nested group must be first. Here is an example of a
valid set of operands:
TETX 5 12
TETX 5 10
TETX 11 12
The second operand is invalid because it partially overlaps the first (this violates rule 1). The
third operand is invalid because although nested with operand 1, it is the outermost range of
the two (this violates rule 2). The second operand must be deleted or modified, but the third
operand could be placed in front of the first operand to make a legal operand list:
TETX 5 15
TETX 5 12
Note that an operand is considered nested even if it shares one or both surface limits with a
previous operand, so that TETX 5-15 may be followed by another TETX 5-15 or by TETX 5-12 or
TETX 13-15, but not TETX 4-13.
Tolerance scripts are macro-like command files that define a procedure to follow for
evaluating the perfomance of a lens during tolerancing. Scripts allow simulation of a complex
alignment and evaluation procedure for a lens. With scripts, the following actions can be taken
to evaluate a perturbed lens:
l Monitor and report any value OpticStudio can compute via a merit function (which
includes essentially any value OpticStudio can compute since the merit function may
Any number of these operations may be combined in the script; so multiple merit functions
and compensator groups may be defined. The script is executed many times during the
evaluation of the tolerance analysis, including:
l Twice for each tolerance operand in the sensitivity analysis, (once for the min and once
for the max tolerance).
l Multiple times for each tolerance operand in the inverse sensitivity analysis (inverse
sensitivity may require iteration).
The tolerance script files must be text files ending in the extension TSC, and be placed in the
<data>\Tolerance folder (for details, search the help files for “Folders”).
When using tolerance scripts, the min and max boundary values of compensators are not
enforced; search the help files for “General comments about min and max values on
compensators” for more information. If any compensators are defined in the script, then no
compensators are allowed in the Tolerance Data Editor.
Purpose:
Syntax:
! A comment line!
Discussion:
CEDV
Purpose:
Syntax:
CEDV surf param
Discussion:
CEDV defines a new extra data value compensator. The value “surf” is the surface number in
the original lens file. OpticStudio automatically renumbers the surface if additional coordinate
break or other dummy surfaces were inserted by the tolerance program. The value for “param”
corresponds to the extra data number for the surface.
CLEARCOMP
Purpose:
Syntax:
CLEARCOMP
Discussion:
CLEARCOMP removes all current compensators. New compensators must be defined before
calling OPTI-MIZE or OPTIMIZE-OD.
CLOSEFILE
Purpose:
Syntax:
CLOSEFILE
Discussion:
CMCO
Purpose:
Syntax:
CMCO operand config
Discussion:
CMCO defines a new multi-configuration operand compensator. The value “operand” is the
operand (row) number in the original lens file. The value for “config” corresponds to the
configuration number.
CNPA
Purpose:
Syntax:
CNPA object parameter surface
Discussion:
CNPA defines a new non-sequential parameter compensator. The value “object” is the object
number in the original lens file. The value for “parameter” corresponds to the parameter
number. Surface is the surface number of the NSC group, use 1 for non-sequential program
mode.
CNPS
Purpose:
Syntax:
CNPS object code surface
Discussion:
COMP
Purpose:
Syntax:
COMP surf code
Discussion:
COMP defines a new compensator. The value “surf” is the surface number in the original lens
file. OpticStudio automatically renumbers the surface if additional coordinate break or other
dummy surfaces were inserted by the tolerance program. The value for “code” is 0 for
thickness, 1 for curvature, 2 for conic.
CPAR
Purpose:
Syntax:
CPAR surf param
Discussion:
CPAR defines a new parameter compensator. The value “surf” is the surface number in the
original lens file. OpticStudio automatically renumbers the surface if additional coordinate
break or other dummy surfaces were inserted by the tolerance program. The value for “param”
corresponds to the parameter number for the surface.
FORMAT
Purpose:
Syntax:
FORMAT m.n [EXP]
The integers m and n are separated by a decimal point. The value m refers to the total number
of characters to be printed, even though some of them may be blank. The value n refers to the
number of places to display after the decimal point. Therefore, FORMAT 8.4 will cause
subsequent REPORT statements to print 8 characters, with 4 numbers after the decimal point.
FORMAT .5 will cause REPORT to show 5 decimal places, and as many total places as needed.
FORMAT only affects numeric output from REPORT. If a number is too large to fit within the m
decimal places, then the m portion of the FORMAT statement will be ignored. The optional
keyword EXP after the m.n expression indicates exponential notation should be used. The
default format is 16.8 EXP.
Example:
FORMAT 18.9 EXP
GETMERIT
Purpose:
Syntax:
GETMERIT
Discussion:
GETMERIT should be used prior to any REPORT commands if the merit function has not yet
been evaluated. LOADMERIT, OPTIMIZE, and OPTIMIZE-OD also update the current merit
function.
HEADER
Purpose:
Prints a text header to the beginning of an output file. The header can be used to identify to
which tolerance operand or Monte Carlo file the subsequent data belongs to.
Syntax:
HEADER "text"
Discussion:
The HEADER command adds a text line to the output file when using OPENFILE in TXT mode.
The HEADER command will output the user supplied text string, followed by either the
tolerance operand number (during sensitivity analysis) or the Monte Carlo file number being
LOADMERIT
Purpose:
Syntax:
LOADMERIT filename.mf
LOADMERIT "C:\SOMEPATH\SOME MERIT FILE NAME.MF"
Discussion:
The merit function file must reside in the <data>\MeritFunction folder (for details, search the
help files for “Folders”) if no path is specified. The file should be in the proper format as saved
using the Toolbar option of the Merit Function Editor, or may be a full ZMX file, in which case
only the merit function portion of the file is read and loaded.
When the merit function is loaded, it replaces any existing merit function. Any operands in the
merit function which reference surface numbers should be the surface numbers for the
original, unaltered lens. OpticStudio automatically adjusts the surface numbers as required if
additional coordinate break or other dummy surfaces were inserted by the tolerance program.
The new merit function is then evaluated. The resulting merit function value is what will be
returned to the tolerance analysis program as the criterion unless a subsequent GETMERIT,
LOADMERIT, OPTIMIZE, or OPTIMIZE-OD command is executed.
NOMINAL
Purpose:
Syntax:
NOMINAL keyword
Discussion:
The NOMINAL script command allows some control over the evaluation of the script for the
computation of the nominal performance only. The supported keywords are:
OPENFILE
Purpose:
Opens a text or binary file for subsequent output of data using REPORT.
Syntax:
OPENFILE "FILENAME" mode
Discussion:
FILENAME may be any valid file name, with the full path and extension included, such as
“C:\DATA\My File.DAT”. The mode parameter should be BIN for a binary file, or TXT for a text
file. OPENFILE will open a new data file the first time the script is run for a tolerance analysis
run. Each subsequent call to the script will append data to the same file.
Data is written to the file whenever the REPORT OR HEADER commands are executed.
However, the text string is not included in REPORT commands; just the numerical data the
REPORT command prints to the tolerance output file. If mode is TXT, the file will be text with
each REPORT value written on a separate line. If mode is BIN, each value will be written out as a
64-bit double precision number.
Because data is written out each time the script is called, the amount of data in the file
depends upon how many tolerance operands and Monte Carlo runs are being performed. The
first call to the script is to compute the nominal criterion, then the sensitivity analysis, then the
Monte Carlo analysis. OPENFILE should not be used during an inverse sensitivity run, because
there are multiple calls to execute the script and no practical way to discern which data
belongs to which operand.
The file is automatically closed after the script is finished executing. Multiple OPENFILE
commands may be used within the same file to write different data to different files. See also
CLOSEFILE.
OPTIMIZE
Purpose:
Optimizes the system using the current merit function and compensators.
Syntax:
OPTIMIZE n
OPTIMIZE calls the damped least squared optimizer and executes “n” cycles of optimization. If
n is zero or is omitted the optimizer runs in automatic mode, terminating when convergence is
detected.
OPTIMIZE-OD
Purpose:
Optimizes the system using the current merit function and compensators.
Syntax:
OPTIMIZE-OD n
Discussion:
OPTIMIZE-OD calls the orthogonal descent optimizer and executes “n” cycles of optimization.
If n is zero or is omitted the optimizer runs in automatic mode, terminating when convergence
is detected.
PERTURB
Purpose:
Syntax:
PERTURB type int1 int2 int3 stat nstd min max
Discussion:
PERTURB is used to randomly change a numerical parameter in the lens. The integer parameter
type must be 0 for surface data, 1 for parameter data, 2 for extra data, 3 for multi-configuration
data, 4 for non-sequential component position data, and 5 for non-sequential parameter data.
The arguments to PERTURB change meaning depending upon the value of type as described
below.
Type = 0, surface data: int1 is used for the surface number, int2 is 0 for thickness, 1 for radius, 2
for conic, and 3 for clear semi-diameter or semi-diameter. The value of int3 must be set to
zero.
Type = 1, parameter data: int1 is the surface number, int2 is the parameter number, int3 must
be set to zero.
Type = 3, multi-configuration data: int1 is the configuration number, int2 is the operand
number, int3 must be set to zero.
Type = 4, NSC position data: int1 is the surface number, int2 is the object number, int3 must be
1 for x, 2 for y, 3 for z, 4 for tilt x, 5 for tilt y, or 6 for tilt z.
Type = 5, NSC parameter data: int1 is the surface number, int2 is the object number, int3 is the
parameter number.
The stat integer indicates the statistical model to use: 0 for normal (Gaussian), 1 for uniform,
and 2 for parabolic. Only these 3 distributions are currently supported. The nstd is a floating
point value that indicates the number of standard deviations from the center of the
distribution to either edge. A small value for nstd (less than 1.0) will yield a nearly uniform
distribution. Large values of nstd will yield a sharply peaked distribution, with most of the
randomly generated values being clustered close to the center of the range. Only the normal
distribution uses the nstd value, however, it must be provided and should be set to zero if the
other stat types are used.
The min and max values indicate the range over which the random values are selected.
The resulting random value will be between 0.0 and 1.0, and will likely be close to 0.5 because
the number of standard deviations is moderately large. This random value will then be added
to the current value for the thickness of surface 6. Note that PERTURB works on all values,
whether they are compensators or not. To perturb values controlled by multi-configuration
operands, use type 3 to perturb the operand directly rather than the parameter under control.
QUIET
Purpose:
Controls whether data sent to a file using REPORT is also sent to the tolerance analysis output
window..
Syntax:
QUIET ON
QUIET OFF
Discussion:
REPORT
Purpose:
Syntax:
REPORT "text" operand
REPORT "text" SZERNIKE term field wave sampling maxorder
REPORT “text” -1
REPORT_NB (see discussion under syntax 4 below)
Discussion:
Syntax 1: REPORT will print any user defined text to the tolerance output window, along with
the value of any operand in the currently loaded merit function. The value for operand is an
integer corresponding to the operand number (row) of the value to print (note that any value
may be computed in a merit function, and if it is not needed for optimization, it may be
weighted to zero and is still available for reporting). If operand is zero, then the value of the
entire merit function will be printed out. The numeric format is set by the FORMAT command.
Note that for Syntax 1 and all following syntaxes, when REPORT follows an OPENFILE
command, all content within the "text" portion will be omitted from the output.
Syntax 2: REPORT, when followed by a text string and then the keyword SZERNIKE, can be used
to compute and report Standard Zernike coefficients (for details, search the help files for
“Zernike Standard Coefficients”). If the term number is zero, then the other values for field,
wave, sampling, and maxorder are used to define the Zernikes to be computed. The computed
values are then saved in a buffer, and no output is generated. If term is between 1 and the
most recent maxorder value used in a previous SZERNIKE call, then that Zernike term is
reported. A sample session follows:
REPORT "Compute Only!" SZERNIKE 0 1 1 1 4
REPORT "Zernike 1 = " SZERNIKE 1
REPORT "Zernike 2 = " SZERNIKE 2
REPORT "Zernike 3 = " SZERNIKE 3
REPORT "Zernike 4 = " SZERNIKE 4
Note that only when the term is zero are the Zernikes actually computed; the following calls
retrieve the computed Zernikes one at a time.
Syntax 4: If the command REPORT_NB is used instead of REPORT, then no line break is printed
at the end of the line, so multiple data may be displayed on one line. The last report issued
should use REPORT and not REPORT_NB to properly terminate the line, otherwise the last
REPORT_NB value will be at the end of a Monte Carlo run. The remaining arguments are
supported as described for syntax 1, 2, and 3.
SAVE
Purpose:
Syntax:
SAVE n
Discussion:
SAVE will save the current lens file in a ZMX file; with the name TSAVnnnn.ZMX where nnnn is
the four digit integer representation of the number "n". For example, if "n" is 6, the file will be
saved as TSAV0006.ZMX.
UPDATE
Purpose:
Syntax:
UPDATE
Discussion:
Element number 2 is decentered until an axial test beam is centered on the image.
Finally, the back focus is adjusted to maximize the on-axis MTF only.
Assume that element number 2 is decentered using parameters 1 and 2 of surface 3, which is
an existing coordinate break, the position of element 4 is thickness 10, and the back focus is
thickness 15. Furthermore, assume a merit function which centers the axis ray on the image
surface is defined in CENTER.MF, the magnification enforcing merit function is MAGNIFY.MF,
the MTF merit function is MTF.MF, and the evaluation merit function is EVALUATION.MF. The
corresponding script might look like this:
! clear any existing compensators for a clean start
CLEARCOMP
! load the centering merit function
LOADMERIT CENTER.MF
! define the two compensators to decenter element 2
CPAR 3 1
CPAR 3 2
! optimize 4 cycles
OPTIMIZE 4
! clear the decenters, load the magnification merit, and adjust
thickness 10
CLEARCOMP
LOADMERIT MAGNIFY.MF
COMP 10 0
OPTIMIZE 4
! now load the MTF merit function, and adjust back focus
CLEARCOMP
LOADMERIT MTF.MF
COMP 15 0
OPTIMIZE 4
! load the evaluation merit function, report the distortion and 5
MTF values
! these should be the first 6 operands in EVALUATION.MF.
CLEARCOMP
LOADMERIT EVALUATION.MF
REPORT "Distortion = " 1
REPORT "MTF at field 1 = " 2
REPORT "MTF at field 2 = " 3
REPORT "MTF at field 3 = " 4
REPORT "MTF at field 4 = " 5
REPORT "MTF at field 5 = " 6
At the end of the script, the entire merit function value resulting from the last LOADMERIT or
OPTIMIZE command is returned as the criterion which OpticStudio reports and uses.
There are occasions where a pickup solve is required, and thus should not be deleted. For
example, if the lens is used in double-pass, and a tilt on one element implies a tilt on a
subsequent element, then a pickup solve can be used to pickup the tilts from the first element.
For this case use the TUTX and TUTY tolerance operands.
When TIRR is applied on any surface other than Standard, an Irregular Composite Add-on
surface will be inserted before the surface and used to perturb the irregularity during
tolerancing.
When TEXI is applied on any surface other than Standard and Even Asphere, a Zernike Fringe
Sag Composite Add-on surface will be inserted before the surface and used to perturb the
irregularity during tolerancing
When TEZI is applied on any surface other than Standard, Even Asphere and Toroid, a Zernike
Standard Sag Composite Add-on surface will be inserted before the surface and used to
perturb the irregularity during tolerancing.
Note that the expanded capabilities for TIRR, TEXI, and TEZI described above will not include
support for off-axis apertures at present.
If any of the calculated tolerance data show a value of "Infinity", this means the criterion could
not be evaluated for the specified tolerance. Usually the criterion cannot be evaluated because
of total internal reflection of some of the ray targets. The statistical data which follows the
sensitivity analysis is usually meaningless if any of the tolerances have a criterion value of
infinity. One solution is to decrease by a factor of two or more the tolerance value, and then
repeat the analysis.
If the nominal criterion the tolerance algorithm reports is different from the expected value,
check to see if ray aiming is “off” in the lens file (search the help files for “Ray Aiming” for
details about ray aiming). Try using ray aiming “on” and re-optimizing. Generally, if there is a
big difference between criterion when ray aiming is turned on and off, then it should be left on.
Non-sequential Mode
OpticStudio’s Installation Package includes many optical materials, stock lenses, thin-film
coatings and light sources in the form of catalog data. You can also add your own data. The
Libraries Tab provides access to all the catalog data that ships with OpticStudio as well as the
tools necessary to enter your own data.
The Optical Materials group gives access to catalogs of glasses, plastics, birefringent media
and more.
The Stock Parts group holds all the vendor lens catalogs in OpticStudio, which can be quickly
searched to find the correct lenses for your application.
The Coatings group contains data and tools for designing thin-film coatings and applying
them to optical surfaces.
The Scattering group gives access to OpticStudio’s surface scattering libraries and scatter
viewers.
The Sources group gives access to IES (angular only) data. Spectral (color) information can be
added to data files that do not have it.
The Source Viewers group includes tools for modeling source directivity plots and spectra.
OpticStudio computes indices of refraction from formulas and coefficients entered into the
glass catalogs. When you specify a glass name such as “BK7” in the glass column of the LDE,
OpticStudio looks for the name in each of the currently loaded glass catalogs. If the glass is
It is important to note that all OpticStudio glass catalogs assume that the index computed by
the dispersion formulas is the relative index of refraction computed as a function of the relative
wavelength. Relative means relative to air at 1.0 atmosphere and a reference temperature
defined in the glass catalog.
For details on how OpticStudio considers temperature, pressure, and the index of air see Index
of refraction computation
OpticStudio assumes that the index computed by the dispersion formulas is the relative
index of refraction computed as a function of the relative wavelength.
This method may seem more complex than directly entering in the indices of refraction, but
the advantages are numerous. For one, the formulas are generally more accurate than user-
entered data. Catalog data is more convenient as well, requiring the user to only supply the
glass name. This is a particular advantage during the glass selection phase of the design.
Additionally, any wavelength may be used, even if no explicit index data at that wavelength is
available. The primary disadvantage is that the coefficients must be calculated, although this
data is either readily available in catalogs or easily calculated. If you have the index data for
some material not in the catalog, or if you feel your data is better than the catalog data,
OpticStudio will compute the coefficients for you automatically; see “Fitting index data” later in
this reference file.
All the listed catalogs must be in the Glass Folder folder (see Folders). The reason that glass
catalog names are specified on this screen is that the catalog choice is stored with each lens
separately. If you now save the lens, and reload it at a later time, the correct glass catalogs, and
only those catalogs, will automatically be loaded.
Select the catalog name from those listed in the drop-down list on the dialog box. Once the
catalog is selected, you may insert, cut, copy, paste, or modify data in the catalog, as is
described in the following sections. You can save the newly modified catalog to either the
same name or a new name. When editing the glass catalogs supplied with OpticStudio, be sure
to save the modified data to a new name using the “Save Catalog As” button. This is important
because future releases of OpticStudio may include an updated catalog which will be installed
over the existing catalog, and any changes that had been made to the existing catalog will be
lost.
To edit a large amount of data in the glass catalog, to create an extensive custom catalog, or to
convert data in another format to the format used by OpticStudio, it may be easier to edit the
glass catalog file directly. For information on the file format see “The AGF and BGF file formats”
later in this reference file.
Be extremely careful when editing the glass catalogs; erroneous ray trace data will
result if the catalog data is incorrectly modified.
Item
Description
Catalog
Used to specify which of the .AGF format catalogs to display. The comment string to the right
of the catalog name may be used to describe the catalog.
Glass
Used to specify which glass within the catalog to display data for.
In the event that a glass needs to be given a different name, the name of the currently selected
glass can be modified in this field.
Formula
The dispersion of each glass is described by a formula. This control allows selection of which
formula is used. If this setting is changed, then the dispersion data becomes invalid unless the
appropriate coefficients are also entered. See “The glass dispersion formulas” later in this
reference file.
Status
The status indicates the general availability of the glass. The available settings are Standard,
Preferred, Obsolete, Special, and Melt. The status values are generally specified by the
manufacturer. Standard glasses are generally available for purchase. Preferred glasses are
usually frequently melted glasses, and more likely to be available upon demand. Obsolete
glasses are no longer manufactured, but may be available. Special is a general category used
to indicate a glass that does not fall into one of the other categories. Melt is a flag used by
OpticStudio to indicate glasses that have been created in the catalog by the melt fit feature,
see “Fitting melt data” later in this reference file. The status classification may differ slightly
between vendors. In some cases, vendor-specific definitions for material status are available as
header comments in the AGF file.
Index Nd
The index at d-light, or 0.587 micrometers. OpticStudio does not use this number when
computing the index of refraction. It is displayed solely for reference. The entry may be
meaningless for some materials which do not transmit well in the region around 0.587
micrometers.
Abbe Vd
The Abbe value at d-light. This number is not used by OpticStudio when computing the index
of refraction. It is displayed solely for reference.
This switch allows accurate thermal modeling of non-solid materials, such as gasses and
liquids, by allowing direct specification of the thermal coefficient of expansion in the lens data
editor rather than in the glass catalog. Only the edge effects are considered; the radius of
curvature and other thermal pickup solves will all use the adjacent material TCE, rather than the
gas or liquid TCE.
Exclude Substitution
If checked, then this glass will not be selected during global optimization, conversion from
model to real glasses, or be considered by the RGLA optimization operand.
The first eight rows in the center column of the dialog box display the dispersion coefficient
data. The names of these coefficients changes depending upon the glass formula.
TCE
The TCE value is the thermal coefficient of expansion. This is a dimensionless parameter. The
value displayed or entered needs to be multiplied by 1e-6 to yield the actual values.
OpticStudio currently uses the TCE value to model linear thermal expansion independent of
the temperature range being used. The catalogs values supplied by the glass vendor are
usually the TCE for the temperature range from -30 to +70 degrees Celsius, but OpticStudio
will use the TCE value for any temperature range.
Temp
The reference temperature in degrees Celsius. This is the temperature of the air to which the
relative wavelength and index data is referenced. This is usually the temperature of the glass at
which the data was measured, but not always.
These are the thermal coefficients used by the thermal analysis model.
DPgF
The value is the deviation of the relative partial dispersion from the normal line.
The minimum and maximum wavelengths in micrometers over which the dispersion formula
returns valid index data.
Melt Frequency
This integer value indicates the relative frequency with which the glass is melted by the
manufacturer. The convention used is 1 means the glass is melted very frequently, 2 means less
frequently, etc. up to a value of 5 to indicate a very infrequently melted glass.
Comment
Relative Cost
This number is intended to indicate the approximate relative cost of the glass as compared to
BK7. For example, a value of 3.5 would indicate the glass costs about 3.5 times as much as BK7
per pound. The number is only intended as a rough guide. The exact glass cost may vary with
the quality, amount, form, and availability of the glass being purchased. Contact the glass
vendor for more information.
These are the glass codes that indicate how resistant the glass is to various environmental
effects. The codes correspond to Climate Resistance (CR), Stain Resistance (FR), Acid Resistance
(SR), Alkali Resistance (AR), and Phosphate Resistance (PR). Generally, the lower the number
the more durable the glass is. If the value -1 or the symbol "?" is entered or displayed, no data
is available. For a complete description of these codes and the test conditions used to measure
them, contact the glass vendor.
Note that OpticStudio does not allow any spaces in the names of glasses or glass
catalogs.
The BGF file is of no value without the AGF file; so if a glass catalog must be copied, moved, or
sent via email to another folder or location, copy the AGF file and not the BGF file. OpticStudio
will automatically recreate the BGF whenever it is needed.
The required coefficients are available in most manufacturers’ glass catalogs. Schott no longer
uses this formula, but it is widely used by other glass manufacturers. See also “The Extended
formula” later in this reference file.
Coefficients for all three terms may be entered to describe the material, although fewer terms
may be used. See also the Sellmeier 3 and Sellmeier 5 formulas.
Only two terms are used, there is no wavelength dependence in the numerator of the second
term, and there is a constant term.
The Conrady formula is extremely useful for fitting to sparse data. For example, if you have
only three index- wavelength pairs of data, fitting to the six-term Schott formula would yield
meaningless data at the intermediate wavelengths.
This is similar to the Schott formula, with two additional terms added.
This is similar to the Extended formula, with a variation in powers of the wavelength in the last
two terms.
This is similar to the Extended formula, with another variation in powers of the wavelength.
It is also a good idea to check the coefficients against a tabular listing of the index data
available in many handbooks and publications. Use the dispersion plot or listing feature, or the
prescription data report, which lists index data at each surface. If there are discrepancies, check
the data you have entered carefully, and verify that the correct units and formula are being
used.
It is often the case that the materials you are designing with are in the catalog already. If they
are not, you can enter the coefficients for the formulas described previously. As an alternative,
OpticStudio will compute either the Schott, Herzberger, Conrady, or Sellmeier 1 dispersion
formula coefficients for you. With the glass catalog dialog box displayed, click on “Fit Index
Data” and the Fit Index Data dialog box appears. For a more comprehensive tool, see Glass
Fitting
If you have more data than will fit in the spreadsheet, use the data most closely representing
the wavelength region of interest. At least three points are required to get a good fit if you are
using the Conrady formula, six or more (and preferably twelve to fifteen) for the Schott,
Herzberger, or Sellmeier 1 formulas. Select the formula to use by selecting the formula name
from the drop-down list. You may want to try each of the models in turn, to see which gives
the lowest residual.
The RMS error is the RMS fit error between the given data, and the index data generated using
the resulting fit coefficients. The max error is the largest error between the fit and any one data
point. Both numbers can be compared to the magnitude of the index of refraction; which is of
course dimensionless. Because the Sellmeier 1 formula has non-linear coefficients, the fitting is
iterative, and this formula takes much more computer time to fit the data than the other
formulas do.
Now move the cursor over to the “Name” field, and enter the material name for the catalog.
Select “Fit” and OpticStudio will compute the optimal coefficients. The residual RMS error, and
the maximum single-point error, are listed on the bottom of the display. To enter this data in
the currently loaded catalog, select “Add to catalog”. OpticStudio will issue a message
verifying that the glass was saved.
When a glass is added to the catalog, the transmission data, if any, needs to be added
as described in the next section. Otherwise, the default internal transmission of 1.0 is
used at all wavelengths.
The index and wavelength data may also be saved to a text file for later use, and loaded for
fitting again by selecting the appropriate buttons. The text file may also be edited outside of
OpticStudio, and then loaded for fitting.
Usually, when quality optical glass is shipped from the manufacturer, a data sheet will
accompany the glass which indicates the index of refraction for the supplied glass at a few
wavelengths, either as an offset from the nominal catalog values or as the measured index
directly. Typically 3-5 wavelength-index data points are provided. This data is called "melt"
data because it is specific to the batch of glass melted at one time.
The Melt Data tool available from the glass catalog dialog box is a handy utility for converting
the limited melt data provided into a usable new glass type in the glass catalog.
There are a maximum of 8 wavelength-index points allowed for melt data. If you have more
than 8 points, use the "Fit Index" tool described in the previous section. The minimum number
of points allowed is 3, however, at least 4 and preferably 5 points should be used to get a good
melt fit. The wavelength range defined by the melt index data should be as broad as possible,
and should at a minimum cover the intended range of wavelengths to be used for ray tracing
through the melt glass. In all cases, the fitted data should be inspected carefully for accuracy
before it is used.
Glass: The name of the nominal glass in the selected glass catalog.
Melt Name: The name of the new glass to be created. The default is the nominal glass name
with "_MELT" appended on. The name length may not exceed 20 characters.
Fit only these wavelengths: If checked, the melt index fit will only be done over the
wavelength range defined by the minimum and maximum wavelengths of the provided melt
data points. This allows much more precise fitting of the glass data, however, the melt glass
cannot be used outside of this wavelength range. If unchecked, OpticStudio will attempt to
extrapolate the data (see “Discussion of melt fitting method” later in this reference file) to
create a melt fit that is valid over the entire wavelength spectrum of the original glass data.
This is the key difference between fitting index data (see “Fitting index data” earlier in this
reference file) and fitting melt data.
Formula: The dispersion formula to use for the new melt glass. Choose either Schott,
Herzberger, Conrady, or Sellmeier 1. The default value is the Schott formula unless the nominal
glass uses one of these formulas; in which case the same formula as the nominal glass will be
used.
Use: This box turns "on" and "off" each row of data.
Nominal: The index of refraction at the defined wavelengths using the nominal glass
dispersion.
Delta: The difference between the actual and nominal index of refraction. Note if the delta
value is edited, the "actual" value is automatically adjusted to keep the data consistent.
Fit/Insert: Choosing this button starts the fitting process as described below. Cancel: Aborts
the melt fitting process.
After the fitting is finished, the new melt glass will be inserted in the catalog, the catalog will be
saved, and a report summarizing the fit will be presented.
The problem with fitting melt data is the generally low number of points available; typically 3-
5. Most fitting routines need at least 8 points for good accuracy. So, the problem is to
extrapolate from a few points the variation in index over a large enough number of points to fit
the resulting dispersion accurately. The accuracy of the resulting melt fit at the defined data
points depends largely upon the extent of the wavelength range. Greater accuracy is achieved
if "Fit only these wavelengths" (see discussion above) is checked, at the expense of a reduced
spectral range over which the fit is valid.
First, a fit of the actual dispersion data is computed using the Conrady formula. The Conrady
formula is used because it is stable and reasonable when as few as three points are defined.
Then a Conrady fit of the nominal data is computed using only the defined wavelength points.
A large number of index points covering either the entire usable wavelength range (if "Fit only
these wavelengths" is unchecked) or the wavelength range defined by the melt points (if "Fit
only these wavelengths" is checked) of the nominal glass is generated. To each nominal index
value, an offset is added which is the difference between the two Conrady fits that were
generated using only the melt data wavelengths.
Finally, the resulting data is fit using the selected formula (not necessarily the Conrady). This is
the final fit inserted into the catalog.
After the melt fitting is finished, a report summarizing the melt fitting process is presented.
Check this report carefully before using the new melt glass!
OpticStudio automatically copies over all transmission, density, cost factor, and other data
from the nominal glass to the melt glass.
Check the generated melt fitting report for index accuracy carefully before using the
new melt glass!
where α is the absorption coefficient and τ is the path length through the glass. The parameter
α generally depends upon wavelength and has units of inverse length.
See Polarization (system explorer) for information on polarization ray tracing and transmission.
The transmission is defined in the glass catalog by a series of 3 numbers: the wavelength in
micrometers, the intensity transmittance, and the reference thickness in mm. For example, the
transmission of a glass at 0.35 micrometers may be 0.65 for a thickness of 25 mm. Up to 100
data points may be defined in the transmission data editor. Internally, OpticStudio converts the
data to “per mm”, and interpolates between defined wavelengths. If ray tracing is being
performed at a wavelength outside of the defined wavelengths, then the data for the closest
wavelength is used; otherwise, OpticStudio performs a linear interpolation.
To save the transmission data to a text file, use the “Save To File” button. The file format is
three columns of data: wavelength in micrometers, intensity transmittance, and reference
thickness in mm. Data in this same format may be read from a file and placed in the catalog
using the “Load From File” button. To save the modified data directly in the original glass
catalog, use the “Save Catalog” button.
Not all of the glasses listed in the supplied catalogs have valid transmission data, especially for
infrared materials and other non-commercial glass types. If transmission data is supplied by
the manufacturer, it is usually included. If no reliable data is available, or if the data has been
omitted, the default internal transmission of 1.0 is used at all wavelengths. Note that this is
internal transmission data, and thus does not include Fresnel reflections or other losses due to
thin film coatings.
The Transmission Data editor ignores all data after the first entry with a wavelength (Lambda)
of zero. Only the data entered before the first zero wavelength is considered.
In this special case, OpticStudio needs to use the TCE supplied in the Lens Data Editor to define
the mounting material properties, rather than the TCE supplied in the glass catalog. This can be
accomplished by setting the “Ignore Thermal Expansion” switch for the material in the glass
catalog.
The following table lists the vendors associated with each Material Catalog:
Although the data contained in the glass catalogs is generally reliable, it is always possible for
errors to be made during translation or editing of the data.
It is absolutely crucial that all index data be verified for accuracy by the end user! This is
especially true where fabrication of the optics is being considered
The catalog data may be in error, and it needs to be verified before it can be trusted.
The data contained in other catalogs provided with OpticStudio, such as the BIREFRINGENT,
INFRARED, and MISC catalogs have been compiled from published sources as described in the
following table. Some materials, such as calcite, are defined in more than one catalog.
Materials may be included in the catalog which are not referenced in the table, or the source is
specified as “unknown”. These materials should be especially scrutinized before trusting the
data accuracy.
Material Source
ADP Handbook of Optics, Second Edition Vol. II
AG3ASS3 Handbook of Optics, Second Edition Vol. II
AGGAS2 Handbook of Optics, Second Edition Vol. II
AGGASE2 Handbook of Optics, Second Edition Vol. II
AL2O3 Handbook of Optics, Second Edition Vol. II
ALN Handbook of Optics, Second Edition Vol. II
BATIO3 Handbook of Optics, Second Edition Vol. II
BBO Handbook of Optics, Second Edition Vol. II
Material Source
ACRYLIC Handbook of Optics Vol. II
BASF5 Laikin, Lens Design
BASF55 Laikin, Lens Design
CAF2 Handbook of Optics Vol. II
CDS Handbook of Optics Vol. II
COC Hoechst Celanese Spec sheet
The Photonics Design and Applications Handbook,
CR39 Optical Plastics: Properties and Tolerances, H. D.
Wolpert, pp. H-300 - H-307, (1991).
Obsolete glasses still exist in optical shops and may be used for new designs, if a supply can be
located. Also, many older designs using the old glasses need to be modeled and ray traced,
especially when designing new optics to work in harmony with the existing optical system. For
these reasons, data for obsolete glasses are still provided with the catalogs distributed with
OpticStudio. Obsolete glasses are indicated by the “obsolete” status displayed in the glass
catalog dialog box.
Because some new glasses may have the same name as old glasses, although the exact
composition may have changed, optical engineers need to be especially vigilant about
checking the index data predicted by the software against the melt sheets of the glass which
will actually be used.
Never blindly trust the accuracy of the index computed using catalog coefficients. There are
numerous sources of potential error, such as the measurement of the original sample, the
The AGF file consists of a header line followed by a series of records, one for each glass. The
header line format is:
CC <Catalog Comment>
!Standard glass: write your definition of standard status
!Special glass: write your definition of special status
!Obsolete glass: write your definition of obsolete status
The mnemonic CC stands for Catalog Comment, and any comment string up to 140 characters
may be placed here to define a comment for the catalog as a whole. The lines starting with !
are optional and will not appear in the material catalog. These lines can be used to explain the
classification between the different status of materials. Each subsequent record consists of a
two letter mnemonic followed by one or more data items separated by spaces. For a
description of these data see "Description of catalog data". The format of a single record is:
NM <glass name> <dispersion formula #> <MIL#> <N(d)> <V(d)>
<Exclude Sub> <status>
<melt freq>
GC <Individual Glass Comment>
ED <TCE (-30 to 70)> <TCE (100 to 300)> <density> <dPgF> <Ignore
Thermal Exp>
CD <dispersion coefficients 1 - 10>
TD <D0> <D1> <D2> <E0> <E1> <Ltk> <Temp>
OD <rel cost> <CR> <FR> <SR> <AR> <PR>
LD <min lambda> <max lambda>
IT <lambda> <transmission> <thickness>
IT <lambda> <transmission> <thickness>
... multiple IT lines may follow
l The dispersion formula number is 1 for Schott, 2 for Sellmeier 1, 3 for Herzberger, 4 for
Sellmeier 2, 5 for Conrady, 6 for Sellmeier 3, 7 for Handbook of Optics 1, 8 for
Handbook of Optics 2, 9 for Sellmeier 4, 10 for Extended, 11 for Sellmeier 5, 12 for
Extended 2 and 13 for Extended 3.
l The MIL# is provided for back compatibility and is not used, but a placeholder value
must be provided.
l The nd and vd values are also provided for reference but are not used.
l Status is 0 for Standard, 1 for Preferred, 2 for Obsolete, 3 for Special, and 4 for Melt.
l Melt Freq is an integer between 1 and 5 to indicate the relative frequency of melting by
the manufacturer.
GC: Glass comment. Any text string up to 140 characters long may be placed here.
ED: Extra Data. The values are the TCE in the -30 to 70 degree Celsius range, the TCE in the 100
to 300 degree Celsius range (this value is currently not used), the density, dPgF, and the Ignore
Thermal Expansion flag, which is 0 for no and 1 for yes.
CD: Coefficient Data. Up to 10 coefficients may be provided. The meaning of these coefficients
depends upon the dispersion formula used.
TD: Thermal Data. These are the D0, D1, D2, E0, E1, Ltk, and reference temperature values.
OD: Other Data. The relative cost, CR, FR, SR, AR, and PR values. For these values, -1 should be
specified if the data is not available.
LD: Lambda Data. The minimum and maximum wavelength in micrometers over which the
dispersion formula is valid.
IT: Internal Transmittance. These lines are the internal transmittance. Each line defines a
wavelength, transmission, and thickness in millimeters. The wavelengths must be in ascending
order. Up to 100 points may be defined for each glass record.
OpticStudio uses a formula for computing the index at each defined wavelength based upon
the index and Abbe number defined by the MIL number. The formula is based upon a least-
squares fit of coefficient data of many typical glasses. Typically, the index data calculated is
accurate to roughly 0.001. At wavelengths in the deep UV or infrared the index value becomes
less reliable. MIL number glasses are generally inferior substitutes for the constants of
dispersion (or other) models for the glass, however they are useful if no other data is available.
Note MIL number glasses are an approximation, although usually a very good
approximation in the visible range. Outside the visible wavelength range, such as in the
ultraviolet or infrared, the MIL number glass is not accurate and should not be used.
It is important to note that the indices calculated from the six-digit MIL number are not the
same as those calculated from the glass catalog, even if the MIL number you are using
corresponds to a glass in the catalog. Index data is calculated directly from the MIL number
entered on the main screen; not from the glass catalog data, even if a glass with that MIL
number is in the catalog.
Because any glass with a six digit name is assumed to be a MIL number glass defined by
OpticStudio’s internal equations, six digit numbers may not be used for glass names defined in
the glass catalogs. MIL number glasses are not used by the glass substitution feature (see
Global optimization of glass selection).
Any blank line or a line starting with the "!" symbol is assumed to be a comment and is
ignored.
The DENSITY data line defines the density of the glass in grams per cubic centimeter. If the
DENSITY data line is omitted the density is assumed to be zero.
The wavelength must always be in units of micrometers and should be listed in ascending
order. The index of refraction must be a positive value. The transmission is the internal
transmittance of the glass and should be a positive value. The thickness is the thickness of
glass in millimeters for the specified internal transmittance. The transmission and thickness
values are used to determine the internal transmission per unit length. If both the transmission
and thickness values are omitted the material is assumed to be 100% transmitting.
Up to 1200 lines of wavelength data may be defined in the file. At least 5 data points should be
defined to provide a reasonable spline fit. If fewer than 5 points are provided, dummy points
are added before and after the specified wavelength range to provide a smooth fit. The data
should be checked for accuracy and reasonable fitting by using the dispersion plot data, see
Dispersion Diagram.
To use the table data, enter the file name in the glass column for the desired surface, including
the extension. For example, if the file name is "MYGLASS.ZTG" then "MYGLASS.ZTG" should be
entered in for the glass name. Note the total name, including the extension, may not exceed 20
characters.
When computing the data for a specific wavelength, OpticStudio will use a cubic spline
interpolation if the wavelength is between the shortest and longest wavelengths defined in the
ZTG file. For wavelengths outside of the defined range, the data for the nearest data point is
used; no extrapolation of the data is performed.
The advantage of a table glass is the index at the defined points is exactly the index specified
in the table, unlike fitted functions which may deviate from the data being fitted at the data
points.
Table glasses are not used by the glass substitution feature (see Optimizing glass selection).
Table glasses are always assumed to be defined at a pressure of 1.0 ATM. No thermal
properties are defined for table glasses. If thermal analysis is important, a catalog glass should
be used instead. For information on converting measured index and thermal data into a
catalog glass see Glass Fitting.
where and are the indices of refraction at 0.4861327 and 0.6562725 micrometers,
respectively. The partial dispersion term is . OpticStudio uses a formula based upon the
typical dispersion of standard glasses in the visible range to estimate the index at any defined
wavelength within the visible range as a function of the Nd and Vd values. This formula is
accurate to roughly 0.0001 for typical glasses.
The , and values are specified on the glass solve dialog box, which can be
reached from the Lens Data Editor.
Note model glasses are an approximation, although usually a very good approximation
in the visible range. Outside the visible wavelength range, such as in the ultraviolet or
infrared, the model glass is not accurate and should not be used.
Materials Analysis
Dispersion Diagram
Minimum WaveDefines the minimum wavelength for which the data should be plotted.
Maximim WaveDefines the maximum wavelength for which the data should be plotted.
Minimum IndexDefines the minimum index for which the data should be plotted. Enter zero
for automatic scaling.
Use Temperature, PressureIf checked, then the change in index due to temperature and
pressure effects will be considered.
Discussion
This feature is useful for comparing the dispersion curves between different glasses. Table
glass files (see “Using table glasses”) are listed at the bottom of the various "Glass" controls.
If the minimum and maximum wavelength inputs are both zero, then the left X-axis of the plot
will be determined by the minimum wavelength for which data are available for any of the
input glasses (even if other glasses do not have data at this wavelength) and the right X-axis of
the plot will be determined by the maximum wavelength for which data are available for any of
the input glasses (even if other glasses do not have data at this wavelength).
Glass Map
Plots names of glasses on map according to the d-light index of refraction and Abbe V-
number. The index and Abbe number are computed from the data in the glass catalog. All
currently loaded glass catalogs are searched, and glasses within the boundary values specified
in the following table are plotted.
Min IndexDefines the bottom Y- axis of the plot. Enter zero for automatic scaling.
Max IndexDefines the top Y- axis of the plot. Enter zero for automatic scaling.
Apply Glass Substitution TemplateIf checked, only glasses that meet the glass substitution
template will be shown.
Discussion
This is useful for locating a glass with particular refractive and dispersive properties. By
convention, the glass map is shown with the Abbe number decreasing while going from left to
right, which is why the default min and max Abbe numbers seem to be reversed.
Plots names of glasses on a map according to the chromatic and thermal power. The
chromatic and thermal power are computed based upon the currently defined wavelengths
and the data in the glass catalog. All currently loaded glass catalogs are searched, and glasses
within the boundary values specified in the following table are plotted.
Min/Max Therm. PowerMinimum/Maximum Thermal power to plot. If both the Min and Max
Thermal power are zero, a default scaling is selected.
Apply Glass Substitution TemplateIf checked, only glasses that meet the glass substitution
template will be shown. See “Glass Substitution Template (materials tools)”.
Reference GlassIf a glass is selected, a reference line is drawn from the origin of the plot to
the selected glass. Glasses along this line may be used to make athermalized achromatic
doublets. See the discussion below.
Discussion
The Chromatic power, which is the inverse of a generalized Abbe V-number, is given by
Where is the derivative of the relative refractive index with respect to temperature
measured at the center wavelength and the reference temperature of the glass, and α is the
linear expansion coefficient of the glass.
All these values are computed using the data for the glass defined in the glass catalog. The air
pressure is assumed to be 1.0.
To make a doublet that is both achromatic and athermalized requires the solution of three
simultaneous equations:
To solve these three equations simultaneously with two glasses requires selection of glasses
that lie along a line that also crosses the origin of the athermal glass map. This reference line
may be drawn on the map by selecting a reference glass, which defines one point on the line
(the other point is the origin of the map).
Minimum WaveDefines the minimum wavelength for which the data should be plotted.
Maximim WaveDefines the maximum wavelength for which the data should be plotted.
Minimum TransmissionDefines the minimum transmittance for which the data should be
plotted.
Maximum TransmissionDefines the maximum transmittance for which the data should be
plotted.
Discussion This feature is useful for comparing the transmittance curves between different
glasses. Table glass files (see “Using table glasses”) are listed at the bottom of the various
"Glass" controls. See also “Defining Transmission Data” for more details.
If the minimum and maximum wavelength inputs are both zero, then the left X-axis of the plot
will be determined by the minimum wavelength for which data are available for any of the
input glasses (even if other glasses do not have data at this wavelength) and the right X-axis of
the plot will be determined by the maximum wavelength for which data are available for any of
the input glasses (even if other glasses do not have data at this wavelength).
Minimum Wave Defines the minimum wavelength for which the data should be plotted.
Maximim Wave Defines the maximum wavelength for which the data should be plotted.
Minimum Dispersion Defines the minimum dispersion for which the data should be plotted.
Enter zero for automatic scaling.
Maximum Dispersion Defines the maximum dispersion for which the data should be plotted.
Enter zero for automatic scaling.
Discussion
This feature is useful for comparing how dispersion varies with wavelength for different
glasses.
Table glass files (see “Using table glasses”) are listed at the bottom of the various "Glass"
controls.
If the minimum and maximum wavelength inputs are both zero, then the left X-axis of the plot
will be determined by the minimum wavelength for which data are available for any of the
input glasses (even if other glasses do not have data at this wavelength) and the right X-axis of
the plot will be determined by the maximum wavelength for which data are available for any of
the input glasses (even if other glasses do not have data at this wavelength).
Grin Profile
Grin Profile (Sequential UI Mode)
Plots the index of refraction along any axis for gradient index surfaces.
Min X, Y, or Z Defines the left X- axis of the plot, the minimum value of the independent
variable.
Max X, Y, or Z Defines the right X- axis of the plot, the maximum value of the independent
variable.
Minimum Index Defines the bottom Y- axis of the plot. Use zero for the default value.
Discussion This plot shows index of refraction along either the X, Y, or Z axis for gradient index
surfaces.
Gradium™ Profile
DiscussionIf the surface is selected to "None", then the reference wavelength for the profile
glass family is used, no matter what wavelength is selected. If a Gradium surface is selected,
then any defined wavelength, or the reference wavelength may be selected. Also, if a surface
number is selected, then the starting and ending points for the glass blank will be indicated
using an "X" on the plot. The starting and ending positions include consideration of the sag of
the surface at the defined clear semi-diameter or semi-diameter.
Glass Compare
Compares 2 or 3 glass catalogs to assist in finding glasses used in visible light with similar
index and dispersion characteristics.
SecondaryThe name of the secondary glass catalog. Only glasses which are considered
equivalent to those in the primary catalog will be listed.
TertiaryThe name of the tertiary glass catalog. Only glasses which are equivalent to those in
the primary catalog will be listed.
Index ToleranceThe maximum allowed difference in index at d-light for a glass from the
secondary or tertiary catalog to be considered equivalent to a glass from the primary catalog.
Abbe ToleranceThe maximum allowed difference in Abbe number at d-light for a glass from
the secondary or tertiary catalog to be considered equivalent to a glass from the primary
catalog.
Discussion
This feature only lists glasses that are used in the F-C wavelength range. If “Show Used Glasses”
is selected, the name of the glass displayed in the glass column of the lens data editor is used
to determine if the glass from the primary catalog is used by the current lens and
configuration. However, there is no check made that the glass from the primary catalog is
actually used by the lens. For example, if the current lens uses glass A1 from catalog X, the
primary catalog is Y, and Y also contains a glass called A1, then the data for A1 from catalog Y
will be displayed, even though the lens actually uses the A1 as defined in catalog X. If more
than one catalog uses the same name for different glasses, great care should be taken to verify
all data is for the intended glass.
Glass Fitting
Fits glass dispersion data at either a single temperature or thermal dispersion over a range of
temperatures.
FormulaChoose the name of the desired glass dispersion formula. For a complete description
of the formulas, see “The glass dispersion formulas”.
Data FileThe name of the data file that contains the dispersion data. When fitting index data,
the file extension is IND. For thermal index data, the file extension is TID. See the discussion
below for information on the file formats.
Add To CatalogIf “none” is selected the data will be fit and a report generated, but the data
will not be added to a catalog. If a glass catalog name is selected, then the fit data will be
added to the specified catalog. Note that adding glass data to a catalog that is supplied with
OpticStudio is not allowed, therefore only the names of catalogs not supplied with OpticStudio
are listed. If no catalog is listed, then a new catalog must first be created. For information on
doing this, see “Creating a new catalog”.
Glass NameThe name of the glass to add to the selected glass catalog.
Discussion
There are two different file formats and fitting algorithms supported by this feature. For index
data, the text file should end in the extension IND. The first line of the file should contain the
word TEMPERATURE followed by the temperature of the glass in degrees Celsius at which the
data was measured. The next line should contain the word PRESSURE followed by the ambient
air pressure in atmospheres. If one or both of these lines are omitted the default values are 20
degrees and 1.0 atmospheres. The remaining lines consist of two columns of data: wavelength
and index. The wavelength values are in micrometers, measured in air at the specified
temperature and pressure. The index must be relative to air at the temperature and pressured
defined by the first two lines. OpticStudio will automatically convert the wavelength and index
For index data, the maximum number of points allowed to be fit is 1000.
For thermal index data, the text file should end in TID. The first line should contain the word
PRESSURE followed by the ambient air pressure in atmospheres. If this value is omitted, the
default value is 1.0 atmosphere. The remaining lines consist of three columns of data:
temperature, wavelength, and index. The temperature of the first data point defines the
reference temperature for the glass. It is important that the reference temperature data be
listed first. Data for other temperatures should be listed in subsequent lines. All temperatures
are measured in degrees Celsius. The wavelength values are in micrometers, measured in air at
the reference temperature and pressure. The index values must be relative to air at the
temperature of each data point at the pressure defined by the PRESSURE argument.
OpticStudio will automatically convert the wavelength and index data to be relative to air at a
pressure of 1.0 atmospheres before fitting. A sample file might look like this:
PRESSURE 0.0
20.0000000 0.3500000 1.5391663
20.0000000 0.4500000 1.5253195
20.0000000 0.5500000 1.5185224
20.0000000 0.6500000 1.5145203
etc...
-20.0000000 0.3500000 1.5391663
-20.0000000 0.4500000 1.5253195
-20.0000000 0.5500000 1.5185224
-20.0000000 0.6500000 1.5145203
etc...
40.0000000 0.3500000 1.5391663
40.0000000 0.4500000 1.5253195
40.0000000 0.5500000 1.5185224
40.0000000 0.6500000 1.5145203
etc...
The maximum number of points for the reference temperature fitting is 1,000. The total
number of points for all temperatures and wavelengths that may be fit is limited only by
available memory. Note that the fit will only be as good as the data provided. At least 6 points
should be used at each wavelength, and preferably more than 12. At least 6 different
temperature values should be provided. Using more than about 30 points at any one
temperature tends to only increase the fit time and does not improve accuracy of the fit.
Both the IND and TID files should be placed in the folder <glass> (see “Folders”).
The template is used to define the maximum limits of the glass cost as well as the mechanical
resistance properties of glasses.
The template is used to select acceptable glasses during global optimization, when converting
from model to real glasses
(see Using Material Catalogs in the user’s manual), and when computing the value of the RGLA
operand (“RGLA”).
Exclude Glasses With Incomplete DataIf checked, glasses with incomplete template data
will not be selected by the global optimizer. Only data corresponding to non-zero template
values are tested before excluding a glass.
For example, if both Standard and Obsolete are checked, then either Standard or Obsolete
glasses are acceptable, Note a single glass may have only one status.
Maximum Relative CostThe maximum relative cost. The cost of Schott BK7 is 1.0, all other
glasses are more expensive, and have larger relative costs. If zero the relative cost is ignored.
Maximum Climatic Resistance (CR)The maximum allowed value of CR. If zero the CR is
ignored.
Maximum Stain Resistance (FR)The maximum allowed value of FR. If zero the FR is ignored.
Maximum Acid Resistance (SR)The maximum allowed value of SR. If zero the SR is ignored.
Maximum Phosphate Resistance (PR)The maximum allowed value of PR. If zero the PR is
ignored.
Save As New Glass CatalogSaves all the glasses that meets the current criteria into a new
glass catalog.
Discussion
If “Use Glass Substitution Template” is unchecked, any glass defined in the current catalogs
may be selected if not explicitly excluded (by having “exclude substitution” checked in the
glass catalog) and if the wavelength range is suitable for the current lens. For glasses that do
not include the cost or resistance codes, a “?” will be displayed in the glass catalog. If no cost
or resistance data is provided for a glass, the glass will not be selected if “Exclude Glasses With
No Data” is checked. Template data is stored along with the lens file; so the template
parameters are lens file specific. If no glass meets the specified template parameters, the glass
substitution status is automatically removed.
The glass substitution template is also used when converting from model to real glasses. When
converting model glasses to real glasses, it is possible that no glass can be found that meets
the template specification. If this happens, OpticStudio will first ignore the “Exclude Glasses
With No Data” selection and then try again to find a suitable glass. If still no glass can be found
that meets the criteria, then OpticStudio ignores the template entirely and tries again. If still no
suitable glass can be found, glass number 1 in the catalog, whatever properties it may have,
will be used, even if the glass does not have a suitable wavelength range or is far from the
model glass parameters.
Individual tests for Relative Cost, CR, FR, SR, AR, and PR may be activated and deactivated by
checking the box next to each description.
Lens Catalogs
Vendor Lists the available stock lens vendors. Each vendor name is the name of the file which
contains the stock lenses available from that vendor. The vendor files must be placed in the
<data>\Stockcat folder (see “Folders” in the user’s manual).
Focal Length Min/Max Used to define the range of acceptable effective focal lengths in
millimeters.
Use Entrance Pupil Diameter If checked, then the specified entrance pupil diameter range is
used as part of the search criteria, otherwise, any value will be accepted.
Diameter Min/Max Used to define the range of acceptable entrance pupil diameters in
millimeters.
Equi-, Bi-, Plano-, Meniscus If any of these options are checked, then the search will be
limited to lenses meeting at least one of the selected criteria. For example, if both Equi- and Bi-
are selected, then both equiconvex/equiconcave and biconvex/biconcave lenses will be
included.
Spherical , GRIN, Aspheric, Toroidal If any of these options are checked, then the search will
be limited to lenses meeting at least one of the selected criteria. The "Spherical" category is
also used as "other" for lenses which are not gradient index, aspheric, or toroidal.
# Elements Selects the number of elements allowed in lenses that meet the search criteria.
Choose "Any #" to include all lenses in the search.
Search Results Lists all lens files in the specified catalog which match the current search
criteria.
Search Causes a new search to be conducted for lenses in the specified vendor file based upon
the current search criteria.
Load Loads the currently selected lens file into the Lens Data Editor, and updates all windows
to display data for the newly loaded lens.
Insert Inserts the currently selected lens file to the existing lens.
In sequential mode, the lens will be inserted into the Lens Data Editor. A prompt will be issued
for the insert file options, such as at which surface the lens should be inserted.
In non-sequential mode, the lens will be inserted into the Non-sequential Components Editor
at the bottom of the list of current objects. If the inserted lens consists of more than one
component, the second and subsequent component will use the first as its reference object, so
only the first component needs to be properly positioned.
Catalog Report Displays a text report of all lenses which meet the search criteria in the
currently selected catalog. The values for the criteria used to filter the lenses are displayed at
the top of the report. The lenses are then listed 3 times: once sorted alphabetically by part
name, once sorted by increasing effective focal length (EFL), and once sorted by increasing
entrance pupil diameter (EPD). In each listing, the following data is provided for each lens: part
name, EFL, EPD, Shape, Type, and # of Elements. These last three outputs correspond to the 3
Layout Displays a layout plot (or 3D Layout for systems without axial symmetry) of the
currently selected lens file.
Note: The prescription report and the layout plots are locked (and cannot be unlocked) as
these features show the results based on the lens catalog and not the current lens system.
Discussion
The “Search Results” table will list the part name, focal length, and diameter of all the lenses
from the selected vendor which meet the specified search criteria. After the diameter, a 3 part
code is listed, such as (P,S, 1). The first entry is the shape code, which is E, B, P, M, or “?”, for
Equi-, Bi-, Plano-, Meniscus, or other. Other is used if the lens is multi-element. The second
entry is S, G, A, or T, for Spherical, GRIN, Aspheric, or Toroidal. The third entry is the number of
elements.
Upon installation, OpticStudio creates a <data>\Stockcat folder (see “Folders” in the user’s
manual). Within this folder, many individual files are stored with the extension .ZMF. Each of
these files contains a large number of individual ZMX lens files, each of which represent stock
lenses available from various vendors. The following table lists the represented vendors and
contact data.
Stock Lens Catalogs included with OpticStudio are developed by third party vendors without
any involvement by Ansys. Ansys makes no representation as to the feasibility or functionality
of the Stock Lens Catalogs. Stock Lens Catalogs are provided 'as is,' and any express or implied
warranties are hereby disclaimed. Ansys has no responsibility to maintain the Stock Lens
Catalogs or ensure their availability for future releases.
The following table lists the vendors associated with each Stock Lens Catalog:
To find a catalog lens that closely matches the properties of one or more surfaces in the Lens
Data Editor, place the cursor on the first surface of the surface group in the Lens Data Editor,
then select Tools, Lens Catalogs. The default focal length and diameter search ranges will be
set to appropriate values for that lens. OpticStudio computes the lens focal length and
diameter and adds plus/minus 5% to define the default search ranges.
The Lens Search tool provides the capability to search through the available lenses to find an
appropriate choice. Once selected, the lens file may be loaded or appended to an existing
design.
Used to convert a folder full of ZMX or ZOS files to a stock lens catalog file.
Source Folder Enter the name of the folder where the source ZMX or ZOS lens files reside. All
lens files in this folder will be placed in the ZMF or ZLC file.
Catalog File The name of the ZMF or ZLC file to be created - this file will be placed in the
Zemax\Stockcat Folder.
Discussion
This feature is used to convert multiple ZMX or ZOS files into a single ZMF or ZLC file
respectively that can be used by the Lens Catalogs feature. See “Lens Catalogs” for a
description of this feature.
There are limitations as to what kind of lenses can sensibly be placed in a private lens catalog.
The intended purpose is to include in the catalog only simple lenses that are reasonably
described as singlets, doublets, or triplets. Lenses with complex surface shapes, DLLs, non-
If the Source Folder contains ZMX files, the tool will put them all into a ZMF file, and if it
contains ZOS files it will put them into a ZLC file. In case there is a mix of both, the tool will end
up creating two output catalogs, each in a different format with different extensions and the
suffices "-zmx" and "-zos" are added to the base file name.
Discussion All units on the report are in mm. The CC and CX columns indicate the availability
of concave and convex test plates, respectively.
Design Templates
Search Criteria This dropdown contains all the prescription criteria that can be used to filter
the lenses by. Once a criterion is selected from the dropdown, it will appear in the box below,
and will no longer appear in the dropdown menu.
Load This will load the selected lens into the current OpticStudio instance.
Coatings Group
These are the coatings tools.
This function generates a text listing of the definitions of materials and coatings contained in
the coating file for the current lens.
Invokes the Windows NOTEPAD editor to edit the coating file for the current lens. This file
contains the material and coating definitions.
See the chapter “Polarization Analysis” in the user’s manual. If the coating file is edited, the file
must be reloaded manually by selecting “Reload Coating File“ as described below, or the file
may be saved and reloaded to update the new coating data.
Reloads the coating file for the current lens. This is required if the file has been edited since the
lens was loaded.
File Name:The name of the file to create. The file name should not include any path or
extension. The file will be created in the coating file folder (see “Folders” in the user’s manual)
and the extension “ZEC” will be automatically appended.
Discussion
Optical coating designers and manufacturers are often hesitant to divulge the details of their
coating designs. This feature allows a coating defined in OpticStudio format to be exported to
a single file that is encrypted. The encrypted file may be distributed to users that need to trace
rays and perform analysis on the coating as applied to a specific optical system, without the
details of the coating design being revealed.
The coating data that is exported includes all the material, index, extinction, dispersion, and
layer data required to exactly reproduce the coating performance. No approximations or
tables are used. However, no coating tapers, ideal coatings, or table coatings are supported. A
maximum of 12 different materials and 400 layers may be used in defining the coating to be
exported.
To use an encrypted coating file, see “The ENCRYPTED data section” in the user’s manual.
Defining Coatings
For dielectric materials, the index of refraction is purely real, and therefore the imaginary part
of the index is zero. For metals, the index of refraction is complex.
There are two sign conventions in common use for the imaginary part of the index of
refraction that comes with the phase propagation factor.
OpticStudio uses the 1st convention. For example, using the OpticStudio convention, the index
of aluminum is approximately given by
Note the extinction coefficient is negative using this convention for typical absorbing
materials. This choice of index sign convention is related to the sign convention used by the
propagation phase factors, see “Propagation Phase Factors, pc, ps”
OpticStudio uses a text file format to define all coating data. The file may be of any valid file
name. A sample file called COATING.DAT is supplied with OpticStudio, and COATING.DAT is
the default coating file name for any new lens. Multiple coating files may be defined, and the
name of the coating file use by any particular lens file is defined in the Files section of the
System Explorer. It is highly recommended that any modifications to COATING.DAT be saved
in a file with a different name, so that subsequent updates to OpticStudio will not overwrite the
changes made to COATING.DAT.
In the coating file, the keywords MATE (for material), TAPR (for taper profile), COAT (for
coating), TABLE (for coatings defined by a table of points) and IDEAL or IDEAL2 (for ideal
coatings) are used to define different types of coating data. All of the material and taper
definitions come first, then all of the coating definitions. The materials, tapers, and coatings
may be any user defined name up to 32 characters in length. No error message will be given if
a name is longer than 32 characters, however it will be truncated. If multiple
materials/tapers/coatings/etc. are defined with the same name, then the behavior is
undefined, and it is likely that only the first definition will be used.
! For information on the TAPR format see "The TAPR data section"
below.
! For information on the COAT format see "The COAT data section" below.
COAT I.transmission
ENCRYPTED filename
! For information on the IDEAL format see "The IDEAL data section"
below.
IDEAL <name> <Transmitted intensity> <Reflected intensity>
! For information on the TABLE format see "The TABLE data section"
below.
For details on each of these coating definition keywords, see the discussions which follow.
The material names may be any user defined name up to 32 characters in length, with no
special characters permitted. Note that spaces are not allowed.
The real value is the real index of refraction of the material at that wavelength.
If a single wavelength value is provided for a material, then the real and imaginary parts of the
index of refraction are used no matter what wavelength is being traced. Dispersion of the
coating material is therefore ignored.
If two or more wavelengths are defined for a material, then for wavelengths shorter than the
shortest defined wavelength, the shortest wavelength data is used. For wavelengths longer
than the longest defined wavelength, the longest wavelength data is used. For wavelengths in
between, linear interpolation is used.
Normally, OpticStudio assumes the coating thickness is uniform across the entire optical
surface. Because of the way some optical coatings are applied, a thin film coating may have a
thickness that varies over the optical surface. A tapered coating is defined by applying a taper
where d is the nominal coating thickness and fr, fc, and fp are the radial, cosine, and
polynomial taper factors, respectively. The taper factors are functions of the decentered and
rotated coordinates (x’, y’), which are computed from the local surface coordinates using these
expressions:
where θ is the taper function rotation angle specified in degrees. The radial coordinate is then
defined as:
where r is the radial coordinate as defined above. For coatings applied to sequential surfaces, R
is the radius of curvature of the surface as defined by the “Radius” column in the Lens Data
Editor. Cosine tapers should only be used on radially symmetric sequential surfaces for this
reason. For coatings applied to non-sequential objects, R is always infinity, regardless of the
shape of the object, and cosine tapers should not be used.
where Ei are the polynomial terms in x’ and y’. The Ei terms are a power series:
Note the cosine taper factor will yield different coatings on substrates that have a different
radius of curvature. To define a coating whose thickness varies exactly as cos θ , the Δ0 cosine
taper factor should be zero and the Δ1 cosine taper factor should be 1.0. When applying cosine
taper factors to coatings on non-sequential component objects; the substrate radius is ignored
and treated as a plane. The radial and polynomial terms are still used.
If the sum of the taper factors evaluates to a negative number, OpticStudio assumes it has a
value of zero. The parameters xd , yd , θ , γi , Δi , and βi are all defined in the taper data section
of the coating file. Note that both even and odd powers of the radial coordinate are used, and
that the zero order term is used. The coefficients generally have units and magnitudes that
depend upon the lens units.
The taper names may be any user defined name up to 32 characters in length, with no special
characters permitted. Note that spaces are not allowed.
If the first keyword on any line following the TAPR keyword is DX or DY, then the data value
after the DX or DY keyword on that same line is assumed to be the xd or yd in lens units,
respectively.
If the first keyword on any line following the TAPR keyword is AN, then the data value after the
AN keyword on that same line is assumed to be the taper rotation angle θ .
If the first keyword is RT, the second data value must be an integer between 0 and 22,
inclusively. This integer determines the radial term number. The third data value is the
coefficient on that term, βi .
If the first keyword is CT, the second data value must be an integer between 0 and 5,
inclusively. This integer determines the cosine term number. The third data value is the
coefficient on that term, Δi .
If the first keyword is PT, the second data value must be an integer between 0 and 20,
inclusively. This integer determines the polynomial term number. The third data value is the
coefficient on that term, γi .
Any terms OpticStudio uses are assumed to be zero unless otherwise defined.
If the entire layer of a coating is to be scaled by a different amount on each surface, or if the
coating thickness needs to be optimized, see the discussion about coating multipliers in the
“Coating” section of “Surface Properties” in “The Setup Tab” help file, and the “Optimizing
coatings with OpticStudio” section in this reference file.
Syntax:
COAT I.transmission
The coating names may be any user defined name up to 32 characters in length, with no
special characters permitted. Note that spaces are not allowed.
When the coating file is first read, OpticStudio verifies that each coating consists of materials
that were defined in the material section. If referenced materials are not defined, an error is
issued.
The coating thickness is measured either in units of primary wavelength thickness in that
medium (relative definition), or in units of micrometers independent of any wavelength
(absolute definition). If relative definition is used, the same coating used by two different lens
files, with two different primary wavelengths, will have different actual coating thicknesses. The
actual thickness of the coating is determined by:
where λ0 is the primary wavelength in micrometers, n0 is the real part of the index of refraction
of the coating at the primary wavelength, and T is the "optical thickness" of the coating
specified in the coating file. For example, in a coating material whose real part of the index of
refraction is 1.4, a quarter wave coating (T = 0.25) at a primary wavelength of 0.550
micrometers would be 0.0982 micrometers thick. Note that only the real part of the index of
refraction is used for determining the thickness of the layer.
If the is_absolute integer is zero, the thickness is interpreted to be relative, otherwise, the
coating thickness is absolute in micrometers. If the is_absolute, loop_index, and tapername are
omitted, then is_absolute and loop_index are both assumed to be zero, and no taper is
assumed.
The loop_index parameter determines how OpticStudio replicates groups of coating layers.
See the next section for details.
See “Specifying Coatings on Surfaces” for more information about how the coating layer order
is interpreted in the COAT data section.
COAT 3GROUPS
MAT0 0.25 0 0
MAT1 0.25 0 0
MAT2 0.50 0 0
MAT3 0.25 0 0
MAT1 0.25 0 0
MAT2 0.50 0 0
MAT3 0.25 0 0
MAT1 0.25 0 0
MAT2 0.50 0 0
MAT3 0.25 0 0
MAT4 0.25 0 0
Note the sequence of layers with materials MAT1, MAT2, and MAT3 is repeated 3 times. This is
a perfectly acceptable syntax, however, 11 text lines and 11 layers are required to define the
coating. A shorthand syntax that replicates the layers is available using the loop_index
parameter. The loop_index integer parameter is set to the number of times a group of layers is
to be repeated. The loop_index must be set at BOTH the first AND the last layer (this is to
indicate the range of layers, and OpticStudio also reads the coating data in both directions, as
described in a following section). The coating above could be written as:
COAT 1GROUP
MAT0 0.25 0 0
MAT1 0.25 0 3
MAT2 0.50 0 0
MAT3 0.25 0 3
MAT4 0.25 0 0
Note the "3" parameter appears on both the first and third layers listed. This syntax not only
saves typing, it reduces the chance of careless typing errors, eases editing, and conserves the
total number of layers; which is limited for each coating definition (see the section “Limits on
the amount of coating data” later in this section). The coating above only requires 5 "layers" to
define, although there are physically 11 layers modeled.
There are some important points regarding the use of the loop_index:
A loop_index of zero is the same as a loop_index of 1; that is, zero does not mean do not
include a group at all!
I.transmission
COAT I.75
will create a coating named I.75 which transmits 75% of the ray energy. Ideal coatings defined
in this way transmit the specified fraction of light, and reflect the rest, independent of the ray
wavelength, angle of incidence, incident material, or substrate material. Note this type of ideal
coating has no absorption, and the transmission must be less than 1.0 and greater than 0.0. If
the ray total internal reflects, the reflected intensity factor is assumed to be 1.0. For a more
general ideal coating, see the IDEAL and IDEAL2 coating definitions which follow.
ENCRYPTED filename
Encrypted coating files are created when a coating is exported to a Zemax Encrypted Coating
(ZEC) file format as described in “Export Encrypted Coating” in the “Coating Tools” section of
“The Libraries Tab” help file. The resulting ZEC file must be placed in the coating file folder. The
filename should have no path or extension; the extension ZEC will automatically be appended.
Encrypted coatings and material data are not listed in the coating listing or prescription
reports.
IDEAL coatings are defined only by three intensity coefficients: transmission, reflection, and
total internal reflection. IDEAL coating names may be any user defined name up to 32
characters in length, with no special characters permitted. Note that spaces are not allowed.
After the ideal coating name, the T, R, and TIR values are listed. If T+R exceeds 1.0, the values
will be scaled so that T+R = 1.0. The absorption coefficient is computed automatically via A =
1.0 - R - T, to conserve energy. To make a coating that absorbs 100% of the energy, set both T
and R to zero. OpticStudio assumes the phase of transmission is zero. For mirror substrates,
the phase of reflection is π . For other substrates, the phase of reflection is zero if the incident
index is higher than the substrate index, otherwise the phase of reflection is π. The TIR intensity
is used only if the ray total internal reflects. If the TIR value is omitted, 1.0 is assumed.
IDEAL2 <name> s_rr s_ri s_tr s_ti p_rr p_ri p_tr p_ti no_pi_flag
TIR
The IDEAL2 keyword provides an alternate means of defining ideal coatings. IDEAL2 coatings
are defined by the real and imaginary amplitude transmission and reflection coefficients for S
and P polarized light separately. IDEAL2 coating names may be any user defined name up to
32 characters in length, with no special characters permitted. Note that spaces are not allowed.
After the coating name, the reflection real, reflection imaginary, transmission real, and
transmission imaginary values are listed for S polarized light, followed by these same four
values for P polarized light. To make a coating that absorbs 100% of the energy, set both
transmission and reflection values to zero. The phase of reflection and transmission is defined
by the complex coefficients. If the substrate is not a mirror, and the incident index is higher
than the substrate index, OpticStudio changes the sign of the reflected real and imaginary
coefficients to yield an additional phase change upon reflection of π, unless the no_pi_flag is
set to any value other than zero; in which case no changes are made to the phase of the
...
Table coatings are similar to IDEAL coatings, except the transmission and reflection may be a
function of incident angle and wavelength and may be specified separately for S and P
polarizations. For multiple discrete angles of incidence and wavelengths, four intensity values
are defined: Rs, Rp, Ts, and Tp; for intensity reflection and transmission and the s and p
subscripts indicate the polarization state. There are also four angles (in degrees) defined: Ars,
Arp, Ats, and Atp; these values define the phase angle of the R and T values so OpticStudio can
compute the real and imaginary parts of the transmission and reflection. The real part is
proportional to the cosine of the angle, and the imaginary part is proportional to the sine of
the angle. If the angles are omitted or zero the reflection or transmission is real and no phase
change is introduced by the coating. The absorption is computed from A = 1 - R - T for each
polarization state. If the substrate is not a mirror and the incident index is higher than the
substrate index, the phase of reflection is changed by a factor of π .
The primary purpose of the table model is to allow accurate ray tracing where the layer by
layer prescription of the coating is not known or is unavailable because the coating vendor will
not provide the design data.
The syntax consists of the keyword TABLE followed by the name of the coating. Table coating
names may be any user defined name up to 32 characters in length, with no special characters
permitted. Note that spaces are not allowed. After the TABLE keyword, blocks of data are
defined for each incident angle. After each angle definition, R and T values are defined for each
wavelength in the table. An example syntax would be:
TABLE MYTABLECOAT
ANGL 0
Angles of incidence less than the smallest angle defined will use the smallest angle data.
Angles of incidence greater than the largest angle defined will use the largest angle data.
Other values are linearly interpolated in cosine of the angle space. Note OpticStudio
interpolates but does not extrapolate. Angles must be listed in ascending order. If data for an
angle of incidence of 0.0 degrees is defined, the S and P data should be identical, since S and P
are indistinguishable at normal incidence.
Angles of incidence are assumed to be in the incident media, and for coatings placed on
refractive surfaces, that the incident media has a lower index of refraction than the substrate.
For coatings placed on surfaces where the rays go from high index to low index (such as glass
to air), the refracted angle in the low index media is used as the angle of incidence.
OpticStudio assumes the phase of transmission is zero if no phase angles are defined. The
phase data is angles measured in degrees if the data is provided. If the substrate is not a mirror
and the incident index is higher than the substrate index, the phase of reflection is changed by
a factor of π .
Wavelengths in between wavelength data points will linearly interpolate in wavelength space.
All wavelengths listed must be identical for each angle. The same ascending order values for
the wavelengths is required at each angle for accurate interpolation. An error message will
result if the wavelengths are not properly defined.
Generally much more than the brief set of data listed here is required for adequate accuracy.
There are no limits on the number of angle and wavelength data points associated with each
table coating.
400 layers per coating (see the section “Defining replicated groups of coating layers” earlier in
this file to work around this limit if required).
60 different tapers.
One way to work around these limits is to use a different coating file for each Zemax lens file, if
required. These limits only apply to a single coating file; a different coating file can be used for
each Zemax file. The coating file can be chosen in the System Explorer.
About Coatings
This section contains other general information about modeling coatings in OpticStudio.
Material Description
AIR Unity index, used for including air gaps in coatings
AL2O3 Aluminum Oxide, index 1.59
ALUM Aluminum, index 0.7-7.0i
ALUM2 An alternate definition for aluminum
CEF3 Cerous Flouride, index 1.63
LA2O3 Lanthanum Oxide, index 1.95
Coating Description
AR General anti reflection, defined as a quarter wave of MGF2
GAP A small gap of air used to show evanescent propagation
HEAR1 High performance anti reflection coating
HEAR2 High performance anti reflection coating
METAL A thin layer of aluminum used to make beamsplitters
NULL A zero thickness coating used primarily for debugging
Anti-reflection "W" coat, defined as a half wave of LA2O3 followed by a quarter
WAR
wave of MGF2.
These materials and coatings are meant to be used as examples, and may not be applicable in
any particular situation. Always check with coating manufacturer or designer for details on
coating material specifics. For more detailed information on how these materials and coatings
are defined, use the Coating/Material Listing report described in the "Coating Catalog" section
of “The Libraries Tab” help file.
If the surface specified is a boundary going from air to glass, the coating layer order is
interpreted exactly as specified in the coating file.
The incident media is air, then the outermost layer is listed first (at the top) of the coating
definition, then the next layer, etc., with the substrate being the glass type on the surface. The
definition of the coating should not include the substrate index or material definition.
The term glass here means the glass type is not "MIRROR", and not blank (which is treated as
unity index for air). Gradient index lenses are considered glass. Rays are only reflected by
reflective coatings applied on glasses in NSC mode with ray splitting on.
If the surface specified is a boundary between air and air, or glass and glass, the coating is also
interpreted exactly as for air to glass, with the appropriate calculations done for the incident
and substrate media.
If the surface specified is a boundary going from glass to air, then the order of the layers is
automatically reversed, so that the coating is the same as if it had been applied going from air
to glass.
If the surface type is a mirror, then the coating definition must include the substrate index. The
last layer in the coating definition is then assumed to be a semi-infinite thickness of substrate
material.
Coatings as Etalons
For etalons, the transmission spectrum as a function of wavelength will exhibit high-
transmission peaks corresponding to resonances of the etalon. This transmission function is
caused by interference between multiple reflections of light between the two surfaces of the
etalon. Constructive interference occurs if the transmitted beams are in phase, and this creates
the high-transmission peaks. If the transmitted beams are out-of-phase, destructive
interference occurs, and this creates the transmission minimum.
The easiest way to model an etalon in OpticStudio is by defining it in the coating file. This is
because OpticStudio models propagation through coatings using a different algorithm than
the geometrical ray trace algorithm used elsewhere. This algorithm accurately accounts for
interference from multiple reflections between coating layers, and thus does not require any
additional coherent data analysis to determine the transmission spectrum.
For example, see the sample file “Etalon” in the user data folder
<…\Samples\Sequential\Polarization>. This lens file shows transmission through a surface
with a high finesse optical coating:
However, OpticStudio does have the ability to optimize and tolerance coating layer
thicknesses, indices, and extinction coefficients, once the number of layers and material
selection is made. OpticStudio uses a dimensionless “coating multiplier” which linearly scales
the thickness of any layer of a coating, and dimensionless offsets of the index and extinction
coefficients. Optimization may then be made on the usual coating performance data using the
CODA operand.
To optimize the layer thicknesses or offsets, first define a coating with the correct number of
layers and materials for each layer. The initial coating thicknesses should be set to either a
known good starting value, or 1 wave (in this latter case the coating multipliers may be
interpreted to be in units of waves). Do not use zero for a coating layer thickness as this
Coating multipliers and index offsets may then be defined on the surface coating tab
described in the “Coating” section of “Surface Properties” in “The Setup Tab” help file. This
feature supports setting the multipliers and index offsets to a variable status, which allows for
optimization of the relative coating layer thickness and index of refraction of the coating
materials. To constrain the coating multiplier values, see “CMGT” and the related operands
“CMLT” and “CMVA” in the “Optimization Operands Summary”. To constrain the index and
extinction offsets, see “CIGT” and the related operands “CILT”, “CIVA”, “CEGT”, “CELT”, and
“CEVA”.
At angles other than normal incidence, the relations are more complex. For example, a surface
between air and BK7 at a wavelength of 0.55 micrometers has reflectance and transmittance as
a function of incident angle as shown in the following figures.
Scattering Group
These features are used to display data for scatter models.
Name The name of the ABg data being edited. This name must be in uppercase.
Wave The wavelength in micrometers at which the ABg data is defined (or was measured). If
this value is zero, no scaling with wavelength will be performed. Otherwise, the A and B values
will be scaled with wavelength as defined in the discussion below.
Use If checked, then the displayed row will be used. Up to 10 data rows may be defined for
each ABg data name.
Angle The angle of incidence in degrees. The value should be between 0.0 and 90.0, inclusive.
The BSDF for intermediate angles of incidence are linearly interpolated in cosine space. If data
is required at angles less than the smallest angle defined, data for the smallest angle defined
will be used. Data for the largest angle defined will be used for any incidence angles greater
than the largest angle defined.
TIS Pressing this button will compute the total integrated scatter (TIS) for the displayed data.
This value must be less than 1.0 for accurate scattering results. See the discussion.
Insert Inserts a new ABg data entry into the catalog; and prompts for the name of the new
entry.
Reload Loads from the last saved data file the ABg data; eliminating any changes made since
the last save.
Sort Sorts in ascending order by angle the displayed data. The data is automatically sorted
whenever the catalog is saved or loaded.
Report Sends the data to a text window which may then be printed.
Discussion
For a theoretical discussion of ABg scattering; see “ABg model scattering” in the user’s manual.
The integral of the ABg distribution function over the unit vector circle that represents
physically possible scattering ray directions determines the total integrated scatter, or fraction
to scatter. This integral is automatically computed by OpticStudio when required; to view this
integral press the TIS button. The TIS must be less than 1.0; otherwise conservation of energy
may not be preserved and the scattering will not be correct.
If a reference wavelength other than zero is defined, then the A and B coefficients are scaled
according to the following relations:
and,
where λ is the wavelength being traced and the unsubscripted A, B, and g parameters are
measured at the reference wavelength, λref.
When using the ABg scatter models, OpticStudio can only scatter light using ABg parameters
scaled for wave- lengths defined in the System Wavelengths Dialog box. If you wish to define a
broadband source via a Source Color spectrum (e.g. Tristimulus XYZ), and the ABg data varies
strongly with wavelength, then you need to defined a reasonable number of System
Wavelengths to span the bandwidth of the source. For an arbitrary wavelength being traced,
OpticStudio will use the closest System Wavelength to determine the ABg coefficients and
scatter distribution. This is the only situation in which System Wavelengths need to be defined
when using a Source Color model.
Wavelength The wavelength number to use. ABg and ABg File scattering both use the
specified wavelength, along with the reference wavelength defined in the ABg catalog, to scale
the ABg coefficients.
Fraction The fraction of total energy to scatter. This value must be between 0 and 1. The
fraction to scatter linearly scales the BSDF. This fraction is ignored for ABg and ABg File scatter
functions and must be set to 1 for the BSDF scatter functions.
For BSDF scattering: The angle (in degrees) describing the orientation of the surface in the
system being modeled relative to the orientation of the surface while measured.
File Name/DLL Name For ABG scattering: The name of the ABg scattering data to use. ABg
scatter data names are defined in the ABg Scatter Data Catalogs; see “ABg Scatter Data
Catalogs”.
For ABg File scattering: The name of the ABGF file to use. See “ABg File scattering” in the user’s
manual.
For BSDF scattering: The name of the BSDF file to use. See “BSDF scattering” in the user’s
manual.
For User Defined scattering: The name of the user defined scattering DLL to use. See “User
defined scattering” in the user’s manual.
DLL File Name The name of the data file, if any, used by the user defined scattering DLL.
(parameter names) These parameters are for user defined scattering DLLs.
Bins The number of histogram bins to use in the computation and plot of the BSDF for user
defined scattering. Using a larger number of bins increases the resolution of the plot, at the
expense of requiring more rays to generate smooth data.
Rays The number of rays to scatter to determine the shape of the BSDF curve for BSDF or user
defined scattering.
Alpha X, Y The angle in the X-Z and Y-Z planes respectively, of the specular ray. See the
discussion for details.
X, Y Minimum The minimum value of the scatter vector x, and BSDF (y), to plot, respectively.
Note these are powers of 10 as the BSDF plot is a log-log plot.
X, Y Decades The number of log scale decades to plot in the x and BSDF (y) directions,
respectively.
Discussion
This feature plots or lists BSDF data for any of the surface scattering models supported by
OpticStudio. The BSDF plot is a log - log plot, with BSDF on the vertical axis, and the
magnitude of the scattering vector x on the horizontal axis. The scattering vector x is a 2D
vector that defines the change in the x and y direction cosines between the specular ray and
the scattered ray, when the local surface normal is oriented along the z direction. The vector x
is therefore the difference between the specular and scattered ray when these rays are
projected onto the plane of incidence. For a detailed discussion and drawing illustrating the
scattering conventions used by OpticStudio, see “Scatter models” in the user’s manual.
Lambertian: Lambertian scattering is independent of incident angle and wavelength. The total
integrated scatter (TIS) is 1.0. The resulting BSDF “curve” is a flat line with a value of 1/π.
Gaussian: Gaussian scattering is symmetric about the specular ray projection. The TIS is always
1.0.
ABg: The ABg values are defined in the ABg Scatter Data Catalogs; see “ABg Scatter Data
Catalogs” for more information. The TIS is not generally 1.0; the actual value is listed in the
output plot or listing. The ABg data may be scaled with wavelength; if a reference wavelength
is defined in the catalog. ABg data is also generally a function of incident angle. OpticStudio
interpolates the BSDF data between the two points with the angles of incidence closest to that
of the defined specular ray.
ABg File: All ABg profiles specified in the ABGF file must be defined in the currently loaded
ABg Data File (see “ABg Data File” in the user’s manual). Each ABg profile is treated as it would
be under the ABg scatter model. Thus, ABg data for each profile will be scaled with wavelength
if a reference wavelength is defined in the ABg Scatter Data Catalog for that profile (see “ABg
Scatter Data Catalogs”), and the ABg data for each profile will be interpolated between the two
points with angles of incidence closest to that of the defined incident angle. The wavelength
scaling and interpolation over angle of incidence will be performed for each profile specified in
the ABGF file before all profiles are summed. The TIS for the sum of the ABg profiles (whether it
be the weighted or absolute sum) is not generally 1.0; the actual value is listed in the output
plot.
BSDF: The BSDF values are defined in an input file; see “BSDF scattering” in the user’s manual.
The TIS is not generally 1.0; the actual value is listed in the output plot. As described in detail in
User Defined: OpticStudio cannot determine the exact curve of the BSDF for user defined
scattering. As an alternative, a number of identical specular rays are scattered by the DLL, and
the resulting scatter vector x values are binned in a histogram, normalized, and plotted. BSDF
plots made in this way are typically noisy in a complex way that depends upon the nature of
the scattering function defined by the DLL. Note that if the BSDF as defined by the DLL is not
symmetric about the specular ray in the projected tangent plane, then this plot is not an
accurate description of the BSDF.
Wavelength The wavelength number to use. ABg and ABg File scattering both use the
specified wavelength, along with the reference wavelength defined in the ABg catalog, to scale
the ABg coefficients.
Fraction The fraction of total energy to scatter. This value must be between 0 and 1. The
fraction to scatter linearly scales the BSDF. This fraction is ignored for ABg and ABg File scatter
functions and must be set to 1 for the BSDF scatter functions.
Sigma/Angle For Gaussian scattering: The sigma value determining the width of the Gaussian
distribution on the projected plane.
File Name/DLL Name For ABG scattering: The name of the ABg scattering data to use. ABg
scatter data names are defined in the ABg Scatter Data Catalogs; see “ABg Scatter Data
Catalogs”.
For ABg File scattering: The name of the ABGF file to use. See “ABg File scattering” in the
user’s manual.
For BSDF scattering: The name of the BSDF file to use. See “BSDF scattering” in the user’s
manual.
For User Defined scattering: The name of the user defined scattering DLL to use. See “User
defined scattering” in the user’s manual.
DLL File Name The name of the data file, if any, used by the user defined scattering DLL.
Incident Angle The angle of incidence (in degrees) for which the BSDF should be calculated
and displayed. The BSDF is a function of incident angle for all scatter models except
Lambertian.
Show As Grey scale or false color displays which are consistent with the color palette used
elsewhere in OpticStudio. For BSDF scattering, a HSV false color display is available.
Plot Scale If non-zero, the maximum value for the plot will be scaled to this value. If the value
is zero, then the maximum value for the plot will be determined from the data.
Rays The number of rays to scatter to determine the shape of the BSDF curve for user defined
scattering.
Radial Bins The number of bins used to display the data in the radial (polar) direction,
covering 180 degrees.
Azimuthal Bins The number of bins used to display the data in the azimuthal direction,
covering 360 degrees.
Normalize If selected, the data will be normalized to the maximum BSDF value.
Discussion
This feature plots the 2D BSDF data for any of the surface scattering models supported by
OpticStudio. The plot is provided in standard polar coordinates, with the radial angle
extending outwards from the center and the azimuthal angle moving counter-clockwise from
the +X axis. The plot resolution is determined by the number of radial and azimuthal bins
specified (for the BSDF scatter model, the resolution of the input file will also play a role
Lambertian: Lambertian scattering is independent of incident angle and wavelength. The total
integrated scatter (TIS) is 1.0. The resulting BSDF plot is therefore uniform.
Gaussian: Gaussian scattering is symmetric about the specular ray projection. The TIS is always
1.0. ABg: The ABg values are defined in the ABg Scatter Data Catalogs; see “ABg Scatter Data
Catalogs” for more information.
The TIS is not generally 1.0; the actual value is listed in the output plot. The ABg data may be
scaled with wavelength; if a reference wavelength is defined in the catalog. ABg data is also
generally a function of incident angle. OpticStudio interpolates the BSDF data between the two
points with angles of incidence closest to that of the defined incident angle.
ABg File: All ABg profiles specified in the ABGF file must be defined in the currently loaded
ABg Data File (see “ABg Data File” in the user’s manual). Each ABg profile is treated as it would
be under the ABg scatter model. Thus, ABg data for each profile will be scaled with wavelength
if a reference wavelength is defined in the ABg Scatter Data Catalog for that profile (see “ABg
Scatter Data Catalogs” ), and the ABg data for each profile will be interpolated between the
two points with angles of incidence closest to that of the defined incident angle. The
wavelength scaling and interpolation over angle of incidence will be performed for each profile
specified in the ABGF file before all profiles are summed. The TIS for the sum of the ABg
profiles (whether it be the weighted or absolute sum) is not generally 1.0; the actual value is
listed in the output plot.
BSDF: The BSDF values are defined in an input file; see “BSDF scattering” in the user’s manual.
The TIS is not generally 1.0; the actual value is listed in the output plot. As described in detail in
the Knowledge Base, OpticStudio performs limited interpolation of the input data. Thus, the
input data should have sufficient resolution (specifically with regards to the incident,
azimuthal, and radial angles) to accurately describe any variations of importance in the BSDF
data. For BSDF files with low angular resolution, the resolution of the output plot will generally
be limited by the data file itself rather than the number of radial and azimuthal bins used in the
plot.
User Defined: OpticStudio cannot determine the exact plot of the BSDF for user defined
scattering. As an alternative, a number of identical specular rays (corresponding to the input
value for the incident angle) are scattered by the DLL, and the resulting scatter angles are then
binned and plotted. BSDF plots made in this way are typically noisy in a complex way that
depends upon the nature of the scattering function defined by the DLL.
Non-sequential Mode
For more information on the file formats, please see the Photoluminescence section of the
Object Properties > Volume Physics.
Use
Select the type of spectrum file from the combo box on the left, then select one of the
available spectrum files. If you want to create a new file, select the New button. If you want to
edit an existing file, select the Edit button.
For Emission Spectra, you must specify the excitation wavelength and the corresponding
emission spectrum will be calculated from the entries in the emission spectra file. To reflect the
fact that the photoluminescence model in OpticStudio does not support upconversion of
photon energy, the emission spectra will be truncated to the left of the excitation wavelength.
The first two comments in the file are shown in the comment section below the chart, so when
creating a spectrum file, keep in mind that users will see those two comments in the
OpticStudio UI.
For more information on Photoluminescence, please see the Object Properties > Volume
Physics.
Sources Group
These tools provide access to different source models.
This feature is only available in the Premium and Enterprise editions of OpticStudio. Data
download is only available if support on your license is current.
This feature downloads IES source model files from the Ansys Zemax OpticStudio online
source model library.
This feature is only available in the Premium and Enterprise editions of Ansys Zemax
OpticStudio.
Output File The name of the file containing the converted results. The file extension must be
.IES.
# Radial Pixels The number of radial data points to use in the resulting IES file (corresponds to
vertical angles in the IES nomenclature). The converter will return an IES file with any number of
radial pixel points. However, OpticStudio will only read IES files containing up to 1000 radial
pixel points.
# Angular Pixels The number of angular data points to use in the resulting IES file
(corresponds to horizontal angles in the IES nomenclature). The converter will return an IES file
with any number of angular pixel points. However, OpticStudio will only read IES files
containing up to 999 angular pixel points.
Discussion
This feature allows a spectral color format file (see “Source File” ) to be converted to an IESNA
file (see “Source IESNA File” ). This conversion allows for a faster use of the source data for
modeling systems in which the source is in the far-field relative to all optics.
SDF files contain information regarding the spectral distribution of the source, whereas IESNA
files do not. The spectral content present in the SDF file is retained during conversion by the
creation of a separate spectrum file with an SPCD extension (see “Defining a spectrum file” in
the Sources section of the Object Properties. ).
To create the IESNA and SPCD files from an SDF file, first select the SDF file. By default the
name of the IESNA file will be the same as that of the selected SDF file, simply with a different
extension (IES). However, the user may modify the name of the IESNA file if desired. The name
of the spectrum file will always be the same as that of the IESNA file, simply with a different
extension (SPCD).
Next, the user needs to specify the resolution to use in the IESNA file, i.e. the number of vertical
and horizontal angles (OpticStudio refers to these as Radial and Angular angles, respectively).
Once the input file has been selected and the output file name and pixelation have been
specified, the IESNA and spectrum files are created by selecting the “Convert” button. The
IESNA file will be placed in the <data>\Objects\Sources\IESNA\ folder, while the spectrum file
will be placed in the <data>\Objects\Sources\Spectrum Files\ folder.
Tools for adding spectral data to sources that do not contain it.
To convert a source file that does not contain wavelength information (i.e. a source file with a
.DAT extension) to one that contains such information.
Output File Name The name of the file containing the converted data. The file extension must
be .SDF
Source Color The model used to define the spectral distribution of the source. The ten options
provided for the source color model are described in “Defining the color and spectral content
of sources”.
X, Y, Z; x, y; R, G, B; Temp (K); u'v’ Six of the models require additional numeric inputs for
characterizing the source color. The appropriate inputs should be entered based on the
Spectrum The number of wavelengths to use in characterizing the spectral distribution of the
source. The user has no control over this option when selecting the System Wavelengths or the
Spectrum File models (though in the latter case the appropriate value from the spectrum file
will be read into the dialog).
Wavelengths From The minimum wavelength (in microns) to use in characterizing the
spectral distribution of the source.
The user has no control over this option when selecting the Spectrum File model (though the
appropriate value from the spectral file will be read into the dialog). When select the System
Wavelength model, the title of this setting will change to “Wavenumber”, with the input value
corresponding to the wavenumber to use for defining the spectral distribution (zero means
polychromatic, i.e. all wavelengths defined in the Wavelength Data dialog box will be used
according to their relative weights).
To The maximum wavelength (in microns) to use in characterizing the spectral distribution of
the source. The user has no control over this option when selecting the System Wavelengths or
the Spectrum File models (though in the latter case the appropriate value from the spectrum
file will be read into the dialog).
Spectrum File The name of the file containing the spectral data for the source. This option is
only available when selecting the Spectrum File model.
More information on the file format is provided in “Defining a spectrum file” in the Sources
section of the Object Properties.
Discussion
This feature allows spectral information to be added to a source file, converting the file from a
flux only format file to a spectral color format file (see “Source File”). The spectral data for the
source are added via specification of a source color model and its corresponding parameters.
OpticStudio assigns a wavelength to each ray in the input file based on a Monte Carlo
sampling algorithm, such that the overall color of the source matches the input specification.
The original data, with wavelengths now included, are then written to a new file (with the
appropriate .SDF extension), while the initial input file (.DAT extension) is retained.
To create an SDF file from a DAT file, first select the desired DAT file. By default the name of the
SDF file will be the same as that of the selected DAT file, simply with a different extension.
Once the input DAT file has been selected (and the corresponding SDF file name has been
provided), a source color model is specified. The remaining inputs are then provided based on
the selection of the source color model.
Once the file and color model have been selected, the SDF file is created by selecting the
“Convert” button. The resulting file will be placed in the <data>\Objects\Sources\Source Files\
folder.
This feature is only available in the Premium and Enterprise editions of Ansys Zemax
OpticStudio.
To concatenate either two or three spectral color format (SDF) files into a single SDF file.
File 2The name of the second SDF file to be used in the concatenation. None may be selected,
if the user only wishes to concatenate two files (see details below).
File 3The name of the third SDF file to be used in concatenation. None may be selected, if the
user only wishes to concatenate two files (see details below).
Output FileThe name of the output file containing the concatenated results. The file extension
must be .SDF.
Discussion
This feature allows either two or three spectral color format files (see “Source File”) to be
concatenated into a single file. The concatenation will only be allowed if all of the input files
are binary format. In addition, all of the files must use the same dimension units, and the
translation, rotation, and scale factors in each file must be identical in order for the
concatenation to proceed. This feature is best-suited for situations in which different color
filters were used to make measurements for the same lamp and measurement geometry and
the user now wishes to combine the filtered data (each present in a separate source file) into a
single file.
To create the concatenated file, first select the three desired input files (“File 1", “File 2", and
“File 3"). To concatenate just two files, select “None” for one of the file names. Note that if
“None” is selected for more than one of the file names, an error will be issued and the
concatenation will not proceed. Although a default name for the concatenated file is provided
(“Sum.SDF”), a user defined name should be provided for the output file.
File Name The name of the IESNA IES, EULUMDAT LDT, or rayset SDF file containing the data
to be displayed.
Show As The directivity data may be displayed either in a Half or Full Sphere.
Angle(s) This control supports multiple angles separated by commas. For example, the Angle
(s) list may be 0, 45, 90, 135. All of the data for all angles are then shown on the same plot. A
maximum of 5 angles may be listed.
The directivity cross-sections lie in a plane that contains the local Z axis and a point rotated
counter-clockwise around Z from the +X direction (when the point is aligned with the +X axis
the angle is zero).
Note that this plot only supports photometric units (luminance). The luminance is zero for
wavelengths outside of the photopic response of the eye.
This feature is only available in the Premium and Enterprise editions of Ansys Zemax
OpticStudio.
Displays a hemi- or full-sphere map of the source luminance for IES and LDT source files.
Show As The data may be displayed as either Grey Scale, Inverse Grey Scale, False Color, or
Inverse False Color.
Plot Scale This control sets the maximum upper limit of the plot scale.
Data Range The polar data may be displayed in a Full Sphere (out to a polar angle of 180
degrees) or in a Hemisphere (out to a polar angle of 90 degrees).
Normalize Normalizes all data in the file to a peak value of 1.0 Candela.
Discussion
Note that the luminance is zero for wavelengths outside of the visible spectrum.
This feature is only available in the Premium and Enterprise editions of Ansys Zemax
OpticStudio.
Displays the relative intensity vs. wavelength for a defined spectral distribution.
X, Y, Z; x, y; R, G, B; Temp (K); u'v'Six of the models require additional numeric inputs for
characterizing the source color. The appropriate inputs should be entered based on the
selected model (e.g. X, Y and Z values for the CIE 1931 Tristimulus XYZ model). No additional
numeric inputs are required for the System Wavelengths, Uniform Power Spectrum, D65
White, or Spectrum File models. For any model requiring additional numeric inputs - other
than Black Body Spectrum - OpticStudio must perform fitting to determine the corresponding
Wavelengths FromThe minimum wavelength (in microns) to use in characterizing the spectral
distribution of the source. The user has no control over this option when selecting the System
Wavelengths or the Spectrum File models (though in the latter case the appropriate value from
the spectrum file will be read into the dialog).
ToThe maximum wavelength (in microns) to use in characterizing the spectral distribution of
the source. The user has no control over this option when selecting the System Wavelengths or
the Spectrum File models (though in the latter case the appropriate value from the spectrum
file will be read into the dialog).
Spectrum FileThe name of the file containing the spectral data for the source. This option is
only available when selecting the Spectrum File model. More information on the file format is
provided in “Defining a spectrum file” in the Sources section of the Object Properties.
Discussion
This feature is used to visualize the spectral distribution of a source defined in non-sequential
mode. The distribution may be defined according to any one of ten models, each of which are
described in detail in “Defining the color and spectral content of sources” . The results are
shown as either check marks or bars at each of the discrete wavelengths for the distribution.
The check marks or bars are colored according to the closest RGB value for the corresponding
wavelength (if no RGB value exists for a particular wavelength a black color is used for that
data point). More details on how the wavelengths and weights are determined for any given
source color model may be found in “The spectrum fitting algorithm” . The input distribution
and the Tristimulus values corresponding to the fit for that distribution (as determined by the
spectrum fitting algorithm) are displayed in the text section of the analysis. At the bottom of
this section are the Color Rendering Index (CRI) and Color Correlated Temperature (CCT) for
the distribution.
This feature displays color chart based upon the CIE 1931 color spaces.
This feature displays color chart based upon the CIE 1976 color spaces.
The Zemax Part Designer (ZPD) is an interface that allows users to create and manipulate
geometries in an environment separate from OpticStudio. Special features such as the “Ghost
View” and On-The-Go Geometry creation allow users to quickly build, assess, and modify
individual steps leading up to the final object. Using the ZPD console, users may quickly
modify and add commands and operations to a geometry model and generate results within
moments. Overall, the Part Designer allows for a streamlined process to incorporate solid 3-D
geometry into the user’s OpticStudio non-sequential designs.
Save Save the Part Designer file with the current name, overwriting the older version.
Save As Save the design file with a new name, keeping the original version unchanged.
Save Gallery The “Save Gallery Data” option allows users to save the file in its current state
with supplementary information including a user description and bitmap image. This
information can be accessed through the Gallery Mode.
Export As Export parts in a variety of CAD file formats such as .IGS, .STEP, .STL, and .SAT
Undo Redo
Note that this functionality is not hooked up to the Undo shortcut key defined in the
OpticStudio Preferences (under the Setup > OpticStudio Preferences > Shortcut Keys tab)
Load Example
The Zemax Part Designer has three main modes of operation: the Script, Sketch, and Gallery
Modes. This is also where the Project Preferences for the Part Designer are set.
Script Mode
The Script Mode is the foundation of the Part Object. This mode acts as a standard text editor
and allows users to write a script to generate the user’s desired geometries.
The Sketch Mode is a simple yet robust toolset that allows users to define sketches. These
sketches are used in conjunction with commands listed under “Sketch Object” of the
application toolbar.
The Gallery Mode explores the contents of the default Zemax Part Designer directory. The
gallery allows users to sort the files by application (Collectors, Sources, Fixtures, Misc…) or by
name. Users may double click each file listed to view a brief description of the part.
The Project Preferences tab allows users to modify settings for the current part and the ZPD 3D
display.
Units
By default, ZPD will utilize millimeters as a unit of measurement. Saving a part will associate a
part with the selected unit type. This will not change until the selected unit type is changed and
the part is saved again.
When opening a part in ZPD, ZPD will set its unit type to utilize that of the current file. Once
the file is closed, ZPD will return the unit settings to what it was set to prior to opening the file.
ZPD parts exported in a CAD format will utilize the selected unit type. If a part is opened and
exported within OpticStudio, OpticStudio will use the units specified by the system’s lens units.
If checked, the remaining settings will be locked to their default values and cannot be changed
by the user. In order to choose custom settings, uncheck this box.
This setting controls the color of parts designed in ZPD before any COLOR command is
applied. This only controls the color within ZPD itself; a ZPD object in OpticStudio is not
affected by this setting. Note: changes to this setting will not be applied until the script is re-
built (i.e. Build All).
Background Color
Solid Background: A single color chooser that allows users to choose from either a predefined
palette of colors, or a specific RGB value (under Advanced) to be used as a solid background.
Gradient Background: Two sets of color choosers, each representing the RGB values of vertical
gradient background. The top and bottom selections represent the colors of their respective
positions of the background gradient.
Declaration
The declaration commands are used to define numerical values that may be used elsewhere in
the script by reference to the declared value name. There are two types of declarations:
parameters and constants. The difference between a parameter and a constant is that a
parameter is exposed to the OpticStudio user interface, and the value defined in the script may
be overridden with a different value in the non-sequential component editor.
Parameter
The PARAMETER command defines the name and numerical value of a constant which can
subsequently be used in the place of any numerical value. This named parameter is also
automatically exposed to OpticStudio as a user definable parameter. Changing or optimizing
the parameter in OpticStudio will rebuild the entire object with the new value, and any value
defined in OpticStudio will override the value in the script. The script value will only be used as
the "default" value the first time the script is loaded into an NSC object. Parameters may not be
defined using values from previously defined declarations or computations. Only direct
numerical values are allowed. The parameter name will appear in the NSC Editor and the value
may be changed as any other parameter value for any object.
Constant
The CONSTANT command defines the name and numerical value of a constant which can
subsequently be used in the place of any numerical value.
Objects
Cube
Creates a rectangular volume with the specified width in each direction. The origin is at the
center of the cube.
Cone
Creates a cylindrical or cone shaped volume with the front radial size r1, rear radial size r2, and
a length L. Either r1 or r2 may be zero, but not both. L may be positive or negative, but not
zero. The origin is at the center of face 1 which lies in the XY plane; the length is along the +Z
axis.
Cylinder
Creates a cylinder with the specified radius and length. Length may be positive or negative, but
not zero. The origin is at the center of the face which lies in the XY plane; the length is along
the Z axis.
Elliptical Volume 1
Creates a volume with elliptical front and back faces with the specified radial size along the X
and Y directions, extruded a length L along the Z direction. L may be positive or negative, but
not zero. The origin is at the center of the front face.
Elliptical Volume 2
Creates a volume with elliptical front and back faces with the specified radial size along the X
and Y directions, extruded a length L along the Z direction. L may be positive or negative, but
not zero. The origin is at the center of the front face.
Lens
Creates a standard lens. The r1 and r2 values are the front and back radii of curvature (use 0 for
flat). The k1 and k2 values are the conic constants. The radial clear aperture of the front and
back are radialAperture1 and radialAperture2, respectively, and the center to center thickness
is given by thick. The origin is at the center of the front face. Optionally the bevel1 and bevel2
values may be added to the radial edge aperture front and back faces.
Creates an extruded n-sided polygon. The value n must be at least 3. Size is the distance from
the center axis to any vertex on the polygon. The front face lies in the XY plane and the depth
is the extruded distance along Z. The depth may be positive or negative, but not zero. One
vertex of the polygon lies on the +x axis.
Pyramid (objects)
Creates an extruded n-sided pyramid. The value n must be at least 3. Size is the distance from
the center axis to any vertex on the polygon. The base face lies in the XY plane and the depth is
the extruded distance along Z. The depth may be positive or negative, but not zero. One vertex
of the polygon lies on the +x axis.
Slot
Creates a slot with semi-circular sides, a center to center spacing, and a depth in the Z
direction. The origin is at the center of the slot.
Sphere (objects)
Creates a sphere with the specified radius. The origin is the center of the sphere.
Spiral
Creates a spiral shape. The spiral axis is along the +Z axis. The spiral "wire" has a circular cross
section of radial size "radius". The radius of the windings from the Z axis to the center of the
wire is given by R1 at the beginning of the spiral and by R2 at the end of the spiral. The turns
value is the number of full windings, and need not be an integer. The pitch value is the change
in Z coordinate per turn. The radius parameter should be no larger than one third of the
smaller of R1 and R2.
Torus
Creates a circular torus volume. A circle of radius r is placed in the YZ plane a distance R along
the +Z axis. The angle 0 corresponds to this position of the circle. The circle is spun about the
+Y axis from the start angle tothe stop angle to form the torus. The start and stop angles are
measured in degrees and must be between -360 and +360.
Sketch Objects
Prism/Extrusion
EXTRUDE name, sketch, draft_angle, length
Creates a volume using the sketch specified in sketchID. The volume is aligned along the z-
axis and forms a prism of the given length. The user may also specify a draft angle through the
value d_angle. If no draft angle is present, the value is set to 0.0. The length of the prism
cannot be 0. The sketch used in the operation must be closed, and curves within the sketch
may not overlap.
Creates a pyramidal volume using the sketch specified in sketchID. The volume is aligned
along the z-axis and forms a point on the z-axis at the specified length. The length of the
pyramid cannot be 0. The sketch used in the operation must be closed, and curves within the
sketch may not overlap. The sketch may only use straight line segments.
Revolve
REVOLVE name, sketchID, start_angle, end_angle
Creates an array of the geometry defined by object. The geometry defined by the named
object is replicated nx, ny, and nz times with a spacing of dx, dy, and dz. The array is always
centered in the coordinate system, whether the n value are even or odd. Note this command
creates a new object from object1 and the original object is unaltered. Arrays cannot be
created if they consist of over 200 individual objects; This means nx * ny * nz may not exceed
200.
Copy
COPY name, object
Creates a new object by making a copy of an existing object. The original object is unaltered.
Ring
RING name, object, x, y, z, cx, cy, cz, count
Creates a ring array of the geometry defined by object. The ring is centered at the point (x, y, z)
and the axis of rotation of the part is given by the direction cosines (cx, cy, cz). The total
number of replicated objects is given by count. Before using the RING command, the reference
object must be offset from the axis of rotation via a MOVE or POSITION command. Note this
command creates a new object from object1 and the original object is unaltered. The
parameter “count” may not exceed 200 objects.
Chamfer
CHAMFER object, width
Adds a chamfer of the specified width to all sharp edges on the object.
Fillet
Adds a rounded fillet of the specified radius to all sharp edges on the object.
Free
FREE object
Releases the memory associated with the specified object. This command saves system
resources, but is not strictly required as objects are automatically freed at the end of the script.
Scale
SCALE object, sx, sy, sz
Scales the named object by the specified factors in the X, Y, and Z directions. The scale values
must not be zero, but may be positive or negative. If negative, the object is reversed in the
corresponding direction.
Color (shapes)
COLOR object, R,G,B
Colors an object created by an object creation command with the RGB values specified. Each
value must be between 0-255.
Rotate
Rotates the named object by the specified angle in degrees about the arbitrary axis defined by
the x, y, and z direction cosines.
Mirror
Mirror copies the named object, and reflects the copy relative to a plane defined by the
specified (x, y, z) point and normal vector with direction cosines (cx, cy, cz). The original and the
copy are then merged to be a single object, whether or not they touch. See also REFLECT,
which reflects an object without making a copy.
Reflect
Reflects the named object relative to a plane defined by the specified (x, y, z) point and normal
vector with direction cosines (cx, cy, cz). See also MIRROR, which reflects an object and merges
it with the unreflected original object.
Position
Moves and rotates the object to a new coordinate system centered on the specified (x, y, z)
point with the local +Z axis pointing along the direction cosines (cx, cy, cz). The original origin
is assumed to lie on the new ZY plane.
Creates a new object that is the Boolean union of object1 and object2.
Difference
Create a new object that is the Boolean difference between object1 and object2. This
command is used to remove from object1 the volume represented by object2.
Overlap
Create a new object that is the Boolean overlap (logical AND) of object1 and object2. This
command is used to select only the volume that is shared by both object1 and object2.
The RAY command defines a ray at the specified x, y, and z point, with the specified cx,cy,and
cz direction cosines, and then traces the ray to the named object. If the ray intercepts the
object, the point of interception is stored in the named data value. The named data value
contains three values: the x, y, and z coordinate of the intercept point. These values may be
used as constants in subsequent script commands.
Example
This script defines a cube, then a ray starting above the cube intercepts the top face of the
cube, and defines a point where a sphere is placed.
CUBE box, 1, 1, 1
SQRT data_value: the Square root command evaluates the square root of the data value
following the command. The input cannot be less than or equal to 0.
SINE, COSI, TANG, ATAN, ASIN, ACOS: The Sine, Cosine, Tangent, Arc Tangent, Arc Sine, and
Arc Cosine commands, respectively. These commands are followed by a data value given in
radians.
Sketch Group
Arrow Tool
Ansys Zemax OpticStudio 2023 R2 The Part Designer Tab 2010
The Arrow Tool enables a user to select and manipulate points that have already been plotted.
Selected points appear yellow to the user. In general, selected points can be dragged using
the left mouse button and can be used in conjunction with the various ZPD sketch hot keys
such as ‘g’ (snap to grid line), or ‘v’(snap to integer). Selected points may also be deleted using
the delete key. Deleting a point creates a Bezier Curve between the points before and after the
deleted point.
Points at the ends of a Bezier Curve can be used to adjust the “tangency” of a curve. The
appearance of a Bezier Segment is dictated by the start and end tangent points of the curve.
These tangent vectors are anchored at end points of a curve and point out into 2D space. The
magnitude and direction of these vectors determine the shape of the curve. Tangent vectors
appear as dotted lines in the Editor window.
Typically one point controls the end tangent point of the previous segment while the other
point controls the start tangent point of the next segment. Modifying the magnitude or
changing the direction of a vector will affect segment’s shape in varying ways.
To adjust the magnitude and direction of a tangent vector, a control point corresponding to
either a start or end point of a Bezier Segment must be selected. 1-2 dotted lines should
appear, each representing either the start or end vector of the next or previous curve. Right
clicking and dragging either point at the end of the dotted line will move it to the mouse
cursor’s location, changing the curve’s appearance in real time.
The arrow tool can also be used to select highlighted arc segments. Upon selecting an arc
segment, the arc manipulation panel will appear and replace the current point manipulation
panel. These panels are discussed later in the “Exposing and Parameterizing Sketches within
OpticStudio” section of the documentation.
To deselect a point, use the arrow tool and click in a blank space.
The line tool creates a basic straight line segment. Clicking the left mouse button within the
sketch places the first point. A subsequent click will draw a line segment from the first point to
the last mouse click.
The user cannot adjust the tangent vectors for straight line segments.
Curve Tool
When a curve has been closed, new control points may be added along the existing curve by
selecting the line tool or the Bezier tool and clicking anywhere along the curve. Each left
mouse click will place a new point at the mouse cursor, separating the clicked line or curve
segment into 2 adjustable Bezier segments or straight line segments, depending on the type
of segment being altered.
Arc Tool
1)Select the Arc Tool from the toolbox and plot a point. If you are continuing a sketch from an
existing point, a new point does not need to be plotted to start an arc.
3)Adjust the preview curve by moving the mouse cursor. The final click will plot the arc and
produce a new control point to draw from at the end point.
The start and end points of the arc are adjustable using the Arrow Tool.
This search feature helps users locate Part Designer tools in the OpticStudio Part Designer tab.
Type a keyword into the search bar to find related analyses or tools.
Run Feature (Play icon) Opens/runs the selected Part Designer tool or analysis.
Highlight Feature (Magnifying glass icon) Highlights the location of the selected tool or
analysis in the OpticStudio UI.
Getting Started
For Details on the user interface, see Part Designer Tab
Part Creation
The console acts as a text editor in a coding environment. Each line of the console can accept
one command.
When typing a command, the syntax for the command will be displayed at the bottom of the
console for reference.
Note that this display is static, and cannot be selected (i.e. clicked on) in order populate the
actual contents of the console. In other words, the display is not meant to provide
“Intellisense”-level functionality, but does provide an easy way to review the syntax for any
command.
Declaration commands. To define numerical values used elsewhere in the script the general
syntax is:
declaration new_name, value
Object creation commands. To create a new object, the general syntax is:
object_type_name new_object_name, arguments
Computation commands. To compute data about an existing object, the general syntax is:
computation_type_name new_data_name, arguments
The Zemax Part Designer allows for commented lines by placing an exclamation point in front
of the commented line. Like in any coding environment, Zemax Part Designer also allows users
to perform calculations within a command. For example:
PARAMETER radius, 10
CONSTANT radius2, (radius*0.5)+1
These calculations may also be used in the creation of all geometries and within the “Insert”
dialog options.
“Too many parameters/constants/objects at line x”: More than one value has been listed to
define a parameter or constant, or too many objects are used to define commands such as
Boolean operations or Shape operations.
“Error in Tessellation at line x”: The Part Object could not be tessellated. This may be caused by
certain values within a command line exceeding constraints or conflicting with one another.
If an error occurs, ZPD will tessellate all objects and operations within the script up to the error
line.
Objects can be built and manipulated via the commands in the Part Designer Tab, or they can
be scripted into text editor in the Script Mode window. See System Group, Insert Group, and
Operations Group for details on each of the commands.
Creating a Sketch
Sketches are used in conjunction with the commands listed within the “User Defined”
subsection of the commands.
All sketches exist on the X-Y plane. The EXTRUDE and PYRAMID_S commands will extend
along the +Z axis. The REVOLVE command will always revolve the sketch about the Y-axis.
The ordering of points and direction in which segments are drawn has significance. The
notation for point indices and their relationships to adjacent segments is shown below:
The point highlighted in green represents the user’s selected point with the index n. The dir-
ections of the arrows indicate the order in which the user has drawn the curve; in this case, the
user has drawn the figure from left to right.
The sketch can only exist on one side of the axis of rotation as shown above.
Sketches used with the EXTRUDE, PYRAMID_S, and REVOLVE commands must be closed. This
means that the last point specified by the user must be the same as the starting point of the
sketch. Sketches will automatically close when a point close enough to the starting point is
specified.
l Sketches may consist of both straight line segments, Bezier curves, and arc segments.
A Bezier curve may be formed into a line segment, but a line segment cannot be adjus-
ted to form a smooth curve unless deleted and replaced with a curve.
Using a Sketch
Once a sketch is completed, it may be selected from any of the “Sketch Object” command
options. Navigate out of sketch mode and into the Script Mode. The Sketch ID of a command
indicates the name of any existing sketches. Incomplete sketches (not closed) cannot be used
for the EXTRUDE, REVOLVE, or PYRAMID_S commands.
A Bezier Segment shown with four control points. P1 and P2 are used to control the direction of
the segment at each end point.
This manual will often reference “continuous” intersections between various segments. When
two adjacent segments are “continuous” or “smooth”, there exists, at minimum, a first order
parametric continuity (C1 continuous) on the curve at the intersection between the two
segments. However, a smooth curve does not entail a second order parametric continuity (C2
continuous) in which the first AND second derivatives are the same. To demonstrate this
visually, refer to the figures below:
A C0 continuous curve. In other words, the points are connected but lack and first or second
order continuity
A C2 or C1 continuous curve can be easily constructed with a combination of Bezier, line, or arc
segment. Below, two Bezier segments are linked to form a C2 continuous curve.
A C2 continuous curve. In a C1 and C2 continuous curve, the end tangent point of the previous
segment, the end/start point of the previous/next segment, and the start tangent of the next
segment are all collinear. In a first order continuous curve, the line segment formed by the
previous segment’s end tangent point and end point may not be of the same magnitude of the
This manual and Help files will often detail the manipulation of the start and end tangent
points of various segments. The straight line segment formed by connecting the start tangent
point with the start point of a segment or the end tangent point with its respective end point is
indicated with a stippled line in ZPD. Each Bezier Segment has a start and an end tangent
point associated with the segment’s start and end control points. We will call the line segment
formed by the tangent points to their respective end or start points as the end or start tangent
vectors.
By checking the “Expose Point” box, the point’s coordinates as well as the tangent coordinates
associated with the point will all be exposed within the OpticStudio Environment. Note that
the within OpticStudio tangent points are defined as offsets from the curve point. For
example, an exposed curve point in Part Designer at (3,4), with tangent points at (1,2) and (4,6),
will display within OpticStudio with tangent offsets of (-2,-2) and (1,2).
Constraining a Curve
Line, Bezier, and Arc segments can also be set tangent to one another to create a “smooth
curve”. The effects of checking the “Smooth Curve” box of the point manipulation panel are
shown below.
When a curve is continuous, the tangent points and the control point will be collinear.
Adjusting one tangent point will automatically adjust the other tangent point, thus
maintaining a smooth curve. Enabling smoothing between a line segment and a Bezier
segment will render the segment parallel to the vector between the end point and the tangent
point.
Smooth Curve option is only available for points that are connected to a Bezier Curve. Line-
line, arc-arc, and line-arc pairs will not be able to use the Smooth Curve option.
After a point has been renamed, red lettering of the given name will appear next to the newly
named point. Renaming an arc will place the red text at the center point of an arc segment.
Upon exposing the point or arc, the new name will appear in the OpticStudio editor when the
part is loaded.
An exposed point with the name “Mynamed_Pt_1” is modified within the OpticStudio Editor.
To create gallery data for an object, it must be saved using the Save Gallery feature. This
function saves the file in its current state along with a user description and bitmap image.
The Gallery Information window opens upon selecting the “Save Gallery” feature. This window
shows the bitmap image that will be saved. The application chosen for the part will determine
how it is sorted in the Gallery Mode. A description of the object must also be entered prior to
saving.
Insert Group Commands: Create new objects or variables for use in creating complex Zemax
Part Objects.
Declaration Commands: Used to store variables for use in OpticStudio and within the script
Object Creation Commands: The building blocks of an object, these features create geometries
Operation Group Commands: Allow objects created by Insert Group commands to be modified
and interact with one another
Boolean Commands: Create a new object using Boolean logic and existing objects
Ray Command: retrieve quantitative values from the geometry to be used as parameters and
constants in other calculations.
Math Syntax: The Zemax Part Designer is also capable of performing simple mathematical
calculations as a substitute for data values within a script
Declaration Commands
The declaration commands are used to define numerical values that may be used elsewhere in
the script by reference to the declared value name. There are two types of declarations:
parameters and constants. The difference between a parameter and a constant is that a
parameter is exposed to the OpticStudio user interface, and the value defined in the script may
be overridden with a different value in the non-sequential component editor.
Parameter
The PARAMETER command defines the name and numerical value of a constant which can
subsequently be used in the place of any numerical value. This named parameter is also
automatically exposed to OpticStudio as a user definable parameter. Changing or optimizing
the parameter in OpticStudio will rebuild the entire object with the new value, and any value
defined in OpticStudio will override the value in the script. The script value will only be used as
the "default" value the first time the script is loaded into an NSC object. Parameters may not be
defined using values from previously defined declarations or computations. Only direct
numerical values are allowed. The parameter name will appear in the NSC Editor and the value
may be changed as any other parameter value for any object.
Constant
The CONSTANT command defines the name and numerical value of a constant which can
subsequently be used in the place of any numerical value.
Cube
Creates a rectangular volume with the specified width in each direction. The origin is at the
center of the cube.
Cone
Creates a cylindrical or cone shaped volume with the front radial size r1, rear radial size r2, and
a length L. Either r1 or r2 may be zero, but not both. L may be positive or negative, but not
Cylinder
Creates a cylinder with the specified radius and length. Length may be positive or negative, but
not zero. The origin is at the center of the face which lies in the XY plane; the length is along
the Z axis.
Elliptical Volume 1
Creates a volume with elliptical front and back faces with the specified radial size along the X
and Y directions, extruded a length L along the Z direction. L may be positive or negative, but
not zero. The origin is at the center of the front face.
Elliptical Volume 2
Creates a volume with elliptical front and back faces with the specified radial size along the X
and Y directions, extruded a length L along the Z direction. L may be positive or negative, but
not zero. The origin is at the center of the front face.
Lens
LENS name, r1, k1, radialAperture1, thick, r2, k2, radialAperture2, bevel1, bevel2
Creates a standard lens. The r1 and r2 values are the front and back radii of curvature (use 0 for
flat). The k1 and k2 values are the conic constants. The radial clear aperture of the front and
back are radialAperture1 and radialAperture2, respectively, and the center to center thickness
is given by thick. The origin is at the center of the front face. Optionally the bevel1 and bevel2
values may be added to the radial edge aperture front and back faces.
Creates an extruded n-sided polygon. The value n must be at least 3. Size is the distance from
the center axis to any vertex on the polygon. The front face lies in the XY plane and the depth
is the extruded distance along Z. The depth may be positive or negative, but not zero. One
vertex of the polygon lies on the +x axis.
Pyramid
Creates an extruded n-sided pyramid. The value n must be at least 3. Size is the distance from
the center axis to any vertex on the polygon. The base face lies in the XY plane and the depth is
the extruded distance along Z. The depth may be positive or negative, but not zero. One vertex
of the polygon lies on the +x axis.
Slot
Creates a slot with semi-circular sides, a center to center spacing, and a depth in the Z
direction. The origin is at the center of the slot.
Sphere
Creates a sphere with the specified radius. The origin is the center of the sphere.
Spiral
Creates a spiral shape. The spiral axis is along the +Z axis. The spiral "wire" has a circular cross
section of radial size "radius". The radius of the windings from the Z axis to the center of the
wire is given by R1 at the beginning of the spiral and by R2 at the end of the spiral. The turns
value is the number of full windings, and need not be an integer. The pitch value is the change
in Z coordinate per turn. The radius parameter should be no larger than one third of the
smaller of R1 and R2.
Torus
Creates a circular torus volume. A circle of radius r is placed in the YZ plane a distance R along
the +Z axis. The angle 0 corresponds to this position of the circle. The circle is spun about the
+Y axis from the start angle to the stop angle to form the torus. The start and stop angles are
measured in degrees and must be between -360 and +360.
Prism/Extrusion
Creates a volume using the sketch specified in sketchID. The volume is aligned along the z-
axis and forms a prism of the given length. The user may also specify a draft angle through the
value d_angle. If no draft angle is present, the value is set to 0.0. The length of the prism
cannot be 0. The sketch used in the operation must be closed, and curves within the sketch
may not overlap.
Pyramid
Creates a pyramidal volume using the sketch specified in sketchID. The volume is aligned
along the z-axis and forms a point on the z-axis at the specified length. The length of the
pyramid cannot be 0. The sketch used in the operation must be closed, and curves within the
sketch may not overlap. The sketch may only use straight line segments.
Revolve
Creates a volume made from the revolution of the sketch specified with sketchID. The sketch is
roatated from start_angle to end_angle about the y-axis. The sketch may only on either side of
the y-axis, and must be a closed shape. The start_angle and end_angle must be between 0 and
360.
Creates an array of the geometry defined by object. The geometry defined by the named
object is replicated nx, ny, and nz times with a spacing of dx, dy, and dz. The array is always
centered in the coordinate system, whether the n value are even or odd. Note this command
creates a new object from object1 and the original object is unaltered. Arrays cannot be
created if they consist of over 200 individual objects; This means nx * ny * nz may not exceed
200.
Copy
Creates a new object by making a copy of an existing object. The original object is unaltered.
Ring
Creates a ring array of the geometry defined by object. The ring is centered at the point (x, y, z)
and the axis of rotation of the part is given by the direction cosines (cx, cy, cz). The total
number of replicated objects is given by count. Before using the RING command, the reference
object must be offset from the axis of rotation via a MOVE or POSITION command. Note this
command creates a new object from object1 and the original object is unaltered. The
parameter “count” may not exceed 200 objects.
Chamfer
Adds a chamfer of the specified width to all sharp edges on the object.
Fillet
Adds a rounded fillet of the specified radius to all sharp edges on the object.
Free
FREE object
Releases the memory associated with the specified object. This command saves system
resources, but is not strictly required as objects are automatically freed at the end of the script.
Scale
Scales the named object by the specified factors in the X, Y, and Z directions. The scale values
must not be zero, but may be positive or negative. If negative, the object is reversed in the
corresponding direction.
Color
Colors an object created by an object creation command with the RGB values specified. Each
value must be between 0-255.
Rotate
Rotates the named object by the specified angle in degrees about the arbitrary axis defined by
the x, y, and z direction cosines.
Mirror
Mirror copies the named object, and reflects the copy relative to a plane defined by the
specified (x, y, z) point and normal vector with direction cosines (cx, cy, cz). The original and the
copy are then merged to be a single object, whether or not they touch. See also REFLECT,
which reflects an object without making a copy.
Reflect
Reflects the named object relative to a plane defined by the specified (x, y, z) point and normal
vector with direction cosines (cx, cy, cz). See also MIRROR, which reflects an object and merges
it with the unreflected original object.
Position
Moves and rotates the object to a new coordinate system centered on the specified (x, y, z)
point with the local +Z axis pointing along the direction cosines (cx, cy, cz). The original origin
is assumed to lie on the new ZY plane.
Creates a new object that is the Boolean union of object1 and object2.
Difference
Create a new object that is the Boolean difference between object1 and object2. This
command is used to remove from object1 the volume represented by object2.
Overlap
Create a new object that is the Boolean overlap (logical AND) of object1 and object2. This
command is used to select only the volume that is shared by both object1 and object2.
The RAY command defines a ray at the specified x, y, and z point, with the specified cx,cy,and
cz direction cosines, and then traces the ray to the named object. If the ray intercepts the
object, the point of interception is stored in the named data value. The named data value
contains three values: the x, y, and z coordinate of the intercept point. These values may be
used as constants in subsequent script commands.
Example
CUBE box, 1, 1, 1
SQRT data_value: the Square root command evaluates the square root of the data value
following the command. The input cannot be less than or equal to 0.
SINE, COSI, TANG, ATAN, ASIN, ACOS: The Sine, Cosine, Tangent, Arc Tangent, Arc Sine, and
Arc Cosine commands, respectively. These commands are followed by a data value given in
radians.
The 7 cell cluster concentrator optic is molded from polycarbonate and sits atop a 7 cell LED
array
The concentrator may look like a fairly complex part. Upon closer inspection, the part may be
broken down into 3 segments. The profile of the part suggests that it is cut from a single lens
part. The large hole in the center of the part is also cut from a lens shape. The radial “flower”
shape of the part consists of 6 hexagons, intersected with 6 compound parabolic
concentrators (CPC) with lens shaped holes cut at the base of each CPC.
This tutorial will break down the 7-Cell Cluster Concentrator Optic into several simple pieces to
create a fully parametric part.
Step 1: Design
PARAMETER diameter, 20
PARAMETER thickness, 16
The main body of the concentrator is created with the following commands:
LENS frontCut,-diameter,0.0,diameter*diamRatio,thickness*
(2/3),0,0.0,diameter*diamRatio,0.0,0.0
Where c is the curvature (the reciprocal of the radius), k is the conic constant and r is half the
diameter of the aperture. Values chosen with the LENS command apply to both the front and
back surfaces of the lens.
After creating the initial lens, another smaller lens is created to act as the area subtracted from
the main lens. The RAY command becomes very effective in positioning parts with respect to
other parts as shown in Fig. XVI. The RAY command will grant the user access to the location
of a ray intersection specified in the RAY command. The resulting values act similarly to
variables created by the CONSTANT command, and can undergo mathematical operations. In
this example, the smaller lens needs to be placed close to the front surface (along the +z-axis)
of the larger lens. Due to the curvature of the lens, the placement of the smaller lens is not
apparent without some calculations. Firing a ray from some arbitrary distance along the z-axis
towards the origin will solve this problem. The ray intersection along the lens’ surface is stored
within the script and can be accessed from another command. The z-coordinate attained by
the RAY command indicates a point on the surface of the larger lens, however, the smaller lens
does not simply lay tangent to the lens when performing a DIFFERENCE command. This
means that a scale factor (simply multiplying the placement by a scale factor by an arbitrary or
user defined value) can be used to alter the placement and achieve the desired Boolean result.
The following commands are used to create the base polygon shape. This shape is made up of
6 hexagonal polygons arranged like a honey comb:
POLYGON poly1,6,diameter*diamRatio,diameter
RING poly2Ring,poly2,0,0,0,0,0,1,6
The parameters defining the base polygon utilize the user defined parameters. This ensures
that the entire part may be fully parametric within OpticStudio. The “honey comb” pattern of
the polygons is created through a ring array of the initial base polygon about the z-axis. It is
important to note that the base shape used in a RING command must first be offset from the
specified axis of rotation. Because the geometries are rotated about the origin (axis of rotation
will be the z-axis), a copy of the initial polygon must be created and placed on top of the base
shape. Once again, the top of the polygon is not clear without some tedious math, and a RAY
command is used to find the offset distance of the copied polygon.
It is important to remember that the MOVE and POSITION commands move the origin of a
shape. In this example, the origin of the base polygon lays at the origin, at the center of the
back face of the polygon. Therefore, the command:
Offsets the origin 2*poly2Pos.Y units along the Y-axis. Use the Object Creation Commands
section of this manual to determine the origin of a given geometry.
The initial base polygon and the ring copies are then joined via the UNION command.
LENS cpcCut,0,0,diameter/5,diameter/5,diameter/4,0,diameter/5,0,0
A ring array of 7 compound parabolic concentrators has small air lenses drilled at the rear
apertures. Once again, the CPC geometries must be defined by the parameters declared at the
beginning of the script. An individual CPC object with a hole is copied and offset along the y-
axis using the same values attained by the previous RAY operation. The copied CPC is then
rotated using the RING command and combined with the original CPC located at the origin.
The only Boolean commands utilized thus far have been the DIFFERENCE and UNION
commands. The 3rd and final Boolean command is the OVERLAP command. The overlap
command takes two objects and creates a new object composed of the intersection between
the two objects.
An OVERLAP with the polygon ring and the CPC ring results in the following shape:
The images below show the objects that will be overlapped (polys and cpcLobes) as well as the
overlapped parts and the resultant object named baseShape.
The object is now ready to be exported as a CAD file (.IGS, .STEP,.STL, .SAT) or saved as a .ZSO
or .ZPO file. It is recommended that parts be saved as .ZPO files, as file features are more
robust and can include sketches and gallery data.
To save the file, navigate to the File icon in the System Group and select “save”, “save as”, or
“save gallery”. The part may also be exported via the “export as” command
User’s will create a simple Schmidt-Pechan Roof Prism using the line segment tool as shown
below:
Begin by opening the Zemax Part Designer and navigating to the sketch mode.
Press “OK” to rename the sketch after entering a valid text string.
Return ZPD into script mode and type the following command into the script editor:
The command instructs ZPD to create an extruded shape, “baseShape”, utilizing the sketch,
“pentagon”, with a draft angle of 0° and a length of 20 along the positive Z-axis (extrusions will
always begin at the origin and protrude along the positive Z-axis).
Thinking ahead, the final prism must be a triangular cut from the “baseShape” geometry. As all
extrusions extend along the +Z-axis, baseShape must be rotated 90° about the y-axis and
centered at the origin. Modify the entire script to the following and rebuild:
CONSTANT length, 20
EXTRUDE baseShape,pentagon,0,length
Re-enter Sketch Mode and add a new Sketch titled, “triangle”. Using the line tool, plot the
following points:
EXTRUDE cut,triangle,0,length
The extruded part is created with the specified length, centered, and cut from the initial
baseShape Object.
Depending on the user’s usage of the resulting part, there are several ways in which this part
can be optimized. In the case of this particular part, light typically passes from one pentagonal
face of the prism to the other. One primary factor in this behavior is the angle adjoining the 2
pentagonal faces.
Adjusting the points circled in red will change the angle marked by the blue arrows.
To increase or decrease this angle, OpticStudio must be able to adjust the two points indicated
in Figure GGSDA. Navigate into Sketch Mode and “expose” these two points.
Load the part into a Non-Sequnetial Component Editor as a CAD Part: Zemax Part Designer.
The exposed points will appear in the non-sequential mode editor as highlighted. In this case,
the points were renamed to “+Xsketch” and “-Xsketch”
As the triangular cross section of the prism is symmetrical, add a pick up solve to parameter 3
(-Xsketch.x), scaling the parameter to be of the opposite sign from “+Xsketch.x” at all times.
Adjusting parameter 2 will now result in an equal and opposite change for Parameter 3.
The y coordinates of these control points can be ignored as they will remain fixed. Finally,
Parameter 1 (+Xsketch.x) must now be made into a variable to be used for optimization.
Parameter 1 can now be used as a variable within various merit function parameters and
optimization.
Using the Visual Optimizer slider to adjust the shape of the Prism
Although OpticStudio has a huge range of features and analysis options, specific applications
may need some special feature or requirement. That’s why OpticStudio has programming
interfaces built right in. The first is the Zemax Programming Language (ZPL), which is a very
easy to learn scripting language similar to Basic. With ZPL, it is easy to perform special
calculations, display data in different ways and automate repetitive keyboard tasks, among
many others. Tools for creating, editing, and running ZPL Macros are located in the ZPL
Macros group.
Ansys Zemax OpticStudio also has a ZOS-API programming interface which can be used in a
.NET environment, using C#, or any other .NET-capable language. In addition, ZOS-API can
also be used in a .COM environment, using C++, or any other .COM-capable language. Tools
for using the ZOS-API are in the ZOS-API.NET Applications and ZOS-API.NET Application
Builders groups.
For more information, please see the section About the ZPL.
Macro List
Ansys Zemax OpticStudio 2023 R2 The Programming Tab 2057
The Macro List button is found in the ZPL Macros section of the Programming Tab.
Edit/Run
The Edit/Run macro tool is found in the ZPL Macros section of the Programming Tab.
To run a ZPL macro, select the Edit/Run button in the ZPL Macros section of the Programming
Tab. Select the macro to run from the "Active File" list, and then click on Execute.
Active File A drop-down list of macros available. All the listed macros are text files ending in
the extension .ZPL. The files must be in the folder for ZPL Macros; see “Folders”. Macros may
also be placed in any subfolder within the macros folder.
Close After Execution If checked, the ZPL control dialog box will automatically close after the
macro execution.
Quiet Mode If checked, the default output text window will not be shown. This is useful for
graphics macros that do not generate useful text.
Check Obsolete Syntax If checked, OpticStudio will test the macro for use of obsolete syntax.
Status During execution of the macro, OpticStudio will use this area to print a status message
stating the line number of the macro being executed. The status message is updated every
quarter second.
Terminate The terminate button will stop execution of the macro currently running.
Cancel The cancel button terminates the current macro if one is running. If no macro is
running, cancel closes the ZPL control dialog box.
Edit The edit button invokes OpticStudio’s text editor which can be used to modify or rename
the macro. This editor colors the macro text using the following ZPL syntax:
The Refresh List button is found in the ZPL Macros section of the Programming Tab.
This tool updates the current macro list; which may be required if any macros have been added
or deleted since OpticStudio was started or the last time the list was refreshed.
New Macro
The New Macro button is found in the ZPL Macros section of the Programming Tab.
Macro Help
The Macro Help button is found in the ZPL Macros section of the Programming Tab.
This opens the HTML OpticStudio Help Files to the section About the ZPL. If you are viewing
this as an HTML window, please click the “+” next to the section header in the Contents pane
to expand the subtopics.
This section is about using the Zemax Programming Language (ZPL). If you are viewing this in
an HTML dialog, expand the header in Contents tab to view the subsections.
ZPL is similar to the BASIC programming language, except not all BASIC constructs and
keywords are supported, and capabilities and functions unique to ray tracing have been
added. ZPL is easy to use, and this section will give you instructions and examples to get you
started.
ZPL is a powerful programming language. While it is easy to use, ZPL has no built-in
debugging or variable shadowing capabilities, so the user is responsible for error-checking,
debugging code logic and for good programming practice. For this reason, technical support
on macro writing is restricted to ensuring that all ZPL functions and keywords work as
documented: we cannot advise on how to perform detailed calculations as part of technical
support. If you need a OpticStudio macro, and do not possess the desire or ability to write it
yourself, please feel free to contact OpticStudio Technical Support for a quote on developing a
custom program to meet your requirements. We have considerable experience in developing
these types of programs, and can generally write macros at very competitive rates on short
notice.
To create a ZPL macro, it is probably easiest to start with an existing macro that performs a
task similar to the one you want to achieve. If you are attempting to write your first ZPL macro,
you may want to read the example sections at the end of this help file. Some example ZPL
macros can also be found in the <data>\Macros folder installed with the OpticStudio program.
Use any text editor to create the ZPL file (such as the NOTEPAD editor). The file may have any
name but must end in the .ZPL extension. The file must be placed in the ZPL Folder, which by
default is <data>\Macros. To change this folder see “Folders”.
There is a limit to the allowed complexity of any single line in a ZPL macro. If the “line too long”
error occurs, try breaking the line into several smaller lines.
An Overview of ZPL
A ZPL macro consists of a series of commands which are stored in a text file. The commands
are either assignments, keywords, or comments. Assignments may be for either numeric or
Assignments
The general syntax for an assignment is
variable = (expression)
The (expression) may consist of an explicit value, such as 5, or a variable name containing some
preassigned value, or a complex mathematical expression involving functions, constants, and
variables. In all cases, the expression on the right side of the equal sign is evaluated, and the
result is assigned to the variable designated on the left.
The simplest form of an assignment is where the expression is a fixed value, such as:
x = 5
There are several important things to note in this command. First, no declaration of variables is
required. This means "x", which is called a variable, did not need to exist before the value of 5
was assigned to it. If "x" had already been assigned a value, it would now be reassigned.
Second, no special symbol is required to terminate a command, such as ";" in C. Because of
this, each ZPL command must be on a line by itself.
The functions SQRT (square root) and SINE (sine) are built in to ZPL. There are many of these
functions, all of which are defined in “Numeric functions”. Note that ZPL is not case-sensitive;
SQRT() and sqrt() are the same function. This documentation will use the convention of capital
letters for functions and keywords, and lower case for everything else.
One example of a keyword is PRINT. The PRINT keyword is followed by a list of items,
separated by commas, to be printed. For example, the ZPL commands
x = 3 y = 4
z = SQRT( x * x + y * y ) PRINT "The hypotenuse is ",z
Note that ZPL enforces operator precedence. ZPL uses the following precedence from highest
to lowest: Parentheses, functions (such as SQRT), logical operators (such as ==), multiplication
and division, and then addition and subtraction.
Comments
There are 3 ways to add comments to a ZPL macro: by starting a line with the REM keyword, by
starting a line with the “!” symbol, or by placing the “#” symbol anywhere on the line as long as
the # symbol is not inside a string. Blank lines are also allowed anywhere in the macro. Here
are 3 examples of comments:
REM this is a remark
! This is also a remark
x = 5 # The # symbol allows comments on the same line as a valid
command
Comments make macros easier to understand and modify, and have no effect on performance.
Creating Graphics
There are a number of low-level functions for generating graphics, including GRAPHICS,
GTEXT, GLEN- SNAME, and others. For details see “GRAPHICS”. An easier method of
generating typical OpticStudio style line graphs and 2D graphs graphics is available using the
PLOT and PLOT2D keywords; see “PLOT” and “PLOT2D”.
will cause OpticStudio to allocate memory for the new variable “x” and keep track of the value
associated with it. Once the variable is defined, it may be used in any subsequent expression.
There are a few rules regarding ZPL variables:
Variable names must not contain any "special" characters that ZPL uses for logical operations
or delimiting such as (, ), =, +, -, *, /, !, >, <, ^, &, |, #, ", and the space character.
A variable cannot take on the same name as a keyword or function, such as THIC or RAYX.
Since ZPL is not case-sensitive, you cannot use rayX or Thic to avoid this rule.
All ZPL numeric variables are stored internally as 64-bit double precision numbers.
Array Variables
Array variables are single- or multi-dimensioned arrays of double precision or integer values.
Unlike (scalar) numeric variables, array variables must be declared prior to their use. The
declaration syntax is
DECLARE name, type, num_dimensions, dimension1 [, dimension 2 [,
dimension 3 [, dimension 4] etc...]]
The name may be any legal variable name as described in the previous section. The type must
be either DOUBLE or INTEGER; this value indicates the type of array variable. The integer value
num_dimensions defines the number of dimensions of the array (not the size), and must be
between 1 and 4, inclusive. The integers dimension1, dimension2, etc., define the size of the
array in that dimension. Note that array variables start at index 1, and thus an array of size 10
has valid indices from 1 to 10.
Array variables may be defined anywhere inside the macro, they need not be declared at the
beginning of the macro. To release the memory associated with an array variable, use the
RELEASE keyword. The syntax is
RELEASE name
The values stored in the array may be retrieved with the same basic syntax:
value = name ( index1, index2, ...)
The following sample code declares a two-dimensional array variable, assigns a value to each
element, prints the values, and then releases the memory for the array:
DECLARE Z, DOUBLE, 2, 5, 5
FOR i, 1, 5, 1
FOR j, 1, 5, 1
Z(i, j) = i + j
NEXT j
NEXT i
FORMAT 8.0 k = 0
FOR i, 1, 5, 1
FOR j, 1, 5, 1
PRINT k, i, j, Z(i,j)
k = k + 1
NEXT j
NEXT i
RELEASE Z
Numeric Operations
ZPL macros support basic numeric operations such as add, subtract, multiply, and divide. The
syntax for each is shown below.
x = y + z
x = y - z
x = y * z
x = y / z
All other operations are supported only through the use of numeric functions or numeric
logical operators, both described in subsequent sections.
The other logical operators can be also be used as part of the argument in IF commands. For
example, an IF command may contain two conditions which must both be true for the THEN
command to be executed:
IF ( x > 1 ) & ( y < 2 ) THEN PRINT "Both conditions are true."
These two conditions are related by an "and" expression denoted by &. Note the parentheses
are used to force precedence. ZPL supports the logical operators described in the following
table.
Logical Description
& And, returns 1 only if both expressions are non-zero.
| Or, returns 1 if at least one expression is non-zero.
^ Xor, returns 1 if only one expression is non-zero.
! Not, returns 0 if (right_expression) is non-zero, else returns 1.
== Equality, returns 1 if expressions are equal.
> Greater than, returns 1 if left_expression is greater than right_expression.
< Less than, returns 1 if left_expression is less than right_expression.
Greater than or equal to, returns 1 if left_expression is greater than or equal to
>=
right_expression.
Less than or equal to, returns 1 if left_expression is less than or equal to right_
<=
expression.
!= Inequality, returns 1 if expressions are unequal.
String Variables
ZPL supports string variables and basic string operations. String variables can hold a maximum
of 360 characters. String variables do not need to be declared, but can be created at any time
using a defining assignment command such as:
newstring$ = "Here is the new string"
There are also string functions which can be used to extract text data, such as
title$ = $LENSNAME()
Note the function $LENSTITLE() starts with the $ character. This identifies the function as
returning a string result.
String Operations
String variables can be concatenated using the + operator. The syntax is:
C$ = A$ + B$
Note that the PRINT function can only print single string variables; there is no support for the
concatenation operand or string functions inside print commands. The correct procedure is to
concatenate the strings into a new string and then print the new string:
A$ = B$ + C$
PRINT A$
Instead, the correct procedure is to assign the function result to a variable and then print the
variable:
Z$ = $LENSNAME()
PRINT Z$
Logical Description
$== Equality, returns 1 if left_string and right_string are identical.
$> Greater than, returns 1 if left_string is greater than right_string.
$< Less than, returns 1 if left_string is less than right_string.
Greater than or equal to, returns 1 if left_string is greater than or identical to
$>=
right_string.
$<= Less than or equal to, returns 1 if left_string is less than or identical to right_string.
$!= Inequality, returns 1 if left_string and right_string are not identical.
Numeric Functions
Numeric functions can be used on the right hand side of a numeric variable assignment, and in
expressions which are arguments to keywords. These functions may require no arguments, one
argument, or multiple arguments. All functions return a single value. Certain functions, such as
PWAV() (primary wavelength) , return a value which does not depend upon the argument, and
therefore it is not required to provide one. The parentheses however, are still required.
In the following table, all ZPL functions are listed. If the syntax is given as FUNC(), then no
arguments are required. FUNC(x) indicates one argument is required, FUNC(x,y) indicates two
arguments, etc.
dummy = MCON(1, 0, 0)
a$ = $buffer()
a$ = $buffer()
a$ = $buffer()
SETOPERAND.
a$ = $buffer()
dummy = TOLV(7, 0)
a$ = $buffer()
The fiber coupling is computed by calling FICL(n) where n is the vector number containing the
argument list.
String Functions
The following table lists the available string functions.
Function Description
Returns the current string in the lens buffer. This function is used to
$BUFFER()
extract string data from various ZPL keywords and functions.
Returns the string from the CALLMACRO string buffer at index i. See
$CALLSTR(i)
“Calling a Macro from within a Macro”.
$COAT(i) Returns the coating name for the ith surface.
$COATINGPATH() Returns the path name for coating files.
$COMMENT(i) Returns the comment string for the ith surface.
$DATAPATH() Returns the path name for data files.
Returns the current date and time string. The formatting is specified
$DATE() by the Date/Time control settings in the General section of the
OpticStudio Preferences.
$EXTENSIONPATH() Returns the path name for OpticStudio extensions.
$FILENAME() Returns the current lens file name, without the path.
$FILEPATH() Returns the current lens file name, with the complete path.
For example, $NOTE(1) returns the first line in the notes, up to the first
newline character. If there are more than 100 consecutive characters
before the first newline is found, then line 1 will be the first 100
characters, and line 2 will be the remainder of the line up to the first
$NOTE(line#)
newline, or the next 100 characters, whichever comes first.
A$ = $NOTE(1) N = SLEN(A$)
BEEP
Makes an audible beep sound.
Syntax:
BEEP
Discussion:
This command can be used to alert the user when a calculation is finished or input is required.
BROWSE
BROWSE displays a window that prompts the user to select or enter a file name and populates
a string variable with the chosen file path.
Syntax:
Discussion:
The variable may be any valid string variable name. The mode argument is an integer that can
be either 0 for ‘load mode’ which prompts the user for an existing file or 1 for ‘save mode’
which prompts the user for a file name to save as. The string “extension” provides the option to
filter the files shown by the designated extension (e.g. “.CFG”).
Note that the BROWSE function is meant to allow the user to select a file and populate a string
variable with the file path and will not automatically open or save files.
Example:
! Load
BROWSE "File:",A$,0,".txt"
OPEN A$
! Save
BROWSE "Save Merit Function as: ",B$,1,".mf"
SAVEMERIT B$
PRINT "Saving file as: ",B$
Related keywords:
INPUT
CALLMACRO
Calls another ZPL macro.
Syntax:
CALLMACRO filename.zpl
CALLMACRO name$
Discussion:
This command is used to call another ZPL macro. The filename should be the full macro name
without the path. The file must exist in the folder for ZPL macro files. When the macro returns,
any text output generated by the called macro will be copied into the calling macro’s text
output window. See “Calling a Macro from within a Macro”.
CALLSETDBL
Sets a double precision numeric value in the master macro’s buffer.
Syntax:
CALLSETDBL index, value
Discussion:
CALLSETSTR
Sets a string value in the master macro’s buffer.
Syntax:
CALLSETSTR index, text$
Discussion:
This command is used to set a string value into the buffer maintained by the master macro.
The index can be any value between 0 and 50, inclusive. The string value may then be retrieved
using the $CALLSTRING function. See “Calling a Macro from within a Macro”.
COAT
For setting, coating surface properties use the topic “SETSURFACEPROPERTY, SURP” keyword,
and for getting coating surface properties use the $COAT(i) String Function as discussed under
String Functions.
COMPOSITEOFFAXISAPERTUREON
(keywords)
Set the surface to be an Add-on Composite
Syntax:
COMPOSITEON surf
Discussion:
Checks the Composite property option “Composite Surface: Add sag to the next surface” to
make the surface an Add-on composite.
COMPOSITEOFF (keywords)
Ansys Zemax OpticStudio 2023 R2 The Programming Tab 2095
Avoid the surface to be an Add-on Composite
Syntax:
COMPOSITEOFF surf
Discussion:
Unchecks the Composite property option “Composite Surface: Add sag to the next surface” to
avoid the surface being an Add-on composite.
COMPOSITEON (keywords)
Set the surface to be an Add-on Composite
Syntax:
COMPOSITEON surf
Discussion:
Checks the Composite property option “Composite Surface: Add sag to the next surface” to
make the surface an Add-on composite.
CLOSE
Closes a file previously opened by the OPEN command.
Syntax:
CLOSE
Discussion:
CLOSEWINDOW
Suppresses the display of the default output window. This keyword can also be used to close
any open analysis windows.
Syntax:
CLOSEWINDOW
CLOSEWINDOW n
CLOSEWINDOW (with no argument "n" provided) is used to run the ZPL macro in "quiet"
mode. The text window normally displayed at the end of the macro execution will not be
displayed if the CLOSEWINDOW keyword is included at any line in the macro. CLOSEWINDOW
has no other effect on macro execution.
CLOSEWINDOW (with an integer argument "n" provided) will close analysis window number n.
Discussion:
The value n must evaluate to an integer corresponding to the desired color. The new pen color
will be used for all subsequent line and text commands in graphics mode. Black is color 0, the
other colors are as defined in “Colors 1-12, Colors 13-24”. There are 24 colors other than black
available.
COMMAND
Executes a shell command.
Syntax:
COMMAND executable, arguments
Discussion:
The values executable and arguments are either string literals or string variables. The value of
executable is the name (including folder path) to the executable to run. The value of
arguments is optional, and includes any command line arguments to the executable.
Once the command is launched, the executable runs in its own thread. This command does not
cause the ZPL macro or OpticStudio to “wait” until the executable completes its task. No error
codes are returned, and OpticStudio has no way of knowing if the shell command was
launched successfully.
CONI
For setting surface properties use the “SETSURFACEPROPERTY, SURP” keyword, and for getting
surface properties use the SPRO(surf, code) Numeric Function as discussed under Numeric
Functions.
CONVERTFILEFORMAT
Converts a text file from ANSI to Unicode format or from Unicode to ANSI format.
Syntax:
CONVERTFILEFORMAT filename, encoding
Discussion:
Filename is the name of the text file to convert. Encoding is 1 to convert the file from Unicode
to ANSI, or 2 to convert ANSI to Unicode. Note converting a Unicode file into ANSI may cause
the loss of data, if any of the characters have no ANSI equivalent.
To convert the file, first close the file (for example using OUTPUT SCREEN) and then use the
CONVERTFILEFORMAT keyword.
CONVERTIMAGETOGRID
CONVERTIMAGETOGRID Converts monochromatic image files (.BMP, .JPG, .TIFF, .PNG, etc) to
.DAT files that can be used with the Grid Phase surface. For RGB images, the R channel is used
for the conversion. Performs the Bitmap Image to OpticStudio DAT feature from within a
macro.
Syntax:
CONVERTIMAGETOGRID filename, delta x, delta y, unit flag, offset x,
offset y
The filename is the full path of the file to be converted. Delta x and delta y are the width and
height between pixels in units specified by the unit flag. The unit flag is 0 for millimeters, 1 for
centimeters, 2 for inches, and 3 for meters. Offset x and offset y may be used to decenter the
image.
Example:
A$ = “C:\pictures\opticstudio.bmp”
CONVERTIMAGETOGRID A$, 0.1, 0.1, 0, 0, 0
COPYFILE
COPYFILE is used to make a copy of a file.
Syntax:
COPYFILE sourcefilename, newfilename
Discussion:
This keyword requires two file names, defined as literal string expressions in quotes or as string
variables. The file sourcefilename is copied into the new file newfilename. If newfilename
already exists it is overwritten without warning.
Example:
COPYFILE "C:\source.dat", "C:\copy.dat"
Related Keywords:
DELETEFILE
RENAMEFILE
CURV
For setting surface properties use the “SETSURFACEPROPERTY, SURP” keyword, and for getting
surface properties use the SPRO(surf, code) Numeric Function as discussed under Numeric
Functions.
DEFAULTMERIT
Generates a default merit function.
Syntax:
DEFAULTMERIT type, data, reference, method, rings, arms, grid,
delete, axial, lateral, start, xweight, oweight, pup_obsc
Discussion:
This keyword generates a default merit function in the Merit Function Editor. Any existing
default merit function will be deleted. For details see “Modifying the merit function”. The
values are as follows:
data: use 0 for wavefront, 1 for spot radius, 2 for spot x, 3 for spot y, 4 for spot x + y. reference:
use 0 for centroid, 1 for chief, 2 for unreferenced.
arms: the number of radial arms (Gaussian quadrature only). The number of arms must be
even and no less than 6.
grid: the size of the grid. Use an integer, such as 8, for an 8 x 8 grid. n must be even and no less
than 4. delete: use 0 to not delete vignetted rays, 1 to delete vignetted rays.
axial: use -1 for automatic, which will use symmetry only if the system is axial symmetric. Use 1
to assume axial symmetry, 0 to not assume axial symmetry.
start: use -1 for automatic, which will add the default merit function after any existing DMFS
operand. Otherwise use the operand number at which to add the default merit function. Any
existing operands above the specified operand number will be retained.
DELETE
Deletes a surface from the spreadsheet.
Syntax:
DELETE n
Discussion:
Example:
DELETE 5
DELETE i+2*j
DELETECONFIG (keywords)
DELETECONFIG deletes an existing configuration in the multi-configuration editor.
Syntax:
DELETECONFIG config
Discussion:
The value config must evaluate to an integer expression greater than 0 and less than or equal
to the current number of configurations. See also INSERTCONFIG and DELETEMCO.
DELETEFILE
DELETEFILE is used to delete a file.
Discussion:
This keyword requires a file names, defined as literal string expression in quotes or as a string
variable.
Example:
DELETEFILE XFILE$
Related Keywords:
COPYFILE RENAMEFILE
DELETEMCO (keywords)
DELETEMCO deletes an existing operand in the multi-configuration editor.
Syntax:
DELETEMCO row
Discussion:
The value row must evaluate to an integer expression greater than 0 and less than or equal to
the current number of operands. See also INSERTMCO and DELETECONFIG.
DELETEMFO (keywords)
DELETEMFO deletes an existing operand in the merit function editor.
Syntax:
DELETEMFO row
DELETEMFO ALL
The value row must evaluate to an integer expression greater than 0 and less than or equal to
the current number of operands. If the ALL argument is used all operands are deleted. See also
INSERTMFO.
DELETEOBJECT (keywords)
Deletes an existing NSC object.
Syntax:
DELETEOBJECT surf, object
Discussion:
The value surf must evaluate to an integer expression, and the specified surface must be a
non-sequential component surface. Use a surf value of 1 if the program mode is non-
sequential. The value object must evaluate to an integer that is between 1 and the current
number of objects plus 1, inclusive. The specified object will be deleted, renumbering other
objects as required. See also INSERTOBJECT and SETNSCPROPERTY.
Example:
DELETEOBJECT 1, 1
DELETETOL
DELETETOL deletes an existing operand in the tolerance data editor.
Syntax:
DELETETOL row
Discussion:
EDVA
For setting surface extra data properties use the topicSETSURFACEPROPERTY, SURP keyword,
and for getting surface extra data properties use the topic“GETEXTRADATA.
END
See GOSUB.
EXPORTBMP
Exports any graphic window as a BMP file.
Syntax:
EXPORTBMP winnum, filename, timeout
Discussion:
The winnum value may be either an integer or an expression that evaluates to an integer. The
integer winnum corresponds to the graphic window number that should be saved to a file.
OpticStudio numbers windows sequentially as they are opened, starting with 1. Any closed
windows are deleted from the window list, without renumbering the windows which remain.
Any windows opened after another window has been closed will use the lowest window
number available. The filename should be the full file name including the path, but with no
extension. OpticStudio will automatically add the BMP extension. The optional timeout
parameter specifies a time timeout in milliseconds. For some complex graphics, a timeout is
required to allowed the graphic to be completely redrawn and the screen capture to complete.
If the BMP files appear incomplete, try a timeout value of 500 - 2500 milliseconds. See also
EXPORTJPG.
Example:
EXPORTCAD (keywords)
Exports lens data as an IGES, STEP, SAT, or STL file for import into CAD programs.
Syntax:
EXPORTCAD filename
Discussion:
That tool is described in The File Tab > Export Group > CAD Files.
The filename can be a literal string, such as “C:\DATA\FILE.IGS” or a string variable name, such
as MYFILENAME$. There are many other parameters required to define the export. These other
data are placed in the vector 1 variable as follows:
VEC1(1): The file type. Use 0 for IGES, 1 for STEP, 2 for SAT, 3 for STL.
VEC1(2): The number of spline points to use (if required on certain entity types). Use 16, 32, 64,
128, 256, or 512.
VEC1(3): The First surface to export. In NSC Mode, this is the first object to export.
VEC1(4): The last surface to export. In NSC Mode, this is the last object to export.
VEC1(9): Ray pattern. Use 0 for XY, 1 for X, 2 for Y, 3 for ring, 4 for list, 5 for none, 6 for grid, and
7 for solid beams.
VEC1(17): Use 1 to use polarization when tracing NSC rays, otherwise use 0. Polarization is
automatically selected if splitting is specified.
VEC1(18): Use 0 for the current configuration, 1 to n for a specific configuration where n is the
total number of configurations, n+1 to export “All By File”, n+2 to export “All By Layer”, and
n+3 for “All At Once”. For a more detailed explanation of the configuration setting, see “Export
CAD File”.
VEC1(19): Tolerance setting. Use 0 for 1.0E-4, 1 for 1.0E-5, 2 for 1.0E-6, and 3 for 1.0E-7. Note
that if any other value is entered it will default to 1E-4.
Example:
VEC1(1) = 0
VEC1(2) = 32
VEC1(3) = 1
etc...
VEC1(18) = 0
EXPORTCAD "C:\TEMP\MYCADFILE.IGS"
EXPORTJPG
Exports any graphic window as a JPG file.
Syntax:
EXPORTJPG winnum, filename, timeout
Discussion:
See “EXPORTBMP”.
Example:
EXPORTJPG 3, "C:\TEMP\MYJPGFILE"
EXPORTJPG k, FILENAME$, 500
Syntax:
FINDFILE TEMPNAME$, FILTER$
Discussion:
This keyword requires two expressions, one to specify the string variable name to store the file
name in, and another string variable which contains a "filter" string. The filter string usually
specifies a path name and wildcards appropriate to the desired file type. See the example
below.
FINDFILE is useful for listing all files of a certain type in a folder, or for analyzing large numbers
of similar lens files. To reset FINDFILE back to the first file of any type, just call FINDFILE with a
different filter, then call FINDFILE again with the original filter name. Each time FINDFILE is
called with a new filter, it resets back to the first file that meets the filter specifications.
Example:
FILTER$ = "C:\Zemax\*.ZMX"
PRINT "Listing of all Zemax files in ", FILTER$
FINDFILE TEMPFILE$, FILTER$
LABEL 1
if (SLEN(TEMPFILE$))
PRINT TEMPFILE$
FINDFILE TEMPFILE$, FILTER$
GOTO 1
ENDIF
PRINT "No more files."
Syntax:
FOR variable, start_value, stop_value, increment commands...
NEXT
Discussion:
The keyword FOR marks the beginning of a group of commands to be executed a multiple
number of times. FOR requires a variable to be specified which acts as a counter (it need not be
an integer), a starting value for the counter, a stop value, and an increment. The NEXT keyword
marks the end of the group of commands. FOR- NEXT loops may be nested. The number of
FOR and NEXT commands must be the same.
Upon reaching a FOR command, the expressions for the start, stop, and increment values are
evaluated and saved. The stop and increment values are not evaluated again, even if the
expressions defining the values consist of variables whose values change within the program
block. Only the values valid at the beginning of the FOR loop are used.
If the start value and stop value are the same, the loop executes exactly once.
If the start value is less than the stop value, then the loop continues until the counter variable is
greater than the stop value.
If the start value is greater than stop value, then the loop continues until the counter variable is
less than the stop value.
Note that only integral values can be reliably represented exactly using computer floating
point math, so comparing two floating point values for equality is not advised. Rather than
using floating point ranges in loops, it is advised that the loop is conducted over an integer
range and then converted from the index to the actual value of interest. More information on
the accuracy of floating point arithmetic can be found in this helpful Wikipedia article:
https://en.wikipedia.org/wiki/Floating-point_arithmetic#Accuracy_problems
Example:
j = 5
k = 0
FOR i, j, j + 5, 2
k = i + j + k
NEXT
FORMAT
Specifies the numerical precision format for subsequent PRINT and $STR commands.
Syntax:
FORMAT m.n
FORMAT m.n EXP
FORMAT m [INT]
FORMAT "C_format_string" [LIT]
Discussion:
The integers m and n are separated by a decimal point. The values for m and n used must be
explicit, i.e. values stored as variables cannot be used. The value m refers to the total number
of characters to be printed, even though some of them may be blank. The value n refers to the
number of places to display after the decimal point. Therefore, FORMAT 8.4 will cause
subsequent PRINT commands to print 8 characters, with 4 numbers after the decimal point.
FORMAT .5 will cause PRINT to show 5 decimal places, and as many total places as needed.
FORMAT only affects numeric output from PRINT. If a number is too large to fit within the m
decimal places, then the m portion of the FORMAT command will be ignored.
The optional keyword EXP after the m.n expression indicates exponential notation should be
used.
The optional keyword INT indicates the value should be first converted to an integer and
printed in integer format using the number of places specified by m.
The optional keyword LIT (for literal) indicates the value should be printed according to the “C”
language format specifier. The C format specification can be found in any programming
reference for the C language.
Example:
The macro:
FORMAT 6 INT : 5
FTYP
For setting the field type use the SETSYSTEMPROPERTY, SYSP keyword, and for getting the
data use the the SYPR(code) Numeric Function as discussed under “Numeric Functions.
GCRS
For setting the system property use the SETSYSTEMPROPERTY, SYSP keyword, and for getting
the data use the the SYPR(code) Numeric Function as discussed under Numeric Functions.
GDATE
GDATE will place the current date under the lens name in the text box on user defined graphics
screens.
Syntax:
GDATE
GDATE is primarily used for making graphics generated by ZPL macros look like other
OpticStudio graphics.
Example:
See “GRAPHICS”.
GETDENCUSER1D
Calculates diffraction encircled energy data from a Huygens PSF text file and places the data in
one of the vector arrays (either VEC1, VEC2, VEC3, or VEC4).
Syntax:
GETDENCUSER1D wave, pupil_samp, PSFFile$, vector
Discussion:
Wave is an integer corresponding to the wavelength number to use for the calculation. A value
of zero indicates a polychromatic calculation. Pupil_samp may be 1 (32 x 32), 2 (64 x 64), 3 (128
x 128), etc... up to 2048 x 2048. PSFFile$ is a string containing the file name and path of the text
file containing the Huygens PSF data to use. The vector argument must be an integer value
between 1 and 4, and specifies which vector array the data should be placed in. If any of the
arguments fall outside the valid ranges, then the nearest acceptable value is used instead. This
calculation uses the Huygens MTF method.
*Note that TXT File Encoding (set under OpticStudio Preferences > General) must be set to
ANSI to use this keyword.
Example:
PSFFile$ = "C:\Users\Name\Documents\Zemax\PSF.txt"
PSFFile$ = "C:\Users\Name\Documents\Zemax\PSF.txt"
SettingsFile$ = "C:\Users\Name\Documents\Zemax\Configs\HPS.CFG"
wave = 3
pupil_samp = 4
image_samp = 3
vector = 4
OUTPUT SCREEN
FORMAT 15.0
PRINT "Number of Bins = ", N_BINS
FORMAT 15.0
PRINT "Offset = ", OFFSET
OFF1 = OFFSET
OFF2 = OFF1 + N_BINS
MAXI = N_BINS-1
FORMAT 16.6
PRINT
PRINT " Radial Distance Energy"
PRINT
FOR i, 0, MAXI, 1
PRINT vec4(OFF1 + i),
PRINT vec4(OFF2 + i)
NEXT i
GETEXTRADATA
Retrieves the extra data values loaded into the lens data editor. The data is placed in one of the
vector array variables (either VEC1, VEC2, VEC3, or VEC4).
Syntax:
GETEXTRADATA vector_expression, surface_expression
Discussion:
GETGLASSDATA
Retrieves the data for any glass in the current catalogs. The data is placed in one of the vector
array variables (either VEC1, VEC2, VEC3, or VEC4).
Syntax:
GETGLASSDATA vector_expression, glass_number
Discussion:
The data is stored in the specified VECn array variable. For example, if the command
GETGLASSDATA 1, 32 is issued, the data for glass number 32 will be placed in VEC1. The glass
number is returned by the GNUM function. The data is stored in the following format, where
the first number in each line refers to the array position:
3: Nd
7: Density in g/cm^3
9: Lambda min
23-(22 + #waves): Internal transmission coefficient (per mm) alpha, T = exp(- alpha * path). The
alpha for wavelength 1 is stored in 23, wavelength 2 is in 24, etc., up to the number of
wavelengths used by the system.
(23 + #waves) - (32 + #waves): Constants of dispersion A0-A9 (meaning depends upon
formula)
Related Functions:
GNUM
GETLSF
Calculates the geometric edge and line response functions, similar to the “Geometric
Line/Edge Spread”.
Syntax:
GETLSF wave, field, sampling, vector, maxradius, use_polarization
Discussion:
Wave is an integer corresponding to the wavelength number to use for the calculation. A value
of zero indicates a polychromatic calculation. Field must be an integer between 1 and the
The data is returned as an array of values in the specified vector. Vector position 0-3 will hold
the number of points "N", the starting x coordinate (this is the negative of the half width of the
data range), the delta coordinate, and the offset (defined below), respectively. The offset is the
first position in the vector that holds the edge or line spread data. Starting at the offset, the
first N value are the tangential LSF response. The next N values are the sagittal LSF response.
The tangential and sagittal ERF values are in the next two groups of N data values.
If the current vector size is not large enough, OpticStudio will automatically increase the size of
the vectors to hold the LSF data in the manner described in SETVECSIZE.
Example:
! Macro computes and prints the LSF and ERF for polychromatic light
at field 1.
!
! Syntax is GETLSF wave, field, samp, vector, maxradius, usepol
!
GETLSF 0, 1, 3, 1, 0, 0
N_BINS = vec1(0)
STARTX = vec1(1)
DELTAX = vec1(2)
OFFSET = vec1(3)
FORMAT 15.0
PRINT "Number of Bins = ", N_BINS
FORMAT 15.3 EXP
PRINT "Starting Coordinate = ", STARTX
PRINT "Delta Coordinate = ", DELTAX
FORMAT 15.0
PRINT "Offset = ", OFFSET
OFF1 = OFFSET
OFF2 = OFF1 + N_BINS
OFF3 = OFF2 + N_BINS
OFF4 = OFF3 + N_BINS
MAXI = N_BINS-1
FOR i, 0, MAXI, 1
PRINT STARTX + DELTAX*i,
PRINT vec1(OFF1 + i),
PRINT vec1(OFF2 + i),
PRINT vec1(OFF3 + i),
PRINT vec1(OFF4 + i)
NEXT i
GETMTF
Calculates tangential and sagittal MTF, real part, imaginary part, phase, or square wave
response data for the currently loaded lens file, and places the data in one of the vector arrays
(either VEC1, VEC2, VEC3, or VEC4).
Syntax:
GETMTF freq, wave, field, sampling, vector, type
Discussion:
l The freq argument is the desired spatial frequency in MTF Units (see “MTF Units”). If the
frequency is less than zero, or greater than the cutoff frequency, GETMTF returns zero.
l Wave is an integer corresponding to the wavelength number to use for the calculation.
A value of zero indicates a polychromatic calculation.
l Field must be an integer between 1 and the maximum number of fields. The value indic-
ates which field position to use.
l Sampling may be 1 (32 x 32), 2 (64 x 64), 3 (128 x 128), etc... up to 2048 x 2048.
l The vector argument must be an integer value between 1 and 4, and specifies which
vector array the data should be placed in.
l The type argument refers to the data type:
o 1 for MTF,
o 2 for real part,
o 3 for imaginary part,
o 4 for phase in radians,
o 5 for square wave MTF.
This calculation uses a fast, sparse sampling integration method to compute the MTF, i.e. at the
given point the MTF value is calculated as the autocorrelation of the complex pupil function
(the complex wavefront in the exit pupil). The fast sampling method used by GETMTF is not
directly related to the MTF Analysis feature. Because only a single spatial frequency is required,
the method of computation used by GETMTF is different, and generally much faster, than the
algorithm used by the analysis feature (see also MTFA operand Grid parameter).
The data is returned in one of the vector arrays with the following format:
Example:
GETMTFUSER1D
Calculates tangential and sagittal MTF data from a Huygens PSF text file and places the data in
one of the vector arrays (either VEC1, VEC2, VEC3, or VEC4).
Syntax:
GETMTFUSER1D wave, pupil_samp, idelta, PSFFile$, vector
Discussion:
Wave is an integer corresponding to the wavelength number to use for the calculation. A value
of zero indicates a polychromatic calculation. Pupil_samp may be 1 (32 x 32), 2 (64 x 64), 3 (128
x 128), etc... up to 2048 x 2048. Idelta is the distance in micrometers between points in the
image grid. Use zero for the default grid spacing. PSFFile$ is a string containing the file name
and path of the text file containing the Huygens PSF data to use. The vector argument must be
Note that TXT File Encoding (set under OpticStudio Preferences > General) must be set to
ANSI to use this keyword. To convert existing text files to the right format, use the keyword
CONVERTFILEFORMAT.
Note that you should close any active Huygens PSF files created with the OUTPUT keyword by
using OUTPUT SCREEN prior to calling GETMTFUSER1D.
Example:
PSFFile$ = "C:\Users\Name\Documents\Zemax\PSF.txt"
SettingsFile$ = "C:\Users\Name\Documents\Zemax\Configs\HPS.CFG"
wave = 3
pupil_samp = 4
idelta = 0.008366
vector = 4
OUTPUT SCREEN
FORMAT 15.0
PRINT "Number of Bins = ", N_BINS
FORMAT 15.0
PRINT "Offset = ", OFFSET
OFF1 = OFFSET
OFF2 = OFF1 + N_BINS
OFF3 = OFF2 + N_BINS
MAXI = N_BINS-1
FORMAT 16.6
PRINT
FOR i, 0, MAXI, 1
PRINT vec4(OFF1 + i),
PRINT vec4(OFF2 + i),
PRINT vec4(OFF3 + i)
NEXT i
GETNSCMTF
Calculate the X and Y direction geometric MTF in the non-sequential mode based on the spot
diagram on Detector Rectangular.
Syntax:
GETNSCMTF freq, surface, object
Discussion:
The freq argument is designed for spatial frequency in MTF Units (see “MTF Units”). If the
frequency is less than zero, GETNSCMTF uses its absolute value. The Surface argument allows
the feature to be used in a sequential and non-sequential mixed mode. For a pure non-
sequential mode system, the Surface number should be always set to 1. The Object argument
points to the detector on which the MTF is calculated. It should be set to a Detector Rectangle
only. This calculation uses the Geometric MTF method, which does a Fourier transform of the
Spot Diagram on the Detector Rectangle.
The data is returned in first vector arrays, vec1(), with the following format: Vector position 0: X
direction; Vector position 1: Y direction. See VEC1, VEC2, VEC3, VEC4 for more information on
how to use vector arrays.
Example:
! This macro computes the X & Y direction NSC MTF at 50 lp/mm
! at object 10 – Detector Rectangular
GETPSF
Calculates the diffraction point spread function (PSF) using the FFT algorithm and places the
data in one of the vector arrays (either VEC1, VEC2, VEC3, or VEC4).
Syntax:
GETPSF wave, field, sampling, vector, unnormalized, phaseflag,
imagedelta
Discussion:
l Wave is an integer corresponding to the wavelength number to use for the calculation.
A value of zero indicates a polychromatic calculation.
l Field must be an integer between 1 and the maximum number of fields. The value indic-
ates which field position to use.
l Sampling may be 1 (32 x 32), 2 (64 x 64), 3 (128 x 128), etc... up to 2048 x 2048.
l The vector argument must be an integer value between 1 and 4, and specifies which
vector array the data should be placed in.
l The unnormalized flag is zero if the data should be normalized to a peak of 1.0, if the
unnormalized value is 1, then the data is returned unnormalized.
l If phase flag is zero, the data returned is intensity.
If phase flag is 1, then the phase in degrees is returned.
If phase flag is 2, the data returned is the real part of the PSF.
If phase flag is 3, the data returned is the imaginary part of the PSF.
l The imagedelta value is the spacing between PSF points in micrometers; use zero for
the default spacing. The wavelength must be monochromatic to compute phase data.
If any of the arguments fall outside the valid ranges, then the nearest acceptable value
is used instead.
The data is returned in one of the vector arrays with the following format:
Vector position 0: the total number of PSF data points in the vector array. Usually, this number
will be 4*n*n where n is the sampling size (32, 64, etc.). For example, if the sampling density is
2, the pupil sampling will be 64 x 64, and there will be 128 x 128 or 16,384 values in the array.
This will require 8 bytes per number, or a total of 131 kb. A sampling density of 1024 will
require at least 8 Mb just for the array; another 64 Mb or more to compute the PSF. Position 0
Vector position 1 through 4*n*n holds the PSF data intensity. The first 2n values are the first
row, going left to right from -x to +x, then each subsequent block of 2n values is another row,
going from -y to +y. Vector position 4*n*n+1 holds the spacing between data values in
micrometers.
Example:
! This macro computes the PSF
! for the currently loaded lens, polychromatic,
! at the first field,
! and a 32x32 grid density (sampling = 1),
! data will be placed in vector 1,
! normalized to 1,
! no phase data,
! default image delta.
SETVECSIZE 4500
GETPSF 0, 1, 1, 1, 0, 0, 0
np = vec1(0)
IF (np == 0)
PRINT "PSF Computation aborted."
GOTO 1
ENDIF
IF (np == -1)
PRINT "SETVECSIZE too small for PSF data."
GOTO 1
ENDIF
IF (np == -2)
PRINT "Not enough system RAM for PSF data."
GOTO 1
ENDIF
PRINT "There are ", np, " data points, spaced ", vec1(np+1), "
micrometers apart".
LABEL 1
GETSYSTEMDATA
Syntax:
GETSYSTEMDATA vector_expression
Discussion:
The data is stored in the specified VECn array variable. For example, if the command
GETSYSTEMDATA 1 is issued, the system data will be placed in VEC1. See also
SETSYSTEMPROPERTY.
The data is stored in the following format, where the first number in each line refers to the
array position:
1: Aperture Value
2: Apodization Factor
19: Ray Aiming (0 for off, 1 for paraxial, and 2 for real)
GETTEXTFILE (keywords)
Creates a text file from any OpticStudio analysis window that supports text.
Syntax:
GETTEXTFILE textfilename, type, settingsfilename, flag
Discussion:
The textfilename must be in quotes, or be a string variable name, and include the full path,
name, and extension for the file to be created. The string function $TEMPFILENAME can be
used to define a suitable temporary file name. Temporary files created with the
The type argument is a 3 character string code that indicates the type of analysis to be
performed. For the full list of string codes, see the “String Codes” section of the The
Programming Tab. If no type is provided or recognized, a standard ray trace will be generated.
If a valid file name in quotes or a string variable name is used for the settingsfilename
argument, OpticStudio will use or save the settings used to compute the text file, depending
upon the value of the flag parameter.
If the flag value is 0, then the default settings will be used. If the lens file has it’s own default
settings, then those will be used; these are the settings stored in the “lensfilename.cfg” file. If
no lens specific default settings exist, then the default settings for all OpticStudio files, stored
in the file “OpticStudio.CFG” will be used, if any. If no previous settings have been saved for
this or any other lens, then the default settings used are the “factory” defaults used by
OpticStudio.
If the flag value is 1, then the settings provided in the settings file, if valid, will be used to
generate the file. If the data in the settings file is in anyway invalid, then the default settings
will be used to generate the file. The only valid settings files are those generated by
OpticStudio, then renamed and saved to a new user defined file name. For example, on the
Spot Diagram settings dialog, pressing “Save” will generate a “SPT.CFG” file with the saved
settings. If this file is renamed to “MySPT.CFG”, then the file, with a full path, may be used as
the settingsfilename argument to GetTextFile.
No matter what the flag value is, if a valid file name is provided for the settingsfilename, the
settings used will be written to the settings file, overwriting any data in the file. To modify the
settings defined within an existing settings file, use MODIFYSETTINGS.
Example:
! Macro sample to generate cardinal points in a file.
! Get a temporary file name
A$ = $TEMPFILENAME()
! Compute the data and place in the temp file
GETTEXTFILE A$, Car
! Open the new file and print it out
OPEN A$
LABEL 1
READSTRING B$
IF (EOFF()) THEN GOTO 2
PRINT B$
GOTO 1
LABEL 2
GETVARDATA
Retrieves the current number, type, and value of all optimization variables. The data is placed
in one of the vector array variables (either VEC1, VEC2, VEC3, or VEC4).
Syntax:
GETVARDATA vector
Discussion:
The data is stored in the specified VECn array variable. For example, if the command
GETVARDATA 1 is issued, the data will be stored in VEC1. The data is stored in the following
format, where the first number in each line refers to the array position:
etc...
The integer q goes from 1 to n, where n is the number of variables. If n is zero, then no valid
data is returned. The value of the number in array position zero, n, is always valid. The type
codes for variables is as described in the following table. The surface number, parameter
GETZERNIKE
Calculates Zernike Fringe, Standard, or Annular coefficients in units of waves for the currently
loaded lens file, and places them in one of the vector arrays (either VEC1, VEC2, VEC3, or VEC4).
Syntax:
GETZERNIKE maxorder, wave, field, sampling, vector, zerntype,
epsilon, reference
Discussion:
The data is returned in one of the vector arrays with the following format: Vector position 1:
Peak to valley to the chief ray in waves; Vector position 2: RMS to the zero OPD line in waves
(this value is not physically meaningful but is provided for reference); Vector position 3: RMS to
the chief ray in waves; Vector position 4: RMS to the image centroid in waves (this is the most
physically meaningful number related to image quality); Vector position 5: Variance in waves;
Vector position 6: Strehl ratio; Vector position 7: RMS fit error in waves; Vector position 8:
Maximum fit error (at any one point) in waves. The remaining vector positions contain the
actual Zernike coefficient data. For example, Zernike term number 1 is in vector position 9,
Zernike term 2 is in position 10, and so on.
Example:
! This macro computes the first 37 Zernike Fringe coefficients
! for the currently loaded lens, at wave 1, field 1
! and a 32x32 grid density (sampling = 1). The coefficients
! will be placed in vector 1. First get the data:
GETZERNIKE 37,1,1,1,1,0
! Now print it out:
FORMAT 16.6
PRINT "Peak to Valley : ", vec1(1)
PRINT "RMS to chief : ", vec1(3)
PRINT "RMS to centroid : ", vec1(4)
PRINT "Variance : ", vec1(5)
PRINT "Strehl ratio : ", vec1(6)
PRINT "RMS Fit Error : ", vec1(7)
PRINT "Maximum Fit Error : ", vec1(8)
i = 1
label 1
FORMAT 2.0
PRINT "Zernike #", i, " = ",
FORMAT 16.6
PRINT vec1(8+i)
i = i + 1
GLAS
For setting glass properties use the “SETSURFACEPROPERTY, SURP” keyword, and for getting
glass properties use the $GLASS(i) String Function as discussed under String Function.
GLASSTEMPLATE
GLASSTEMPLATE sets data on the Glass Substitution Template.
Syntax:
GLASSTEMPLATE code, data
Discussion:
For checkbox values, code is 0 for Use Glass Substitution Template, 1 for Exclude Glasses With
Incomplete Data, 11 for Standard, 12 for Preferred, 13 for Obsolete, 14 for Special, and 21-26
for Use Relative Cost, CR, FR, SR, AR, and PR, respectively. The checkbox will be unchecked if
the value of data is zero. Any non-zero value will check the checkbox.
For numerical values, code is 31-36 for Relative Cost, CR, FR, SR, AR, and PR, respectively.
Related Function:
GTEM
GLENSNAME
GLENSNAME will place the current lens name at the top left corner of the text box on user
defined graphics screens.
Discussion:
GLENSNAME is primarily used for making your graphics look like other OpticStudio graphics.
Example:
GLOBALTOLOCAL (keywords)
Converts coordinate breaks from global to local references.
Syntax:
GLOBALTOLOCAL surf1, surf2, direction
Discussion:
GLOBALTOLOCAL concatenates all adjacent coordinate breaks into single coordinate breaks.
Surf1 and surf2 define the surface range. Direction is 0 for forward, 1 for reverse coordinate
breaks.
Syntax:
Discussion:
There can be no more than 100 defined subroutines per ZPL macro file. Each subroutine must
be terminated by a RETURN command. More than one return command may be placed in the
body of a subroutine. If subroutines are defined, at least one END command must be used to
indicate the end of the main macro body. The main macro body must be at the top of the file.
There can be no more than 100 "nesting levels" used in the ZPL macro. For example, if
subroutine ABC calls subroutine XYZ, then the nesting level is 2. If subroutine XYZ then calls
subroutine DEF, the nesting level is 3.
All variables in ZPL are global. Any variables used or defined within a subroutine exist within
the main macro as well.
Example:
x = 1 y = 2
GOSUB add
print "the sum of ", x, " and ", y, " is ", z
END
SUB add
z = x + y
RETURN
GOTO
Normally, each macro line is executed in turn. GOTO allows execution to resume at an arbitrary
point in the macro. GOTO is always used in conjunction with the LABEL command.
Syntax:
GOTO label_number
GOTO text_label
Example:
LABEL 1
x = RAND(10)
if x <= 5 THEN GOTO 1
PRINT " X is greater than 5 "
GRAPHICS (keywords)
Creates a standard OpticStudio graphics frame with ruling lines for the plot title.
Syntax:
GRAPHICS
GRAPHICS NOFRAME
GRAPHICS OFF
Discussion:
If GRAPHICS is specified alone, then a standard OpticStudio graphics window will be created. If
the optional argument NOFRAME is supplied, then the standard frame for the graph title will
be suppressed. All subsequent graphics commands will be sent to this newly created window.
GRAPHICS OFF will close any existing open graphics windows, and then display the closed
window.
Example:
Graphics
xmx = xmax()
xmn = xmin()
ymx = ymax()
ymn = ymin()
xwidth = xmx-xmn
ywidth = ymx-ymn
line xleft,ytopp,xrigh,ytopp
line xrigh,ytopp,xrigh,ybott
line xrigh,ybott,xleft,ybott
line xleft,ybott,xleft,ytopp
Related Keywords:
GTEXT
GTEXT is used for labeling graphics plots with user defined text.
Syntax:
GTEXT x, y, angle, user_text
GTEXT x, y, angle, A$
Discussion:
The coordinates x and y refer to the left edge of where the text string user_text will appear.
"user_text" may be either a constant string in quotes or a string variable name. Angle specifies
how the text is rotated with respect to the graphics frame, and defaults to 0 degrees
(horizontal). See also SETTEXTSIZE.
Example:
See “GRAPHICS”.
GTEXTCENT
Ansys Zemax OpticStudio 2023 R2 The Programming Tab 2132
GTEXTCENT is used for centering labels on graphics plots with user defined text.
Syntax:
GTEXTCENT y, user_text
Discussion:
The coordinate y refers to the vertical position of the text string user_text. See also
SETTEXTSIZE.
Example:
See “GRAPHICS”.
GTITLE
GTITLE is similar to GTEXT except only the text needs to be specified, and the text will appear
centered in the title bar on the graphics display. GTITLE is useful for making ZPL graphics
functions look like standard OpticStudio graphics.
Syntax:
GTITLE user_title
Example:
See “GRAPHICS”.
HAMMER (keywords)
Invokes the Hammer optimization algorithm to optimize the current lens with the current merit
function.
Syntax:
HAMMER
HAMMER number_of_cycles
HAMMER number_of_cycles, algorithm
If no argument is provided, then the Hammer Optimization runs 1 cycle using Damped Least
Squares. If an argument is provided, it must evaluate to an integer between 1 and 99, and the
Hammer optimization algorithm will run the specified number of cycles. For the algorithm
argument, use 0 for Damped Least Squares (the default) and 1 for Orthogonal Descent. For
more information see “Performing an optimization”.
Related Functions:
MFCN
Example:
PRINT "Starting merit function:", MFCN()
HAMMER 3
PRINT "Ending merit function :", MFCN()
IF-THEN-ELSE-ENDIF
IF provides conditional macro execution and branching.
Syntax:
IF (expression)
(commands)
ELSE (commands)
ENDIF
or
IF (expression) THEN (command)
Discussion:
The IF-ELSE-ENDIF construction is used for conditional execution of either the group of
commands following the IF command or the commands following the ELSE command, but not
both. The value of expression is considered false if it is zero, otherwise it is considered true. The
expression can be any valid ZPL expression, composed of functions, variables, operands, and
constants. The IF command must be paired with an ENDIF, although the ELSE is optional. IF-
ENDIF pairs may be nested to any level.
Example:
x = 1
y = 2
if (x < y)
PRINT "x is less than y"
ELSE
if (x == y) THEN PRINT "x equals y"
if (x > y) THEN PRINT "x is greater than y"
ENDIF
IMA
Computes the Geometric Image Analysis feature and saves the result to a BIM file. For a
description of the BIM (Binary Image) format see “The BIM format”. For a description of the
Geometric Image Analysis feature see “Geometric Image Analysis”.
Syntax:
IMA outfilename, infilename
Discussion:
This keyword requires the name of the output BIM file, and optionally, the name of the input
IMA or BIM file. If the extension to the outfilename is not provided, the extension BIM will be
appended. The extension must be provided on the infilename. The filenames must be enclosed
in quotes if any blank or other special characters are used. The outfilename will be placed in
the <data>\<images> folder. The infilename must also be placed in the <data>\<images>
folder. No paths should be provided with the file names.
The settings for the Geometric Image Analysis feature will be those settings previously saved
for the current lens. To make adjustments to the settings, open a Geometric Image Analysis
window, choose the appropriate settings, then press "Save". Be certain to choose "Show As" as
anything other than "spot diagram". All subsequent calls to IMA will use the saved settings.
The exceptions are the output file name, which is specified as the first argument after the IMA
keyword, and the input source file, which is optionally specified as the second argument after
the IMA keyword.
Example:
Related Keywords:
IMASHOW, IMASUM
IMAGECOMBINE
Combines two graphic files and writes the combined graphic to a new file.
Syntax:
IMAGECOMBINE source1$, source2$, destination$, mode$
Discussion:
This keyword opens the two source graphic files, combines them to a single image, and then
writes the resulting image to the destination file. The files may be in BMP, JPG or PNG format.
Conversion between the formats is automatic and is based upon the extension provided. If the
source images have the same number of rows, they can be combined left-to-right. If the
source images have the same number of columns, they can be combined top-to-bottom. The
combination used depends upon the mode$ value. Use either “LEFTRIGHT” or “TOPBOTTOM”
for the value of mode$ to define how the images should be combined.
Example:
S1$ = "C:\TEMP\SOURCE1.JPG" S2$ = "C:\TEMP\SOURCE2.JPG"
D$ = "C:\TEMP\DESTINATION.JPG" M$ = "LEFTRIGHT"
IMAGECOMBINE S1$, S2$, D$, M$
Related Functions:
PIXX, PIXY
Related Keyword:
IMAGEEXTRACT
IMAGEEXTRACT
Syntax:
IMAGEEXTRACT source$, destination$, startx, starty, width, height
Discussion:
This keyword opens the source graphic, and extracts a rectangular portion of the file, then
writes the extracted portion to the destination file. The files may be in BMP, JPG or PNG format.
Conversion between the formats is automatic and is based upon the extension provided. The
startx and starty values are the offsets from the left side and top side respectively, in pixels. The
top row and left column start at number 1. The width and height values are the size in pixels of
the rectangular region to extract.
Example:
S$ = "C:\TEMP\SOURCE.JPG"
D$ = "C:\TEMP\DESTINATION.JPG"
IMAGEEXTRACT S$, D$, 1, 1, 20, 20
Related Functions:
PIXX, PIXY
Related Keywords:
IMAGECOMBINE
IMASHOW
Displays an IMA or BIM file in a viewer window. For a description of the IMA and BIM file
formats, see “The IMA format” and “The BIM format”.
Syntax:
IMASHOW filename.ima
Discussion:
This keyword requires the name of the IMA or BIM file. The extension must be included. The
filename may be enclosed in quotes if any blank or other special characters are used. The file
must be located in the <data>\<im- ages> folder. This command will open a new window to
display the file.
Related Keywords:
IMA, IMASUM
IMASUM
Sums the intensity in a BIM file. Despite the name of this function, currently only BIM files, and
not IMA files, may be summed. This limitation is due to the low number of grey scales that are
supported in the IMA file format. For a description of the IMA and BIM file formats, see “The
IMA format” and “The BIM format”.
Syntax:
IMASUM filename1, filename2, outfilename
Discussion:
This keyword requires the names of three BIM files (which need not be distinct). The BIM
extension must be provided on all three file names. The filenames may be enclosed in quotes if
any blank or other special characters are used. The files must be located in the
<data>\<images> folder, which is where the output file will be. The two source files must have
the same number of pixels and color channels, or an error message will result.
Example:
IMASUM "A.BIM", "B.BIM", "sum of A and B.BIM"
Related Keywords:
IMA, IMASHOW
IMPORTEXTRADATA (keywords)
Imports data into the lens data editor from a file.
Syntax:
IMPORTEXTRADATA surface, filename
The surface may be any valid surface number that uses extra data values. The filename should
include the full path. For the supported data formats,
see “Importing grid data” under the sequential surface “Grid Sag”.
INPUT
INPUT provides a means for prompting the user for numeric or text data when the macro is
run.
Syntax:
INPUT "Prompt String" , variable
INPUT variable
INPUT "Prompt String" , string_variable$
INPUT string_variable$
Discussion:
The variable may be any valid variable name. If the variable name is a string variable, then the
input will be interpreted as a literal string; otherwise, as a numeric. The INPUT command will
use a “?” prompt if no prompt string is supplied. The prompt is always displayed on the screen,
and the input always is accepted from the keyboard only. The prompt string cannot exceed
200 characters in length.
Example:
INPUT "Enter value for x:", x
PRINT "X = ", x
INPUT "Enter a value for A$:", A$
PRINT A$
INSERT
INSERT inserts a new surface in the lens data editor.
Discussion:
The value surf must evaluate to an integer expression. See also DELETE and SURFTYPE.
Example:
INSERT 5
INSERT i+2*j
INSERTCONFIG
INSERTCONFIG inserts a new configuration in the multi-configuration editor.
Syntax:
INSERTCONFIG config
Discussion:
The value config must evaluate to an integer expression greater than 0 and less than or equal
to the current number of configurations plus 1. See also DELETECONFIG and INSERTMCO.
Example:
INSERTCONFIG 4
INSERTMCO (keywords)
INSERTMCO inserts a new multi-configuration operand in the multi-configuration editor.
Syntax:
INSERTMCO row
Discussion:
The value row must evaluate to an integer expression greater than 0 and less than or equal to
the current number of operands plus 1. See also DELETEMCO and INSERTCONFIG.
INSERTMFO (keywords)
INSERTMFO inserts a new merit function operand in the merit function editor.
Syntax:
INSERTMFO row
Discussion:
The value row must evaluate to an integer expression greater than 0 and less than or equal to
the current number of operands plus 1.
Example:
INSERTMFO 23
INSERTOBJECT (keywords)
Inserts a new NSC object.
Syntax:
INSERTOBJECT surf, object
Discussion:
The value surf must evaluate to an integer expression, and the specified surface must be a
non-sequential component surface. Use a surf value of 1 if the program mode is non-
sequential. The value object must evaluate to an integer that is between 1 and the current
number of objects plus 1, inclusive. The new object will be inserted at the specified object
number, renumbering other objects as required.
INSERTTOL
INSERTTOL inserts a new operand in the tolerance data editor.
Syntax:
INSERTTOL row
Discussion:
The value row must evaluate to an integer expression greater than 0 and less than or equal to
the current number of operands plus 1. See also DELETETOL and SETTOL.
Example:
INSERTTOL 3
LABEL
LABEL provides a destination for the G"LABEL" aboveOTO command, see “GOTO” for details.
Syntax:
LABEL label_number
LABEL text_label
Discussion:
The label_number must be an integer value greater than zero, such as 1 or 7. If a text label is
used, the text label must not contain spaces or other special characters that are used as
delimiters. LABEL has no effect on program flow by itself. There is a limit of 300 label
commands in a macro.
Example:
LABEL 7
LABEL startover
Syntax:
LINE oldx, oldy, newx, newy
Discussion:
LINE will evaluate the four expressions and draw a line connecting the points defined. The
coordinates refer to the current graphics frame, and must be contained within the bounds
defined by XMIN, YMIN, XMAX, and YMAX. Although only integer pixel values can actually be
plotted, LINE will accept real values as arguments and round the coordinates to the nearest
integer equivalents. LINE is only valid in graphics mode. The color of the line drawn is
controlled by the current pen color, which is specified using the COLOR keyword.
Example:
See “GRAPHICS”.
LOADARCHIVE
Opens an existing Zemax archive (*.ZAR) file.
Syntax:
LOADARCHIVE filename, extractpath
Discussion:
The filename must include the name of the archive file including the file extension. If the
filename does not include a complete path to the archive file, the default folder for lenses is
assumed. If no extractpath is defined, the path is assumed to be the same as the filename. The
lens and session files defined in the archive file are then opened. See “Restore From Archive
File”.
LOADCATALOG
Syntax:
LOADCATALOG
Discussion:
When lenses are loaded, any associated glass catalogs and data files, including the
COATING.DAT file, are automatically loaded if they are not already loaded. However, if these
catalogs have been modified, perhaps by the ZPL macro itself; then the LOADCATALOG
keyword may be used to force a reload of the catalogs. Use of this keyword is not required
unless the COATING.DAT or glass AGF catalog files have been modified since the start of the
current Zemax session.
LOADDETECTOR (keywords)
Loads the data saved in a file to an NSC Detector Rectangle, Detector Color, Detector Polar, or
Detector Volume object.
Syntax:
LOADDETECTOR surf, object, filename
Discussion:
This keyword requires numeric expressions that specify the surface and object, and a file name
with or without a full path. Surf is the surface number of the non-sequential group; use 1 when
using non-sequential mode. Object is the object number of the detector object. The filename
may include the full path, if no path is provided the path of the current lens file is used. The
extension should be DDR, DDC, DDP, or DDV for Detector Rectangle, Color, Polar, and Volume
objects, respectively.
Related Keywords:
SAVEDETECTOR
LOADLENS
Loads a new lens file, replacing any lens file currently in memory.
Discussion:
LOADLENS will load a lens file. If the filename contains the complete path, such as
C:\MYDIR\MYLENS.ZMX, then the specified file will be loaded. If the path is left off, then the
default folder for lenses will be used (see “Folders”).
If the appendflag is greater than zero, then the file is appended to the current lens starting at
the surface specified by the value of the appendflag. The object and image surfaces of the
specified file will be ignored.
If the appendflag is less than zero, then the file is appended to the current lens starting at the
surface specified by the absolute value of the appendflag, and the object surface of the
specified file will be included. The image surface will be ignored.
The appendflag should only be used when appending one sequential system to another.
Appending non-sequential systems isn’t currently supported.
If the session flag is non-zero, any associated session file will be loaded with the lens and all
windows will be updated otherwise the lens session file is ignored.
Example:
LOADLENS "COOKE.ZMX"
Related Keywords:
SAVELENS
LOADMERIT (keywords)
Loads a merit function file, replacing the merit function in the current lens.
Syntax:
LOADMERIT "filename"
LOADMERIT file$
Discussion:
LOADTOLERANCE (keywords)
Loads a tolerance file, replacing the tolerances in the current lens.
Syntax:
LOADTOLERANCE "filename"
LOADTOLERANCE file$
Discussion:
LOADTOLERANCE will load a new tolerance file. If the filename contains the complete path,
such as C:\MYDIR\MYLENS.TOL, then the specified file will be loaded. If the path is left off, then
the <data>\Tolerance folder will be used (see “Folders”).
LOCALTOGLOBAL (keywords)
Converts coordinate breaks from local to global references.
Syntax:
LOCALTOGLOBAL surf1, surf2, reference
Discussion:
LOCALTOGLOBAL modifies all coordinate breaks into groups of 3 coordinate breaks, providing
a means to locate surfaces in global coordinates. Surf1 and surf2 define the surface range.
Reference is the reference surface number, which must precede s1. See “Local To Global”. See
also “GLOBALTOLOCAL”.
Syntax:
LOCKWINDOW winnum
Discussion:
See “Graphic windows operations”. If the winnum is zero, then all open windows are locked. If
the winnum argument is -1, then the currently executing window will lock at the end of the
macro execution.
Example:
LOCKWINDOW 7
Related Keywords:
UNLOCKWINDOW
MAKEFACETLIST
Makes an ASCI listing of the vertices of a faceted description of any importable CAD file.
Syntax:
MAKEFACETLIST infile, outfile
Discussion:
The infile is a string variable or name with the full path to a CAD format file. The outfile is a
string variable or name to the full path for the output file. The output file will be a text listing.
There are 18 lines for each triangle in the faceted description of the object. The first 6 lines are
data for vertex 1 of the first triangle in this format:
x coordinate
y coordinate
x normal vector
y normal vector
z normal vector
The next 6 values are for vertex 2, and then 6 more values for vertex 3. The 18 values together
define the first triangle. The pattern repeats for the next triangle; each represented by 18
values, until all the triangles are written.
MAKEFOLDER
Makes a folder for files.
Syntax:
MAKEFOLDER "C:\TEMP\TEST_FOLDER"
MAKEFOLDER path$
Discussion:
The new folder will be created. If the folder already exists the keyword is ignored. If the path is
invalid, an error message is issued and the macro execution will be terminated.
MODIFYSETTINGS (keywords)
Modifies data within the settings files used by GETTEXTFILE.
The settings file must be manually created prior to using MODIFYSETTING. To create a setting
file, open the analysis in OpticStudio and click Save in the settings dropdown.
Syntax:
MODIFYSETTINGS settingsfilename, type, value, windowtype
Discussion:
The settingsfilename must be in quotes, or be a string variable name, and include the full path,
name, and extension for the file to be modified.
The windowtype argument is a 3 character string code that indicates the type of analysis to
look for in a lens-specific settings file. For the full list of string codes, see the “String Codes”
section of the The Programming Tab. If windowtype is omitted, the first settings that match
the type argument will be modified; note that some type arguments may match multiple
different windows settings and, if no settings match the given type, no change will be made to
the file.
DVW_SHOW: The “Show As” setting. The meaning depends upon the type of
window displayed (Graphic or Text) and the type of detector (Detector
Rectangle, Detector Color, etc.). The value for DVW_SHOW corresponds to
the position of the desired item in the UI of the Detector Viewer window. For
example:
DVW_SCALE: The scale mode. Use 0 for linear, 1 for Log -5, 2 for Log -10, and
3 for Log - 15.
Text Window,
Graphic Window, Detector Rectangle, Summarize All
Value
Source Units: Lumens
Incoherent
0 Incoherent Illuminance
Illuminance
Coherent
1 Coherent Illuminance
Illuminance
2 Coherent Phase
3 Luminous Intensity
4 Luminance (position space)
5 Luminance (angle space)
XSE_TYPE: Type of the Data (1 = "Encircled", 2 = "X Only", 3 = "Y Only", etc.)
LSF_TYPE: Use 0-9 for X-Linear, Y-Linear, X-Log, Y-Log, X-Phase, Y-Phase, X-
Real, Y-Real, X-Imaginary, or Y-Imaginary, respectively.
PSF_ROW: The row number (if doing an X scan) or column number (if doing a
y scan). Use 0 for center.
FFA_FIELDSHAPE: The field shape, use 0 for Rectangular and 1 for Elliptical.
FFA_DISPLAY: The display mode, use 0 for Absolute, 1 for Relative, and 2 for
Average.
FFA_SHOWAS: The "Show As" setting, use 0 for Grey Scale, 1 for Inverse Grey
Scale, etc.
GBM_FIELDSIZE: The field Y size.
TFM_TYPE: The data type. Use 0 for modulation, 1 for real, 2 for imaginary, 3
for phase, or 4 for square wave.
HMF_IMAGESAMP: The image sampling. Use 1 for 32x32, 2 for 64x64, etc.
HMF_CONFIG: The configuration number. Use 0 for all, 1 for current, etc.
Huygens MTF
HMF_WAVE: The wavelength number. Use 0 for polychromatic.
HTF_IMAGESAMP: The image sampling. Use 1 for 32x32, 2 for 64x64, etc.
HTF_CONFIG: The configuration number. Use 0 for all, 1 for current, etc.
HMH_SCANTYPE: The field scan type. Use 0 for +Y, 1 for +X, etc.
HPS_TYPE: The data type. Use 0-8 for Linear, Log -1, Log -2, Log -3, Log -4,
Log -5, Real, Imaginary, or Phase, respectively.
HPC_PUPILSAMP: The pupil sampling, use 1 for 32 x 32, 2 for 64 x 64, etc.
HPC_IMAGESAMP: The image sampling, use 1 for 32 x 32, 2 for 64 x 64, etc.
HPC_TYPE: The data type. Use 0-9 for X-Linear, Y-Linear, X-Log, Y-Log, X-
Real, Y-Real, X-Imaginary, Y-Imaginary, X-Phase, or Y-Phase, respectively.
ILL_SOURCE: The source size.
ISM_OVERSAMPLING: Oversample value. Use 0 for none, 1 for 2X, 2 for 4x,
etc.
ISM_GUARDBAND: Guard band value. Use 0 for none, 1 for 2X, 2 for 4x, etc.
ISM_FLIP: Flip Source. Use 0 for none, 1 for TB, 2 for LR, 3 for TB&LR.
ISM_ROTATE: Rotate Source: Use 0 for none, 1 for 90, 2 for 180, 3 for 270.
Image
ISM_WAVE: Wavelength. Use 0 for RGB, 1 for 1+2+3, 2 for wave #1, 3 for
Simulation
wave #2, etc.
ISM_SHOWAS: Use 0 for Simulated Image, 1 for Source Bitmap, and 2 for PSF
Grid.
ISM_REFERENCE: Use 0 for chief ray, 1 for vertex, 2 for primary chief ray.
ISM_OUTPUTFILE: The output file name or empty string for no output file.
MTF_SAMP: The pupil sampling, use 1 for 32, 2 for 64, etc.
MTF_TYPE: Use 0 for modulation, 1 for real, 2 for imaginary, 3 for phase, 4 for
square wave.
MTF - FFT
MTF_SURF: The surface number, use 0 for image.
POP_SAMPX: The X direction sampling, use 1 for 32, 2 for 64, etc.
POP_SAMPY: The Y direction sampling, use 1 for 32, 2 for 64, etc.
POP_SOURCEFILE: The file name if the starting beam is defined by a ZBF file,
DLL, or multimode file.
POP_FIBERFILE: The file name if the fiber mode is defined by a ZBF or DLL.
POP_POSITION: Fiber position setting. Use 0 for chief ray, 1 for surface
vertex.
REL_SCANTYPE: Use 0 for +y, 1 for +x, 2 for -y, or 3 for -x scan direction.
SHA_ROTX: The x rotation in degrees.
Shaded
SHA_ROTY: The y rotation in degrees.
Model
SHA_ROTZ: The z rotation in degrees.
Spot Dia-
SPT_RAYS: The ray density.
gram
SRS_SAMP: The sampling. Use 1 for 33x33, 2 for 65x65, etc.
Surface Sag
SRS_SURF: The surface number.
UN1_CATEGORY: Use 0 for surface, 1 for system, 2 for config.
The value parameter is the new data for the specified setting. The modified settings file is
written back to the original settings file name.
Example:
MODIFYSETTINGS "C:\MySPT.CFG", SPT_RAYS, 24
MODIFYSETTINGS "C:\MyPOP.CFG", POP_SOURCEFILE, "MyStartBeam.ZBF"
NEXT
See “FOR, NEXT”.
NSLT
Initiates a Non-sequential LightningTrace.
Syntax:
NSLT surf, source, ray_sampling, edge_sampling
Discussion:
Surf is an integer value that indicates the number of the Non-sequential surface. If the
program mode is set to Non-Sequential, use 1. Source refers to the object number of the
desired source. If source is zero, all sources will be traced. Ray_sampling refers to the
resolution of the LightningTrace mesh, with valid values being between 0 (corresponding to a
mesh resolution of “Low (1X)”) and 5 (corresponding to a mesh resolution of “1024X”).
Edge_sampling refers to the resolution used in refining the LightningTrace mesh near the
edges of objects, with valid values being between 0 (corresponding to a mesh resolution of
“Low (1X)”) and 4 (corresponding to a mesh resolution of “256X”). For more details on
LightningTrace, see “The LightningTrace Control”.
Example:
NSLT 1, 0, 3, 2
NSTR
Initiates a Non-sequential trace with ability to save data to a ZRD file.
Syntax:
NSTR surf, source, split, scatter, usepolar, ignore_errors, random_
seed, save, savefilename, filter, zrd_format
Discussion:
Surf is an integer value that indicates the number of the Non-sequential surface. If the
program mode is set to Non-Sequential, use 1. Source refers to the object number of the
desired source. If source is zero, all sources will be traced. If Split is non-zero, then splitting is
on, otherwise, ray splitting is off. If Scatter is non-zero, then scattering is on, otherwise
scattering is off. If Usepolar is non-zero then polarization will be used, otherwise polarization is
off. If splitting is on polarization is automatically selected. If ignore_errors is non-zero, then
errors will be ignored, otherwise ray errors will terminate the non-sequential trace and macro
execution and an error will be reported.
If random_seed is zero, then the random number generator will be seeded with a random
value, and every call to NSTR will produce different random rays. If random_seed is any integer
other than zero, then the random number generator will be seeded with the specified value,
and every call to NSTR using the same seed will produce identical rays. When using NSTR for
optimization, it is recommended that a non-zero value be used for random_seed.
If save is omitted or is zero, the arguments savefilename, filter, and zrd_format need not be
supplied. If save is not zero, the rays will be saved to a file. The saved data file will have the
name specified by the savefilename. The file naming convention and destination folder are the
same as described in “Saving ray data to a file”. The extension of savefilename should be
provided, but no path should be specified. If save is not zero, then the optional filter name is
either a string variable with the filter, or the literal filter in double quotes. If no filter is being
used, enter an empty pair of double quotes like this: “”. For information on filter strings see
“The filter string”. For ZRD files, the zrd_format can be 0, 1, or 2 for uncompressed full data,
compressed basic data, or compressed full data, respectively. For more information on ZRD
formats see “Ray database (ZRD) files”.
Related Functions:
NSTR2
NSDD
Example:
NSTR 1, 0, 0, 0, 0, 1, 0, 1, "saverays.ZRD", "h2"
NSTR2
Initiates a Non-sequential trace with ability to save data to a ZRD and/or PAF file.
Syntax:
NSTR surf, source, split, scatter, usepolar, ignore_errors, random_
seed, save, savefilename, filter, zrd_format, savepaths,
pathfilename
Discussion:
Surf is an integer value that indicates the number of the Non-sequential surface. If the
program mode is set to Non-Sequential, use 1. Source refers to the object number of the
desired source. If source is zero, all sources will be traced. If Split is non-zero, then splitting is
on, otherwise, ray splitting is off. If Scatter is non-zero, then scattering is on, otherwise
scattering is off. If Usepolar is non-zero then polarization will be used, otherwise polarization is
off. If splitting is on polarization is automatically selected. If ignore_errors is non-zero, then
errors will be ignored, otherwise ray errors will terminate the non-sequential trace and macro
execution and an error will be reported.
Save, savefilename, and zrd_format refer to saving ZRD, DAT, or SDF files. If save is omitted or
is zero, the arguments savefilename, filter, and zrd_format need not be supplied. If save is not
zero, the rays will be saved to a file. The saved data file will have the name specified by the
savefilename. The file naming convention and destination folder are the same as described in
“Saving ray data to a file”. The extension of savefilename should be provided, but no path
should be specified. For ZRD files, the zrd_format can be 0, 1, or 2 for uncompressed full data,
compressed basic data, or compressed full data, respectively. For more information on ZRD
formats see “Ray database (ZRD) files”.
Savepaths and pathfilename control the saving of a PAF file and have similar requirements to
thesave and savefilename arguments above. If savepaths is not zero, the rays will be saved to a
If either save or savepaths is not zero, then the optional filter name is either a string variable
with the filter, or the literal filter in double quotes. If no filter is being used, enter an empty pair
of double quotes like this: “”. For information on filter strings see “The Filter String”.
NSTR2 always calls UPDATE before tracing rays to make certain all objects are correctly loaded
and updated.
Related Functions:
NSTR
NSDD
Example:
NSTR2 1, 0, 0, 0, 0, 1, 0, 1, "saverays.ZRD", "h2", 0, 1,
"saverays.PAF"
NUMFIELD
This command is obsolete. See “SETSYSTEMPROPERTY, SYSP”.
NUMWAVE
This command is obsolete. See “SETSYSTEMPROPERTY, SYSP”.
OPEN
Opens an existing text file for reading by the READ command.
Syntax:
OPEN "filename"
OPEN A$
Discussion:
Related Functions:
EOFF
Related Keywords:
Example:
PRINT "Reading the double-column file TEST.DAT!" OPEN "TEST.DAT"
READ x1, y1
READ x2, y2
READ x3, y3
CLOSE
OPENANALYSISWINDOW
Opens a new analysis window.
Syntax:
OPENANALYSISWINDOW type, settingsfilename
Discussion:
The type argument is a 3 character string code that indicates the type of analysis to be
performed. For the full list of string codes, see the “String Codes” section of the The
Programming Tab. If no string code is provided or recognized, no window is opened. The
settingsfilename contains the name of the CFG settings file to use. If this argument is missing,
the default settings will be used.
Related Functions:
WINL, WINN
Related Keywords:
CLOSEWINDOW, MODIFYSETTINGS
Example:
OPTIMIZE (keywords)
Invokes the optimization algorithm to optimize the current lens with the current merit
function.
Syntax:
OPTIMIZE
OPTIMIZE number_of_cycles
OPTIMIZE number_of_cycles, algorithm
Discussion:
The expression for number_of_cyles must evaluate to an integer value between 1 and 99, and
the optimization algorithm will run the specified number of cycles. If number_of_cycles
evaluates to zero, then the optimization runs in “Automatic” mode, stopping when the
algorithm detects the process has converged. For the algorithm argument, use 0 for Damped
Least Squares (the default) and 1 for Orthogonal Descent. For more information see
“Performing an optimization”.
To update the merit function without optimizing, use the MFCN function.
Related Functions:
MFCN
Example:
PRINT "Starting merit function:", MFCN()
OPTIMIZE
Syntax:
OPTRETURN datafield, result
Discussion:
The datafield expression must evaluate to an integer between 0 and 50. The datafield refers to
a position in an array where the value of the expression result may be stored. The sole purpose
of OPTRETURN is to be able to optimize values computed within a ZPL macro.
The optimization operand ZPLM must be used in the merit function to call the ZPL macro and
retrieve the value returned by OPTRETURN. See “Optimizing with ZPL macros” for details.
Example:
x = sqrt(thic(3) + radi(5))
OPTRETURN j, x+5
OUTPUT
Specifies destination for text output. Output is either to the screen, or to a file.
Syntax:
OUTPUT SCREEN
OUTPUT filename
OUTPUT filename, APPEND
Discussion:
If OUTPUT SCREEN is specified alone, then all subsequently executed PRINT commands will be
directed to the screen. If a valid filename is provided, then subsequent PRINT commands will
output to the filename specified. If a filename with no path is provided, output will be directed
to the <data>\Macros folder.
Note that when sending PRINT commands to an output file, the file will be in Unicode format.
To convert the file to ANSI, first close the file (for example using OUTPUT SCREEN) and then
use the CONVERTFILEFORMAT keyword.
If the keyword APPEND follows the file name, then subsequent output will be appended to the
file. Otherwise, the contents of the file will be overwritten.
Example:
OUTPUT "x.txt"
PRINT "This will not appear on the screen, but in the file x.txt."
OUTPUT SCREEN
PRINT "This will appear on the screen."
OUTPUT "x.txt", APPEND
PRINT "This will appear after the first line in the file x.txt."
Related Keywords:
PARM
For setting surface parameters use “SETSURFACEPROPERTY, SURP” keyword, and for getting
surface parameters use the PARM(n,s) Numeric Function as discussed under “Numeric
Functions”.
Syntax:
Discussion:
The current paraxial mode can be established by a call to the function PMOD, which returns 0 if
paraxial mode is off, 1 if it is on. This feature is used for switching between real and paraxial ray
traces. Certain calculations, such as measuring distortion and computing first-order properties
such as effective focal length, require the tracing of paraxial rays.
Example:
mode = PMOD()
IF mode THEN PRINT "Paraxial mode is on!"
IF !mode THEN PRINT "Paraxial mode is not on!"
PARAXIAL ON
PRINT "Now paraxial mode is on!"
PRINT "Restoring original mode..."
if !mode THEN PARAXIAL OFF
PAUSE
Pauses macro execution, optionally while displaying a status message. The status message can
be a string or numerical value. The macro continues once the user presses the “OK” button on
the status dialog.
Syntax:
PAUSE
PAUSE "Ready to continue..."
PAUSE TIME, time
PAUSE THREADS
Discussion:
This feature may be used for debugging, presenting results, or pausing the execution of the
macro. If the keyword after the PAUSE command is TIME, then the macro execution will “sleep”
for at least the number of milliseconds given by the value provided. For example, to pause the
macro for 100 milliseconds, the syntax is
PAUSE TIME, 100
If the keyword after the PAUSE command is THREADS, the macro execution will pause until all
open windows complete whatever computation they are currently executing. This is a very
useful feature when calling UPDATE ALL or LOADLENS using session files.
PIXEL
Turns on a single pixel on the current graphics screen.
Syntax:
PIXEL xcoord, ycoord
Discussion:
PLOT
The PLOT keyword supports a number of arguments used to simplify the task of creating plots
of numeric data.
Syntax:
PLOT NEW
PLOT TITLE, string
PLOT TITLEX, string
PLOT TITLEY, string
PLOT BANNER, string
PLOT WINASPECT, type
PLOT COMM1, string
PLOT COMM2, string
PLOT COMM3, string
PLOT COMM4, string
PLOT COMM5, string
PLOT COMM6, string
PLOT RANGEX, minx, maxx
PLOT RANGEY, miny, maxy
Discussion:
PLOT NEW is used to initialize a new plot. All data related to any previously generated plot is
discarded. This should always be the first PLOT command used when making a new graphic.
PLOT TITLE, PLOT TITLEX, and PLOT TITLEY are used to define the main plot title, the x-axis title,
and the y-axis title, respectively. The parameter “string” may be a literal string in quotes or may
be a string variable.
PLOT BANNER is used to define the banner title. The parameter “string” may be a literal string
in quotes or may be a string variable.
PLOT WINASPECT defines the aspect ratio format of the window that will display the window.
The valid values for type are the integers 0 through 3, which yield aspect ratios of 4x3, 5x3, 3x4,
and 3x5, respectively. If no WINASPECT command is issued a default aspect ratio is used.
PLOT COMMx is used to define up to 6 comments that appear on the bottom of the plot. The
parameter “string” may be a literal string in quotes or may be a string variable.
PLOT RANGEX and PLOT RANGEY define the minimum and maximum values of the plot in the
x- and y- directions respectively. If no RANGEX or RANGEY command is issued, a default range
will be selected.
PLOT CHECK is used to define the size of the “X” marks used to mark data points in the PLOT
DATA command. The units are dimensionless fractions relative to the width of the display. If no
CHECK command is issued, a default size will be selected.
PLOT TICK is used to define the increments between tick marks on the x- and y-axis,
respectively. If no TICK command is issued, a default increment will be selected.
PLOT FORMATX and PLOT FORMATY are used to define the format strings for numeric labels
on the x- and y-axis, respectively. The parameter “format_string” may be a literal string in
quotes or may be a string variable. The format_string must be a valid C-language format
specifier. A common format string is “%M.nf” where M is the total number of spaces in the
output string and n is the number of figures after the decimal point. For example, the value for
pi will print as “3.1415” if the format string is “%6.4f”. To define an exponential format, the
format string is of the form “%M.nE” which would yield a total of M characters and n is the
number of figures after the decimal point. The value for pi would print as “3.14E+000” if the
format_string was “%9.3E”. If no FORMATX or FORMATY is specified a default format is used.
PLOT LINE makes a line between the points (x1, y1) and (x2, y2). The units of x and y here are
normalized screen coordinates between 0.0 and 1.0. A maximum of 1000 lines may be defined.
PLOT LABEL prints any text string on the plot starting at the coordinates (x, y). The units of x
and y here are normalized screen coordinates between 0.0 and 1.0. The angle is the angle from
the +x direction in degrees. The size is a scaling constant greater than 0.0 that defines the size
of the font. A size of 1.0 would print at the normal font size, while a value of 1.5 would print at
50% larger than normal size. The parameter “string” may be a literal string in quotes or may be
a string variable. A maximum of 100 labels may be defined.
PLOT GO uses all settings and data from previous PLOT commands and generates the desired
plot, and displays the plot in a window. After the plot is generated all the PLOT data is reset as
though PLOT NEW had been executed.
Related Keywords:
PLOT2D
PLOT2D
The PLOT2D keyword supports a number of arguments used to simplify the task of creating
plots of numeric data. This keyword makes it easy to generate surface, contour, grey scale, and
false color plots.
Syntax:
PLOT2D NEW
PLOT2D TITLE, string
PLOT2D COMM1, string
PLOT2D COMM2, string
PLOT2D COMM3, string
PLOT2D COMM4, string
PLOT2D COMM5, string
PLOT2D RANGE, min, max
PLOT2D ASPECT, ratio
PLOT2D WINASPECT, type
Discussion:
PLOT2D NEW is used to initialize a new plot. All data related to any previously generated
plot2d is discarded. This should always be the first PLOT2D command used when making a
new graphic.
PLOT2D TITLE is used to define the main plot title. The parameter "string" may be a literal
string in quotes or may be a string variable.
PLOT2D COMMx is used to define up to 5 comments that appear on the bottom of the plot.
The parameter “string” may be a literal string in quotes or may be a string variable.
PLOT2D RANGE define the minimum and maximum values of the plot. If no RANGE command
is issued, a default range will be selected. The range should span the data values, or the data
will be truncated to fit the range. The surface and contour plots ignore this command.
PLOT2D ASPECT defines the ratio of the x-width of the plot as compared to the y-width. The
surface plots ignore this command.
PLOT2D WINASPECT defines the aspect ratio format of the window that will display the
window. The valid values for type are the integers 0 through 3, which yield aspect ratios of 4x3,
5x3, 3x4, and 3x5, respectively. If no WINASPECT command is issued a default aspect ratio is
used.
PLOT2D DATA is used to define the array variable containing the data to be plotted. The
variable arrayname MUST be an array variables of 2 dimensions. For information on defining
array variables see “Array variables”. The number of points in the x and y directions is defined
by the array dimensions. Any number of points is allowed, however, the minimum number of
points in either direction is 5. The data will be assuming the two dimensions form a rectangular
grid with uniform spacing along each dimension, although an overall aspect ratio for the plot
may be defined using PLOT2D ASPECT. Only one PLOT2D DATA command may be issued.
PLOT2D ACTIVECURSOR is used to define the left, right, bottom, and top boundaries of the
plotted data for display on contour, grey scale, and false color plots.
PLOT2D DISPLAYTYPE is used to select the type of plot generated. The value for type should
be an integer between 1 and 6, inclusive, for surface, contour, grey scale, inverse grey scale,
false color, and inverse false color, respectively.
PLOT2D SURFACESCALE is used to define an overall vertical scaling of the surface plot. Only
surface plots use this command. The default scaling value is 0.5 arbitrary units.
PLOT2D LOGPLOT is used to generate a log scale display. Only grey scale, inverse grey scale,
false color, and inverse false color plots use this command. The peak value is an integer
indicating the maximum power of 10 to plot. For example, is peak is 3, then the maximum
value plotted will be 1E+03. The decades value is an integer indicating the number of log
decades below the peak to plot. If peak is 3, and decades is 5, then the plot will span the range
from 1.0E+03 to 1.0E-02. Note that the use of LOGPLOT does not actually take the logarithm of
the input array data. The macro itself must take the log base 10 of the values in the array
before calling PLOT2D GO.
PLOT2D HIDEADDRESS is used to hide or show the address data. If the flag value is zero, the
address is shown, otherwise the address is not shown. See also “Address”.
PLOT2D CONFIG is used to define the configuration number shown if the address box is
displayed and the address box displays information about the current configuration. If
configuration is 0, the address box will show the current configuration number. If the
configuration is an integer between 1 and the number of configurations, inclusive, the specific
configuration number will be shown. If configuration is an integer less than 0, then “All” is
shown for the configuration number.
PLOT2D GO uses all settings and data from previous PLOT2D commands and generates the
desired plot, and displays the plot in a window. After the plot is generated all the PLOT2D data
is reset as though PLOT2D NEW had been executed.
Related Keywords:
PLOT
POLDEFINE
Defines the input polarization state for subsequent POLTRACE calls.
Syntax:
POLDEFINE Jx, Jy, PhaX, PhaY
Discussion:
Example:
POLDEFINE 2.0, 2.0, 45.0, -66.0
Related Keywords:
POLTRACE
POLTRACE
Calls the OpticStudio polarization ray tracing routines to trace a particular ray through the
current system.
Syntax:
POLTRACE Hx, Hy, Px, Py, wavelength, vec, surf
Discussion:
The expressions Hx and Hy must evaluate to values between -1 and 1, and represent the
normalized object coordinates. The pupil coordinates are specified by the expressions Px and
Py, which also must be between -1 and 1. For more information about normalized coordinates,
see the chapter "Conventions and Definitions" under "Normalized field and pupil coordinates".
The wavelength expression must evaluate to an integer between 1 and the maximum number
of defined wavelengths. The vec expression must evaluate to a number between 1 and 4,
inclusive. The surf expression must evaluate to an integer between 1 and the number of
surfaces, inclusive.
The input polarization state of the ray is defined by the POLDEFINE keyword.
Once the ray is traced, the polarization data for the ray is placed in the vector variable specified
by the vec expression. For example, if the command "POLTRACE Hx, Hy, Px, Py, w, 2, n" is
issued, the data will be stored in VEC2. The data is stored in the following format, where the
first number in each line refers to the array position:
If the value in array position 0 is 0, then an error occurred and the polarization data is invalid.
This may occur if the specified ray cannot be traced. See the RAYTRACE command to extract
extended error information.
Example:
POLDEFINE 0, 1, 0, 0
POLTRACE 0, 1, 0, 0, pwav(), 1, nsur()
PRINT "Transmission of chief ray at primary wavelength is ", vec1
(1)
Related Keywords:
POLDEFINE, RAYTRACE
Syntax:
POP outfilename, lastsurface, settingsfilename
Discussion:
This keyword requires the name of the output ZBF file, an expression that evaluates to the last
surface to propagate to, and optionally the name of a settings file. The filename must be
enclosed in quotes if any blank or other special characters are used. The created ZBF files will
be placed in the <pop> folder. No paths should be provided with the file names.
The settings for the POP feature will be those settings previously saved for the current lens,
unless a settings file name is provided. The settings file name must include the full path, name,
and extension. To make adjustments to the settings, open a POP window, choose the
appropriate settings, then press “Save”. By default, all subsequent calls to POP within ZPL will
use the saved settings. The exceptions are the output file name, which is specified as the first
argument after the POP keyword, and the last surface number, which is optionally specified as
the second argument after the POP keyword.
Example:
POP "pop_output.ZBF", 12, "MyPOP.CFG"
PRINT
Print is used to output constant text and variable data to either the screen or a file, depending
upon the current status of the keyword OUTPUT.
Syntax:
PRINT
PRINT X
PRINT "The value of x is ", x
PRINT " x = ", x, " x + y = ", x + y
PRINT alone will print a blank line. PRINT with a list of text arguments and expressions will print
each text string (enclosed in double quotes) and the numeric value of each expression. PRINT
uses the numerical output format specified by FORMAT. If the last item in the list is followed by
a comma, PRINT will not end the line with a carriage return.
Note that very large quantities of PRINT commands (i.e. thousands of lines or more) can
negatively impact macro execution speed if the printed text is displayed on the screen (i.e.
OUTPUT SCREEN).
The reason this can cause slowdown is because OpticStudio handles these print windows as a
single string. As the string gets longer and longer (as you print more lines of data out to the
window), it becomes more computationally costly to display it and store it. In other words, the
problem is that the PRINT overhead linearly increases with each loop iteration.
l The best solution is to use PRINT to save to a file instead of pushing to the window (i.e.
use OUTPUT filename). It will make the macro more efficient, by avoiding the inef-
ficiencies of printing to the ZPL output window.
l To display the results on the screen, consider using a "child" macro. The "child" macro
will only print one string at a time.
OUTPUT SCREEN
a$ = "This text gets really really long."
CALLSETSTR 1, a$
CALLMACRO PRINT.ZPL
Example:
X = 3
PRINT "X equals ",x
Related Keywords:
REWIND
PRINTFILE
Syntax:
PRINTFILE filename
Discussion:
The filename must be a valid file name. The file must be a text file (as would be created by
OUTPUT and PRINT commands in ZPL) and must be in the current folder. PRINTFILE also closes
the file if no CLOSE command has been executed.
Example:
OUTPUT "test.txt"
PRINT "Print this to the printer."
PRINTFILE "test.txt"
Related Keywords:
PRINTWINDOW
Prints any open graphic or text window.
Syntax:
PRINTWINDOW winnum
Discussion:
The winnum value may be either an integer or an expression that evaluates to an integer. The
integer winnum corresponds to the window number that should be printed. OpticStudio
numbers windows sequentially as they are opened, starting with 1. Any closed windows are
deleted from the window list, without renumbering the windows which remain. Any windows
opened after another window has been closed will use the lowest window number available.
Example:
PRINTWINDOW 5
Syntax:
PWAV n
Discussion:
The expression n is evaluated and the primary wavelength is set to the specified number. The
UPDATE command must be issued before the new data takes effect.
Example:
PWAV 1
Related Functions:
QUICKFOCUS (keywords)
Adjusts the thickness of the surface prior to the image surface to minimize the specified
criteria.
Syntax:
QUICKFOCUS mode, centroid
Discussion:
The expression for mode should evaluate to 0, 1, 2, or 3 for RMS spot radius, spot x, spot y, or
wavefront OPD. The expression for centroid should evaluate to 0 or 1 to indicate the RMS
should be referenced to the chief ray or image centroid, respectively. The "best" focus is
chosen as a wavelength weighted average over all fields.
Example:
! Focus at best RMS wavefront to centroid
QUICKFOCUS 3, 1
Syntax:
QUICKSENSITIVITY criterion, sampling, config, fields, out_file_name
Discussion:
1 = RMS Spot X
2 = RMS Spot Y
3 = RMS Wavefront
4 = Boresight Error
6 = RMS Angular X
7 = RMS Angular Y
0 = All
2 = 2/n
3 = 3/n
x = x/n
0 = Y-Symmetric
1 = XY-Symmetric
2 = User Defined
Out_file_name is a text file (any extension may be used) and the file will be placed in the same
folder as the current lens file. This field should not specify a full file path.
RADI
This command is obsolete. See “SETSURFACEPROPERTY, SURP”.
RANDOMIZE
RANDOMIZE seeds the random number generator.
Syntax:
RANDOMIZE seed
Discussion:
If seed evaluates to zero, OpticStudio seeds the random number generator with a value based
upon the CPU clock. Otherwise, the value provided is used to seed the random number
generator. Using the same seed will reproduce the identical series of random numbers created
by the RAND function.
Example:
RANDOMIZE
RANDOMIZE 250
Related Functions:
RAND
Syntax:
RAYTRACE hx, hy, px, py, wavelength
Discussion:
The expressions hx and hy must evaluate to values between -1 and 1, and represent the
normalized field coordinates. The pupil coordinates are specified by the expressions px and py,
which also must be between -1 and 1. For more information about normalized coordinates see
“Normalized field coordinates”. The wavelength expression is optional, defaulting to the
primary wavelength, but if supplied must evaluate to an integer between 1 and the maximum
number of defined wavelengths.
Once the ray is traced, the ray intercept coordinates and direction cosines may be determined
using the ZPL functions RAYX, RAYY, RAYZ, RAYL, RAYM, and RAYN (use RAGX, RAGY, RAGZ,
RAGL, RAGM, and RAGN to get results in global coordinates). If an error occurred during ray
tracing, the function RAYE (for RAY Error) will return a value other than zero. If RAYE is
negative, it indicates that total internal reflection occurred at the surface whose number is the
absolute value of the value returned. If RAYE returns a value of -9999, the ray cannot be
launched.
If RAYE is greater than zero, then the ray missed the surface number returned. Checking RAYE
is optional, however, the RAYX, RAYY, ... functions may return invalid data if RAYE is not zero.
The functions RANX, RANY, and RANZ return the intercept surface normal direction cosines,
and OPDC returns the optical path difference for the ray. The function RAYV returns the
surface number at which the ray was vignetted, or it returns zero if the ray was not vignetted.
Values returned for surfaces past the surface of vignetting may not be accurate.
Example:
PRINT "Tracing the marginal ray at primary wavelength!"
n = NSUR()
RAYTRACE 0,0,0,1
y = RAYY(n)
PRINT "The ray intercept is ", y
PRINT "Tracing the chief ray at maximum wavelength!"
RAYTRACE 0,1,0,0,NWAV()
y = RAYY(n)
PRINT "The ray intercept is ", y
RAYTRACEX
RAYTRACEX
Calls the OpticStudio ray tracing routines to trace a particular ray from any starting surface
through the current system.
Syntax:
RAYTRACEX x, y, z, l, m, n, surf, wavelength
Discussion:
The expressions x, y, z, l, m, and n define the input ray position and direction cosines in the
local coordinates of the starting surface. The surface expression must evaluate to an integer
between 0 and the number of surfaces minus one, inclusive. The wavelength expression is
optional, defaulting to the primary wavelength, but if supplied must evaluate to an integer
between 1 and the maximum number of defined wavelengths.
If the object has a thickness of infinity, and the surf parameter is zero, then the input
coordinates are assumed to be relative to the first surface rather than the object surface;
although the ray will still be defined in object space media. Otherwise, OpticStudio uses the
specified coordinates without alteration.
Once the ray is traced, the ray intercept coordinates and direction cosines may be determined
using the ZPL functions RAYX, RAYY, RAYZ, RAYL, RAYM, and RAYN (use RAGX, RAGY, RAGZ,
RAGL, RAGM, and RAGN to get results in global coordinates). Note only data from surface
AFTER the "surf" surface will be valid.
If an error occurred during ray tracing, the function RAYE (for RAY Error) will return a value
other than zero. If RAYE is negative, it indicates that total internal reflection occurred at the
surface whose number is the absolute value of the value returned. If RAYE is greater than zero,
then the ray missed the surface number returned.
Checking RAYE is optional, however, the RAYX, RAYY, ... functions may return invalid data if
RAYE is not zero. The functions RANX, RANY, and RANZ return the intercept surface normal
direction cosines, and RAYT returns the optical path length up to the surface for the ray. The
function RAYV returns the surface number at which the ray was vignetted, or it returns zero if
the ray was not vignetted. Values returned for surfaces past the surface of vignetting may not
be accurate.
Example:
Related Keywords:
RAYTRACE
READ
Reads data from an existing text file opened for reading by the OPEN command.
Syntax:
READ x
READ x, y
READ x,y,z,a,b,c,q
Discussion:
The file must be already open, see the keyword OPEN for details. Each READ command reads a
single line from the file. The first valid data field from this line is placed in the variable first
listed. The data from the second field is placed in the second variable listed, if any.
Therefore, the number of variables listed in the read command should match the number of
columns in the text file. Numeric data in the file should be delimited by spaces.
The data may be in free-form, and is internally promoted to double precision. In order to use
decimal separator currently selected in Windows settings use READ_LOCALE keyword. A
maximum of 2000 characters can be read in on any single line. The maximum number of
variable arguments is 199; for reading longer lines with more arguments use READNEXT
instead. The variables listed must be valid ZPL variable names.
READNEXT does not support array variable names as arguments. The workaround is to read
the data into a scalar variable and then set the array variable to the scalar variable value in a
subsequent line like this:
READ x
data(i, j) = x
Always CLOSE a file after all the data has been read. See the function EOFF.
Example:
Related Functions:
EOFF
Related Keywords:
READ_LOCALE
Reads data from an existing text file opened for reading by the OPEN command.
Syntax:
READ_LOCALE x
READ_LOCALE x, y
READ_LOCALE x,y,z,a,b,c,q
Discussion:
The file must be already open, see the keyword OPEN for details. Each READ command reads a
single line from the file. The first valid data field from this line is placed in the variable first
listed. The data from the second field is placed in the second variable listed, if any. Therefore,
the number of variables listed in the read command should match the number of columns in
the text file. Numeric data in the file should be delimited by spaces. The data may be in free-
form, and is internally promoted to double precision assuming character currently selected in
Windows settings as decimal separator. In order to use period as decimal separator use READ
keyword. A maximum of 2000 characters can be read in on any single line. The maximum
number of variable arguments is 199; for reading longer lines with more arguments use
READNEXT_LOCALE or READNEXT instead. The variables listed must be valid ZPL variable
names.
Always CLOSE a file after all the data has been read. See the function EOFF.
Example:
PRINT "Reading the double-column file TEST.DAT!"
OPEN "C:\DATA\TEST.DAT"
Related Functions:
EOFF
Related Keywords:
OPEN, CLOSE, READ, READNEXT, READNEXT_LOCALE, READSKIP, READSTRING
READNEXT_LOCALE
Reads data from an existing text file opened for reading by the OPEN command.
Syntax:
READNEXT_LOCALE x
READNEXT_LOCALE x, y
READNEXT_LOCALE x,y,z,a,b,c,q
Discussion:
The following two READNEXT_LOCALE commands will read the values 3.0, 4.0, and 5.0 for x, y,
and z:
READNEXT_LOCALE x, y
READNEXT_LOCALE z
READNEXT_LOCALE is more useful than READ_LOCALE or READ if the line is very long, or the
number of arguments is large. READNEXT_LOCALE does not support array variable names as
arguments. The workaround is to read the data into a scalar variable and then set the array
variable to the scalar variable value in a subsequent line like this:
READNEXT_LOCALE x
data(i, j) = x
Example:
Related Keywords:
READNEXT
Reads data from an existing text file opened for reading by the OPEN command.
Syntax:
READNEXT x
READNEXT x, y
READNEXT x,y,z,a,b,c,q
Discussion:
READNEXT is almost identical to READ. The key difference is READ will read the entire data line
from the opened file, up to the newline character, while READNEXT reads only enough
characters to fill the number of arguments.
The following two READNEXT commands will read the values 3.0, 4.0, and 5.0 for x, y, and z:
READNEXT x, y
READNEXT z
READNEXT is more useful than READ if the line is very long, or the number of arguments is
large. READNEXT does not support array variable names as arguments. The workaround is to
read the data into a scalar variable and then set the array variable to the scalar variable value in
a subsequent line like this:
READNEXT x
data(i, j) = x
Example:
Related Keywords:
READSKIP
Reads any number of unwanted characters from an existing text file opened for reading by the
OPEN command.
Syntax:
READSKIP n
Discussion:
The file must be already open, see the keyword OPEN for details. If n is positive, READSKIP
reads off exactly n characters from the file. If n is negative, READSKIP reads to the end of the
current line. The read characters are discarded. This function allows faster access to large files
by effectively skipping over any number of unwanted characters. Always CLOSE a file after all
the data has been read. See the function EOFF.
Example:
PRINT "Reading the contents of file TEST.DAT!"
OPEN TEST.DAT
READSKIP 59
READSTRING A$
PRINT A$
CLOSE
Related Keywords:
READSTRING
Syntax:
READSTRING A$
Discussion:
The file must be already open, see the keyword OPEN for details. Each READ command reads a
single line from the file. The entire line read is placed in the variable listed. A maximum of 359
characters can be read in and placed in a single string. The variable listed must be a valid ZPL
string variable name, although it does not need to be previously referenced. Always CLOSE a
file after all the data has been read. See the function EOFF.
Example:
PRINT "Reading the contents of file TEST.DAT!"
OPEN TEST.DAT
READSTRING A$
PRINT A$
CLOSE
Related Keywords:
RELEASE
See “Array variables”.
RELOADOBJECTS
Reloads NSC objects into the NSC Editor.
Syntax:
RELOADOBJECTS surface, object
Discussion:
Example:
RELOADOBJECTS 1, 0
REM, !, #
REM, !, and # are used to define remarks or comments.
Syntax:
REM (text)
! (text)
(valid zpl line) # (text)
Discussion:
The exclamation symbol may also be used to indicate a remark. Both the REM command and
the "!" symbol are only recognized as remark indicators if they appear at the very beginning of
the line. The # symbol may be used anywhere on the line, but will only be interpreted as the
beginning of a comment if the # is not inside a string. Everything after the # symbol is ignored.
Example:
REM any text can be placed after the REM command.
! any text can also be placed
! after the exclamation symbol.
x = 5 # this syntax allows comments to be placed on the same line
as a command.
REMOVEVARIABLES (keywords)
Sets all currently defined variables to fixed status.
Syntax:
REMOVEVARIABLES
RENAMEFILE
RENAMEFILE is used to rename a file.
Syntax:
RENAMEFILE oldfilename, newfilename
Discussion:
This keyword requires two file names, defined as literal string expressions in quotes or as string
variables. The file oldfilename is renamed newfilename.
Example:
RENAMEFILE AFILE$, BFILE$
Related Keywords:
COPYFILE
DELETEFILE
RETURN
See GOSUB.
REWIND
Syntax:
REWIND
Example:
PRINT "First line"
REWIND
PRINT "New First line"
Related Keywords:
SAVEARCHIVE
Saves the current lens to a Zemax archive (*.ZAR) file.
Syntax:
SAVEARCHIVE filename
Discussion:
The filename must include the name of the archive file including the file extension. If the
filename does not include a complete path to the archive file, the default folder for lenses is
assumed. See “Backup To Archive File”.
SAVEDETECTOR (keywords)
Saves the data currently on an NSC Detector Rectangle, Detector Color, Detector Polar, or
Detector Volume object to a file.
Syntax:
SAVEDETECTOR surf, object, filename
Discussion:
Related Keywords:
LOADDETECTOR
SAVELENS
Saves the current lens file.
Syntax:
SAVELENS filename, session
Discussion:
SAVELENS will save the current lens file to the specified file name. The full file path may be
optionally specified. The name of the current lens in memory will also be changed. If the file
name is absent, then the lens data is stored in the current file name. If the session argument
evaluates to anything other than zero, the session file will also be saved.
Example:
SAVELENS
SAVELENS "NEWCOPY.ZMX"
SAVELENS NEW$
Related Keywords:
LOADLENS
SAVEMERIT (keywords)
Saves the current merit function to a file.
Syntax:
Discussion:
SAVEMERIT will save the current merit function to a file. If the filename contains the complete
path, such as C:\MYDIR\MYLENS.MF, then the specified path will be used. If the path is left off,
then the <data>\MeritFunction folder will be used (see “Folders”). See also LOADMERIT.
SAVETOLERANCE (keywords)
Saves the current tolerances to a file.
Syntax:
SAVETOLERANCE "filename"
SAVETOLERANCE file$
Discussion:
If the filename contains the complete path, such as C:\MYDIR\MYLENS.TOL, then the specified
file will be created. If the path is left off, then the <data>\Tolerance folder will be used (see
“Folders”). See also LOADTOLERANCE.
SAVEWINDOW
Saves the text from any text window to a file.
Syntax:
SAVEWINDOW winnum, filename
Discussion:
The winnum value may be either an integer or an expression that evaluates to an integer. The
integer winnum corresponds to the text window number that should be saved to a file.
OpticStudio numbers windows sequentially as they are opened, starting with 1. Any closed
windows are deleted from the window list, without renumbering the windows which remain.
Any windows opened after another window has been closed will use the lowest window
number available.
SCATTER
Used to control whether sequential surface scattering is done while tracing rays.
Syntax:
SCATTER ON
SCATTER OFF
Discussion:
The default condition at the start of a macro is SCATTER OFF; and all rays will be traced
deterministically. If SCATTER ON is executed, then sequential surface scattering will be enabled
for all subsequent RAYTRACE commands.
SDIA
For setting surface properties use the “SETSURFACEPROPERTY, SURP” keyword, and for getting
surface properties use the SPRO(surf, code) Numeric Function as discussed under “Numeric
Functions”.
SETAIM
Sets the state of the ray aiming function.
Syntax:
SETAIM state
Discussion:
This keyword requires one numeric expression that must evaluate to either 0 or 1. The state is a
code which is 0 for ray aiming off and 1 for ray aiming on.
Related Keywords:
SETAIMDATA
SETAIMDATA
Sets various data for the ray aiming function.
Syntax:
SETAIMDATA code, value
Discussion:
Code Property
1 Sets "Use Ray Aiming Cache" to true if value is 1, or false if value is 0.
2 Sets "Robust Ray Aiming" to true if value is 1, or false if value is 0.
3 Sets "Scale Pupil Shift Factors by Field" to true if value is 1, or false if value is 0.
4, 5, 6 Sets the value of the x, y, and z pupil shift, respectively.
7, 8 Sets the value of the x and y pupil compress, respectively.
Example:
SETAIMDATA 5, 0.34
Related Keywords:
SETAIM
SETAPODIZATION
SETCONFIG (keywords)
Sets the current configuration for multi-configuration (zoom) systems.
Syntax:
SETCONFIG config
Discussion:
The expression config must evaluate to an integer between 1 and the maximum number of
configurations.
Example:
SETCONFIG 4
Related Functions:
CONF, NCON
SETDETECTOR
Sets the coherent or incoherent detector data for any pixel on a detector rectangle object.
Syntax:
SETDETECTOR surf, object, pixel, datatype, value
Discussion:
This keyword requires numeric expressions that specify the surface, object, pixel, and data type
(all integers) and the new detector value. Surf is the surface number of the non-sequential
group; use 1 when using non- sequential mode. Object is the object number of the detector.
The object must be a detector rectangle. Pixel is a number between 1 and the number of pixels
the object supports. Datatype should be 0 for incoherent intensity, 1 for incoherent intensity in
angle space, 2 for coherent real part, 3 for coherent imaginary part, and 4 for coherent
amplitude. For more information on the use and meaning of these values see “Detector
Example:
SETDETECTOR 1, 5, 12, 0, 1.0056
Related Functions:
NSDD
SETMCOPERAND
Sets any row or configuration of the Multi-Configuration Editor to any numeric value.
Syntax:
SETMCOPERAND row, config, value, datatype
Discussion:
This keyword requires numeric expressions that evaluate to integers specifying the row and
configuration of the Multi-Configuration Editor.
datatype = 0, value is a string literal or variable that specifies the name of the operand.
If the config number corresponds to a defined configuration then the value is interpreted as
follows:
datatype = 3, value is the status of the operand, 0 for fixed, 1 for variable, 2 for pickup, 3 for
thermal pickup.
Related Functions:
MCOP
SETNSCPARAMETER (keywords)
Sets the parameter values of any object in the NSC editor.
Syntax:
SETNSCPARAMETER surface, object, parameter, value
Discussion:
This keyword requires 3 numeric expressions that evaluate to integers specifying the non-
sequential component surface number, the object number, and the parameter number. The
fourth argument is the new value for the specified parameter.
Example:
SETNSCPARAMETER 4, 2, 15, newp15value
Related Functions:
NPOS, NPAR
Related Keywords:
SETNSCPOSITION (keywords)
Syntax:
SETNSCPOSITION surface, object, code, value
Discussion:
This keyword requires 3 numeric expressions that evaluate to integers specifying the non-
sequential component surface number, the object number, and a code. The code is 1 through
6 for x, y, z, tilt x, tilt y, tilt z, respectively. The fourth argument is the new value for the specified
position.
Example:
SETNSCPOSITION 4, 2, 2, newyvalue
Related Functions:
NPOS, NPAR
Related Keywords:
SETNSCPROPERTY (keywords)
Sets properties of NSC objects.
Syntax:
SETNSCPROPERTY surface, object, code, face, value
Discussion:
This keyword requires 4 numeric expressions that evaluate to integers specifying the non-
sequential component surface number (use 1 if the program mode is non-sequential), the
object number, a code which specifies what property of the object is being modified, and the
face number (use 0 if not applicable to the property being set). The fifth argument is the new
value for the specified property, and it may be either text in quotes, a string variable, or a
numeric expression. The code is as follows:
Launch.
17 Sets the “Object Is A Detector” checkbox, use 1 for checked, 0 for unchecked.
Sets the “Consider Objects” list. The argument should be a string listing the
18
object numbers to consider delimited by spaces, such as “2 5 14”.
Sets the “Ignore Objects” list. The argument should be a string listing the object
19
numbers to ignore delimited by spaces, such as “1 3 7”.
20 Sets the “Use Pixel Interpolation” checkbox, use 1 for checked, 0 for unchecked.
Sets the “Use Consider/Ignore Objects When Splitting” checkbox, use 1 for
30
checked, 0 for unchecked.
The following codes set values on the Coat/Scatter tab of the Object Properties dia-
log.
5 Sets the coating name for the specified face.
6 Sets the profile name for the specified face.
Sets the scatter mode for the specified face: 0 = none, 1 = Lambertian, 2 =
7
Gaussian, 3 = ABg, 4 = User Defined, 5 = BSDF, 6 = ABg File.
8 Sets the scatter fraction for the specified face.
9 Sets the number of scatter rays for the specified face.
Sets the Gaussian sigma (Gaussian scatter model) or the sample orientation
10
angle (BSDF scatter model) for the specified face.
11 Sets the reflect ABg data name for the specified face.
12 Sets the transmit ABg data name for the specified face.
27 Sets the name of the user defined scattering DLL.
21-26 Sets parameter values on the user defined scattering DLL.
The NSC Object type codes are listed below. These codes are not case sensitive.
Example:
SETNSCPROPERTY 1, 2, 0, 0, "NSC_SLEN"
Related Functions:
Related Keywords:
SETOPERAND (keywords)
Syntax:
SETOPERAND row, col, value
Discussion:
This keyword requires numeric expressions that evaluate to integers specifying the row and
column of the Merit Function Editor.
To set the comment string associated with an operand use col 10.
To set the operand type, use a col value of 1 and the integer operand returned by the function
ONUM. An alternate method for setting the operand type is to use a col value of 11 with the
string name of the operand type, such as EFFL or DIST.
The col integer is 12 for data5 and 13 for data6. Note the value and percent contribution
columns cannot be set but must be computed.
Example:
SETOPERAND 1, 8, tarvalue
SETOPERAND 3, 11, "EFFL"
SETOPERAND 5, 10, "Operand Number 5"
Related Functions:
SETSTDD
This command is obsolete. See “SETSURFACEPROPERTY, SURP”.
Syntax:
SETSURFACEPROPERTY surface, code, value1, value2
SURP surface, code, value1, value2
Discussion:
Surface is an expression that evaluates to an integer specifying the surface number. The code
may either be an expression that evaluates to an integer or a mnemonic which specifies what
property of the surface is being modified. The third and fourth arguments are the new values
for the specified property, and they may be either text in quotes, a string variable, or a numeric
expression, depending upon the code. For most codes, the property value being modified is
defined by the value1 argument. A few operands require both a value1 and a value2, as
described in the table below.
If the property being modified is under control of the Multi-Configuration Editor, then the
multi-configuration data for the current configuration only will also be modified to reflect the
changed property.
Code Property
Basic Surface Data. See “Lens Data.
Surface type. The value should be the name of the object, such as “STANDARD”
for the standard surface. The names for each surface type are listed in the
Prescription Report in the Surface Data Summary for each surface type currently
in the Lens Data Editor.
0 or
TYPE See also "Surface names" summary table at the bottom of this page.
To change the surface type to a user defined surface, first set the DLL name using
code 9 (SDLL), then set the new surface type to USERSURF.
(e.g. SampleABGF.abgf).
Surface draw data. See “Surface properties draw tab”.
90 Sets the “Hide Rays To This Surface” checkbox status: 0 for off, 1 for on.
91 Sets the “Skip Rays To This Surface” checkbox status: 0 for off, 1 for on.
92 Sets the “Do Not Draw This Surface” checkbox status: 0 for off, 1 for on.
Sets the “Do Not Draw Edges From This Surface” checkbox status: 0 for off, 1 for
93
on.
96 Sets the “Draw Edges As” status: 0 for squared, 1 for tapered, 2 for flat.
97 Sets “Mirror Substrate” status: 0 for none, 1 for flat, 2 for curved.
98 Sets the mirror substrate thickness value.
User defined surface scatter DLL parameters. See “Surface properties scattering tab”.
181-186 Sets the user defined scatter DLL parameters 1-6.
Changes to surface properties usually require that a subsequent UPDATE (see “UPDATE”) be
performed to update pupil positions, solves, and other data required for correct ray tracing.
The UPDATE is not performed automatically because it is faster to execute all
SETSURFACEPROPERTY keywords and then execute just one UPDATE. The function SPRO uses
a very similar syntax and identical code values to “get” rather than “set” these same values.
Example:
! Set the glass type on surface 7 to BK7
SETSURFACEPROPERTY 7, GLAS, "BK7"
! Set the thickness of surface 2 to the thickness of surface 1
SETSURFACEPROPERTY 2, THIC, THIC(1)
! Set the value of parameter 4 on surface 11 to 7.3
SURP 11, PARM, 7.3, 4
Related Functions:
SPRO
Related Keywords:
SETSYSTEMPROPERTY, SYSP
Sets properties of the system, such as system aperture, field, wavelength, and other data.
Syntax:
SETSYSTEMPROPERTY code, value1, value2
SYSP code, value1, value2
Discussion:
This keyword requires a numeric expression that evaluates to an integer code which specifies
what property is being modified. The second and third arguments are the new values for the
specified property, and they may be either text in quotes, a string variable, or a numeric
expression, depending upon the code. For most codes, the property value being modified is
defined by the value1 argument. A few operands require both a value1 and a value2, as
described in the table below.
If the property being modified is under control of the Multi-Configuration Editor, then the
multi-configuration data for the current configuration only will also be modified to reflect the
changed property.
Code Property
Adjust Index Data To Environment. Use 0 for off, 1 for on. See “Adjust Index Data
4
To Environment”.
10 Aperture Type code. See “Aperture Type” for code values and discussion.
11 Aperture Value. See “Aperture Value”.
Apodization Type code. Use 0 for uniform, 1 for Gaussian, 2 for cosine cubed. See
12
“Apodization Type”.
13 Apodization Factor. See “Apodization Factor”.
14 Telecentric Object Space. Use 0 for off, 1 for on. See “Telecentric Object Space”.
Iterate Solves When Updating. Use 0 for off, 1 for on. See “Iterate Solves When
15
Updating”.
16 Lens Title. See “Lens Title”.
17 Lens Notes. See “Notes”.
18 Afocal Image Space. Use 0 for off, 1 for on. See “Afocal Image Space”.
6 for Kilo, 7 for Mega, 8 for Giga, and 9 for Tera. See “Source Units”.
32 Source Units. Use 0 for Watts, 1 for Lumens, and 2 for Joules. See “Source Units”.
Analysis Units Prefix. Use 0 for Femto, 1 for Pico, 2 for Nano, 3 for Micro, 4 for Milli,
33 5 for None,
6 for Kilo, 7 for Mega, 8 for Giga, and 9 for Tera. See “Analysis Units”.
Analysis Units “per” Area. Use 0 for square mm, 1 for square cm, 2 for square
34
inches, 3 for square Meters, and 4 for square feet.
MTF Units code. Use 0 for cycles per millimeter, or 1 for cycles per milliradian. See
35
“MTF Units”.
40 Coating File name. See “Coating File”.
41 Scatter Profile name. See “Scatter Profile”.
42 ABg Data File name. See “ABg Data File”.
43 GRADIUM Profile name. See “GRADIUM Profile”.
50 NSC Maximum Intersections Per Ray. See “Maximum Intersections Per Ray” .
51 NSC Maximum Segments Per Ray. See “Maximum Segments Per Ray”.
NSC Maximum Nested/Touching Objects. See “Maximum Nested/Touching
52
Objects”.
53 NSC Minimum Relative Ray Intensity. See “Minimum Relative Ray Intensity”.
54 NSC Minimum Absolute Ray Intensity. See “Minimum Absolute Ray Intensity”.
55 NSC Glue Distance In Lens Units. See “Glue Distance In Lens Units”.
NSC Missed Ray Draw Distance In Lens Units. See “Missed Ray Draw Distance in
56
Lens Units”.
NSC Retrace Source Rays Upon File Open. Use 0 for no, 1 for yes. See “Retrace
57
Source Rays Upon File Open”.
NSC Maximum Source File Rays In Memory. See “Maximum Source File Rays In
58
Memory”.
59 Simple Ray Splitting. Use 0 for no, 1 for yes. See “Simple Ray Splitting”.
Usually, changes to system properties do not become effective until after the UPDATE keyword
is executed.
Related Functions:
SYPR
Related Keywords:
SETSURFACEPROPERTY, UPDATE
SETTEXTSIZE
Changes the size of the characters drawn by the GTEXT command.
Syntax:
SETTEXTSIZE xsize, ysize
Discussion:
The arguments refer to the fraction of the graphic screen width that each character represents.
For example, the default text size is 70 40. This means each character is 1/70 of the graphic
screen width, and 1/40 of the screen height. An argument of zero restores the text size to the
default.
Example:
! Make text twice default size
SETTEXTSIZE 35, 20
! Restore text size to default
SETTEXTSIZE
SETTITLE
This command is obsolete. See “SETSYSTEMPROPERTY, SYSP”.
Syntax:
SETTOL row, column, data
Discussion:
The value row must evaluate to an integer expression greater than 0 and less than or equal to
the current number of tolerance operands. To set the operand type. use a column value of 0.
The data is either a literal string or a string variable that contains the name of the operand,
such as “TTHI”. To set the integer 1, 2, or 3 values, use a column number of 1, 2, or 3. To set the
min or max tolerance values, use column 4 or 5, respectively.
To set the “Do Not Adjust During Inverse Tolerancing” or the “Ignore this Operand During
Tolerancing” checkboxes, use column 6 or 7 respectively.
The data is 1 for checked, 0 for unchecked. To set the comment, use column 99. The data is
either a literal string or a string variable that contains the comment. The nominal value cannot
be set using SETTOL.
Example:
SETTOL 16, 0, “TRAD”
Related Functions:
SETUNITS
This command is obsolete. See “SETSYSTEMPROPERTY, SYSP”.
SETVAR
Syntax:
SETVAR surf, code, status, object
or
SETVAR config, M, status, operand
Discussion:
Surf must evaluate to an integer between 0 and the maximum number of surfaces. Config must
evaluate to an integer between 1 and the number of configurations. Code must be one of the
following strings:
T for thickness
C for conic
G for glass
Pn for parameter n
If status evaluates to 0, then the variable status is removed. Otherwise, the value is made
variable. If the code is Nn or On; the object number must be provided; otherwise, it should be
omitted. If the code is M, then the syntax for this command is as shown under "syntax" above.
Examples:
SETVAR j+3, R, 1
SETVAR 5, P6, 0
SETVAR surfk+2, E06, status
SETVAR config, M, status, operand
SETVAR 1, O32, 1, 5
Syntax:
SETVECSIZE n
Discussion:
The expression must evaluate to an integer argument between 1 and 18,000,000. All four
vector variables are always the same size. All data in the vectors will be lost during the resize.
The initial size of the vectors is 1000.
SETVIG (keywords)
Sets the vignetting factors for the lens.
Syntax:
SETVIG
Discussion:
SHOWBITMAP
Displays a BMP, JPG or PNG file in a viewer window.
Syntax:
SHOWBITMAP filename
Discussion:
This keyword requires the name of the BMP, JPG or PNG file. The extension must be included.
The filename may be enclosed in quotes if any blank or other special characters are used. The
file must be located in the <data>\<images> folder. This command will open a new window to
display the file.
SHOWFILE
Displays a text file to the screen using the OpticStudio file viewer.
Syntax:
SHOWFILE filename, saveflag
Discussion:
The filename must be a valid file name. The file must be a text file (as would be created by
OUTPUT and PRINT commands in ZPL) and must be in the current folder. Once the file is
displayed, it may be scrolled up and down and printed like any other text file. The ability to
scroll and print the data is the primary advantage of using OUTPUT and SHOWFILE instead of
PRINT commands. SHOWFILE also closes the file if no CLOSE command has been executed. If
the saveflag is zero or omitted, then the file is erased when the window is closed. if saveflag is
any value other than zero, then the file remains even after the window is closed.
Example:
OUTPUT "test.txt"
PRINT "Print this to a file."
SHOWFILE "test.txt"
Related Keywords:
SOLVEBEFORESTOP
Enables ZPL solves to be placed on surfaces prior to the stop surface.
Syntax:
SOLVEBEFORESTOP
This keyword is used only for supporting ZPL Macro solves. It must be placed on the first line
of the macro in order to prevent OpticStudio from issuing an error message. Usage of this
keyword implies that the user understands when such solves are valid and when they are not.
Any solve placed prior to the stop should not be based upon ray data. For example, the
RAYTRACE keyword and data that it returns should not be used. OpticStudio doesn’t perform
any checks to ensure this is the case. If the macro does contain ray-based data then the macro
solve may compute erroneous values.
SOLVERETURN
Returns a computed solve value back to the editor calling the solve.
Syntax:
SOLVERETURN x
Discussion:
This keyword is used only for supporting ZPL Macro solves. The macro computes a single
value, and returns the value to the editor calling the solve using this keyword. If more than one
SOLVERETURN keyword exists, only the last SOLVERETURN called is considered and prior calls
are ignored.
If an error or invalid condition occurs in the macro, and the solve value cannot be computed,
then the macro should return without calling SOLVERETURN. The absence of the
SOLVERETURN call will indicate to OpticStudio that the solve cannot be computed and the
optical system is in an error condition. This is particularly important during optimization.
SOLVETYPE
Changes the solve status on a given surface and value. Only some solve types are supported;
contact OpticStudio technical support for information on setting other types of solves.
Syntax:
Discussion:
Surf must evaluate to an integer argument between 0 and the maximum number of surfaces.
The CODE must be a mnemonic as listed in the following table. The arg1 - arg4 expressions
evaluate to the first - fourth solve parameters as specified in “SOLVES”. Note that for cross-
column Pickup solves, the column numbers are defined in “Integer codes for column
numbers”. For non-sequential pickup solves, the arguments are the first through fourth lines
that follow the “Solve Type” selection on the NSC solve dialog box. Some codes do not use any
or all of the arguments and arg2/arg3/arg4 may be omitted in these cases.; arg1 is always
required with a value of 0 if it does not exist via the GUI menu.
(see left)
NSC_
MATF_o,
NSC_
Non-sequential Component Material is fixed, model glass, pick up, or offset. MATM_o,
Replace “o” with the object number in the code, for example, NSC_MATM_11 will NSC_
set the material on object 11 to be a model glass. NSC_MATP_o is redundant MATP_o,
with NSC_PMAT_o. NSC_
MOFF_o
(see left)
NSC_ZX_
o, NSC_
ZY_o,
NSC_ZZ_
Non-sequential Component ZPL Macro solve on X, Y, Z, Tilt-X, Tilt-Y, Tilt-Z. o, NSC_
Replace “o” with the object number in the code, for example, NSC_ZX_14 will set ZTX_o,
a macro solve on object 14. NSC_
ZTY_o,
NSC_
ZTZ_o
(see left)
Non-sequential Component Parameter Pickup. Replace “o” with the object NSC_PP_
number and “p” with the parameter number in the code, for example, NSC_PP_ o_p
11_7 will set a pickup solve on object 11, parameter 7. (see left)
Non-sequential Component ZPL Macro solve. Replace “o” with the object NSC_ZP_
number and “p” with the parameter number in the code, for example, NSC_ZP_ o_p
11_7 will set a macro solve on object 11, parameter 7. (see left)
Example:
Related Functions:
SOLV
STOPSURF
STOPSURF sets the current stop surface location by number.
Syntax:
STOPSURF surf
Discussion:
The UPDATE command must be issued before the new data takes effect.
Example:
STOPSURF n+2
Related Keywords:
UPDATE
SURFTYPE
This command is obsolete. See “SETSURFACEPROPERTY, SURP”.
SUSPENDUPDATES
SUSPENDUPDATES is intended to be used with RESUMEUPDATES.
Prevents any UI editor windows from being updated by ZPL commands while suspended. This
command can greatly speed up macro execution when performing many updates to the
system, such as inserting hundreds or thousands of merit function rows.
The number of suspend and resume calls are reference counted such that no updates will be
performed until RESUMEUPDATES is encountered as many times as SUSPENDUPDATES (or the
macro completes execution).
Note that changes will still be made to the internal lens state, however the user interface will
not reflect the changes.
Also note that the UI is not automatically updated when RESUMEUDPATES is called; to do so,
use the UPDATE EDITORS command.
Example:
SUSPENDUPDATES
n = 5
FOR i = 1, n, 1
INSERTMFO i
SETOPERAND i, 1, ONUM("OPDX")
SETOPERAND i, 6, (i/n)
SETOPERAND i, 8, 0
SETOPERAND i, 9, 1
NEXT
RESUMEUPDATES
UPDATE EDITORS
TESTPLATEFIT
TESTPLATEFIT calls the test plate fitting routine. See “Test Plate Fitting”.
Syntax:
TESTPLATEFIT tpd_file, log_file, method, number_cycles
Discussion:
This keyword requires string expressions for the test plate data file, and the name of a file for
the output log file. The method is an integer between 0 and 4, inclusive, for try all methods,
best to worst, worst to best, long to short, and short to long, respectively. The integer number_
cycles is 0 for automatic or the maximum number of optimization cycles to execute. Note the
tpd_file name should NOT include the path, since all test plate files are in a fixed folder; while
the path should be included for the log file.
This keyword may take a long time to execute. It is advisable to display the log file after
completion of the fitting, or use some other means to indicate when the fitting is complete.
Example:
TESTPLATEFIT "optico.tpd", "c:\temp\logfile.dat", 0, 0
SHOWFILE "c:\temp\logfile.dat"
THIC
For setting surface properties use the “SETSURFACEPROPERTY, SURP” keyword, and for getting
surface properties use the SPRO(surf, code) Numeric Function as discussed under “Numeric
Functions”.
Syntax:
TIMER
Discussion:
TIMER and ETIM() are used primarily for testing execution efficiency of the ZPL interpreter and
various program architectures.
Example:
i = 0
TIMER
LABEL 1
x = RAND(1000)
i = i+1
if i < 10000 THEN GOTO 1
FORMAT .1
PRINT "Elapsed time:", ETIM(), "Seconds"
TOLERANCE
Runs a tolerance analysis and saves the tolerance report to a text file.
Syntax:
TOLERANCE top_file_name, out_file_name
Discussion:
TOLERANCE runs a tolerance analysis on the current lens based upon the settings in the
tolerance options file defined by top_file_name. This file name should end in the extension TOP
and be placed in the <data>\Configs folder (see “Folders”). TOP files are created by saving the
tolerance options from the tolerance dialog, see “Other buttons”. The out_file_name must end
in the extension .ZTD to save a ZTD file or .txt to save a text file. The file will be placed in the
same folder as the current lens file. Neither top_file_name nor out_file_name should specify a
path.
UNLOCKWINDOW
Unlocks any one or all locked windows.
Syntax:
UNLOCKWINDOW winnum
Discussion:
See “Graphic windows operations”. If the winnum is zero, then all open windows are unlocked.
If the winnum argument is -1, then the currently executing window will be unlocked at the end
of the macro execution.
Example:
UNLOCKWINDOW 2
Related Keywords:
LOCKWINDOW
UPDATE
Updates pupil positions, index data, paraxial constants, clear semi-diameter or semi-diameters,
maximum field normalization values, solves, non-sequential objects, and other data required
for both sequential and non-sequential ray tracing.
The UPDATE keyword MUST be used before tracing or evaluating a system if the prescription
data, such as surface type, radii, thicknesses, system apertures, wavelengths, or non-sequential
object types or parameters, have been altered since the last UPDATE.
If the UPDATE command is followed by the keyword “ALL”, then all open windows, except ZPL
macro windows, will be updated as well. If the UPDATE command is followed by an expression
which evaluates to an integer corresponding to an open window, then the specified window is
updated, as long as it is not the window of the macro currently executing. If UPDATE is
Syntax:
UPDATE
UPDATE ALL
UPDATE n
UPDATE EDITORS
UPDATE MACROS
Syntax:
VEC1 subscript, value
VEC2 subscript, value
VEC3 subscript, value
VEC4 subscript, value
Discussion:
VEC1..4 are used to store data in an array. The subscript value can be any expression which is
rounded down to an integer. The resulting integer expression must be between 0 and the
current maximum vector size, which is initially 1000. The ZPL functions VEC1..4 can be used to
extract the data. To change the array size use the SETVECSIZE keyword.
Example:
i = 0
LABEL 1
i = i + 1
VEC1 i, i
IF i < 10 THEN GOTO 1
j = 0
LABEL 2
j = j + 1
VEC2 j, VEC1(j) * VEC1(j)
IF j < 10 THEN GOTO 2
i = 0
WAVL, WWGT
These commands are obsolete. See “SETSYSTEMPROPERTY, SYSP”.
XDIFFIA
Computes the Extended Diffraction Image Analysis feature and saves the result to a ZBF file.
For a description of the ZBF (Zemax Beam File) format see “Zemax Beam File (ZBF) binary
format”. For a description of the Extended Diffraction Image Analysis feature see “Extended
Diffraction Image Analysis”.
Syntax:
XDIFFIA outfilename, infilename
Discussion:
This keyword requires the name of the output ZBF file, and optionally, the name of the input
IMA or BIM file. If the extension to the outfilename is not provided, the extension ZBF will be
appended. The extension must be provided on the infilename. The filenames must be enclosed
in quotes if any blank or other special characters are used. The outfilename will be placed in
the <pop> folder. The infilename must be placed in the <data>\<im- ages> folder. No paths
should be provided with the file names.
The settings for the Extended Diffraction Image Analysis feature will be those settings
previously saved for the current lens. To make adjustments to the settings, open an Extended
Diffraction Image Analysis window, choose the appropriate settings, then press "Save". All
subsequent calls to XDIFFIA will use the saved settings. The exceptions are the output file
name, which is specified as the first argument after the XDIFFIA keyword, and the input source
file, which is optionally specified as the second argument after the XDIFFIA keyword.
Related Functions:
ZBF2MAT
Converts a ZBF file to a Matlab MAT file.
Syntax:
ZBF2MAT zbffilename, matfilename, surfacerange, integer1, integer2
Discussion:
The first two arguments are strings giving the full name including path and extension of the
ZBF file to be converted and the MAT file to be created, respectively. The surfacerange
argument is an integer flag indicating whether a ZBF file at an individual surface is to be
converted or a range of ZBF files, one for a given surface, are to be converted. If this flag is set
to zero then integer1 and integer2 can be ignored. If surfacerange is non-zero integer1 is the
starting surface to be converted and integer2 is the final surface to be converted. Note that
there are restrictions on the ZBF file name as described in “MAT File Generator”.
ZBFCLR
Clears the complex amplitude data in a ZBF file.
Syntax:
ZBFCLR filename
Discussion:
Example:
ZBFCLR "some beam file name.ZBF"
ZBFCLR N$
ZBFMULT
Multiplies the complex amplitude data in a ZBF file by a complex factor.
Syntax:
ZBFMULT filename, Ax, Bx, Ay, By
Discussion:
This keyword requires the name of the ZBF file to modify, and factors by which to multiply the
real and imaginary components of the complex electric field for each point in the ZBF. The
factors are applied to the x- and y-components of the electric field as follows, respectively,
where Ex0 and Ey0 represent the original values in the ZBF.
Ex = Ex0(Ax + Bx*i)
Ey = Ey0(Ay + By*i)
The resulting data is written back to the same ZBF file name.
See “Purpose” for comments that apply to all ZBF related keywords.
Example:
ZBFMULT "some beam file name.ZBF", 0.0, 1.0, 0.0, -1.0
ZBFPROPERTIES
Opens the specified ZBF file and places various data about the beam in a vector variable.
Syntax:
Discussion:
This keyword requires the name of the ZBF file and a value for the vector number to place the
data in. The value of vector must be between 1 and 4, inclusive. After the ZBFPROPERTIES
function executes, the following beam data will be placed in the specified vector: nx, ny, dx, dy,
waist_x, waist_y, position_x, position_y, rayleigh_x, rayleigh_y, wavelength (in lens units), total
power, peak irradiance (power per area), the is_polarized flag (0 for no, 1 for yes), and the
media index; the values are placed in vector positions 1 through 15.
See “Purpose:” for comments that apply to all ZBF related keywords.
Example:
ZBFPROPERTIES "TEST.ZBF", 1
rayleighx = VEC1(9)
ZBFREAD
Opens the specified ZBF file and places the electric field and beam property data in two user-
defined array variables.
Syntax:
ZBFREAD filename, beamname, propertyname
Discussion:
This keyword requires the name of the ZBF file and the name of two arrays defined by a
previous call to DECLARE. The beamname must be a 3 dimensional array, of minimum size (nx,
ny, 2) for an unpolarized beam and minimum size (nx, ny, 4) for a polarized beam. The
propertyname array must be a one dimensional array of minimum size 14. After the ZBFREAD
function executes, the following beam data will be placed in the specified propertyname array:
nx, ny, dx, dy, waist_x, waist_y, position_x, position_y, rayleigh_x, rayleigh_y, wavelength (in lens
units), total power, peak irradiance (power per area), the is_polarized flag (0 for no, 1 for yes),
and the media index; the values are placed in array positions 1 through 15. The electric field
data will be placed in the beamname array. The third dimension of the beamname array is 1 for
Ex Real, 2 for Ex Imaginary, and if the beam is polarized, 3 for Ey Real, and 4 for Ey Imaginary.
See “Purpose:” for comments that apply to all ZBF related keywords. See also “ZBFWRITE”.
FOR j, 1, ny, 1
FOR i, 1, nx, 1
FORMAT 4.0
PRINT i, j,
FORMAT 12.6
IF (ip == 1)
PRINT B(i, j, 1),
PRINT B(i, j, 2),
PRINT B(i, j, 3),
PRINT B(i, j, 4)
ELSE
PRINT B(i, j, 1),
PRINT B(i, j, 2)
ENDIF
NEXT
NEXT
ZBFRESAMPLE
Resamples a ZBF file to a new width and point spacing.
Syntax:
ZBFRESAMPLE filename, nx, ny, wx, wy, decenterx, decentery
This keyword requires the name of the ZBF file and six numbers. The beam will be resampled
and interpolated as required to create a new beam file with nx and ny points, of total width wx
and wy, in the x and y directions respectively. The nx and ny values must be powers of 2; such
as 32, 64, 128, etc. The decenterx and decentery values may be provided to optionally decenter
the new beam relative to the old beam. If either nx or ny is zero, no change is made to the
existing beam sampling. If either wx or wy is zero, no change is made to the existing beam
width. The length units in the ZBF file are converted automatically to the current lens units. The
resulting data is written back to the same file name.
Example:
ZBFRESAMPLE "TEST.ZBF", 128, 128, 25.4, 25.4, 0, 0.4
ZBFSHOW
Displays a ZBF file in a viewer window.
Syntax:
ZBFSHOW filename
Discussion:
This keyword requires only the name of the ZBF file. This command will open a new window to
display the beam file.
Example:
ZBFSHOW "new beam data.ZBF"
ZBFSHOW N$
ZBFSUM
Sums either coherently or incoherently the data in two ZBF files and places the resulting data
in a third ZBF file.
Syntax:
Discussion:
This keyword requires an integer to indicate if the sum is coherent (any value other than zero)
or incoherent (zero), and the names of three ZBF files. If an incoherent sum is performed, then
the output data will be real valued only. If the two source files do not have the same number of
data points, point spacing, and reference radii in both x and y directions, then the second
source file listed is first scaled and interpolated, and the reference radii is adjusted, to match
the first file before the sum is performed. The length units in the ZBF files are converted
automatically to the current lens units. The outfilename may be the same as one of the source
file names; in which case the original file is overwritten.
Example:
ZBFSUM 1, "a.ZBF", "b.zbf", "coherent a plus b.zbf"
ZBFSUM 0, "a.ZBF", "b.zbf", "incoherent a plus b.zbf"
ZBFSUM 0, A$, B$, C$
ZBFTILT
Multiplies the data in a ZBF file by a complex phase factor to introduce phase tilt to the beam.
Syntax:
ZBFTILT filename, cx, cy, tx, ty
Discussion:
This keyword requires the name of the ZBF file and four numbers. The phase of the beam is
modified by a phase angle given by θ = ( x – cx )tx + ( y – cy )ty . The cx and cy values are the
center of the phase tilt, and tx and ty are the slopes of the tilt in units of radians per lens unit
length. The coordinates x and y refer to positions within the beam file, with the center
coordinate (x = 0, y = 0) being at the point (nx/2 + 1, ny/2 + 1) where nx and ny are the
number of points in the x and y directions. The length units in the ZBF file are converted
automatically to the current lens units. The resulting data is written back to the same file name.
Example:
ZBFTILT "TEST.ZBF", 0.0, 0.0, 0.0, 0.01237
Syntax:
ZBFWRITE filename, beamname, propertyname
Discussion:
This keyword requires the name of the ZBF file and the name of two arrays defined by a
previous call to DECLARE. The beamname must be a 3 dimensional array, of minimum size (nx,
ny, 2) for an unpolarized beam and minimum size (nx, ny, 4) for a polarized beam. The
propertyname array must be a one dimensional array of minimum size 14.
The following beam data must be placed in the specified propertyname array: nx, ny, dx, dy,
waist_x, waist_y, position_x, position_y, rayleigh_x, rayleigh_y, wavelength (in lens units), total
power, peak irradiance (power per area), the is_polarized flag (0 for no, 1 for yes), and the
media index; the values are placed in array positions 1 through 15. The electric field data must
be placed in the beamname array. The third dimension of the beamname array is 1 for Ex Real,
2 for Ex Imaginary, and if the beam is polarized, 3 for Ey Real, and 4 for Ey Imaginary.
ZRD2MAT
Converts a ZRD file to a Matlab MAT file.
Syntax:
ZRD2MAT zrdfilename, matfilename, savesegment, integer1, integer2
Discussion:
The first two arguments are strings giving the full name including path and extension of the
ZRD file to be converted and the MAT file to be created, respectively. The next argument,
which is savesegment, is an integer flag indicating whether an individual segment in the ZRD
file is to be converted or a range of rays. If this flag is set to zero then integer1 is the number of
the first ray in the range to be converted and integer2 is the number of the last ray. If
savesegment is non-zero then only one segment is converted; in this case integer1 is the ray
number and integer2 is the segment number.
Syntax:
ZRDAPPEND infilename, outfilename
Discussion:
This keyword requires the name of two input ZRD files. For information on the ZRD format, see
“Ray database (ZRD) files”. The file names may each be defined by either a literal string or a
single string variable. The file names must include the full path name. Although any extensions
may be specified, the extension ZRD is recommended for both file names. The input and
output file names must be distinct. The input and output files must use the same ZRD format.
See also ZRDSUM.
Example:
ZRDAPPEND "C:\TEMP\CART.ZRD", "C:\TEMP\HORSE.ZRD"
ZRDFILTER
Opens a ZRD ray database file, applies a filter, and saves the filtered subset of rays to a new
ZRD file.
Syntax:
ZRDFILTER infilename, outfilename, filterstring
Discussion:
This keyword requires the name of an input ZRD file, the name of the output (filtered) ZRD file,
and the filter string to apply. For information on the ZRD format, see “Ray database (ZRD)
files”. For information on the filter string format see “The filter string”. The file names and filter
string may each be defined by either a literal string or a single string variable. The file names
must include the full path name. Although any extensions may be specified, the extension ZRD
is recommended for both the input and output files. The input and output file names must be
distinct.
ZRDPLAYBACK
This keyword reads a ZRD file, and adds ray amplitude data to one or all detectors. This
command only makes sense to use if the ZRD file was generated with the currently loaded
system, as no attempt is made to modify object numbers or coordinates.
Syntax:
ZRDPLAYBACK zrdfilename, surface, detector, clear, filterstring
Discussion:
This keyword requires the name of a ZRD file. For information on the ZRD format, see “Ray
database (ZRD) files”. The file name may each be defined by either a literal string or a single
string variable. The file name must not include a path and the file must be in the same folder as
the current lens file. The surface argument is the surface number of the Non-sequential
surface, use 1 for Non-sequential mode. The integer detector is either 0 for all detectors, or the
object number of a specific single detector. If clear is set to anything other than zero, then the
specified detector(s) are cleared prior to playback. The optional filterstring is applied to the
rays before being played back.
Example:
ZRDPLAYBACK "MYRAYS.ZRD", 1, 0, 1, "H3 & H5"
ZRDSAVERAYS
Opens a ZRD ray database file, applies a filter, and saves the rays in the filtered subset that
intersect a specified object number.
Syntax:
ZRDSAVERAYS infilename, outfilename, filterstring, object
This keyword requires the name of an input ZRD file, the name of the output source ray DAT
file, the filter string to apply, and the object number. For information on the ZRD format, see
“Ray database (ZRD) files. Source ray files are described in “Source File”. For information on the
filter string format see “The filter string” . The file names and filter string may each be defined
by either a literal string or a single string variable. The file names must include the full path
name. Although any extensions may be specified, the extension ZRD is recommended for the
input file, and the extension DAT is recommended for the output file. The input and output file
names must be distinct. If no filtering is desired, the filterstring argument should be replaced
with two double quotes like this: "".
Examples:
ZRDSUM
Concatenates two ZRD files into a third file. This command only makes sense to use if the two
ZRD files were traced in the same system, as no attempt is made to modify object numbers or
coordinates.
Syntax:
ZRDSUM infilename1, infilename2, outfilename
Discussion:
This keyword requires the name of two input ZRD files and the name of the output ZRD file.
For information on the ZRD format, see “Ray database (ZRD) files”. The file names may each be
defined by either a literal string or a single string variable. The file names must include the full
path name. Although any extensions may be specified, the extension ZRD is recommended for
all three file names. The input and output file names must be distinct. Both input files must use
the same ZRD format, and the output file will use this same ZRD format. See also ZRDAPPEND.
Example:
Example Macro 1
The following sample macro will print out the image surface intercept coordinates of the chief
ray at every defined field angle:
nfield = NFLD()
maxfield = MAXF()
n = NSUR()
FOR i, 1 , nfield, 1
hx = FLDX(i)/maxfield
hy = FLDY(i)/maxfield
PRINT "Field number ", i
RAYTRACE hx,hy,0,0,PWAV()
PRINT "X-field angle : ",FLDX(i)," Y-field angle : ", FLDY(i)
PRINT "X-chief ray : ",RAYX(n), " Y-chief ray : ", RAYY(n)
PRINT
NEXT
PRINT "All Done!"
The first line of the macro calls the NFLD() function which returns the number of defined field
angles, and assigns it to the variable "numfield". The second line calls MAXF(), which returns
the maximum radial field and stores the value in the variable "maxfield". The number of
surfaces is then stored in the variable "n" by calling the function NSUR().
The FOR loop is then defined with i being the counter for the field position, starting at 1, with a
maximum value of nfield, and an increment of 1 on each loop. The two macro lines which
define "hx" and "hy" use the functions FLDX() and FLDY(), which return the x- and y- field
values for the current field position number "i".
The chief ray is then traced by the keyword RAYTRACE. Note the chief ray intersects the center
of the pupil, which is why the two pupil coordinates are both zero. The PWAV() function
returns the primary wavelength number, which is usually used for the chief ray. The various
PRINT commands will output the chief ray coordinates on the image surface to the screen.
Example Macro 2
The following sample macro will estimate the RMS spot radius (on axis) of the current optical
system. The macro traces many random rays through the system, and records the radial offset
! Start at wavelength 1
weightsum = 0
wwrms = 0
FOR w, 1, NWAV(), 1
rms = 0
FOR i, 1, n, 1
hx = 0
hy = 0
angle = 6.283185 * RAND(1)
! SQRT yields uniform distribution in pupil
radius = SQRT(RAND(1))
px = radius * COSI(angle)
py = radius * SINE(angle)
RAYTRACE hx, hy, px, py, w
x = RAYX(ns)
y = RAYY(ns)
rms = rms + (x*x) + (y*y)
NEXT
rms = SQRT(rms/n)
wwrms = wwrms + ( WWGT (w) * rms )
weightsum = weightsum + WWGT(w)
FORMAT .4
PRINT "RMS spot radius for ", WAVL(w),
FORMAT .6
PRINT " is ", rms
NEXT
wwrms = wwrms / weightsum
PRINT "Wavelength weighted rms is ", wwrms
FORMAT .2
Note the use of the trailing commas in the first two PRINT commands. These allow the data
printed from the first three PRINT commands to appear on the same line. The intervening
FORMAT commands changes the way the numerical output is printed, even on the same line.
The "!" character is used to indicate a comment, which is ignored when the macro is run.
The first macro that is executed, usually from the ZPL Macro Dialog box, is the “parent” macro.
The parent macro can call other macros, and these macros are called “child” macros. The
parent macro creates a buffer of 51 numeric and 51 string values. The buffer can be used to set
or retrieve numeric or string values, which allows macros to share data, or pass arguments to
one another. The buffer is unique to the parent macro, and any child macros called by the
parent. If more than one parent macro is executing in parallel (for example, in two windows
each updating a different macro) each parent has their own buffer, and no data is shared
between parents.
The easiest way to see how the parent and child macros work is by example. This example will
use just two very simple macros, but there is no hard limit as to how many macros may be
called or nested.
Consider two macros, called PARENT.ZPL and CHILD.ZPL The PARENT.ZPL macro is:
CALLSETDBL 1, 3.5
CALLSETSTR 1, "Hello World"
CALLMACRO CHILD.ZPL
PRINT CALD(1)
The PARENT.ZPL macro then executes the macro CHILD.ZPL. The child macro prints the
message “Execut- ing child macro” to the child’s output window, which is not visible during
execution. The child then extracts the numeric value from numeric buffer at index 1 using
CALD(1), and the string value from the string buffer index 1 using $CALLSTR(1). These values
are also printed. Finally, the child macro overwrites the numeric value in index 1 with the new
value 7.11, and the child macro completes.
Control now returns to the parent macro, which copies the child macro output window
contents to the parent’s output window, and the child’s output window contents are discarded.
Lastly, the modified value from the numeric call buffer at index 1 is printed. The output of this
macro looks like this:
Executing child macro
3.5000
Hello World
7.1100
The sample macros PARENT.ZPL and CHILD.ZPL are included with OpticStudio in the Macros
folder.
Note that argument names cannot contain spaces, quotes (“”) are required around the macro
path and argument values, and the ‘-zpl’ flag must come before any string arguments. All ‘-v’
arguments are optional and can be retrieved using the $GETARG string function:
var$ = $GETARG(“variable_name”)
or
var$ = $GETARG(varName$)
The “IsAutomated” string argument is always populated automatically, with a value of ‘True’ if
the macro is executing via the command line, and ‘False’ otherwise.
OpticStudio will automatically shut down once the macro has finished running, however it is
possible something might prevent the macro from completing, such as a dialog box waiting
for user input.
Macro solves work by invoking a user defined ZPL Macro to compute the solve. Any numerical
value that can be computed in a macro can be returned to the editor calling the solve macro.
The macro may make use of the data that exists elsewhere in the editors, such as previous
surfaces. Once the data is computed, the macro uses the keyword SOLVERETURN to pass the
data back to the editor.
For a simple example, here is a macro that computes the first -order optical power of the
interface between surfaces 1 and 2, and returns this power as the solve value:
n1 = INDX(1)
n2 = INDX(2)
c2 = CURV(2)
SOLVERETURN (n2-n1)*c2
The surface or object number from which the macro solve is being called can also be extracted
using the numeric ZPL SOSO function.
Use surface comments and the SURC function in solve macros whenever possible.
Be aware that when tolerancing, the SURC function will keep returning the original surface
number even if additional surfaces are added automatically.
For example, if SURC(surface_name$) returns 10 in the original file, when the file is toleranced
it will keep returning 10 even if surfaces are added during the tolerancing.
Macro solves may be placed prior to the stop surface only if the computations in the macro
aren’t based upon any ray data. Care should be taken to ensure that this is indeed the case.
See the description of the ZPL keyword “SOLVEBEFORESTOP” for details.
If an error or invalid condition occurs in the macro, and the solve value cannot be computed,
then the macro should return without calling SOLVERETURN. The absence of the
SOLVERETURN call will indicate to OpticStudio that the solve cannot be computed and the
optical system is in an error condition. This is particularly important during optimization.
0: The current column, which is the column the solve is placed in. This is the default for all
pickup solves.
String Codes
String codes are 3 character arguments used in the keywords “GETTEXTFILE” and
“OPENANALYSISWINDOW”.
The string codes are listed below. Note that the codes are case sensitive.
“Code” DESCRIPTION
File Codes
"New" NEW_FILE
"Ope" OPEN_FILE
"Sav" SAVE_FILE
"Sas" SAVE_AS
"Bac" BACKUP_TO_ARCHIVE_FILE
"Res" RESTORE_FROM_ARCHIVE_FILE
For more information, please see the section “About the ZOS-API”.
User Analyses
The User Analyses button is found in the ZOS-API Applications section of the Programming
tab. The feature shows a drop-down list of all analyses that have been created using ZOS-API
and stored in the <data>\ZOS-API\User Analysis folder (see “Folders”). Clicking on the
executable name will execute that analysis.
For a full description of the ZOS-API, please see “About the ZOS-API”.
Phase Plot for Binary 2 Creates a graph showing the phase and the inverse of the phase
slope for Binary 2 surfaces. The plot indicates the phase over the clear semi-diameter or semi-
diameter of the surface.
SampleAnalysis1An example user analysis created using the language C# that plots a graph
of MTF vs. Field. The file <ZOS-API Sample Code>\C#\SampleAnalysis1.cs contains the code
used to generate this analysis.
Transmission Plot This analysis generates a graph of transmission vs. wavelength for a
selected Configuration and Field in a Sequential Mode system. Transmission is calculated by
sampling a grid of pupil points and averaging their transmission. Data can be saved as a text
file.
User Extensions
See “ZOS Inherent – User Extension” in the section ZOS Inherent (ZOS uses your Application)
for more details.
For a full description of the ZOS-API, please see About the ZOS-API.
RCWAvisualization A visualization tool to help users define the grating parameters in Non-
Sequential Mode. This tool functions with User Defined Objects that use a RCWA DLL. For
more information on this tool, see the Knowledgebase Article Simulating diffraction efficiency
of surface-relief grating using the RCWA method.
Interactive Extension
The Interactive Extension mode is almost identical to a User Extension except an Interactive
Extension does not have to be a standalone executable.
This capability allows connections from scripting environments such as MATLAB or Python
where there is no compiled executable that OpticStudio can launch.
Instance Number This is the instance ID for the running instance of OpticStudio. This allows
the external application to connect to a specific instance of OpticStudio if more than one
instance is running.
Status displays whether or not an external application is currently connected and controlling
OpticStudio. Note that only one external application can connect at a time.
Auto Close on Disconnect If checked (the default), when an external connection is shut down,
the Interactive Extension dialog will automatically close.
Close This closes the Interactive Extension dialog, terminating any active connection.
The Interactive Extension button is found in the ZOS-API.NET Applications section of the
Programming tab.
Selecting ZOS-API Introduction will open the OpticStudio Help Files to the section About the
ZOS-API.
For more information, please see the section About the ZOS-API.
C#
C++
The C++ button found in the ZOS-API Application Builders group in the Programming tab is
used to access templates for starting projects with the API using C++ as the programming
language:
Mathematica
Templates that are currently provided are for the development of standalone applications and
interactive extensions.
MATLAB
Templates that are currently provided are for the development of standalone applications and
interactive extensions.
Python
The Python button found in the ZOS-API Application Builders group in the Programming tab is
used to access templates for starting projects with the API using Python as the programming
language.
Templates that are currently provided are for the development of standalone applications and
interactive extensions.
l Standalone Mode. In this mode the application launches an entirely new instance of
OpticStudio (the other modes rely on the presence of an existing instance already
being open). Thus, care must be taken to ensure that 1 or fewer instances of OpticStu-
dio are already open before launching an application in this mode (to stay within the
licensing constraints for OpticStudio). In this mode OpticStudio is effectively being run
as a service, with no user interface.
l User Extensions Mode. This mode allows for applications to be built for inter-process
communication. A toggle has been provided that determines whether or not the user
interface is kept up-to-date with changes made in the program when run in this mode.
l User Operands Mode. This mode is linked to a user defined operand in the Merit Func-
tion Editor, which is added to the editor using the UDOC operand. This mode would
not allow changes to the current lens system or to the user interface (i.e. in this mode
only changes to a copy of the system are allowed). Access to the list of open analyses in
the file has not been provided in this mode, since a new instance of an analysis can
always be run if needed.
l User Analysis Mode. This mode is linked to a single analysis window. This mode is
nearly identical to User Operands mode, except it is used to populate data for a custom
analysis. The data is displayed using the modern graphics provided in OpticStudio for
most analyses.
Another means of categorizing the various communication modes is based on the method by
which the application connects to OpticStudio. Either your application is standalone and will
start up its own copy of OpticStudio with which to interact (Standalone Mode), or OpticStudio
is already running and will call your application (all other modes, which we will refer to as
‘Inherent’ Modes).
Note that while applications built using Inherent Modes compile to executable (.exe) files just
as with applications built using Standalone Mode, in order for Inherent Mode applications to
be used by OpticStudio the .exe files need to be copied (or built) into certain folders in your
OpticStudio installation. The given folder name will be specific to your personal installation; we
will refer to this as the {program} folder. Within that folder:
Get Connected…
There are two different methods to connect to the Ansys Zemax OpticStudio API (ZOS-API):
Either your application is ‘Standalone’ and it will start OpticStudio during its execution, or
OpticStudio is already running and will call your application (‘Inherent’). For either case, you
need a properly installed and licensed version of Ansys Zemax OpticStudio.
The standard boilerplate code that every ZOS-API Application needs can be generated by the
Standalone Application buttons available in ZOS-API.NET Application Builders group in the
Programming Tab.
This document focuses on using ZOS-API in a .NET environment using C# (or any other .NET-
capable language). ZOS-API can also be used in a .COM environment using C++ (or any other
.COM-capable language).
Change the Name, Location and Solution name to something appropriate for your
Solution/Project
You should see something along the lines of Figure 1.1 (below).
Figure 1.1
Figure 1.2
Figure 1.2a
Figure 1.3
Figure 1.3b
Figure 1.3d
Figure 1.3e
Figure 1.4
Figure 1.5
NOTE: Copy Local determines whether or not the referenced library is copied to the output
directory when the project builds. For proper operation, ZOSAPI.dll and ZOSAPI_Interfaces.dll
must remain in the OpticStudio install directory. The ZOSAPI_NetHelper.dll on the other
hand should always be in the directory that your application is run from. This means that if you
are developing a User Analysis, User Operand, or User Extension, ZOSAPI_NetHelper.dll should
be copied to the proper location along with your plugin.
Select the programming languange that you wish to use, and then select standalone, or one of
the inherent application options.
Selecting “Standalone” will open a template for a standalone application, and this is
introduced in the next section called “ZOS Standalone Applications (Your Application Uses
ZOS)”
The remaining options are “User Extension”, “User Analysis”, and “User Operand”. These are all
considered inherent applications, meaning ZOS uses the compiled application. This is
introduced in the section called “ZOS Inherent (ZOS uses your Application) .
The C#, C++, MATLAB, and Python programming languages all have templates for Standalone
Applications.
Clicking on ‘Standalone Application’ will generate all the necessary files, set the Properties,
generate the initial boilerplate and open the generated Solution in Visual Studio. The Solution
is generated in your ‘Zemax\ZOS-API Projects’ Folder (See ‘Final Thoughts…)
See the Ansys Zemax OpticStudio help system to see how your application is invoked
There are a few features available only to ZOS Inherent applications which are described in
their own sections of this document.
The C# and C++ programming languages include templates for User Analysis applicaitons:
The C# and C++ programming languages include templates for User Analysis applicaitons:
The C# and C++ programming languages include templates for User Extensions:
If I generate another Template, it will be generated into a similarly name, but unique Folder:
NOTE: ‘Main’ initializes the system and then calls another function to actually ‘connect’ to the
API and do the actual work for your application. Due to possible ‘order of operation
optimizations’ imposed by the Operating System and Compiler/Optimizer, it is possible that
certain code sequences could ‘pre-load’ functions which “aren’t there yet” causing an
Exception to be thrown.
Therefore, it is ‘best practice’ to have ‘Main’ call a secondary function and that secondary
function directs all the ‘work’ for your application
ALSO: While not strictly necessary, you should check the runtime status of your license.
l is not working
l you need a new license
l there has been some other form of license error
l there are too many instances of OpticStudio (14 or 15) and/or Zemax 13 running
IZOSAPI_Application TheApplication
‘TheApplication’ (or whatever you choose to call this variable) is the point of access to all
facets of ZOS that have been made available to you.
Void TheApplication.CloseApplication()
Close the Application. You can only have one Application running at a time. If you want to start
a new one, you need to close the old one first. Note that this only applies in Standalone mode
– a User Operand, User Analysis, or User Extension is not allowed to close down
OpticStudio. Also, the server instance of OpticStudio will automatically shut down when your
application exits.
ZOSAPI_Mode TheApplication.Mode
(Read Only)
Provides the current ‘Mode’ in which the System is operating.
IOpticalSystem TheApplication.PrimarySystem
(Read Only)
The currently ‘Active’ Optical System. The PrimarySystem is the System upon which any
Analyses or Tools will operate. This is the System created when we created the Application.
int TheApplication.NumberOfOpticalSystems
(Read Only)
How many Optical Systems are currently in use.
IOpticalSystem LoadNewProject(String
newProject)
Create a new Optical System by loading the given file.
IOpticalSystem ThePrimarySystem
‘ThePrimarySystem’ gives you access to the currently loaded .ZMX file and provides several
operations and data access.
File Operations
saveIfNeeded: false
);
ThePrimarySystem.Save();
ThePrimarySystem.SaveAs(fileName: FQPCopy);
ISystemData TheSystemData
‘TheSystemData´ holds all the basic data of the System.
NOTE: In ZOS’s User Interface the ‘System Explorer’ provides the ability to see and change the
SystemData values.
ISDApertureData Aperture
The system aperture defines the size of the beam through the system on axis. The system
aperture is the overall system F/#, Entrance Pupil Diameter, Numerical Aperture, or Stop Size.
Any of these 4 quantities is sufficient to define the other 3 for a particular optical system. The
system aperture is used to define the object space entrance pupil diameter, which in turn is
used to launch all rays. The system aperture is always circular. Rays may be vignetted after
being launched by various surface apertures. There is only one system aperture, although there
may be many surface apertures.
ZemaxApertureType ApertureType
ZemaxApodizationType ApodizationType
Double ApodizationFactor
The apodization factor determines how fast the amplitude decays in the pupil. Used only for
Gaussian apodization.
Bool ApodizationFactorIsUsed
Turn this bit on if you want the Apodization factor to be in play.
Double SemiDiameterMargin
This semi diameter margin control allows specification of an additional amount of radial
aperture as a fixed number on surfaces with an automatic solve. The default value of zero
leaves no margin.
If both "percent" and "millimeters" margin values are non-zero, the percent is added first, then
the lens unit margin.
Bool TelecentricObjectSpace
If this checkbox is selected, ZOS will assume the entrance pupil is located at infinity, regardless
of the location of the stop surface.
Bool AFocalImageSpace
If this box is checked, ZOS will perform most analysis features in a manner appropriate for
optical systems with output beams in image space that are nominally collimated.
Bool IterateSolvesWhenUpdating
Solves placed on parameters in the Lens Data Editor sometimes require iteration to compute
accurately. ZOS normally detects the need for iteration. However, if ZOS does not iterate
Bool FastSemiDiameters
ZOS needs to update the clear semi-diameters or semi-diameters frequently, especially during
optimization. There is a trade-off between speed and accuracy. For axial systems, OpticStudio
will use the slower iterative algorithm only if the “Fast Semi-Diameters” option is checked “off”.
Bool CheckGRINApertures
If checked, this setting instructs OpticStudio to check all gradient index ray traces for surface
aperture vignetting.
IFields Fields
This feature is used to define the number, type, and magnitude of the field points to be used
for tracing rays. Vignetting factors can also be set.
IField members
Depicted are examples that get the existing values of the Field; these values can also be set in
the usual manner.
Angle Field angles are always in degrees. The angles are measured with respect to the object
space z axis and the paraxial entrance pupil position on the object space z axis. Positive field
angles imply positive slope for the ray in that direction, and thus refer to negative coordinates
on distant objects.
Paraxial Image Measured in lens units. When paraxial image heights are used as the field
definition, the heights are the paraxial image coordinates of the primary wavelength chief ray
Real Image Measured in lens units. When real image heights are used as the field definition,
the heights are the real ray coordinates of the primary wavelength chief ray on the image
surface.
IWavelengths Wavelengths
Wavelengths are always entered in microns. Wavelength weights can be used to define relative
spectral intensity, or simply to define which wavelengths are most important in a design. The
‘primary’ wavelength is used as a default wavelength: for example, if asked to compute
effective focal length, OpticStudio will compute it at the primary wavelength if no wavelength
is specified.
Double Temperature
The system temperature in degrees Celsius.
Double Pressure
The system air pressure in atmospheres. A value of 0.0 implies vacuum, 1.0 implies sea level.
Bool AdjustIndexToEnvironment
If set, all index data used for ray tracing will be adjusted from the “raw” glass catalog values to
be relative to the system temperature and pressure.
Bool Unpolarized
If set, then the polarization values Jx, Jy, X-Phase, and Y-Phase are ignored, and an unpolarized
computation will be performed. An unpolarized computation is performed by tracing two rays
with orthogonal polarization and averaging the resulting transmission.
PolarizationMethod Method
It selects the method used to determine the S and P vectors based on the ray vector.
Bool ConvertThinFilmPhaseToRayEquivalent
If set, ZOS converts the polarization phase computed using thin film conventions to phase
along the ray. If unselected, the ray coefficients will not be converted from the field
coefficients. The recommended and default setting is to convert the field thin film phase to ray
phase.
ISDAdvancedData Advanced
Please read the documentation before changing these settings.
ReferenceOPDSetting ReferenceOPD
The Optical Path Difference, or OPD, is of value in optical design computations because the
OPD represents the phase error of the wavefront forming an image. Any deviations from zero
OPD contribute to a degradation of the diffraction image formed by the optical system.
ParaxialRaysSetting ParaxialRays
Bool DontPrintCoordinateBreakData
If set, selected data will not be printed for coordinate break surfaces. Use of this option can
shorten and clarify some text listings, particularly in systems with many coordinate break
surfaces.
Bool TurnOffThreading
If set, OpticStudio will not split calculations into multiple threads of execution. Threading
allows computers with multiple CPU’s or multi-core CPU’s to calculate results more quickly.
The only reason to turn off threading is if insufficient memory exists to break calculations into
separate threads.
Bool OPDModulo2PI
If set, all OPD data will be computed as the fractional part of the total OPD. All OPD
computations will return results that are between -π and +π, or -0.5 and +0.5 waves. This
method of computing OPD may have applications to some specific problems. However, its use
is discouraged unless the user fully understands the meaning and ramifications of computing
OPD in this manner.
Bool IncludeCalculatedDataInSessionFile
ISDRayAimingData RayAiming
Ray Aiming controls the data used by the ray aiming algorithm.
RayAimingMethod RayAiming
Ray aiming is an iterative ray tracing algorithm in OpticStudio that finds rays at the object that
correctly fill the stop surface for a given stop size.
Bool UseRayAimingCache
If set, ZOS caches ray aiming coordinates so that new ray traces take advantage of previous
iterations of the ray tracing algorithm. Using the cache can speed up ray tracing dramatically
Bool UseRobustRayAiming
If set, ZOS uses a more reliable, but slower algorithm for aiming rays. This switch should only
be set if the ray aiming algorithm is failing even with the cache turned on.
ISDMaterialCatalogData MaterialCatalogs
ISDMaterialCatalogData MaterialCatalogs = TheSystemData.MaterialCatalogs;
String[] GetCatalogsInUse()
Gets the array of strings that hold the names of the Catalogs that are currently in use.
String[] GetAvailableCatalogs()
ISDTitleNotes TitleNotes
ISDTitleNotes TitleNotes = TheSystemData.TitleNotes;
String Title
The lens title will appear on graphic and text output.
String Notes
The notes section allows entry of a few lines of text which is stored with the lens file.
String[] GetCoatingFiles()
An array of strings that holds all the available Coating Files.
String CoatingFile
Get/Set the Coating File.
String[] GetScatterProfiles()
An array of strings that holds all the available Scattering Profiles.
String ScatterProfile
Get/Set the Scattering Profile.
String[] GetABgDataFiles()
An array of strings that holds all the available ABg Data Files.
String[] GetGradiumProfiles()
An array of strings that holds all the available Gradium Profiles.
String GradiumProfile
Get/Set the Gradium Profile.
Void ReloadFiles()
Reload all the files.
ISDUnitsData Units
Specify the various unit measurements.
ZemaxSystemUnits LensUnits
ZemaxUnitPrefix SourceUnitPrefix
Provides the prefix attached to ‘Source Units’ when printed as text.
ZemaxSourceUnits SourceUnits
Source units define the unit of measure for the flux (power) or energy emitted by non-
sequential sources. This setting is used for sources defined in the non-sequential component
editor, and for defining the power and irradiance in physical optics analysis.
ZemaxAnalysisUnits AnalysisUnits
Analysis units define the unit of measure for irradiance (radiometric) or illuminance
(photometric). This setting only affects data as displayed on detectors collecting light from
sources defined in the non-sequential component editor.
ZemaxMTFUnits MTFUnits
MTF units for focal systems may be cycles per millimeter or cycles per milliradian.
Analysis
You need to add a new ‘using’ clause (at the top of your file, if you’ve been following along):
using ZOSAPI;
using ZOSAPI.Analysis;
‘TheAnalyses’ (note that it’s the plural form) holds all the information needed to access all the
Analyses made available to you from ZOS.
It should be noted that when an Analysis is ‘started’, it has not generated any results. In
Standard ZOS parlance, consider the Preference ‘Show Options First’ option is set. The naming
convention mimics almost exactly the Analysis names found in the ZOS UI’s Ribbon Bar with
‘New_’ prepended. Visual Studio’s Intellisense is very helpful for finding these if you’re not
sure.
ZOSAPI is built on the concept of ‘Interfaces’. (We leave finding a deeper understanding of
Interfaces as an exercise for the Reader.)
As an experienced OpticStudio User, you know that each Analysis has its own group of
‘Settings’. In ZOSAPI, each Analysis’s Settings are defined in an Interface and, in order for the
compiler to understand what you’re doing, you have to tell the compiler which Interface you
are using. OpticStudio has also placed each of the Analyses which are normally ‘grouped’
together into their own ‘namespaces’. For example, for the FftMtf Analysis, you need to add
another ‘using’ statement at the top of your file:
using ZOSAPI.Analysis.Mtf;
The line of code that provides access to the settings of the FftMtf Analysis is:
Using your Analysis (variable FftMtf), assign the Settings to variable FftMtf_Settings and use
the ‘Interface to Analysis Settings for the FftMtf Analysis’ to access the data therein.
NOTE: While it is possible to use the C# language ‘type’ ‘var’ it is less unwise to use the actual
type name to catch, at compile time, any typing errors you might make.
Values of settings with built-in types (bool, int, double, etc…) are used as simply as one would
expect:
FftMtf_Settings.ShowDiffractionLimit = true;
FftMtf_Settings.UsePolarization = false;
FftMtf_Settings.MaximumFrequency = 42.0;
FftMtf_Settings.Type = MtfTypes.SquareWave;
FftMtf_Settings.SampleSize = SampleSizes._128x128;
Fields
Fields use functions to get and set their values. There is also other functionality available for
Fields. The ‘set’ functions return an ‘IMessage’ which contains any errors that happen when
you try to set a Field to an illegal value.
int nF_FftMtf = FftMtf_Settings.Field.GetFieldNumber();
IMessage iM_SetFieldN = FftMtf_Settings.Field.SetFieldNumber(nF +
11);
IMessage iM_UseAllFields = FftMtf_Settings.Field.UseAllFields();
Wavelengths
Wavelengths use functions to get and set their values. There is also other functionality
available for Wavelengths. The ‘set’ functions return an ‘IMessage’ which contains any errors
that happen when you try to set a Wavelength to an illegal value.
int numW = FftMtf_Settings.Wavelength.GetWavelengthNumber();
IMessage iM_WaveN = FftMtf_Settings.Wavelength.SetWavelengthNumber
(11);
IMessage iM_UseAllWaves = FftMtf_
Settings.Wavelength.UseAllWavelengths();
Surfaces use functions to get and set their values. There is also other functionality available for
Surfaces. The ‘set’ functions return an ‘IMessage’ which contains any errors that happen when
you try to set a Surface to an illegal value.
int nS = FftMtf_Settings.Surface.GetSurfaceNumber();
IMessage iM_SetSurfN = FftMtf_Settings.Surface.SetSurfaceNumber
(22);
IMessage iM_UseImageSurf = FftMtf_Settings.Surface.UseImageSurface
();
IMessage iM_UseObjSurf = FftMtf_
Settings.Surface.UseObjectiveSurface();
Generating Results
Using our previously defined variable ‘FftMtf’…
bool isFftMtfRunning = FftMtf.IsRunning();
IMessage iM_FftMtfApply = FftMtf.Apply();
IMessage iM_FftMtfApplyAndWait = FftMtf.ApplyAndWaitForCompletion
();
FftMtf.WaitForCompletion();
Getting Results
IAR_: Interface to Analysis Results
If you’ve been following along closely, you may have noticed the Settings interface concept of
‘IAS_’ and ‘IAS_FftMtf’. ‘IAS_’ exists to define items in common for all settings (currently there
are none) and is used to define a ‘common interface’ to Settings for ALL the Analyses. ‘IAS_
FftMtf’ exists because the settings for the FftMtf Analysis are unique to the FftMtf Analysis
and must be defined to grant access to them.
All that being said, and hopefully not confusing the issue, let us continue.
As noted previously:
IAR_MetaData MetaData
IAR_MetaData metadata = FftMtf_Results.MetaData;
string featureDescription = metadata.FeatureDescription;
string lensFile = metadata.LensFile;
string lensTitle = metadata.LensTitle;
DateTime runDate = metadata.Date;
IAR_HeaderData headerData = FftMtf_Results.HeaderData;
string[] headerDataLines = headerData.Lines;
IAR_DataGrid[] DataGrids
If the result data cannot be represented by a Grid, this value will be null.
Otherwise, it will contain an array (of size ‘dataGrids.Length’) of ‘IAR_DataGrid’ entries. Thus,
to look at each ‘IAR_DataGrid’ in the result:
IAR_DataGrid
Using these defined variables we calculate the X and Y values and retrieve the Z value for that
point:
if (Values != null)
{
for (int nRow = 0; nRow < Nx; nRow++)
{
double X_Value = (MinX + (nRow * Dx));
for (int nCol = 0; nCol < Ny; nCol++)
{
double Y_Value = (MinY + (nCol * Dy));
double Z_Value = Values[nRow, nCol];
}
}
}
IAR_DataGridRgb[] DataGridsRgb
RBG Grids are similar in nature to Data Grids; instead of the double value, it’s an RBG Value.
Instead of:
double[,] Values = dataGrid.Values;
double Z_Value = Values[nRow, nCol];
We use:
IAR_Rgb[,] Values = dataGrid.Values;
IAR_Rgb RGB_Value = Values[nRow, nCol];
IAR_DataSeries[] DataSeries
If the result data cannot be represented by a Series, this value will be null.
IAR_DataSeries
Type ‘ILensDataEditor’ takes care of the ‘housekeeping’ of the System. Keeping track of how
many Surfaces there are, Adding, Inserting, Removing Surfaces and so on.
double d = XConicCell.DoubleValue;
XConicCell.DoubleValue = d + 1.0;
ISurfaceTypeSettings
Ansys Zemax OpticStudio 2023 R2 The Programming Tab 2321
SurfaceTypeSettings provides any extra ‘housekeeping’ needed to properly define the
SurfaceType.
ISurfaceTypeSettings sts = Surface_n.GetSurfaceTypeSettings
(thisSurfaceType);
SurfaceType st = sts.Type; // READ ONLY
bool isValidSurfaceTypeSettings = sts.IsValid; // READ ONLY
bool requiresFile = sts.RequiresFile; // READ ONLY
String[] allFileNames = sts.GetFileNames();
sts.FileName = allFileNames[2]; // R/W
bool didChange = Surface_n.ChangeType(settings: sts);
ILDETypeData TypeData
ILDETypeData provides the data that is specific to the selected Row.
ILDETypeData ldeTD = Surface_n.TypeData; // READ ONLY
ZemaxColor zcSC = ldeTD.SurfaceColor; // R/W
ZemaxOpacity zoSO = ldeTD.SurfaceOpacity; // R/W
ZemaxColor zcRC = ldeTD.RowColor; // R/W
bool sdIS = ldeTD.IsStop; // R/W
bool sdCBS = ldeTD.CanBeStop; // READ ONLY
bool sdGCR = ldeTD.IsGlobalCoordinateReference; // R/W
bool sdCBGCR = ldeTD.CanBeGCR; // READ ONLY
bool sdIgnore = ldeTD.IgnoreSurface; // R/W
bool sdSCBH = ldeTD.SurfaceCannotBeHyperhemispheric;// R/W
ILDEDrawData DrawData
ILDEDrawData ldeDraw = Surface_n.DrawData; // READ ONLY
bool bHide = ldeDraw.HideRaysToThisSurface; // R/W
bool bSkip = ldeDraw.SkipRaysToThisSurface; // R/W
bool bDND = ldeDraw.DoNotDrawThisSurface; // R/W
bool bNoE = ldeDraw.DoNotDrawEdgesFromThisSurface; // R/W
bool bDLA = ldeDraw.DrawLocalAxis; // R/W
SurfaceEdgeDraw sde = ldeDraw.DrawEdgesAs; // R/W
ILDETiltDecenterData TiltDecenterData
ILDETiltDecenterData tdcData = Surface_n.TiltDecenterData; //
READ ONLY
TiltDecenterOrderType bso = tdcData.BeforeSurfaceOrder; // R/W
double bsdX = tdcData.BeforeSurfaceDecenterX; // R/W
double bsdY = tdcData.BeforeSurfaceDecenterY; // R/W
double bstX = tdcData.BeforeSurfaceTiltX; // R/W
double bstY = tdcData.BeforeSurfaceTiltY; // R/W
double bstZ = tdcData.BeforeSurfaceTiltZ; // R/W
TiltDecenterPickupType asm = tdcData.AfterSurfaceMode; //
READ ONLY
int asms = tdcData.AfterSurfaceModeSurface; //
READ ONLY
bool asmst = tdcData.AfterSurfaceModeSurfaceIsThis; //
READ ONLY
tdcData.SetAfterSurfaceModeExplicit();
TiltDecenterPickupType (Intellisense
Screenshot)
ILDEPhysicalOpticsData
PhysicalOpticsData
ILDEPhysicalOpticsData poD = Surface_n.PhysicalOpticsData; //READ
ONLY
bool bpo_1 = poD.UseRaysToPropagateToNextSurface; // R/W
bool bpo_2 = poD.DoNotRescaleBeamSizeUsingRayData; // R/W
bool bpo_3 = poD.UseAngularSpectrumPropagator; // R/W
bool bpo_4 = poD.DrawThisLensOnShadedModel; // R/W
bool bpo_5 = poD.ReComputePilotBeamParameters; // R/W
bool bpo_6 = poD.UseXaxisReference; // R/W
ILDECoatingData CoatingData
ILDECoatingSettings
ILDECoatingSettings coS = ldeCD.GetLayerSettings(layer: 2);
int LayerN = coS.Layer; // READ ONLY
coS.ExtinctionOffset = 1.0;
int ePickUp = coS.ExtinctionPickupFrom; // READ ONLY
CoatingStatusType eCST = coS.ExtinctionStatus; // READ ONLY
coS.IndexOffset = 1.0;
int iPickUp = coS.IndexPickupFrom; // READ ONLY
CoatingStatusType iCST = coS.IndexStatus; // READ ONLY
coS.ThicknessMultiplier = 1.0;
int tPickUp = coS.ThicknessPickupFrom; // READ ONLY
CoatingStatusType tCST = coS.ThicknessStatus; // READ ONLY
coS.SetExtinctionStatusFixed();
coS.SetExtinctionStatusPickup(fromLayer: 1);
coS.SetExtinctionStatusVariable();
coS.SetIndexStatusFixed();
coS.SetIndexStatusPickup(fromLayer: 1);
coS.SetIndexStatusVariable();
coS.SetThicknessStatusFixed();
coS.SetThicknessStatusPickup(fromLayer: 1);
coS.SetThicknessStatusVariable();
ILDEImportData ImportData
ILDEImportData ldeID = Surface_n.ImportData; // READ ONLY
string did = ldeID.DefaultImportDirectory; // READ ONLY
bool idB = ldeID.ImportDataFile(dataFile: "My Import Data File");
string[] didA = ldeID.GetImportFiles(directory: "My Folder");
The Nonsequential Component Editor (NCE) may also be used in Sequential Systems when
the Active Surface is a Nonsequential Component.
The NCE takes care of the ‘housekeeping’ of the System; Keeping track of the number of
Objects, their sequence, Adding/Removing Objects and so on.
// Recalling that:
// IOpticalSystem ThePrimarySystem = TheApplication.PrimarySystem;
NOTE: When ZOSAPI first starts up, it will have created a new ‘default’ Sequential System. We
need to create a new ‘Non-sequential’ System.
ThePrimarySystem.New(saveIfNeeded: false);
ThePrimarySystem.MakeNonSequential();
INonSeqEditor NCE = ThePrimarySystem.NCE;
if (NCE.SetActiveSurface(currentActiveSurface + 1))
{
//
// True if the next Surface is also a nonsequential component
group
//
}
if (NCE.NextNSCGroup())
{
//
// True if there is another Nonsequential Component Group.
//
}
if (NCE.PrevNSCGroup())
{
//
// True if there is a Nonsequential Component Group prior to
this one.
//
}
int nObjects = NCE.NumberOfObjects;
At this point, we should have 3 objects in this Group, all of them are ‘null’ objects because, by
definition, we Insert and Add null objects. (Object 1 is null because when the system is first
created it contains 1 null object.
if (NCE.RemoveObjectAt(objectNumber: 3))
//
//
if (nRemoved != 1)
//
//
//
//
//
// Operate on Object_n
//
IobjectTypeSettings
ObjectTypeSettings provides extra ‘housekeeping’ needed to properly define the
ObjectType.
INCETypeData TypeData
INCETypeData nceTD = Object_n.TypeData; // READ ONLY
//
// User Defined Aperture Informnation
//
if (nceTD.AreUDASettingsAvailable) // READ ONLY
{
nceTD.UserDefinedAperture = true;
nceTD.UDAScale = 1.1;
string[] udaFilenames = nceTD.GetAvailableUDAFiles();
if (udaFilenames.Length > 0)
{
nceTD.UDAFile = udaFilenames[0];
}
INCEDrawData DrawData
INCEDrawData nceDD = Object_n.DrawData;
nceDD.DoNotDrawObject = false;
nceDD.DrawLocalAxis = true;
if (nceDD.SupportsDrawingResolution) // READ ONLY
{
nceDD.DrawingResolution = DrawingResolutionType.Presentation;
}
nceDD.NumSegments1 = 22;
nceDD.NumSegments2 = 42;
string segment1 = nceDD.Segments1Type; // READ ONLY
string segment2 = nceDD.Segments2Type; // READ ONLY
if (nceDD.MakeAllObjectsDrawLikeThisOne())
{
}
nceDD.ExportAsTriangles = true;
nceDD.IncreaseResolutionOnShadedModelLayouts = false;
nceDD.Opacity = ZOSAPI.Common.ZemaxOpacity.P50;
nceDD.ObjectColor = ZOSAPI.Common.ZemaxColor.Color15;
INCECoatScatterData CoatScatterData
INCECoatScatterData nceCSD = Object_n.CoatScatterData;// READ ONLY
if (nceCSD.IsCoatScatterAvailable) // READ ONLY
{
int nFaces = nceCSD.NumberOfFaces; // READ ONLY
INCECoatScatterFaceData csfd = nceCSD.GetFaceData(faceNumber:
2);
if (csfd != null)
{
}
}
INCEVolumePhysicsData
VolumePhysicsData
INCEVolumePhysicsData vpd = Object_n.VolumePhysicsData; // READ
ONLY
if (vpd != null)
{
if (vpd.IsVolumePhysicsAvailable) // READ ONLY
{
vpd.Model = VolumePhysicsModelType.PhotoluminescenceModel;
vpd.WavelengthShift = "Wavelength Shift String";
IVolumePhysicsModelSettings ivpms = vpd.ModelSettings; //
READ ONLY
}
}
INCEIndexData IndexData
INCEIndexData id = Object_n.IndexData; // READ ONLY
if (id != null)
{
if (id.IsIndexAvailable) // READ ONLY
if (ims != null)
{
}
}
}
INCEDiffractionData DiffractionData
INCEDiffractionData dd = Object_n.DiffractionData;
if (dd != null)
{
if (dd.IsDiffractionAvailable)
{
dd.Split = DiffractionSplitType.SplitByTable;
if (dd.IsDLLRequired)
{
string[] availableDLLs = dd.GetAvailableDLLs();
if (availableDLLs.Length > 0)
{
dd.DLL = availableDLLs[0];
}
}
dd.StartOrder = 1;
dd.StopOrder = 10;
int nParams = dd.NumberOfParameters; // READ ONLY
for (int ddIDX = 0; ddIDX < nParams; ddIDX++)
{
string pName = dd.GetReflectParamaterName(ddIDX);
double ddV = dd.GetReflectParameterValue(ddIDX);
if (!dd.SetReflectParameterValue
(paramIdx:ddIDX,value:ddV+22.0))
{
Debug.Fail(String.Format("Reflect{0}({1})", pName,
ddIDX));
}
pName = dd.GetTransmitParamaterName(ddIDX);
ddV = dd.GetTransmitParameterValue(ddIDX);
if (!dd.SetTransmitParameterValue
(paramIdx:ddIDX,value:ddV+22.0))
{
Debug.Fail(String.Format("Tramsmit{0}({1})", pName,
ddIDX));
}
INCECADData CADData
INCECADData cadD = Object_n.CADData;
if (cadD != null)
{
if (cadD.IsCADAvailable)
{
if (cadD.HasChordTolerance)
{
cadD.ChordTolerance = 22.0;
}
if (cadD.HasSurfaceTolerance)
{
cadD.SurfaceTolerance = 23;
}
if (cadD.HasFaceParameters)
{
cadD.FaceAngle = 42.0;
cadD.FaceMode = 22;
}
if (cadD.HasMergeSurfaces)
{
cadD.MergeSurfaces = true;
}
if (cadD.HasFaceData)
{
int nS = cadD.NumberOfSurfaces;
int fN = cadD.GetSurfaceFace(nS - 1);
if( ! cadD.SetSurfaceFace(surfaceIdx: nS - 1, face:fN))
{
Debug.Fail("Can't set Surface/Face");
}
}
if (cadD.HasPartData)
{
int nC = cadD.NumberOfConfigurations;
int cconfig = cadD.CurrentConfiguration;
for (int cIDX = 1; cIDX <= nC; cIDX++)
{
cadD.CurrentConfiguration = cIDX;
string cS = cadD.GetConfigurationName(cIDX);
}
for (int pIDX = 1; pIDX <= cadD.NumberOfParts; pIDX++)
{
The Merit Function Editor (MFE) interface allows you to add/edit/delete the operands and their
values.
As with all Editors, there are Rows comprised of Columns. Each Row in the Merit Function
Editor is thought of as an Operand. The Columns define the Parameters which modify how
the Operand provides its result. Each Operand has its own specific set of Parameters.
Tolerancing is used to determine the fabrication and alignment tolerances on radii, spacings,
and many other lens data values. For a complete description see the Tolerancing chapter of the
User's Guide.
ITDERow ToleranceOperandType
<XXXLink to Tolerance Operand Types>
ToleranceOperandTypes instill tolerance limits in Surface Radius, Surface Thickness, Abbe
Number of a Surface along with many other operands.
It must be noted that the MCE works slightly differently from the other editors; in the MCE
each Column is used to define a Configuration while each Row is used to specify an Operand
whose function it is to alter specific design data between Configurations.
Each Editor Cell in this Row/Column matrix contains the ‘Value’ of the Operand. Each of
these Operand Values can be different in each Configuration.
Each Row (Operand) contains the Parameters for the Operand. These Parameters remain
the same regardless of the Configuration.
Consider the MultiConfigOperandType ‘XFIE’: its sole Parameter specifies a Field Number,
say 1. Its Value is the new X-position of Field 1. Now consider there exist 2 Configurations, 1
and 2. Configuration 1 sets the Value to 10.0 and Configuration 2 sets the Value to 20.0. When
using Configuration 1, the X-position of Field 1 is 10.0 and Configuration 2 moves the X-
position of Field 1 to 20.0. The Parameter (Field #1) remains constant while the Value (new X-
position of Field #1) changes.
IMCERow MultiConfigOperandType
<XXXLink to Multiconfig Operand types>
MultiConfigOperandTypes represent various parts available for varying the Configuration
such as Afocal Image Space, Apodization Factor, Aperture Value and so on.
Each MultiConfigOperandType defines what the IMCERow’s data will represent. (Tthe
IMCERow’s ‘data’ represents the ‘Parameters’ for the ‘Operand’.) For example, a
MultiConfigOperandType of XFIE is using the IMCERow’s ‘Param1’ to hold the value that
the XFIE operand defines to be the ‘Field #’ value. To interact with XFIE’s ‘Field #’ data:
Debug.Assert(mceRow != null);
Debug.Assert(mceRow.Type = MultiConfigOperandType.XFIE);
Debug.Assert(mceRow.Param1Enabled);
int fieldN = mceRow.Param1;
mceRow.Param1 = 1;
config_1 = MCE.FirstConfiguration;
int nConfigs = MCE.NumberOfConfigurations;
//
// Get the Current Solve Type.
//
SolveType cSolveType = aCell.Solve; // READ ONLY
//
// If this Cell supports the ‘Marginal Ray Height’ Solve…
//
if(aCell.IsSolveTypeSupported(SolveType.MarginalRayHeight))
{
ISolveData iSD = aCell.CreateSolveType(SolveType.
MarginalRayHeight);
if(iSD != null)
{
ISolveMarginalRayHeight solveMRH = iSD as
ISolveMarginalRayHeight;
if(solveMRH != null)
{
solveMRH.Height = 1.0;
solveMRH.PupilZone = 2.0;
SolveStatus iSS = aCell.SetSolveData(solveMRH);
If(iSS != SolveStatus.Success)
{
// Handle errors here.
}
}
}
}
// If we now Get the SolveData, it should match what we’ve just
entered.
IOpticalSystemTools
ThePrimarySystem.Tools
Each Optical System provides you access to the System Tools. You can only run one tool at a
time on a given Optical System. To prepare a Tool for Running, you ‘Open’ it, as you will see
below.
ISystemTool Tools.CurrentTool
There are many in common with all System Tools:
IHammerOptimization
OpenHammerOptimization
IHammerOptimization iHam = Tools.OpenHammerOptimization();
if (iHam != null)
{
iHam.NumberOfCores = 8; // READ/WRITE
switch (iHam.Algorithm) // READ/WRITE
{
case OptimizationAlgorithm.DampedLeastSquares:
case OptimizationAlgorithm.OrthogonalDescent:
break;
}
iHam.AutomaticOptimization = true; // READ/WRITE
int nTargets = iHam.Targets; // READ ONLY
int nVars = iHam.Variables; // READ ONLY
long nSystem = iHam.Systems; // READ ONLY
double iM = iHam.InitialMeritFunction;
Console.WriteLine(String.Format("Initial Merit Function {0}",
iM));
for (int i = 1; i <= 10; i++)
{
Thread.Sleep(1000);
Console.WriteLine(String.Format("Iteration {0}", i));
iM = iHam.CurrentMeritFunction;
Console.WriteLine(String.Format("\t{0}", iM));
}
iHam.Cancel();
iHam.Close();
}
IRestoreArchive OpenRestoreArchive
Restore a ZOS Archive.
IRestoreArchive rZAR = Tools.OpenRestoreZAR();
if (rZAR != null)
{
switch(rZAR.SetFileName("C:\\Temp\\testingZARCreation.zar"))
{
//
// Handle as appropriate...
//
case ArchiveFileStatus.InvalidFile:
case ArchiveFileStatus.InvalidVersion:
case ArchiveFileStatus.Okay:
IExportCAD OpenExportCAD
The sample code below assumes that there is an open ZMX Sequential Mode file.
This code sample will run through all the Surfaces in the System and, for each Surface that is
followed by a non-mirror Material, will output a ‘STEP’ CAD file consisting of that Surface plus
the next one. Essentially there will be one STEP CAD file for each ‘Lens’ in the System.
User Operand
When using a ZOSAPI-based user operand, a “Prog#” of 0 performs the calculation, while any
other value retrieves the specified value from the result vector.
double Hx = TheApplication.OperandArgument1; // Hx
double Hy = TheApplication.OperandArgument2; // Hy
double Px = TheApplication.OperandArgument3; // Px
double Py = TheApplication.OperandArgument4; // Py
int dataLength = TheApplication.OperandResults.Length;
double[] results = new double[dataLength];
for (int i = 0; i < results.Length; ++i)
{
double x = i;
double x2 = x * x;
double x3 = x * x * x;
results[i] = Hx * x3 + Hy * x2 + Px * x + Py;
}
//
// Now assign the locally calculated resule back to the
Application.
//
TheApplication.OperandResults.Data = results;
NOTE: that the interface allows an arbitrarily large vector, however only the first 100 values will
be stored and accessible by OpticStudio.
NOTE: If you do not wish to make your analysis configurable (ie, your Analysis does not need
any input from the User to perform its task) your Analysis does not need to interact with ZOS
when in settings mode.
If the following code examples, these 4 strings are defined in class ‘Program’:
//
// Define the strings used to interact with the Settings.
//
private const string SC1 = "C1";
private const string SC2 = "C2";
private const string SC3 = "C3";
private const string SPos = "Pos";
l Integer
l Float (32 bit)
l Double (64 bit)
l Boolean
l String
l Byte
All of the types except string also support storing/retrieving an array of values using the
appropriate function name (i.e. GetDoubleArray vs. GetDoubleValue). These ‘Get’ functions
return ‘true’ if the Setting Variable already exists and the value was successfully and ‘false’
otherwise. Remember, the very first time your User Anaylsis is invoked, the dictionary holding
the data will be empty; the first ‘Get’ will set things up for subsequent accesses.
If(TheApplication.Mode == ZOSAPI_
Mode.UserAnalysisSettings)
For the sample below, assume there is a Windows Form (frmSettings) and a function
(ShowSettings) that displays the form and returns the frmSettings when the form is closed.
if (TheApplication.Mode == ZOSAPI_Mode.UserAnalysisSettings)
{
// show the settings UI
frmSettings f = ShowSettings(c1, c2, c3);
c1 = f.A;
c2 = f.B;
c3 = f.C;
//
// Save the new Settings for subsequent invocations
//
TheSettings.SetDoubleValue(SC1, c1);
TheSettings.SetDoubleValue(SC2, c2);
TheSettings.SetDoubleValue(SC3, c3);
TheSettings.SetIntegerValue(SPos, showType);
//
// Have the Analysis run when the Settings are closed.
//
TheAnalysis.RunAnalysisOnSettingsClosed = true;
}
If(TheApplication.Mode == ZOSAPI_
Mode.UserAnalysis)
There are currently four types of a data that can be calculated and displayed:
Note that only one format of data is allowed per user analysis.
1D Line Plot
2D Grid Plot
The 2D grid simple consists of a start and end value for the X axis, a start and end value for the
Y axis, and a 2D array of Z values (in row major order). The data is assumed to be regularly
spaced.
Text Data
The only input is the block of text to display:
Plug-In/Extension
A ZOS-API Extension is conceptually very similar to a ZPL Macro – the Extension controls the
active OpticStudio instance, blocks user interaction with the UI while it is running, and can
change virtually any aspect of the active lens system. Initial setup and connection to
OpticStudio is identical to the User Operand and User Analysis modes.
For an extension, the PrimarySystem (found on TheApplication) is always the lens system
displayed in OpticStudio. Note however that the Extension author can control whether or not
changes to PrimarySystem are displayed ‘live’ in the user interface:
TheApplication.ShowChangesInUI = true;
// Do some work
TheApplication.ShowChangesInUI = false;
There are also three additional properties available via the API that are specific to Extensions:
If you wish to work on a system without affecting the PrimarySystem, you can create a new
system and perform all of you operations on it:
// etc
TempSystem.SaveAs(@”C:\Temp\MyNewSystem.zmx”);
You can connect to a specific instance by using the instance number as an argument or 0 to
connect to any available instance.
Once connected you can terminate the connection either manually via the dialog box or by
running CloseApplication in the external application.
The three additional terminate/progress properties are not relevant for the Interactive
Extension.
Discussion
Please note the API does not currently support concurrent connections to multiple OpticStudio
instances from a single client process.
It means that for example Matlab cannot connect to two separate OpticStudio instances.
Instead of tracing the rays one at a time, an array of all the rays is passed to OpticStudio at a
single time, OpticStudio traces all the rays and passes the entire array back to the
Programming software. This method is called IBatchRayTrace. It is a bit more complex to
program than performing a single ray trace, but it traces numerous rays at the same time
through OpticStudio’s multithreading capability.
For a complete example of using the batch ray trace, the reader is directed to Example 22. In
Example 22, a batch ray trace is run in a sequential sample file. A list of 315 rays is generated
and passed to ZOS-API for tracing in a single operation. Resulting ray data is stored and
displayed outside of OpticStudio. Using the native OpticStudio spot diagram analysis,
geometric and RMS spot radius are retrieved, and are also displayed.
Discussion
The parameters returned that are common to all the batch ray traces are:
l IRayTraceNSCData
Surface apodization is considered for all the above batch ray trace modes. For example, when a
User Defined Surface is used with a DLL, this will modify the intensity of the ray.
*If you require a polarized ray trace that checks for vignetting and you have normalized
coordinates, you can convert from normalized coordinates to direct coordinates using the
GetDirectFieldCoordinates() method of the IBatchRayTrace interface. Note that the
GetDirectFieldCoordinates() method returns direct coordinates at Surface 0.
**If you need to account for pupil apodization, you may calculate this by using the
GetApodization method from the ILensDataEditor interface.
l If the intention with the batch ray trace is to trace a large number of wavelengths, > 24,
then it is recommended to keep wavelength 1 as the primary wavelength, and then
change 23 wavelengths at a time per batch ray trace. A wavenumber is kept as the
primary wavelength as the thickness of coatings may be defined in wavelengths, which
is at the primary wavelength. This is significantly faster than cycling through the
wavelengths by changing a single wavenumber and opening and closing the batch ray
trace each time. Remember that the batch ray trace tool must be closed for changes of
the system to be taken into account.
l If the intention with the batch ray trace is to calculate the transmittance, then one must
consider the pupil apodization factors. The transmittance of a single ray is simply,
where P0 and P are the initial and transmitted power of the ray, respectively. Without
pupil apodization, P0=1; however, with pupil apodization, the initial power of the ray is
reduced to A(px,py ). For example, if pupil apodization is used with Gaussian apod-
ization with an apodization factor of 1, and the marginal ray is traced (e.g. py=1) with
an optical system with a transmittance of 1, the initial flux of the ray will be 0.1353 W,
and the intensity out parameter will return 0.1353 W. If the average transmittance, Tav,
needs to be determined, then this may be calculated by summing the transmitted
power of each ray, Pi, considering their pupil apodization, Ai (px,py),
IRayTraceNormUnpolData
IRayTraceNormUnpolData performs a batch unpolarized ray trace, using normalized pupil
coordinates.
When opening the tool, the user selects the number of maximum rays to be traced, the type of
rays (the ray tracing can use real or paraxial rays), and the surface up to which the rays will be
traced.
CreateNormUnpol (int MaxRays, RaysType rayType, int toSurface)
The rays are then defined one by one in the AddRay function. The rays are defined by the
wavelength, the relative field and pupil coordinates. The AddRay also contains a calcOPD
variable, if the optical path difference (OPD) needs to be returned.
AddRay (int waveNumber, double Hx, double Hy, double Px, double Py,
OPDMode calcOPD)
l If calcOPD is 0, no OPD calculation will be performed. It will return the optical path as
defined in the Single Ray Trace analysis. That value can differ from other analyses at
infinite conjugates.
l If calcOPD is OPDMode.Current, it will calculate the OPD based on this ray and the pre-
viously computed chief ray.
l OPDMode.CurrentAndChief will first compute the chief ray, and then calculate the OPD
for this ray. Note that the OPD can only be calculated when tracing rays all the way to
the image surface.
Results
l rayNumber
l ErrorCode
l vignetteCode: indicates if the ray was vignetted
l X, Y, Z: the coordinates of the ray at the requested surface
l L, M, N: direction cosines of the ray at the requested surface
l l2, m2, n2: vector normal of the ray at the requested surface.
l opd: optical path difference (see the discussion below)
l Intensity: the power of the ray (see discussion below on the polarization)
Discussion
OPD
Computing the OPD takes additional time beyond that for regular ray tracing, and OpticStudio
only performs this additional computation if requested to do so. Computing the OPD is also
more complicated for the client program, because OPD means optical path difference, which
means two rays must be traced rather than just one. To compute OPD for an arbitrary ray,
OpticStudio must trace the chief ray, then the arbitrary ray, then subtract the phase of the two
to get the OPD. Rather than trace the same chief ray over and over, which is slow, usually the
chief ray is traced once, and then the phase of the chief ray is subtracted from each
subsequent ray.
l If calcOPD is OPDMode.CurrentAndChief then both the chief ray and specified ray are
requested, and the OPD is the phase difference between the two in waves of the cur-
rent wavelength.
l If calcOPD is OPDMode.Current, then the most recently traced chief ray data is used.
Therefore, the calcOPD should be OPDMode.CurrentAndChief whenever the chief ray changes;
OPDMode.Current for all subsequent rays which do not require the chief ray be traced again.
Generally the chief ray changes only when the field coordinates or wavelength changes. This
method is much faster if there are many rays being traced from the same field point, as is the
Note that with both the unpolarized ray tracing modes (NormUnpol and DirectUnPol)
polarization is not considered. In these two modes, the intensity of the ray is not affected by
the bulk internal transmittance due to absorption, coating losses or surface Fresnel reflections.
Even though the bulk absorption can be handled through just the OPL of the ray, it is not
considered with either of the unpolarized ray trace modes (NormUnpol and DirectUnPol);
however, coating losses and Fresnel surface reflection contributions require modifying the E-
field of the ray which requires a polarization ray trace. It should be noted that the intensity of a
ray with the NormUnpol and DirectUnPol ray trace modes may still be modified by a few
surfaces in sequential mode that can modify the ray intensity without relying on modifying the
electric field such as User Defined (e.g. US_FILT1), Slide, or Non-Sequential surfaces.
IRayTraceDirectUnpolData
IRayTraceDirectUnpolData performs a batch unpolarized ray trace, using direct x/y/z
coordinates.
When opening the tool, the user selects the number of maximum rays to be traced, the type of
rays (the ray tracing can use real or paraxial rays), and the first and last surfaces where the rays
will be traced.
CreateDirectUnpol (int MaxRays, RaysType rayType, int startSurface,
int toSurface)
The rays are then defined one by one in the AddRay function. The rays are defined by the
wavelength and x, y, z, l, m, and n coordinates on any starting surface.
AddRay (int waveNumber, double X, double Y, double Z, double L,
double M, double N)
Results
IRayTraceNormPolData
IRayTraceNormPolData performs a batch polarized ray trace, using normalized pupil
coordinates.
When opening the tool, the user selects the number of maximum rays to be traced, the type of
rays (the ray tracing can use real or paraxial rays), the Jones vector (electric field) and the
surface up to which the rays will be traced.
CreateNormPol (int MaxRays, RaysType rayType, double Jx, double Jy,
double phaX, double phaY, int toSurface)
The rays are then defined one by one in the AddRay function. The rays are defined by the
wavelength, the relative field and pupil coordinates, and a Jones vector. Jx and Jy represent the
amplitude of the electric field in the x and y directions respectively, and Phax and Phay
represents the relative phase in degrees of the complex electric field. The quantity Jx*Jx + Jy*Jy
should have a value of 1.0 (with an important exception described below) although any values
are accepted. Note that the generated electric field will depend on the method selected in the
System Explorer to perform the conversion from J to E.
AddRay (int waveNumber, double Hx, double Hy, double Px, double Py,
double exr, double exi, double eyr, double eyi, double ezr, double
ezi)
l If all six of the electric field values are zero; then OpticStudio will use the Jx and Jy val-
ues provided in the CreateNormPol function to determine the electric field.
l If Jx, Jy, Phax, and Phay are all zero, and only in this case, then OpticStudio assumes an
“unpolarized” ray trace is required. An unpolarized ray trace requires OpticStudio to
trace two orthogonal rays and the resulting transmitted intensity be averaged. If any of
the four values are not zero, then a single polarized ray will be traced.
Results
l rayNumber
l ErrorCode
l exr, exi, eyr, eyi, ezr, ezi: the ex, ey, and ez values are the electric field components, with
the r and i characters denoting the real and imaginary portions
l intensity: the power of the ray
l if ReadNextResultFull is used: xo, yo, zo: the coordinates of the ray at the requested sur-
face
l if ReadNextResultFull is used: lo, mo, no: direction cosines of the ray at the requested
surface
IRayTraceDirectPolData
RayTraceDirectPolData performs a batch polarized ray trace, using direct x/y/z coordinates.
When opening the tool, the user selects the number of maximum rays to be traced, the type of
rays (the ray tracing can use real or paraxial rays), the Jones vector to define the electric field
and the first and last surfaces where the rays will be traced. If Jx, Jy, Phax, and Phay are all zero,
and only in this case, then OpticStudio assumes an “unpolarized” ray trace is required.
CreateDirectPol (int MaxRays, RaysType rayType, double Jx, double
Jy, double phax, double phay, int startSurface, int toSurface)
Results
l rayNumber
l ErrorCode
l exr, exi, eyr, eyi, ezr, ezi: : the ex, ey, and ez values are the electric field components,
with the r and i characters denoting the real and imaginary portions
l intensity: the power of the ray
l if ReadNextResultFull is used: xo, yo, zo: the coordinates of the ray at the requested sur-
face
l if ReadNextResultFull is used: lo, mo, no: direction cosines of the ray at the requested
surface
IRayTraceNSCData
In non-sequential mode, there is one trace mode IRayTraceNSCData.
When opening the tool, the user selects the number of maximum rays to be traced, the
maximum number of segments for each individual rays and the coherence length.
CreateNSC (int MaxRays, int maxSegments, double coherenceLength)
The rays are then defined one by one in the AddRay function.
AddRay (int waveNumber, int surf, NSCTraceOptions mode, double X,
double Y, double Z, double L, double M, double N, int InsideOf,
double exr, double exi, double eyr, double eyi, double ezr, double
ezi)
Note that the input intensity is always assumed to be equal to 1.0. So the e-field magnitude (if
used) should also be 1.0.
If we use polarization in the ray tracing (NSCTraceOptions = UsePolarization), the initial electric
field values must be provided. The user application must ensure the defined vector is
orthogonal to the ray propagation vector, and that the resulting intensity matches the starting
intensity value, otherwise incorrect ray tracing results will be produced.
Results
There are two methods to return the results: one to read ray by ray, and then one to read
segment by segment:
ReadNextResult (out int rayNumber, out int ErrorCode, out int wave,
out int numSegments)
Ansys Zemax OpticStudio Enterprise features a STAR tab that contains tools and analyses to
perform Structural, Thermal, and Optical Performance (STOP) analysis within OpticStudio.
The STAR tab in Ansys Zemax OpticStudio Enterprise makes it possible to load structural and
thermal Finite Element Analysis (FEA) datasets into sequential OpticStudio designs and utilize
all sequential analyses, tolerancing, and optimization tools to compensate for the effects of the
FEA data. The tools easily integrate into existing workflows and are build around three design
principles: accuracy, ease of use, and that they are platform agnostic.
To start, load FEA datasets into OpticStudio using the Load FEA Data tool and assign them to
surfaces. An algorithm then fits each dataset to its assigned surface in OpticStudio using a
numeric fitting process. Once loaded and fitted, the Fit Assessment tool allows for the fit
settings to be adjusted. The rest of the STAR features can be used to view the FEA data and
analyze its effect on your optical system. In addition, all sequential analyses can be used to
quantify the impact on optical performance.
The full functionality of the STAR tools can also be accessed using the OpticStudio API (ZOS-
API).
To use the tools inside the STAR tab, you must have an Ansys Zemax OpticStudio Enterprise-
level license.
Once a FEA dataset is loaded and assigned to an optical surface, the fitted data and settings
used are kept in a .zst file that is used to analyze the impact on the optical results. These files
are saved in <Objects>\STOP Files.
The FEA Data group contains the tools for loading FEA datasets into your optical system and
verifying their alignment.
The FEA Data Viewer enables users to view the FEA dataset without assigning to an optical
surface in the system. This allows the opportunity to verify the correct file before assigning to
an optical surface and performing a numeric fit.
The viewer also displays pertinent information about the FEA datatset such as:
Open FEA File(s) Opens a File Explorer window so you can navigate and select one or more
FEA datasets to view.
l Vector Length colors the nodes based on the length of the deformation vectors
defined under “Vectors Show”.
l Weight colors the nodes based on the node weight defined in the FEA data file(s).
More information about node weights is available in About node weights help topic.
l File colors the nodes based on which file they are associated with. This is useful when
more than one FEA dataset has been opened.
l Line colors the nodes based on which line the node corres ponds to in the original text
file. This can be used to visualize how the node points are organized and can help with
identifying mesh-related issues.
Display Model When enabled, a 3D model of the optical design will be displayed in the
graphics area.
Rendering Mode Change the display of the model between shaded (Default) or Wireframe.
Display Vectors Select to display vectors showing the magnitude and direction of
deformations.
Vectors Show Select which directional component is displayed with the vectors in the
graphics area. Total Deformation displays all directional components combined.
First Surface Choose the first surface to display in the graphics area.
Last Surface Choose the last surface to display in the graphics area.
The filenames of all selected FEA datasets will be listed. The graphics area will display only one
selected FEA dataset at a time.
Point size: Control the size of the FEA dataset in the graphics area.
Mirror Tab: Use the options in this tab to mirror the dataset(s) over different geometrical
plane(s). Multiple geometrical planes can be selected for the mirror transformation
simultaneously.
Rotate Tab: Use the options in this tab to rotate the dataset(s) around an axis of rotation. Only
one axis of rotation can be selected for the rotate transformation at a time.
Preview Selected: The FEA Symmetry Tool will calculate and display the extrapolated FEA
datapoints of the selected FEA dataset. Use this to verify that the enabled transformation
settings are yielding the expected results before applying to all selected FEA datasets.
Preview All: The FEA Symmetry Tool will calculate and display the extrapolated FEA
datapoints of all selected FEA datasets. Use this tool to verify that the enabled transformation
settings are yielding the expected results for all of the FEA datasets prior to saving new FEA
files.
Clear Preview: Clears the calculated extrapolated FEA datapoints for the current settings. The
graphics area will also clear automatically when changing the transformation settings.
Save New File(s): The FEA Symmetry Tool will save new FEA datasets. The filename will
include an additional tag:
Note:
Examples:
FEA datasets can be loaded from any FEA package. All FEA datasets that are loaded are also
copied into the <Objects>\STOP Files folder. For more information, see Folders. The datasets
must have the following format:
Structural Deformations (no node weights) Six columns in a tab-delimited format with columns
in the following order:
[X position, Y position, Z position, dX, dY, dZ]
Structural Deformations (with node weights) Seven columns in a tab-delimited format with
columns in the following order:
[X position, Y position, Z position, dX, dY, dZ, node weight]
Temperature Profiles Four columns in a tab-delimited format with columns in the following
order:
[X position, Y position, Z position, T]
Once data is imported, the graphics area displays the location of FEA datasets and optical
surfaces.
To load new datasets, select Load FEA and select the FEA datasets to load from the File
Explorer window. Once loaded, these datasets are automatically categorized as either
Structural or Thermal and are displayed in the graphics area. Assign each FEA dataset to a
surface using the Assigned Surface dropdown next to each FEA Dataset. See The STAR Tab for
supported FEA dataset formats.
Thermal datasets should only be assigned to surfaces which have a material such as the first
surface of a lens.
FEA datasets cannot to applied to surfaces that have the Composite Surface option enabled
"Composite Surface" on page 457. These surfaces will not appear in the surface dropdown list.
Not all surface types are allowed to follow a surface with thermal data applied. For further
details see the discussion in Gradient 1 'Restrictions on surfaces following GRIN surfaces'.
l Extended Polynomial
l Grid Sag
l Irregular
l Odd Asphere
l Q-Type Freeform
l Standard
l Tilted
l Toroidal
l TrueFreeForm
l User Defined
If a FEA dataset is imported with the same name as an existing dataset, a pop-up window gives
the option to skip this dataset or overwrite the existing dataset.
To remove a dataset right-click on it and select Remove from the system, or select a dataset
and use the Delete key on your keyboard.
Display
First Surface Choose the first surface to display in the graphics area.
Last Surface Choose the last surface to display in the graphics area.
Selecting a smaller range of surfaces may make it easier to view the optical surfaces and their
assigned FEA datasets.
Transformation
Transformations change the coordinate system or move and tilt the datasets and are applied
to the selected datasets. Select multiple datasets using Ctrl + Click or Shift + Click.
FEA Coordinate System Select the coordinate system of the FEA data.
l Global refers to the coordinate system located at the Global Coordinate Reference
Surface.
l Different refers to a selection of multiple surfaces that have different options defined.
For example, one surface is global and one surface is local.
Apply Apply the user-defined transformations to the FEA data and view the results in the
graphics area.
OK (Fit FEA Data) Run the numerical fitting process and apply the FEA data to your
OpticStudio system. For surface deformation data, a 2D fit is performed. For thermal data, a 3D
fit is performed. For more information, see FEA Fitting Process and RBMs.
Notes
l For thermal FEA datasets, the GRIN step size is automatically set so that each GRIN has
10 steps. This is done to balance loading time and accuracy. To change the GRIN step
size for an FEA dataset, change the setting located in the Thermal Summary.
l When loading thermal FEA datasets, the material defined to the selected surface must
have at least one of the thermal coefficients defined in the material catalog. If all of the
thermal material information is missing, then the row will turn red, and a message of
“no mat. info” will be shown.
User-defined Transformations
ΔX/Y/Z and Theta X/Y/Z translate and rotate the position of the FEA datasets by the specified
distances and angles. These settings must be used when the FEA data has been exported in a
coordinate system that is different to the Local or Global coordinates in OpticStudio.
If the FEA Coordinate System is set to Global, the transformation that is needed to place the
FEA data in Global coordinates should be provided. If the FEA Coordinate System is set to
Local, the transformation that is needed to place the FEA data in Local coordinates should be
provided.
The transformations are defined by the 3 decenter values: ΔX, ΔY, ΔZ, and the 3 tilt values:
Theta X, Theta Y, Theta Z. All tilts are right-handed in sign. Decenters are first applied in the
original coordinate system of the FEA data and then the tilts are applied about the decentered
axes.
The calculation of the transformed point (x’, y’, z’) from the point (x, y, z) is:
The deformation vectors are also translated into the transformed coordinate system. The
temperature data (x,y,z) points are transformed but the temperature values remain unchanged.
The user-defined transformations are always applied to the original FEA datasets and the
transformations cannot be added together or used in any cumulative way.
Fit Assessment
Fit Assessment provides controls to adjust the numerical fit settings for each FEA dataset to its
associated surface. The graphics area shows the difference of the FEA dataset and the numeric
fit of the FEA dataset along the surface. This visual representation shows how well the numeric
fit is performing and highlights potential trouble areas.
Choose a Surface Number and Data Type to view the fit difference in the graphics window and
to access the fit settings. The FEA data source, root mean square (RMS) fit error, and peak-to-
valley (PV) fit error are shown at the bottom of the window for the selected surface.
FEA Data Type Choose either the Structural or Thermal dataset to view and edit for the
selected surface.
RBMs Choose whether to remove the rigid-body motion (RBM) of the structural data before
the fitting process. By default, RBM is calculated and removed before fitting.
Dimension Choose to view the fit difference as a magnitude or along one of the axes. This
only changes the graphics area, not the fit settings.
Point Size Change the point size in the graphics area. This only changes the graphics area, not
the fit settings.
Fit Settings Adjust the settings used to perform the numerical fit. The following settings are
available:
l Grid 1/2/3: Used to shape the control lattice of the fitting algorithm. In general, a larger
number in Grid 1, 2, and 3 will cause the algorithm to consult more neighboring points
during the fit. This will tend toward smoother fits. The Grid 3 parameter is only used for
Thermal datasets. Values must be between 2 (default) and 100.
l Tolerance: This parameter is compared to the maximum absolute deviation of the fitted
value from the raw FEA point. If the calculated deviation is smaller than the Tolerance
parameter, the fitting algorithm will complete regardless of the number of refinement
levels performed. This does not guarantee that the tolerance was achieved during
fitting. Use the RMS error and PV error to assess the overall quality.
Alignment Check
The Alignment Check tool displays the entire optical system with the loaded FEA datasets. This
allows for an overall view of the alignment of FEA data in a single window.
l Structural: Displays the surface deformation files and shows them on-top-of the optical
surfaces.
l Thermal: Displays the temperature data files and shows points on-top-of and in-
between the optical surfaces.
Color FEA Data Change the color scheme of the FEA datasets.
Component RBMs
Surface Summary Table Lists all surfaces in the optical design file and the FEA datasets
assigned. Click on surface(s) to define components. Select multiple consecutive items by
holding the Shift key while you select. Select non-consecutive items by holding the Ctrl key
while you select.
Define Component Once the surface(s) of the component is selected, click this button to have
STAR calculate the average rigid-body motion . A component will be listed in the “Surfaces
defining Component” list. Note: Surfaces that are used in a defined component cannot be used
to define other components.
Component RBM Displays the calculated common rigid body motion for the currently
defined component.
Surface Defining Component Lists the component(s) defined in the system. What would a
customer use this for?
Add Component RBMs as Coordinate Breaks When clicked, STAR will remove the
component RBM from the surfaces and add them as Coordinate Breaks around the surface(s).
A total of 5 surfaces will be added to the Lens Data Editor (LDE) for each component defined
and the Comment of the surface will indicate its function. The surfaces are:
1. In the STAR tab, click Component RBMs. The tool will appear.
2. In the Component Rigid Body Motions tool window, select the surface(s) that comprise
a component in your system.
3. Click Define Component. STAR will calculate the average RBMs from the selected
surface(s) and display them in the Component RBM table. An entry will appear in the
Surface Defining Component list.
4. Repeat steps 2 and 3 for the rest of the components in your system that you want to
change to coordinate breaks.
5. Click the Add Component RBMs as Coordinate Breaks button. STAR will add the
coordinate breaks and dummy surface(s) for the components you have defined.
The Data Summary group contains the features to summarize and enable or disable the effects
of FEA datasets.
The Structural Summary shows an overview of the surfaces that have structural FEA datasets
assigned and provides quick controls to enable or disable the effects of surface deformations
or RBMs of these datasets.
The Surface Properties dropdown displays the Fit Settings (as in the Fit Assessment tool) and
RBM (rigid body motion) information, and Coordinate Transformation information.
Surface, Surface Type, and Comment columns show the same information for each surface
as in the Lens Data Editor.
Deformation File The name of the structural FEA dataset assigned to the surface.
Fitted Deformation Select or clear the checkbox to enable or disable the surface deformation
effects of the FEA dataset for each surface. This disables the surface deformation effects
without needing to delete the dataset in the Load FEA Data tool.
Structural Options
Use the controls in the drop-down menu to enable and disable the surface deformation and
RBM effects for all surfaces with one click.
Use all structural data Turn ON surface deformations and RBM effects for all surfaces.
Use deformation without RBMs Turn ON surface deformations and turn OFF RBM effects for
all surfaces.
Use only RBMs Turn OFF surface deformations and turn ON RBM effects for all surfaces.
Disregard structural effects Turn OFF surface deformations and turn OFF RBM effects for all
surfaces.
Note: Surface deformation and RBM effects can be changed for multiple surfaces at one time
by using the right-click menu in the Structural Data Summary. CTRL + Left-click to select
multiple surfaces individually in the Structural Data Summary. SHIFT + Left-click to select a
range of surfaces in the Structural Data Summary.
Thermal Summary
The Thermal Summary shows an overview of the surfaces that have thermal FEA datasets
assigned and provides quick controls to enable or disable the effects of these datasets.
The Surface Properties dropdown displays the Fit Settings (as in the Fit Assessment tool).
Deformation File The name of the thermal FEA dataset assigned to the surface.
GRIN Step Change the GRIN step size used. A larger GRIN step size reduces computing time
but reduces accuracy. When thermal datasets are loaded the GRIN step size is set by default so
that each GRIN has 10 steps. This is done to balance loading time and accuracy.
Status Select or clear the check box to enable or disable the effects of the FEA dataset for each
surface. This disables all thermal FEA effects without needing to delete the dataset in the Load
FEA Data tool.
Use the controls in the ribbon to enable and disable the effects of all thermal FEA datasets. This
is equivalent to selecting or clearing the Status check box for every surface.
Show Thermal Data Enable the effects of all thermal FEA datasets.
Hide Thermal Data Disable the effects of all thermal FEA datasets.
Analyses Group
The Analyses Group contains the STAR specific tools to view deformations and changes to
your optical system due to the fitted FEA data.
The System Viewer displays a system-wide view of the deformations and changes in optical
properties due to the fitted FEA data. This data is overlaid on the entire optical system in a
single window. The information that is displayed can be changed with the Draw Mode setting.
Not all controls are available for all draw modes.
Data Type Choose the type of data to be displayed over the optical system. This changes the
available draw modes:
l Deformations
l Temperature
l Change in Index
l Index
l Deformation Map & Vectors: Both the Deformation Map and Deformation Vectors are
displayed on the optical system.
l Deformation Vectors: Vectors displayed on the optical system showing the magnitude
and direction of deformations.
l Index Voxels: Refractive index or change in refractive index due to temperature data
from the FEA dataset. Data is displayed as 3D voxels around the optical volumes.
l Index Point Cloud: Refractive index or change in refractive index due to temperature
data from the FEA dataset. Data is displayed as a uniformly sampled point cloud
around the optical volumes.
l Index Planes: Refractive index or change in refractive index due to temperature data
from the FEA dataset. Data is displayed as three cross-sectional planes through the
optical volumes.
Pixel/Voxel Density Used to control the number of cells in a voxel or points in a point cloud.
Point Size Adjust the display size of the fitted data points.
Wavelength Choose at which wavelength to view the index data. The options available are the
Wavelengths chosen in the System Explorer.
Performance Analysis
The Performance Analysis enables the ability to see how each FEA dataset that is assigned to
an optical surface is contributing to the overall change in the specified performance metric.
With this tool, you can see which surface is contributing the most to the overall performance
change. Furthermore, the analysis will differentiate between the performance change
contributions from structural deformations and temperature data. The end result is the ability
Show errors for: Choose the granularity of the Performance Analysis plot.
l System: Display the performance on a system-level basis. Up to five values are shown
o Nominal - All STOP data (structural deformations and temperature data) are
turned off and the metric is collected.
o Structural: Only RBMs – All structural datasets are turned on and all
temperature data is turned off. Only the RBMs are enabled for this metric.
o Structural: Deformations without RBMs – All structural datasets are turned on
and all temperature data is turned off. Only the surface deformations are
enabled for this metric.
Error type:
l Individual: To generate individual plots, the STOP effects are turned on one at a time,
the performance metric is collected, and then the STOP effects are turned off. This
isolates the performance change due to the structural data or temperature data on one
surface at a time.
l Cumulative: To generate cumulative plots, the STOP effects are turned on one at a time
and the performance metric is collected. The STOP effects that are turned on, remain
on, to collect the performance due to a group of STOP effects.
Field number: The field number for which the calculation should be performed.
Details for RBMs: Enable this setting to separate structural data into surface deformations
and RBMs. An additional column will appear.
2D Deformation Plot
Click and drag with the wheel button (middle button) on your mouse to zoom in to a selected
area.
Sampling Choose the number of points in the sampling grid across the selected surface.
Higher sampling yields more accurate data but increases computing time.
The Thermal Index Plot tool displays a plot of Index against Temperature for each surface that
has a thermal FEA dataset assigned to it. Additional summary information is located at the top
of the window and displays useful data to compare the information for all of the surfaces with
thermal data applied in the system.
Use the Settings menu to select which of the system wavelengths, as defined in the System
Explorer, is used to calculate the data.
Click on a row in the table to display the thermal index plot for that surface.
FEA Data Set Filename of the FEA dataset applied to the surface.
Material Glass name of the material applied to the surface and the Material Catalog that the
glass is located in.
T range (°C) Range of temperatures in the FEA data file in degrees Celsius.
n range The refractive index range calculated from the FEA dataset.
δn/δT The temperature coefficient of refractive index calculated at the median temperature of
the FEA dataset.
The fitting process is similar but not identical for structural and thermal datasets. See the
following process for each data type.
Thermal Data
Structural Data
Note: Deformation data is valid for all wavelengths in the optical system.
Note on RBMs
Removing RBMs will improve the quality of the fit if they are significant. If RBMs are
insignificant but removed anyway, then the error in the fit may increase. Remove RBMs can be
disabled in the Fit Assessment tool. You should evaluate RBM values and the resulting fit errors
and consider if you should use this option.
When deformation data files with node weights are used, different tools will have indications:
l In the Load FEA Data tool, files with weights are indicated by bold letters.
l In the Fit Assessment, it is indicated that the RBMs have been calculated using weights.
l In the Structural Data Summary, the RBMs submenu has an indication that node
weights were used to calculated the rigid-body motions.
Information Group
This is the Information section of the Help Tab.
About
The About button is found in the Information section of the Help tab.
License Agreement
The License Agreement button is found in the Information Section of the Help Tab.
License Utility
This version of OpticStudio only works with Ansys licenses. If you are trying to access a Zemax
license (those licenses in the format L1XXXXX or any USB license), you will need to install the
Zemax version of OpticStudio.
Licensing configuration:
If you have activated a license on your own machine, leave "Use Default Settings" checked.
You can also select whether to use a Professional, Premium or Enterprise license first when
starting. Once done, click Ok and restart OpticStudio to try and access the local license.
To access an Ansys license on a server, remove the check from the “Use Default settings” box.
Enter the machine name of the license server or servers into the Server field(s) below. If you
have multiple servers to enter, Check “Specify Redundant Servers”. Optional is a port number.
Typically using the default of 1055 will work.
If you are unsure of the server name or port, contact the license administrator listed in your
Ansys portal account. Once you have added the server name and / or port, click Ok and restart
OpticStudio to attempt to use it.
You can also select whether to use a Professional, Premium or Enterprise license first when
starting the software.
For additional information or help, open the "Licensing Help" button in the License Utility. This
will take you to the Zemax support website with additional information.'
Manage my license
OpticStudio is sold as a shared or network license. This means that the license is typically
installed on your company server and then may be used by different client computers. The
maximum concurrent number of users is set by the number of license seats you have
purchased.
License access and other settings are managed on the server where the license is activated. See
the Zemax support website at https://support.zemax.com for information on the latest
versions of Zemax software, support information, knowledgebase articles, and the Community.
There is a new utility bundled with your Zemax product called “Ansys Licensing Client
Settings”. This utility is used to “borrow” a license seat from the license server and use it if away
from your organization’s network for up to 30 days. You can return it before expiration if you
get back on the network, or it will automatically time out if you do nothing. We recommend
you return it as soon as you no longer need it to make it available to other colleagues.
Note that this utility requires administrator rights to run as it saves the settings to a folder
within Windows Program Files. You will also need to configure it with the name and port of
your license server.
This utility only works for Ansys licenses. If you have a Zemax legacy license number in the
format similar to L1XXXXX, you will need to install the Zemax version of the software rather
than this Ansys release.
Start by launching the Ansys Licensing Client Settings from the Windows Start menu.
If you are a computer administrator, you will get a popup to allow it to make changes. Click
yes.
From the "FlexNet Publisher" section of the utility, enter the license server name or ip address
where your Ansys Zemax licenses are activated. If you have multiple servers or a “triad” license
backup servers, enter all 3 license servers here. The port is normally 1055 unless your
organization has a specially configured license on a different port.
If you are unsure of the server name, know that Zemax support does not typically have this
information since we do not host your license server. There are several ways to get it:
l Check with a coworker who is already using one of the licenses. Open the Ansys Client
settings app within Opticstudio on the Help tab or in OpticsBuilder.
l Contact your manager or organization’s IT department.
You can click “Test” to verify connection to the server(s). A checkbox will appear on the right of
“Test” if it succeeds.
Borrowing a seat
Navigate to the Borrow section on the Client settings and click the "Borrowable increments"
drop-down menu.
OpticsBuilder
zob_level1
zob_level2
zob_level3
TIP: For OpticsBuilder, you may select any of the levels. They are currently the same edition and
features. This may change in future. New releases will include information about the edition.
Opticsbuilder is listed as:
Select the "Return Date" and select "Borrow" to save your selections.
Your borrowed entitlements with the corresponding return date will be shown. You may now
disconnect from your network and use your Zemax software.
If you want to return the license before the expiration date, first connect to your organization’s
network.
Then you may open the Ansys Licensing Client Settings utility again. Navigate to the Borrow
section and Click Return next to the one you want to return, or you can return all.
This opens a window with the built-in OpticStudio help file database.
Selecting this Button will launch a separate Help File which describes the details of the
NameSpaces and Classes used in the API and includes several sample codes for Python,
MATLAB, C# and C++:
This window contains an overview of the feature highlights in this version of OpticStudio. The
window opens automatically the first time a new version of OpticStudio is opened.
Websites Group
This is the Websites section of the Help Tab.
Knowledgebase
The Knowledgebase button is found in the Websites section of the Help tab.
Community Forum
The Community Forum button is found in the Websites Section of the Help Tab.
This opens a web browser to the Community Forum: an online forum to get advice, help, and
connect with other users of Zemax products.
Utilities Group
This is the Utilities section of the Help Tab.
System Diagnostic
The System Diagnostic button is found in the Utilities section of the Help tab.
The system diagnostic tool displays graphics rendering information and other diagnostic
information specific to your operating system.
The Save Output button exports the diagnostic data into a text file.
If you are experiencing any graphic display problems, please run this System Diagnostic and
email the results to support@zemax.com. In your email, please include:
The Zemax File Collector tool is found in the Utilities section of the Help tab.
Furthermore, you can provide the following information and data related to the crash,
including:
l A description of what you were doing at the time of the error or crash
l Steps to reproduce an issue with your file.
l Any additional comments.
l Any supplementary files. If a ZMX file is added, the tool also tries to gather any related
files (i.e. glass catalogs, DLL's, etc.).
You can select which files to include and exclude. Potentially sensitive files which may contain
specific data about your design are listed separately. These files will not be included in the
package by default.
..\Documents\Zemax\Errors\Packages
The tool is automatically launched after a crash and it includes the ZMX file that was loaded in
OpticStudio at the time.
Here is an example:
Feature Finder
The Feature Finder button is found in the Utilities section of the Help tab.
This tool helps users locate different tools and analysis features in the OpticStudio user
interface.
Button Functions:
Highlight Feature Highlights the location of the selected tool or analysis in the OpticStudio
UI.
The Feature Experiments button is found in the Test Lab section of the Help Tab.
In the Feature Experiments drop-down menu, you can test out new features that we’re
considering implementing in the next OpticStudio release. These features aren’t fully
documented, so please let us know if you have any questions about the functionality. In the
toolbar of these features, you’ll see a Send Feedback button which opens an email to our
technical support team
Research Surveys
The Research Surveys button is found in the Test Lab section of the Help Tab.
The Search Bar is found in the upper right corner of the user interface:
The Search Bar is always visible, regardless of the selected tab, or if the navigation ribbon is
hidden. It is similar to the Feature Finder tool, and locates different tools and analysis features
in the OpticStudio user interface.
Type a keyword into the search bar to find related analyses or tools.
Button Functions:
Run Feature (Play icon) Opens/runs the selected tool or analysis window.
Highlight Feature (Magnifying glass icon) Highlights the location of the selected tool or
analysis in the OpticStudio UI.
Important Notice
AutoDesk Inventor®, Creo Parametric®, MATLAB® are trademarks used by ANSYS, Inc. under
license.
Ansys, Ansys logo and all other Ansys, Inc. product names are trademarks or registered
trademarks of ANSYS, Inc. or its subsidiaries in the United States or other countries.
All other product names or trademarks are property of their respective owners.
Information in the help file documentation is subject to change without notice and does not
represent a commitment on the part of the vendor. The software described in this
documentation is furnished under a license agreement and may be used or copied only in
accordance with the terms of the agreement.
ANSYS, Inc. provides this publication “as is” without warranty of any kind, either express or
implied, including but not limited to the implied warranties or conditions of merchantability or
fitness for a particular purpose. In no event shall ANSYS, Inc. be liable for any loss of profits,
loss of business, loss of use or data, interruption of business, or for indirect, special, incidental,
or consequential damages of any kind, even if ANSYS, Inc. has been advised of the possibility
of such damages arising from any defect or error in this publication or in the Software.
OpticStudio supports dynamic links to AutoDesk Inventor 2018 and PTC Creo Parametric 4, 5,
6, 7, 8 and 9.
Most importantly, OpticStudio is not a substitute for good engineering practices. No design
should ever be considered finished until a qualified engineer has checked the calculations
performed by the software to see if the results are reasonable. This is particularly important
when a design is to be fabricated and significant costs are involved. It is the engineer’s
responsibility to check the results of OpticStudio, not the other way around.
Active Configuration
The active configuration is the configuration currently being displayed in the lens data editor.
For details see Using Multiple Configurations.
Angular Magnification
The ratio of the paraxial image space chief ray angle to the paraxial object space chief ray
angle. The angles are measured with respect to the paraxial entrance and exit pupil locations.
Apodization
Apodization refers to the uniformity of illumination in the entrance pupil of the system. By
default, the pupil is always illuminated uniformly. However, there are times when the pupil
should have a non-uniform illumination. For this purpose, OpticStudio supports pupil
apodization, which is a variation of amplitude over the pupil.
Three types of pupil apodization are supported: uniform, Gaussian, and tangential. For each
type (except uniform), an apodization factor determines the rate of variation of amplitude in
the pupil. See the discussion on apodization types and factors in the Aperture (system
explorer) section of the System Explorer.
OpticStudio also supports user defined apodizations, which may be placed on any surface.
Surface apodizations behave differently than pupil apodizations, because surfaces need not be
located at a pupil. For more information on surface apodizations, see the User Defined surface.
If no surfaces are made of glass, the back focal length is the distance from surface 1 to the
paraxial image surface for the object at infinite conjugates.
Cardinal Planes
The term cardinal planes refers to those special conjugate positions where the object and
image surfaces have a specific magnification. The point where the plane intersects the optical
axis is the cardinal point corresponding to that cardinal plane. The cardinal planes include the
principal planes, where the lateral magnification is +1, the anti-principal planes, where the
lateral magnification is -1, the nodal planes, where the angular magnification is +1, the anti-
nodal planes, where the angular magnification is -1, and the focal planes, where the
magnification is 0 for the image space focal plane and infinite for the object space focal plane.
Except for the focal planes, the cardinal planes are conjugates with each other, that is, the
image space principal plane is conjugate with the object space principal plane, etc. If the lens
has the same index in both object space and image space, the nodal planes are identical to the
principal planes.
OpticStudio lists the distance from the image surface to the various image space planes, and
lists the distance from the first surface to the various object space planes.
Chief Ray
If there is no vignetting, and there are no aberrations, the chief ray is defined to be the ray that
travels from a specific field point, through the center of the entrance pupil, and on to the
image surface. Note that without vignetting or aberrations, any ray passing through the center
of the entrance pupil will also pass through the center of the stop and the exit pupil.
When vignetting factors are used, the chief ray is then considered to be the ray that passes
through the center of the vignetted pupil, which means the chief ray may not necessarily pass
through the center of the stop.
If there are pupil aberrations, and there virtually always are, then the chief ray may pass
through the center of the paraxial entrance pupil (if ray aiming is off) or the center of the stop
(if ray aiming is on), but generally, not both.
The common convention used is that the chief ray passes through the center of the vignetted
pupil, while the principal ray passes through the center of the unvignetted stop. OpticStudio
never uses the principal ray. Most calculations are referenced to the chief ray or the centroid.
Note the centroid reference is generally superior because it is based upon the aggregate effect
of all the rays that actually illuminate the image surface, and not on the arbitrary selection of
one ray which is “special”.
Coordinate Axes
The optical axis is the Z axis, with the initial direction of propagation from the object being the
positive Z direction. Mirrors can subsequently reverse the direction of propagation. The
coordinate system is right handed, with the sagittal X axis being oriented "into" the monitor on
a standard layout diagram. The tangential Y axis is vertical.
The direction of propagation is initially left-to-right, down the positive Z axis. After an odd
number of mirrors the beam physically propagates in a negative Z direction. Therefore, all
thicknesses after an odd number of mirrors should be negative.
Diffraction Limited
The term diffraction limited implies that the performance of an optical system is limited by the
physical effects of diffraction rather than imperfections in either the design or fabrication. A
common means of determining if a system is diffraction limited is to compute or measure the
optical path difference. If the peak to valley OPD is less than one quarter wave, then the system
is said to be diffraction limited.
There are many other ways of determining if a system is diffraction limited, such as Strehl ratio,
RMS OPD, standard deviation, maximum slope error, and others. It is possible for a system to
be considered diffraction limited by one method and not diffraction limited by another
method.
On some OpticStudio plots, such as the MTF or Diffraction Encircled Energy, the diffraction
limited response is optionally shown. This data is usually computed by tracing rays from a
reference point in the field of view. Pupil apodization, vignetting, F/#’s, surface apertures, and
transmission may be accounted for, but the optical path difference is set to zero regardless of
the actual (aberrated) optical path.
Edge Thickness
OpticStudio defines the edge thickness of a surface as:
Where Zi is the sag of the surface, Zi+1 is the sag of the next surface, and Ti is the axial
thickness of the surface. The sag values are computed at the +y clear semi-diameter or semi-
diameter of their respective surfaces; Note that edge thickness is computed for the +y radial
aperture, which may be inadequate if the surface is not rotationally symmetric, or if surface
apertures have been placed upon either of the surfaces.
Edge thickness solves use a slightly different definition of edge thickness. For edge thickness
solves only, the sag of the i+1 surface is computed at the clear semi-diameter or semi-
diameter of surface i. This method avoids a possible infinite loop in the calculation, since
changing the thickness of surface i may alter the clear semi-diameter or semi-diameter of
surface i+1, if the latter clear semi-diameter or semi-diameter is in “automatic” mode and the
value is based upon ray tracing.
See “Thickness: Edge Thickness” and “Entering Semi-Diameter Data” for more information.
Note the secondary focal length (f') is list as "Effective Focal Length (in Image Space)" in the
Prescription Data, which is Effective Focal length multiplied by the refractive index in image
space. For example, below figure displayed sample system EFLs in air and water image space:
Note OpticStudio will first try to trace real parabasal rays to calculate the exit pupil position in
sequential mode. If, however, the central ray can’t be traced, we switch to paraxial rays to
estimate the pupil position. The usage of parabasal rays may sometimes give unexpected
result if there are some unusual components in the system. For example, this can happen if
users make an User Defined surface which has some kind of discontinuous behavior of the
surface as the rays intersect close to the vertex.
If object or image heights are used to define the field points, the heights are measured in lens
units.
When paraxial image heights are used as the field definition, the heights are the paraxial image
coordinates of the primary wavelength chief ray on the paraxial image surface, and if the
optical system has distortion, then the real chief rays will be at different locations.
When real image heights are used as the field definition, the heights are the real ray
coordinates of the primary wavelength chief ray on the image surface.
When angles are used as the field definition, the maximum radial field is used to calculate the
normalization of all defined field points. For this reason, the maximum radial field is also called
the normalization angle. (See the normalization section in “Field Type” for more information
about the difference between the maximum radial field and the maximum field angle.)
OpticStudio uses normalized field coordinates for many features. For information on how field
coordinates are normalized, see the “Normalized field coordinates” definition. To set the field
type and values, see Fields”.
Ghost Reflections
Ghost reflections are spurious, unwanted images formed by the small amount of light which
reflects off of, rather than refracts through a lens face. For example, the multiple images of the
aperture stop visible in photographs taken with the sun in the field of view are caused by ghost
reflections. Ghost images can be problematic in imaging systems and in high power laser
systems.
Glasses
Glasses are entered by name in the glass column. Available glasses may be reviewed, and new
ones entered using the glass catalog tool. See the Chapter Using Material Catalogs for details.
Blanks are treated as air, with unity index. Mirrors can be specified by entering "MIRROR" for
the glass type, although this name will not appear in the glass catalog. The index of refraction
of the mirror space is always equal to the index of refraction of the media before the mirror.
If a surface or object has the material type MIRROR, light will only be reflected. The transmitted
part will be ignored. The behavior is different depending on whether a coating has been
specified:
For information on the effect of temperature and pressure on index of refraction data, see
Defining Temperature and Pressure.
Hexapolar Rings
OpticStudio usually selects a ray pattern for you when performing common calculations such
as spot diagrams. The ray pattern refers to how a set of rays is arranged on the entrance pupil.
The hexapolar pattern is a rotationally symmetric means of distributing a set of rays. The
hexapolar pattern is described by the number of rings of rays around the central ray. The first
ring contains 6 rays, oriented every 60 degrees around the entrance pupil with the first ray
starting at 0 degrees (on the x-axis of the pupil). The second ring has 12 rays (for a total of 19,
including the center ray in ring “0”). The third ring has 18 rays. Each subsequent ring has 6
more rays than the previous ring.
Many features which require a sampling parameter to be specified (such as the spot diagram)
use the number of hexapolar rings as a convenient means of specifying the number of rays. If
the hexapolar sampling density is 5, it does not mean that 5 rays will be used. A sampling of 5
means 1 + 6 + 12 + 18 + 24 + 30 = 91 rays will be used.
Lens Units
Lens units are the primary unit of measure for the lens system. Lens units apply to radii,
thicknesses, apertures, and other quantities, and may be millimeters, centimeters, inches, or
meters.
Marginal Ray
The marginal ray is the ray that travels from the center of the object, to the edge of the
entrance pupil, and on to the image surface.
If there is vignetting, OpticStudio extends this definition by defining the marginal ray to be at
the edge of the vignetted entrance pupil. If ray aiming is on, then the marginal ray is at the
edge of the vignetted stop.
Maximum Field
The maximum field is the minimum radial coordinate that would enclose all the defined field
points if the x and y values of each field point were plotted on an Cartesian XY plot. The
maximum field is measured in degrees if the field type is angles, or in lens units for object
height, paraxial image height, or real image height. The field type is described in the “Field
angles and heights” definition. To set the field type and values, see Fields.
Native Object
Native objects are parametric objects that are built into the Non-sequential Component Editor.
OpticStudio uses a relative internal optical precision of about 10-12 for ray tracing to native
objects.
When non-native objects, such as STEP files, are imported into OpticStudio, its surfaces are
defined with Non-Uniform Rational B-Splines (NURBS). The NURBS surface form cannot model
surfaces to arbitrary precision, but conic aspheres are represented exactly. Therefore, the
NURBS representation is accurate for spheres, ellipses, parabolas, and hyperbolas, but not for
higher-order surface shapes. In addition, NURBS representations require more memory than
native objects, and thus more time to render and raytrace.
Note that the OpticStudio documentation also references “native CAD files” which are different
from “native objects” as defined here. Native CAD files are part and assembly file formats that
are native to their originating CAD software. Examples of native CAD files are Autodesk
Inventor part files (*.IPT) and Creo Parametric part files (*.PRT). OpticStudio uses a NURBS
representation for all CAD parts.
Non-Paraxial Systems
The term non-paraxial system refers to any optical system which cannot be adequately
represented by paraxial ray data. This generally includes any system with tilts or decenters,
strong aspheres, axicons, holograms, gratings, cubic splines, ABCD matrices, gradient index,
diffractive components, or non-sequential surfaces.
A great deal of optical aberration theory has been developed for systems with conventional
refractive and reflective components in rotationally symmetric configurations. This includes
If the system being analyzed contains any of the non-paraxial components described, then any
data computed based upon paraxial ray tracing cannot be trusted. OpticStudio will generally
use exact real rays rather than paraxial rays for ray tracing through these surfaces and
components.
A system which is well described by paraxial optics will have the general property that the real
and paraxial marginal ray data converge as the radial entrance pupil coordinate of the rays
being traced tends toward zero.
There are two methods used to normalize fields: radial and rectangular. The choice of field
normalization method is made on the Field Data dialog; for a description see the “Field angles
and heights” definition.
If the field normalization is radial, then the normalized field coordinates represent points on a
unit circle. The radius of this unit circle, called the maximum radial field, is given by the radius
of the field point farthest from the origin in field coordinates. The maximum radial field
magnitude is then used to scale all fields to normalized field coordinates. Real field
coordinates can be determined by multiplying the normalized coordinates, Hx and Hy , by the
maximum radial field magnitude:
and
where Fr is the maximum radial field magnitude and fx and fy are the field coordinates in field
units.
If a fourth field point at (-10.0, -3.0) were added in the above example, the maximum radial
field would become
Otherwise, the field point lies outside of the maximum radial field.
If the field normalization is rectangular, then the normalized field coordinates represent points
on a unit rectangle. The x and y direction widths of this unit rectangle, called the maximum x
field and maximum y field, are defined by the largest absolute magnitudes of all the x and y
field coordinates. The maximum x and y field magnitudes are then used to scale all fields to
normalized field coordinates. Real field coordinates can be determined by multiplying the
normalized coordinates, Hx and Hy , by the maximum x and y field magnitudes:
and
where Fx and Fy are the maximum x and y field magnitudes, and fx and fy are the field
coordinates in field units.
If a fourth field point at (-10.0, -3.0) were added in the above example, the maximum x and y
field values would not change. Normalized rectangular coordinates should always be between
-1 and 1.
For example, if the entrance pupil radius (not diameter) is 8 mm, then (Px = 0.0, Py = 1.0) refers
to a ray which is aimed to the top of the entrance pupil. On the entrance pupil surface, the ray
will have a coordinate of (x = 0.0 mm, y = 8.0 mm).
Note that the normalized pupil coordinates should always be between -1 and 1, and that
NSC
Non-sequential Component (NSC) objects are 3D objects used in non-sequential ray tracing.
NSC objects can be defined in non-sequential mode and in mixed mode:
NSC objects are defined in non-sequential mode using the Non-sequential Component Editor.
See “NSC ray tracing in non-sequential mode” for more information.
NSC objects are defined in mixed mode using a Non-sequential Component surface in the
Lens Data Editor. See “NSC ray tracing in mixed mode” for more information.
Parameter Data
Parameter data values are used to define certain non-standard surface types. For example,
parameter data may include aspheric coefficients, grating spacings, or tilt and decenter data.
For a complete discussion of the parameter data values see SEQUENTIAL SURFACES (lens data
editor).
Many definitions in optics are based upon this assumption of linearity. Aberrations are
deviations from this linearity, and so the paraxial properties of optical systems are often
considered the properties the system has in the absence of aberrations. Paraxial rays are traced
using formulas which assume the optical surface power is based only upon the vertex radius of
curvature, ignoring local linear tilts and higher order curvature of the surface.
OpticStudio computes many paraxial entities, such as focal length, F/#, focal position, entrance
pupil diameter, and others. These values should be used with caution when the optical system
has components which violate the assumption that the vertex curvature is an acceptable
approximation to the surface power over the entire aperture of the surface.
For many analysis features, paraxial data is required, typically as a reference against which real
rays are measured. To ensure these features work properly, even for optical systems that do
not meet the paraxial assumption above, OpticStudio traces “parabasal” rays which are real
(real means using Snell's law explicitly) that make small angles with respect to a reference ray,
which is usually an axis or chief ray. The parabasal rays are used to compute the limiting
properties of the system as the stop size is decreased, which provides a good estimate of the
paraxial properties.
The reason OpticStudio uses parabasal rays rather than paraxial formulas is because many
optical systems include non-paraxial components. Non-paraxial means these components are
not well described by conventional axial first-order theory. This includes tilted or decentered
systems, systems using holograms, diffractive optics, general aspheres, and gradient index
lenses.
In summary, paraxial ray data is computed using first order approximations to the surface
power for tracing rays, while parabasal rays are real, exact ray traces close to a chief or
reference ray. Most paraxial data, such as EFL, F/#, and magnification, use paraxial rays and the
data is invalid if the optical system is not well described by the vertex power of every surface.
Most analysis features in OpticStudio use parabasal rays, to allow these features to work with a
greater range of optical systems, including those with optical surfaces not well described solely
by their vertex surface power.
where θ is the paraxial marginal ray angle in image space and n is the index of refraction of
image space. The paraxial marginal ray is traced at the specified conjugates. For non-axial
systems, this parameter is referenced to the axis ray and is averaged over the pupil. The
paraxial working F/# is the effective F/# ignoring aberrations. See also the definition for
“working F/#”.
Primary Wavelength
The primary wavelength in micrometers is displayed. This value is used for calculating most
other paraxial or system values, such as pupil positions.
Radii
The radius of curvature of each surface is measured in lens units. The convention is that a
radius is positive if the center of curvature is to the right (a positive distance along the local z
axis) from the surface vertex, and negative if the center of curvature is to the left (a negative
Real propagation
A real propagation means the rays are propagated in the direction energy would actually flow.
See also the definitions for “Virtual Propagation” and “Thicknesses”.
For typical rotationally symmetric systems with field points lying along the Y axis, the
tangential plane is the YZ plane and the sagittal plane is the plane orthogonal to the YZ plane
which intersects the center of the entrance pupil.
The problem with this definition is that it is not readily extended to non-rotationally symmetric
systems. For this reason, OpticStudio instead defines the tangential plane to be the YZ plane
regardless of where the field point is, and tangential data is always computed along the local y
axis in object space. The sagittal plane is the orthogonal to the YZ plane, and intersects the
center of the entrance pupil in the usual way, and sagittal data is always computed along the x
axis in object space.
The tangential plane and sagittal plane are rotated in pupil coordinates by the Tangential
Angle in the Fields section of the System Explorer about the z axis. See Vignetting Factors.
The philosophy behind this convention is as follows. If the system is rotationally symmetric,
then field points along the Y axis alone define the system imaging properties, and these points
should be used. In this case, the two different definitions of the reference planes are redundant
and identical. If the system is not rotationally symmetric, then there is no axis of symmetry, and
the choice of reference plane is arbitrary.
Semi-Diameters
The size of each surface is described by the semi-diameter setting if it is non-rotationally
symmetric and the clear semi-diameter setting if it is rotationally symmetric. The default
setting is the radial distance to the aperture required to pass all real rays without clipping any
of the rays. Typing a value for the clear semi-diameter or semi-diameter column results in the
character “U” being displayed next to the value. The “U” indicates that the clear semi-diameter
or semi-diameter is user defined. When a user-defined clear semi-diameter or semi-diameter
is placed on a surface with refractive power (which is done by typing in a value in the
appropriate column), and no surface aperture has been defined, OpticStudio automatically
applies a “floating” aperture to the surface. A floating aperture is a circular aperture whose
radial maximum coordinate is always equal to the clear semi-diameter or semi-diameter of the
surface.
For more information on surface aperture types, see the Aperture section of the Surface
Properties (in the Lens Data Editor).
Clear semi-diameters on any surface for axial symmetric systems are computed very
accurately, as long as the surface does not lie within the caustic of the ray bundle (note this
usually occurs at or near the image surface). OpticStudio estimates clear semi-diameters for
axial systems by tracing a few marginal pupil rays. For non-axial systems, OpticStudio
estimates the required clear semi-diameter or semi-diameters using either a fixed number of
rays or by an iterative technique, which is slower but more accurate.
See the explanation of “Fast Semi-Diameters” in Advanced Options (system explorer) for
details. It is important to note that the “automatic” clear semi-diameter or semi-diameter
computed by OpticStudio is an estimate, although it is generally a very good one.
Some surfaces may become so large in aperture that the surface z coordinate becomes
multiple valued; for example, a very deep ellipse may have more than one z coordinate for the
same x and y coordinates on the surface. For the case of spherical surfaces, this condition is
Special Characters
There are many places in OpticStudio where user defined file, material, glass, or other names
may be provided. Generally, OpticStudio allows any characters to be used in these names,
except for a few reserved “special characters” The special characters are space, semi-colon,
single quote, and tab.
Strehl Ratio
The Strehl ratio is one commonly used measure of optical image quality for very high quality
imaging systems. The Strehl ratio is defined as the peak intensity of the diffraction point
spread function (PSF) divided by the peak intensity of the diffraction point spread function
(PSF) in the absence of aberrations. OpticStudio computes the Strehl ratio by computing the
PSF with and without considering aberrations, and taking the ratio of the peak intensity. The
Strehl ratio is not useful when the aberrations are large enough to make the peak of the PSF
ambiguous, or for Strehl ratios smaller than about 0.1.
For more information, see the Aperture section of the Surface Properties
System Aperture
The system aperture is the overall system F/#, Entrance Pupil Diameter, Numerical Aperture, or
Stop Size. Any of these 4 quantities is sufficient to define the other 3 for a particular optical
system. The system aperture is used to define the object space entrance pupil diameter, which
in turn is used to launch all rays. The system aperture is always circular. Rays may be vignetted
after being launched by various surface apertures. There is only one system aperture, although
there may be many surface apertures.
Thicknesses
Thicknesses are the relative distance to the next surface vertex in lens units. Thicknesses are
not cumulative, each one is only the offset from the previous vertex along the local z axis. The
orientation of the local z axis can change using coordinate breaks (see Coordinate Break) or
surface tilts and decenters (see the Tilt/Decenter section of the Surface Properties).
Thicknesses corresponding to real propagation (see “Real propagation”) always change sign
after a mirror. After an even number of mirrors (including zero mirrors), thickness are positive
for real propagations and negative for virtual propagations (see “Virtual propagation”). After
an odd number of mirrors, thicknesses are negative for real propagations and positive for
virtual propagations. This sign convention is independent of the number of mirrors, or the
presence of coordinate breaks. This fundamental convention cannot be circumvented through
the use of coordinate rotations of 180 degrees.
Total Track
Total track is the length of the optical system as measured by the vertex separations between
the “left most” and “right most” surfaces. The computation begins at surface 1. The thickness
of each surface between surface 1 and the image surface is considered, ignoring any
coordinate rotations. The surface which lies at the greatest z coordinate defines the “right
most” surface, while the surface with the minimum z coordinate defines the “left most” surface.
Total track has little or no value in non-axial systems.
Vignetting Factors
Vignetting factors are coefficients which describe the apparent entrance pupil size and
location for different field positions. OpticStudio uses five vignetting factors: VDX, VDY, VCX,
VCY, and TAN. These factors represent decenter x, decenter y, compression x, compression y,
and tangential angle, respectively. The default values of all five factors are zero, which indicates
no vignetting.
Both the field of view and the entrance pupil of an optical system can be thought of as unit
circles. The normalized field and pupil coordinates, defined in “Normalized field coordinates”,
are the coordinates on these two unit circles. For example, the pupil coordinates (px = 0, py =
1) refer to the ray which is traced from some point in the field to the top of the entrance pupil.
If there is no vignetting in the system, OpticStudio will trace rays to fill the entire entrance pupil
during most computations.
First, vignetting decreases the size of the lenses, particularly in wide angle lenses.
Second, vignetting may remove a portion of the beam which would be excessively aberrated.
Vignetting usually increases the F/# as a function field angle (which darkens the image), but
the image quality may improve if the most severely aberrated rays are clipped.
Vignetting factors redefine the entrance pupil for a specific field position. The normalized pupil
coordinates are modified using two successive transformations. First, the coordinates are
scaled and shifted:
and
The scaled and shifted coordinates are then rotated by the tangential angle, 0:
And
Some OpticStudio features are capable of tracing rays from arbitrary field positions where no
vignetting factors have been assigned. These features may not provide completely accurate
results for data computed at field positions other than the defined fields. Some features will
remove the vignetting factors for these computations by placing a clear aperture on each
surface that vignettes the rays an equivalent amount. Features that automatically remove the
vignetting factors are described in the Analysis chapter.
Some features in OpticStudio do not automatically remove vignetting factors for intermediate
field positions, such as ray operands in the merit function (operands like REAX that can launch
a single ray, for example) or ZPL macros. If the vignetting factors are not removed, OpticStudio
will attempt to interpolate the vignetting factors. For rotationally symmetric systems, or
systems with field points entirely along the y axis, OpticStudio interpolates between adjacent
field points to estimate the vignetting factors to use at intermediate field points. For more
general optical systems with X field values, OpticStudio uses the closest defined field point for
determining the vignetting factors for an arbitrary field point.
Once a vignetting factor is defined, it is up to the designer to ensure that rays beyond the
apparent pupil are in fact vignetted! If the vignetting factor is used to shrink the size of the
lenses, then the lenses should be made no larger than is required to pass the rays which are at
the edge of the apparent pupil. If rays from beyond the vignetted aperture are allowed to pass
in the real optical system, then the lens performance will not correlate with the computer
model.
Identical or nearly identical field coordinates may not be defined with different vignetting
factors. Field coordinates must be different by roughly 1E-06 times the maximum field
coordinate if two neighboring fields use different vignetting factors. This is required because
OpticStudio must determine vignetting factors for any field coordinates, not just those at
defined field positions; and identical field coordinates with different vignetting factors have no
physical interpretation. The proper way to set up this sort of system is to use multiple
configurations, and change the vignetting factors via the multi-configuration editor.
One possible application of vignetting factors is to account for pupil aberration without using
the ray aiming feature. This is an advanced trick which can be used to speed up ray tracing in
wide angle systems.
Vignetting factors may be defined on the “Field Data” dialog box. See the Fields section of the
System Explorer for more information.
Vignetting factors may also be zoomable parameters; see the Chapter “Multi-Configurations”.
For more information on the use of vignetting as a design tool, see any of the good books
referenced in the first chapter.
Virtual Propagation
A virtual propagation means the rays are propagated in a direction opposite to the direction
energy would actually flow. Virtual propagations are often useful for placing virtual sources or
pupils. See also the definitions for “Real propagation” and “Thicknesses”.
Wavelength Data
Wavelength data are always measured in micrometers referenced to “air” at the current system
temperature and pressure. The default system temperature is 20 degrees Celsius, and the
default air pressure is 1.0 atmospheres. If the system temperature and/or pressure is modified,
or under the control of multi-configuration operands, care must be taken to adjust the
wavelengths to the new air temperature and pressure.
Working F/#
Working F/# is defined as
where θ is the real marginal ray angle in image space and n is the index of refraction of image
space. The marginal ray is traced at the specified conjugates. Working F/# ignores surface
apertures but considers vignetting factors.
For off axis field points or non-axial systems, working F/# is determined by the average of the
square of the numerical aperture between the axis ray and four marginal rays, at the top,
bottom, left, and right side of the vignetted pupil. The average of the square of the numerical
aperture of the four rays is converted back to equivalent F/#.
Working F/# is generally much more useful than image space F/# because it is based upon real
ray data at the actual conjugates of the lens. See also the definition for “Paraxial working F/#”.
If the marginal rays cannot be traced (due to ray errors) then a smaller pupil is temporarily
used to estimate the working F/#. In this case, OpticStudio scales the data to estimate the
working F/# at the full pupil size, even though rays are not be traceable at the full aperture.
If the marginal rays are nearly parallel to the chief ray, the resulting F/# may become so large
as to be inaccurate. OpticStudio will automatically “cap” the F/# at 10,000 if the calculated F/#
becomes larger than 10,000. This result simply means the F/# cannot be calculated accurately
using rays. Such a large F/# means the output beam is nearly collimated, and many
assumptions OpticStudio makes are not valid in this case. The two solutions are to bring the
nearly collimated beam to a focus using a paraxial lens, or to use the exit pupil size and
position to estimate the F/#.
For a generalized definition of F/# useful for evaluating image brightness, see the discussion of
“Effective F/#” in the discussion about the Relative Illumination analysis.
‘
‘Close’ Close the currently open System 2291
‘LoadFile’ Loading a Lens File (.ZMX) 2291
‘New’ Create a new (default) Lens Data File (Lens.ZMX) 2291
‘Save’ Save the existing System 2291
‘SaveAs’ Save the current System to a new file (.ZMX) 2291
…
…Lens Data Editor (LDE) 2351
…Merit Function Editor (MFE) 2351
…Multi-Configuation Editor (MCE) 2351
…Nonsequential Component Editor (NCE) 2351
…Tolerance Data Editor (TDE) 2351
1
1D Line Plot 2365
2
2D Deformation Plot 2405
2D Grid Plot 2366
2D RGB Grid Plot 2367
3
3D Viewer 951
3D Viewer (Setup Tab, sequential) 918
B
Back Focal Length 2432
Batch Ray Trace Modes 2373
Beam Coordinates and Pilot Beam Properties 1222
Beam DLL Parameters 1214
Beam File Viewer 1232
Beam Width and M-Squared 1223
BEEP 2093
Best Fit Sphere Data 1577
Bi-Directional Scatter Distribution Function 520
Biconic 303
Biconic Lens 600
Biconic Surface 604
Biconic Zernike 304
Biconic Zernike Lens 601
Biconic Zernike Surface 607
Binary 1 (non-sequential geometry objects) 609
Binary 1 (sequential surfaces, lens data editor) 305
C
C# 2266
C++ 2267
CAD 845
CAD Assembly
Autodesk Inventor, Creo Parametric 623
CAD Files 85
CAD Objects and the Grid_Gradient DLL 537
CAD Part
AutoDesk Inventor, Creo Parametric 626
D
Data (sequential surfaces, lens data editor) 331
Data Columns 287
Data Specific to MeritOperandTypes 2343
Data Specific to MultiConfigOperandType 2349
Data Specific to ObjectType 2333
Data specific to SurfaceType 2321
Data Specific to ToleranceOperandType 2345
Data Summary Group 2397
Data[] values for Bulk Scatter, Diffraction, Surface Scatter DLLs 562
E
Edge Thickness 2435
Edit Coating File 1910
Edit Object Data File 855
Edit/Run 2059
Editing & Reviewing Glass Catalogs 1849
Editing Series Properties 1369
Editing the Coating File 1914
Editor Windows Operations 913
F
Face Properties 912
Faceted Surface 665
Fast Semi-Diameters 156
FEA Data Group 2384
FEA Data Viewer 2384
FEA Fitting Process and RBMs 2407
FEA Symmetry Tool 2385
Feature Experiments 2428
Feature Finder 2426
FFT Cross Section 1074
FFT Line/Edge Spread 1076
FFT MTF 1086
FFT MTF Map 1095
FFT MTF vs. Field 1093
FFT PSF 1069
FFT Surface MTF 1091
FFT Through Focus MTF 1089
Fiber Coupling 1244
G
Gallery Mode (script, sketch, and gallery modes, project preferences) 1978
Gallery Mode (using part designer) 2024
Gaussian Angle 1209
Gaussian Beam Data 1554
Gaussian Beams 1235
Gaussian Quadrature 1645
Gaussian scattering 521
Gaussian Size+Angle 1209
Gaussian Waist 1208
GCRS 2110
GDATE 2110
General 254
General Comments About Min & Max Values on Compensators 1763
General Comments on Using Dispersion Formulas 1857
General Information 2430
General Math Operands 1552
General Settings 804
Generalized Fresnel 344
H
HAMMER (keywords) 2133
Hammer Optimizer 1659
Hammer Optimizer (optimize tab, non-sequential) 1725
Help (lens data editor toolbar) 500
Help (multi-configuration editor toolbar) 889
Help (nsc editor toolbar) 869
Help PDF 2419
Help System (documentation group) 2418
Help System (zos-api.net applications group) 2262
Hexagonal Lenslet Array 680
Hexapolar Rings 2439
High Resolution Images and Detectors 1721
Histogram 1793
Hologram 1 366
Hologram 2 369
Hologram Lens 681
Hologram Surface 684
How OpticStudio Computes the Tolerance Analysis 1818
How rays are selected from the spectrum 820
How to Model Scattering Efficiently 528
Huygens Cross Section 1083
Huygens MTF 1097
Huygens MTF vs. Field 1104
Huygens PSF 1078
Huygens Surface MTF 1102
Huygens Through Focus MTF 1100
J
Jones Matrix (non-sequential geometry objects) 687
Jones Matrix (sequential surfaces, lens data editor) 372
Jx, Jy, X-Phase, Y-Phase 191
K
KEYWORDS (about the zpl) 2092
Keywords (an overview of zpl) 2066
Knowledgebase 2421
M
Macro Help 2063
Macro List 2057
Make Conjugate 885
Make Conjugate (Setup Tab Sequential UI Mode) 943
Make Double Pass 487
Make Focal 486
Make Private Lens Catalog 1901
Make Single Configuration 883
Make Thermal 883
Make Thermal (Setup Tab Sequential UI Mode) 942
Make TrueFreeForm 488
MAKEFACETLIST 2147
MAKEFOLDER 2148
Making a Hyperhemispheric Surface 606
Manage my license 2414
N
Named Filters 235
Naming Points & Arcs 2023
Native Object 2441
Nesting Rules for Monte Carlo Analysis 1828
New Lens Project / Save Lens Project As 77
New Macro 2062
New Universal Plot 1D 1471
New Universal Plot 2D 1475
New/Open/Save/Save As 67
NEXT 2161
Next/Previous Configuration 946
No Bulk Scattering 530
No Scattering 521
Non-Paraxial Systems 2441
Non-sequential (system explorer) 229
Non-sequential Bitmap Wizard (from the Setup Tab) 895
Non-sequential Component 373
Non-sequential Component Editor 501
Non-sequential Detectors 779
Non-sequential Geometry Objects 570
Non-sequential Optimization Wizard (from the Setup Tab) 895
Non-sequential Overview 502
Non-sequential Ray Tracing 2442
Non-sequential Ray Tracing and Detector Operands 1564
O
OADDETECTOR (keywords) 2144
Object Creation Commands 2027
Object Editor (editors group) 897
Object Editor (nsc editor toolbar) 856
Object Editor (Setup Tab) 921
Object Editor (system viewers group, the analyze tab, non-sequential ui mode) 1396
Object Editor Settings 901
Object Explorer Tree 905
Object Placement 510
Object Properties (non-sequential component editor) 803
Object Properties (object editor) 902
Object Space Numerical Aperture 2448
Object Viewer 910
Objects 1983
Objects as Detectors 802
Obsolete Catalog Data 1868
Obsolete Operands 1579
Odd Asphere 373
Odd Asphere Lens 695
Odd Cosine 374
Off-Axis Conic Freeform 375
Off-axis Mirror 696
Offset of highlighted geometries in Shaded Model 1386
OPD Modulo 2 pi 219
OPEN 2164
P
PAL/Freeform 1344
Q
Q-Type Asphere (sequential surfaces, lens data editor) 384
Q-Type Asphere Surface (non-sequential objects) 704
Q-Type Freeform 385
QuadratureSteps (Intellisense Screenshot) 2298
Quantitative Beam Analysis 1222
Quick Adjust 1489
Quick Focus 1488
Quick Sensitivity 1786
Quick Tolerancing Group 1786
Quick Yield 1788
QUICKFOCUS (keywords) 2180
QUICKSENSITIVITY (keywords) 2181
R
RADI 2182
Radial Grating 387
Radial NURBS 388
S
Sag Table 1263, 1812
Sagittal and Tangential 2451
Sample bulk scattering
Henyey-Greenstein-bulk.DLL 532
Mie.DLL 533
Phosphor.DLL 533
Poly_bulk_scat.DLL 532
Rayleigh.DLL 532
T
TABB Tolerance on Abbe 1756
Tabulated Faceted Radial 725
Tabulated Faceted Toroid 728
Tabulated Fresnel Radial 730
Talbot Imaging 1232
TARX, TARY, TARR
Tolerance on Roll Angles 1758
TCE 291
U
Understanding Boundary Operands 1679
Undo Redo 1974
Undo, Redo, and Recover 915
Uniform Statistical Distribution 1825
Union 2007
Unit Considerations 1367
Units 239
Universal Plot 1-D 1326
Universal Plot 2-D 1328
V
Variable Line Space Grating 417
VEC1, VEC2, VEC3, VEC4 2234
View Current Object 855
View Spectrum File 1948
Viewing Analysis Information 2311
Vignetting 171
Vignetting Factors 2455
Vignetting Plot 995
Virtual Propagation 2458
Visit Each Operand Cell (Value) in Each Configuration 2350
Visiting each Value in the Grid 2316
Visual Optimizer 1491
Visual Optimizer (optimize tab, non-sequential) 1708
Void ReloadFiles() 2307
W
Wavefront 1037
Wavefront Error and RMS Beam Deviations 1224
Wavefront Map 1039
Wavelength Data 2458
Wavelength Data Editor 176
Wavelength Shift 830
WavelengthPreset (Intellisense Screenshot) 2298
Wavelengths 175
WAVL, WWGT 2235
Websites Group 2421
What is a Bezier Segment? 2020
What OpticStudio Can Compute Using Polarization Analysis 206
What’s New 2421
Where the Integral is Computed 1220
Window Control Group 935
Window Options 937
Wolter Surface 744
Working F/# 2459
Working With IOpticalSystem at the Application Level 2289
X
XDIFFIA 2235
XYSampling (Intellisense Screenshot) 2327
Y
Y-Ybar Drawing 993
Z
ZBF2MAT 2236
ZBFCLR 2236
ZBFMULT 2237
ZBFPROPERTIES 2237
ZBFREAD 2238
ZBFRESAMPLE 2239
ZBFSHOW 2240
ZBFSUM 2240
ZBFTILT 2241
ZBFWRITE 2242
Zemax Beam File (ZBF) Binary Format 1211
Zemax Beam File (ZBF) text format 1212
Zemax Black Box 94
Zemax Element Drawing (manufacturing drawings and data group) 1806
Zemax Element Drawing (Setup Tab, sequential) 919
Zemax Element Drawing (system viewers group) 959
Zemax File Collector 2424
ZemaxAfocalModeUnits AfocalModeUnits 2310
ZemaxAnalysisUnits AnalysisUnits 2309
ZemaxApertureType ApertureType 2292
ZemaxApodizationType ApodizationType 2293
ZemaxColor (Intellisense Screenshot) 2322
ZemaxMTFUnits MTFUnits 2310
ZemaxOpacity (Intellisense Screenshot) 2323
ZemaxSourceUnits SourceUnits 2308