Skip to main content

Hi,

I am unable to find DOESAG.zpl macro for getting the sag values for the diffractive aspheric surface. Earlier it was available in the knowledge base but now that is also not there. 

Can I get this macro as it is very useful to view the steps of diffractive surface and surface sag data

Regards

J Himavanth kumar

Hi,

You can find the DOESAG.ZPL macro attached to this Knowledgebase article How to calculate the sag of a diffractive optical element with a macro – Knowledgebase (zemax.com). Let us know if you have any problems though.

Thanks,

Chris

 


Thank you chris ,

I got it


Dear 

I wonder DOESAG.zpl macro works correctly. When I compare sag of a binary2 surface using surface phase crosssection in analysis and DOESAG.zpl macro, the results are different. Could you check whether this macro is correct to calculate phase and sag? 


Dear 

 


Dear 

Sorry, DOESAG.zpl is correct. this macro shows sag value from DOE vertex. the result from Sag = (phase from Surface phase crossection) x (step height) shows the value from DOE base surface. so, two result are the same.


Hello everyone, thank you very much in advance.Could someone tell me why I receive this message when I run the macro downloaded from: How to calculate the sag of a diffractive optical element with a macro – Knowledgebase (zemax.com) ??

 

The line 85 is:

iter_num = sdi / step

 

Do you think the error is in "sdi" since it should be "sdia"?


 

 

 


Reply