How do I simulate a rectangular amplitude grating using the RCWA DLL. I used srg_trapezoid_RCWA.dll for the simulation. I set Index Grate to 1, Index Env to 0.7-7.0i to simulate transmissive and opaque slits, and both substrate and outside refractive index are set to 1. However, I found that the diffraction efficiency calculated by it is quite different from that calculated by using scalar theory in the paraxial region. Also, when I change Index Env (e.g., 0.7-20i) and Depth, the diffraction efficiency changes more significantly. How can I simulate a rectangular amplitude grating that is consistent with scalar theory?
![](https://uploads-us-west-2.insided.com/zemax-en/attachment/4f3d12a1-30c7-44a8-bdb5-97063793df34.png)
![](https://uploads-us-west-2.insided.com/zemax-en/attachment/742b61d2-f9f4-4ca2-9218-63a342c29e2d.png)