Skip to main content

ZPL Solve: Diffraction grating Littrow angle solve

  • January 24, 2023
  • 1 reply
  • 170 views

 

Just a very simple ZPL solve to set the incident angle of a transmissive diffraction grating to the Littrow angle for order m = -1.

 

#Define pi
pi = 2*ACOS(0)

x = SOSO(0) #get preceeding coord break surface number

L = WAVL(PWAV()) #get primary wavelength
G = PARM(1,x+1) #return Lines/um from grating (pg 319)

Litt = asin(L*G/2)*180/pi #Calculate Littrow angle

solvereturn Litt

 

Just thought I’d share it to potentially save others a little time.

It could be expanded for additional orders.

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

1 reply

Forum|alt.badge.img+2

Hi James! Thank you for posting this. This is great.

I have created a quick file using it. I have modified "{Zemax}\Samples\Sequential\Diffractive components\Sample Spectrometer.zos"and it works well. I have attached my file. The ZPL solve is part of the zar file.

I have changed the tag to “Code Exchange-Verified”.

Thank you!


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