- Home
- Programming ZEMAX
- ZPL
- How To Modify Field Data in the Merit Function Editor Using the FDMO operand
- Home
- Optimization
- Tips & Tricks
- How To Modify Field Data in the Merit Function Editor Using the FDMO operand
How To Modify Field Data in the Merit Function Editor Using the FDMO operand
- By Sanjay Gangadhara
- Published 21 February 2008
- ZPL , Tips & Tricks
-
Rating:




Calculating the Strehl ratio at arbitary fields
A more interesting example which employs the FDMO operand is for the calculation of the Strehl ratio at arbitrary field points. This calculation is currently available using the analysis feature Analysis > RMS > RMS vs. Field, where the Strehl ratio (S) is calculated from the RMS wavefront error (s) using the formula:
S = Exp(-(2ps)2)
The Strehl ratio may also be calculated using the STRH operand, which employs the Huygen’s PSF computation. To calculate the Strehl ratio at arbitrary field using the STRH operand, we construct a Merit Function which alternates FDMO operands and STRH operands. This procedure is automated using a ZPL macro (FDMO_TEST.ZPL), which can be found in the .ZIP file located at the end of this article. This macro is to be used with the lens file \ZEMAX\Samples\Sequential\Objectives\Doublet.zmx (before running the macro with this file, you will need to add a field data point in the Field Data dialog box, with x=0 and y=2). The macro uses the keyword SETOPERAND to place the FDMO and STRH operands in the Merit Function editor with the appropriate input values. The functions MFCN and OPER and then used to evaluate the Merit Function and return values for the Strehl ratio, respectively. The PLOT keyword is then used plot the results to a graphical window.
Computation of the Strehl ratio using the above formula is also performed in the macro, and results obtained from the two methods are presented in the same graph for comparison:
For values of the Strehl ratio corresponding to diffraction limited performance (S > 0.25), there is very good agreement between the methods of calculation. For lower values of S the methods disagree in this case. However, the formula used to calculate the blue curve is generally only valid for small values of the wavefront error, which is becomes less and less true as S gets smaller. Thus, in this region the Huygens computation (as given by the STRH operand) is much more likely to yield an accurate result.
If you open up the Merit Function editor after executing the macro, you will find that the appropriate number of FDMO and STRH operands have been placed within it: