-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump version, add refractiveindex.info example
- Loading branch information
1 parent
169f6b4
commit 320a406
Showing
2 changed files
with
26 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -3,5 +3,5 @@ | |
""" | ||
|
||
__author__ = "Pavel Dmitriev" | ||
__version__ = "1.0.1b" | ||
__version__ = "1.0.1c" | ||
__license__ = "GPLv3" |
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,25 @@ | ||
import numpy | ||
import matplotlib.pyplot as plt | ||
|
||
from PyTMM.transferMatrix import * | ||
from PyTMM.refractiveIndex import * | ||
|
||
database = os.path.join(os.path.dirname(os.path.realpath(__file__)), | ||
os.path.normpath("../../../refractiveindex.info-database/database/")) | ||
catalog = RefractiveIndex(database) | ||
|
||
sio2 = catalog.getMaterial('main', 'SiO2', 'Malitson') | ||
|
||
ran = range(400, 800, 1) | ||
reflectance = [] | ||
|
||
for i in ran: | ||
a = TransferMatrix.boundingLayer(1, sio2.getRefractiveIndex(i)) | ||
R, T = solvePropagation(a) | ||
reflectance.append(numpy.abs(R ** 2)) | ||
|
||
plt.plot(ran, reflectance) | ||
plt.xlabel("wavelength, nm") | ||
plt.ylabel("reflectance") | ||
plt.title("Reflectance of single SiO2 Boundary") | ||
plt.show(block=True) |