Skip to main content
Solved

Different results of image size When calculating the same system of Zemax in Matlab

  • January 3, 2022
  • 1 reply
  • 74 views

  • Monochrome
  • 2 replies

Dear community,

I’m working on a system that contains a simple SV lens and a human eye model (taken from Zemax library, with small changes).

A co-worker wrote a code in Matlab with the exact same system and we wanted to compare the images sizes that was received on  the retina.

We’re receiving a huge difference (two orders difference) between the result from Zemax and the results from Matlab, and we suspect that something in the Zemax system is wrong, or the calculation in Zemax may be wrong.  

I’m attaching my Zemax system, hoping someone here could help me understand if I did something wrong.

 

Also the value of the image size that we received from Matlab is: 3.58 x10^-1 µm both in X and Y direction

 

Thank you

Best answer by Allie

Hi @Nim - it looks like you sent a ZMX file instead of a ZAR. This means that your material catalogs and analysis windows were not included. Can you send the ZAR instead? Also, what analysis are you using to read the image size?

Finally - I am wondering what you mean when you say “A co-worker wrote a code in Matlab with the exact same system”. Is this code hand-written by your co-worker to calculate refraction? Or are you using the ZOS-API to analyze the same system? How is their analysis calculating image size?

Any information you can provide will help us to understand where the discrepancies lie. If needed, we can also move this into a private support case as long as your license is supported. Let me know if that’s a route you’d prefer!

View original
Did this topic help you find an answer to your question?

1 reply

Allie
Zemax Staff
Forum|alt.badge.img+2
  • Zemax Staff
  • 343 replies
  • Answer
  • January 13, 2022

Hi @Nim - it looks like you sent a ZMX file instead of a ZAR. This means that your material catalogs and analysis windows were not included. Can you send the ZAR instead? Also, what analysis are you using to read the image size?

Finally - I am wondering what you mean when you say “A co-worker wrote a code in Matlab with the exact same system”. Is this code hand-written by your co-worker to calculate refraction? Or are you using the ZOS-API to analyze the same system? How is their analysis calculating image size?

Any information you can provide will help us to understand where the discrepancies lie. If needed, we can also move this into a private support case as long as your license is supported. Let me know if that’s a route you’d prefer!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings