- Home
- Optimization
- Tips & Tricks
- How to Optimize at Intermediate Surfaces
How to Optimize at Intermediate Surfaces
- By Nam-Hyong Kim
- Published 17 July 2006
- Tips & Tricks
-
Rating:




The IMSF operand
The Default Merit Function (DMF) Tool, under Tools > Default Merit Function in the Merit Function Editor's menu, builds merit functions that are evaluated at the current image surface (i.e. the last surface in the Lens Data Editor). For example, the RMS spot size DMF evaluates the spot size at the last surface and the RMS wavefront DMF at the exit pupil of the current system with the last surface being the image.
The IMSF optimization operand allows the default merit function to be calculated at any surface in your system. In the included sample file, let's suppose that we want to optimize for minimum RMS spot at surface 3# while at the same time achieve best collimation at the image surface (#6). This can be done using the default merit function tool and the IMSF optimization operand. The variables in this system are the radii of curvature of surfaces #2 and #5 and the conic of surface #2. 
If you are not familiar with optimizing with the default merit function, please refer to the following knowledge base article.
http://www.zemax.com/kb/articles/20/1/Designing-A-Singlet-in-ZEMAX
To learn about the IMSF operand, open the included sample file and follow the steps below. The file can be downloaded from the last page of this article.
1) Open the Merit Function Editor and build the default RMS spot radius merit function. 
Insert an IMSF operand before the DMFS and specify surface #3 as the surface on which the default RMS spot radius merit function is calculated at. 
Insert a blank line after the last operand (BLNK as operand #10)
Insert a new RMS angular radius default merit function starting from line 10.
Insert another IMSF operand before the second DMFS and set the surface parameter to 6 the image surface.
This merit function will optimize for minimum RMS spot size at surface #3 and best collimation, i.e. minimum angular spot radius, at surface #6 (image).
Click on Tools> Optimization> Optimization and press the Automatic button. You should get the following result. 
ZEMAX has optimized at two surfaces, with two different criteria, simultaneously. With multiple IMSF operands in the merit function, you can optimize at several intermediate surfaces at the same time with the same merit function, which can contain different criteria for each surface.