edmundsj / rcwa

Rigorous Coupled Wave Analysis for the calculation of Photonic Crystal R/T spectra
MIT License
93 stars 29 forks source link

Lattice Vectors #6

Closed anthmanni closed 3 years ago

anthmanni commented 3 years ago

Thank you so much for writing this python extension! Haven't been able to get other RCWA extensions to install on my mac, so this simple pip install was an answer to my prayers.

Could you please post an example script for calculating RT coefficients for a single-layer grating or 2D photonic crystal? I'm trying to set my lattice vectors but haven't found a syntax that the function will trust to run the simulation. A simple reply with an example of how to define crystal layers would be great.

Thanks!

edmundsj commented 3 years ago

Thanks :D Nice to see it might actually be useful. I'll take a look over the weekend and see what I can do.

EDIT: I added an example for computing the amplitude reflection coefficients + diffraction efficiencies + total reflection and transmission from a 1-layer 2D photonic crystal. It should be in the "examples" folder as triangular_photonic_crystal.py. While they are not in the examples folder, you can find a YUGE number of syntax examples in the "test" folder, since I have a pretty extensive test suite. Suggestions for improving the syntax are also welcome :)