-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
954 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
# Examples | ||
|
||
## Homogenous layer | ||
|
||
### 1. single layer | ||
|
||
#### 1. single layer with fill_factor in 1D | ||
|
||
#### 2. single layer with cell pattern in 1D | ||
|
||
## 2. 1-dimensional grating | ||
## 3. 1-dimensional grating with conical mounting | ||
## 4. 2-dimensional grating | ||
ex1 | ||
--- | ||
generates reflected and transmitted spectra from grating | ||
structure generated by 'fill factor' method. | ||
This will be deprecated and replaced by 'unit cell' method. | ||
|
||
ex2 | ||
--- | ||
generates reflected and transmitted spectra from grating | ||
structure generated by 'unit cell' method. With this method, | ||
user can design any pattern. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import time | ||
|
||
import matplotlib.pyplot as plt | ||
import numpy as np | ||
|
||
from meent.rcwa import call_solver, sweep_wavelength | ||
|
||
|
||
grating_type = 2 # 0: 1D, 1: 1D conical, 2:2D. | ||
pol = 1 # 0: TE, 1: TM | ||
|
||
n_I = 1 # n_incidence | ||
n_II = 1 # n_transmission | ||
|
||
theta = 0 # in degree, notation from Moharam paper | ||
phi = 0 # in degree, notation from Moharam paper | ||
psi = 0 if pol else 90 # in degree, notation from Moharam paper | ||
|
||
wls = np.linspace(900, 900, 1) # wavelength | ||
|
||
period = [700, 700] | ||
fourier_order = 2 | ||
|
||
thickness = [460, 660] | ||
|
||
ucell_x, ucell_y = 100, 100 | ||
|
||
ucell = np.zeros((2, ucell_x, ucell_y), dtype=int) | ||
|
||
x = np.arange(ucell_x) - ucell_x // 2 | ||
y = np.arange(ucell_y) - ucell_y // 2 | ||
|
||
hole = x**2 + y[:, None]**2 < 20 ** 2 | ||
ucell[0, hole] = 1 | ||
|
||
hole = x**2 + y[:, None]**2 < 15 ** 2 | ||
ucell[1, hole] = 1 | ||
|
||
plt.imshow(ucell[0]) | ||
plt.show() | ||
plt.imshow(ucell[1]) | ||
plt.show() | ||
|
||
ucell_materials = [1, 'p_si', 'p_si__real'] | ||
|
||
AA = call_solver(mode=0, grating_type=grating_type, pol=pol, n_I=n_I, n_II=n_II, theta=theta, phi=phi, psi=psi, | ||
fourier_order=fourier_order, wls=wls, period=period, ucell=ucell, ucell_materials=ucell_materials, | ||
thickness=thickness) | ||
de_ri, de_ti = AA.run_ucell() | ||
print(de_ri, de_ti) | ||
|
||
wls = np.linspace(500, 1000, 10) | ||
|
||
de_ri, de_ti = sweep_wavelength(wls, mode=0, grating_type=grating_type, pol=pol, n_I=n_I, n_II=n_II, theta=theta, phi=phi, psi=psi, | ||
fourier_order=fourier_order, period=period, ucell=ucell, ucell_materials=ucell_materials, thickness=thickness) | ||
|
||
plt.plot(wls, de_ri.sum((1, 2)), wls, de_ti.sum((1, 2))) | ||
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
Wavelength(nm) n k | ||
206.64 1.83 0 | ||
210.14 1.83 0 | ||
213.77 1.83 0 | ||
217.52 1.83 0 | ||
221.4 1.83 0 | ||
225.43 1.83 0 | ||
229.6 1.83 0 | ||
233.93 1.83 0 | ||
238.43 1.83 0 | ||
243.11 1.83 0 | ||
247.97 1.83 0 | ||
253.03 1.83 0 | ||
258.3 1.83 0 | ||
263.8 1.83 0 | ||
269.53 1.83 0 | ||
275.52 1.83 0 | ||
281.78 1.82 0 | ||
288.34 1.82 0 | ||
295.2 1.82 0 | ||
302.4 1.81 0 | ||
309.96 1.81 0 | ||
317.91 1.81 0 | ||
326.28 1.8 0 | ||
335.1 1.8 0 | ||
344.4 1.8 0 | ||
354.24 1.8 0 | ||
364.66 1.79 0 | ||
375.71 1.79 0 | ||
387.45 1.79 0 | ||
399.95 1.79 0 | ||
413.28 1.78 0 | ||
427.54 1.78 0 | ||
442.8 1.78 0 | ||
459.2 1.78 0 | ||
476.87 1.78 0 | ||
495.94 1.78 0 | ||
516.6 1.77 0 | ||
539.07 1.77 0 | ||
563.57 1.77 0 | ||
590.41 1.77 0 | ||
619.93 1.77 0 | ||
652.55 1.77 0 | ||
688.81 1.76 0 | ||
729.32 1.76 0 | ||
774.91 1.76 0 | ||
826.57 1.76 0 | ||
885.61 1.76 0 | ||
953.73 1.76 0 | ||
1033.21 1.75 0 | ||
1127.14 1.75 0 | ||
1239.85 1.75 0 | ||
1377.61 1.75 0 | ||
1549.81 1.75 0 | ||
1771.22 1.74 0 | ||
2066.42 1.74 0 | ||
2479.7 1.73 0 |
Oops, something went wrong.