Skip to content

Commit 320a406

Browse files
committed
bump version, add refractiveindex.info example
1 parent 169f6b4 commit 320a406

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

PyTMM/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"""
44

55
__author__ = "Pavel Dmitriev"
6-
__version__ = "1.0.1b"
6+
__version__ = "1.0.1c"
77
__license__ = "GPLv3"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import numpy
2+
import matplotlib.pyplot as plt
3+
4+
from PyTMM.transferMatrix import *
5+
from PyTMM.refractiveIndex import *
6+
7+
database = os.path.join(os.path.dirname(os.path.realpath(__file__)),
8+
os.path.normpath("../../../refractiveindex.info-database/database/"))
9+
catalog = RefractiveIndex(database)
10+
11+
sio2 = catalog.getMaterial('main', 'SiO2', 'Malitson')
12+
13+
ran = range(400, 800, 1)
14+
reflectance = []
15+
16+
for i in ran:
17+
a = TransferMatrix.boundingLayer(1, sio2.getRefractiveIndex(i))
18+
R, T = solvePropagation(a)
19+
reflectance.append(numpy.abs(R ** 2))
20+
21+
plt.plot(ran, reflectance)
22+
plt.xlabel("wavelength, nm")
23+
plt.ylabel("reflectance")
24+
plt.title("Reflectance of single SiO2 Boundary")
25+
plt.show(block=True)

0 commit comments

Comments
 (0)