Skip to main content
Solved

Differences in zmx files for systems that are equal in file comparer

  • 14 July 2024
  • 3 replies
  • 77 views

Hi! 

 

I am trying to exactly recreate an elaborate sequential optical system and seem to have managed. The built-in “file comparer” shows no noteworthy differences except the naming of some surfaces. I however also compared the text saved in both zmx files to be sure, which showed some differences. In the zmx file, the following surface related properties are different:

 


SURF .. - SLAB

SLAB seems to differ between the surfaces, but I assume this is just related to the order in which the surfaces were created? I insert surfaces using the API and they seem to increment accordingly in my file. In the other file, the surfaces seems to have been added manually.

 

SURF .. - GLAS

In both files, the material “N-BK7” from the “Schott” catalog is used for some surfaces. In the original file, these surfaces have GLAS defined as 

GLAS N-BK7 0 0 0 0 0 0 0 0 0 0 

But in my file, it is saved as 

GLAS N-BK7 0 0 1.5 40 0 0 0 0 0 0

 

I cannot find where 1.5 and 40 are defined in my file (or similarly, 0, 0 in the original file). 

 

SURF .. - OEMA

OEMA is defined in one file as 

OEMA 0.5 0 0 0 0 ""

But in the other file as 

OEMA 0.5 0 0 0 1 ""

 

I cannot find where the difference between the final 0 and 1 originates from.


 

It might be good to mention that I am on OpticStudio 20.3.2 and the file I try to recreate was made in version 24. Can anyone tell me if these differences are relevant, and if so, how to resolve them? Thank you in advance!

3 replies

Userlevel 7
Badge +2

@Luc.van Vught 

 

I had a quick look as well and here is some complementary information.

SLAB

I didn’t check but what you say makes sense, its probably not important.

GLAS

The values 1.5 and 40 look suspiciously like refractive index and dispersion, but of course they would be wrong for N-BK7. Interestingly enough, if you change the solve type to Model Glass and then back to Fixed. The LDE still shows N-BK7, but in the ZMX file you get (I’m using the default wavelength of 0.55um):

  GLAS N-BK7 0 0 1.5168000344999999 64.167336237499995 -0.00089999999999999998 0 0 0 0 0

which makes me think once again that those two parameters (third and fourth) are the refractive index and dispersion. The fifth parameter could be dPgF. However, I don’t think it matters when you use glasses from catalogs. I could be wrong but, my guess is that for catalog glasses OpticStudio just uses the name to find the glass in the corresponding catalog. So instead, I think you should make sure that the definition of N-BK7 in the glass catalog files are the same (\Documents\Zemax\Glasscat\SCHOTT.AGF).

OEMA

It seems related to the mechanical diameter of the lens. I have it appear if I have a Chip Zone and a Mech Semi Dia greater than the sum of Clear Semi Dia and Chip Zone. What the final flag does however, I do not know.

Hope this helps and take care,


David

Userlevel 6
Badge +2

Hi David & Luc,

The SLAB is a Surface Label and is applied to new surfaces in the order there were entered into the LDE.  So if you add surfaces from the top to bottom vs bottom to top, you will have different SLAB values for the exact same geometry in the LDE.  The SLAB was added for bookkeeping, primarily for OpticsBuilder, so a developer can have a little more information about the last surface they added.

As David mentioned, the GLAS only considers the first entry (the glass name) only when you’re using an AGF glass catalog; these extra values past the glass name are only used when entering glass as a MILSPEC or when using solves.  So as long as you’re using the same glass SCHOTT.AGF catalog the dispersion will be the same.

The difference between 0 & 1 in the OEMA is the scale factor when using a pickup solve.  This value is ignored unless the number after the “0.5” is set to 1 (this means that the Mechanical Semi-Diameter has a pickup solve).  If this value is 0, then all the values past this 0 are meaningless.

Basically, when OpticStudio saves a file, there are several different states (fixed, variable, pickup, macro) each surface can have.  When OpticStudio initializes a surface, it has to allocate memory for all the different states, but OpticStudio doesn’t validate the contents of the memory location until that given state becomes active.  So simply reading out the text of a ZMX file doesn’t paint the full picture of what the active state for each surface is.  A better approach would be to create a series of metrics (MFE operands and Analysis Windows), run a regression test against each file, and compare the outputs of the files.

Userlevel 2

Hi @David.Nguyen and @MichaelH, thank you for your quick replies and the explanation. I'm happy to see that the differences that I ran into were not relevant to this case.

 

@MichaelH, I of course agree that the best way to compare files is to create a series of metrics and compare those. I started there and initially had some differences, but could not directly figure out their origin. To solve that, I initially started to compare the .zmx files before I remembered that there is a built-in file comparer that directly shows the differences. As a result, I knew about differences in the .zmx files that were not apparent in the file comparer, but your explanation solved it fully!

 

Thank you both for your time!

 

 

Reply