Just a very simple ZPL solve to set the incident angle of a transmissive diffraction grating to the Littrow angle for order m = -1.
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
Just thought I’d share it to potentially save others a little time.
It could be expanded for additional orders.