The project is based on https://github.com/victorliu/S4. The S4 package with python API should be installed first. For the installation guide, please refer to: https://github.com/phoebe-p/S4 by Dr. Phoebe Pearce. The installation becomes very simple by following her steps. This project is used for the sweep of the cylinder-shaped meta-atom library. But it can be modified for other use related to RCWA.
Metasurfaces on Silicon Photonic Waveguides for Simultaneous Emission Phase and Amplitude Control
Ping-Yen Hsieh, Shun-Lin Fang, Yu-Siang Lin, Wen-Hsien Huang, Jia-Min Shieh, Peichen Yu, and You-Chia Chang
Optics Express 31, 12487-12496 (2023)
Integrated Metasurfaces on Silicon Photonics for Emission Shaping and Holographic Projection
Ping-Yen Hsieh, Shun-Lin Fang, Yu-Siang Lin, Wen-Hsien Huang, Jia-Min Shieh, Peichen Yu, and You-Chia Chang
Nanophotonics 11(21), 4687-4695. (2022)
The schematic of the simulation model:
The Example/ contains 2 example scripts. The structure is from Nat Commun 6, 7069 (2015) by Amir Arbarbi et al.. Example.py is a simple example that can directly run in IDE. Or you can use the following method to read the Example.yml. The models are identical.
$ python3 atom_sweep.py -i <input_parameters.yml>
$ python3 sweepAnalysis.py -i <input_parameters.yml>
The input argument or the structure can be easily modified. Here is an example of mine. Sweep of 562nm period meta-atom library with SiO2 hardmask. All unit in "nm"
PY_S4:
period: 562
radii_range: [50,250,2]
height_range: [1000,1500,1]
wavelength: 1550
h_mask: 80
epsilon: 2.08514 # Palik
top_mask: True
angle: 54.9467 # effective index of 80nmSiO2 slab on silicon waveguide
outputPath: "Example/"
outputName: "Lib562sweep" # Default output name = outputName_E.txt and outputName_T.txt
The analysis input argument can be modified. My example here plot the phase and transmission data and output the transmission and phase data. Unit in "nm"
PY_S4_Analysis:
radii_range: [50,250,2]
height_range: [500,1500,10]
logScale: True # Whether to use log scale in transmission or not
inputFile_T: "Example/Lib562sweep_T.txt"
inputFile_E: "Example/Lib562sweep_E.txt"
outputPath: "Example/"
outputName: "sweep562" # Default output name: sweep562_T.txt and sweep562_Phase.txt
Data: "2D" # 2D or 1D sweep