Hi everyone,
Inspired by this discussion with
In the Double Gauss 28 degree field sample file, with a default Merit Function:
Sequential merit function: RMS spot x+y centroid X Wgt = 1.0000 Y Wgt = 1.0000 GQ 4 rings 6 arms
The Merit Function Editor looks as below:
And the analysis returns:
Installation
To install this user analysis, download the attached archive (MeritFunctionContribution.zip) and extract it on your computer. Copy the file MeritFunctionContribution.exe to your {Documents}\Zemax\ZOS-API\User Analysis folder.
To run the user analysis, after the step above has been completed, simply press Programming..User Analyses..MeritFunctionContribution.
If you need to recompile the source code, please follow the steps outlined in this knowledgebase article.
Note 1: there’s little error traping in the code, I’m not sure how it would react if the Merit Function can’t be calculated.
Note 2: as
I hope this can serve as a starting point to develop further Merit Function analysis tools.
Take care,
David