-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for off-axis incidence and s- p- polarizations.
- Loading branch information
1 parent
81fb422
commit bac7aa8
Showing
3 changed files
with
98 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
from transferMatrix import * | ||
from refractiveIndex import * | ||
|
||
n1 = 1.5 | ||
n2 = np.sqrt(n1) | ||
d = 700 / (n2 * 4) # quarter-wavelength coating | ||
|
||
ran = range(200, 1600, 1) | ||
refl0 = [] | ||
refl = [] | ||
for i in ran: | ||
# substrate layer (considered infinite, so only bounding layer needed) | ||
a = TransferMatrix.boundingLayer(1, n1) | ||
|
||
R, T = solvePropagation(a) | ||
refl0.append(np.abs(R**2)) | ||
|
||
# antireflective layer layer "left" of substrate | ||
b = TransferMatrix.layer(n2, d, i) | ||
a.appendRight(b) | ||
|
||
R, T = solvePropagation(a) | ||
refl.append(np.abs(R**2)) | ||
|
||
|
||
plt.plot(ran, refl0) | ||
plt.plot(ran, refl) | ||
plt.xlabel("Wavelength, nm") | ||
plt.ylabel("Reflectance") | ||
plt.title("Reflectance of ideal single-layer antireflective coating") | ||
plt.legend(['Substrate', 'Coated substrate'], loc='best') | ||
plt.show(block=True) |
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,31 @@ | ||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
from transferMatrix import * | ||
from refractiveIndex import * | ||
|
||
n = 2 | ||
d = 600 # slab thickness, nm | ||
l = 500 # wavelength, nm | ||
ran = np.linspace(0, np.pi/2, 1000) | ||
TE = [] | ||
TM = [] | ||
for i in ran: | ||
# TE | ||
a = TransferMatrix.layer(n, d, l, i, Polarization.s) | ||
|
||
R, T = solvePropagation(a) | ||
TE.append(np.abs(R**2)) | ||
|
||
# TM | ||
a = TransferMatrix.layer(n, d, l, i, Polarization.p) | ||
R, T = solvePropagation(a) | ||
TM.append(np.abs(R**2)) | ||
|
||
|
||
plt.plot(ran, TE) | ||
plt.plot(ran, TM) | ||
plt.xlabel("Angle, rad") | ||
plt.ylabel("Reflectance") | ||
plt.title("Angle dependence of reflectivity") | ||
plt.legend(['TE', 'TM'], loc='best') | ||
plt.show(block=True) |
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