Commit 6db2e31e authored by Lucas Laplanche's avatar Lucas Laplanche
Browse files

added plot for refractive indices benchmark

parent aede3fc1
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (eam-vcsel)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (eam-vcsel)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="jdk" jdkName="Python 3.9 (eam-vcsel)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
......@@ -68,14 +68,16 @@ def mqw_psi(lz=0.01e-9, electric_field=0., wavelength=850e-9):
def benchmark_refractive_index():
al = np.array([0.0, 0.2, 0.4, 0.6, 0.8, 1.0])
wavelength = np.arange(500e-9, 1500e-9, 10e-9)
indices_array = np.empty([al.size, wavelength.size])
for x in al:
for x in range(al.size):
n = np.array([])
for w in wavelength:
n = np.append(n, op.afromovitz_varshni_real_algaas_refractive_index(x, w))
n = np.append(n, op.afromovitz_varshni_real_algaas_refractive_index(al[x], w))
name = 'index_array_' +str(x) +'.mat'
indices_array[x] = n
name = 'indices_array_' +str(x) +'.mat'
scipy.io.savemat(name, mdict={'arr': n})
name = 'al_array.mat'
......@@ -83,6 +85,8 @@ def benchmark_refractive_index():
name = 'wavelength_array.mat'
scipy.io.savemat(name, mdict={'arr': wavelength})
plt.plot_refra_bench(al, wavelength, indices_array)
......
......@@ -231,7 +231,7 @@ def afromovitz_varshni_real_algaas_refractive_index(al, wavelength):
e_1 = -0.000402347826086942*t_c +3.65714869565217
e_1 += (-0.00270520000000000*t_c +1.44506000000000)*al
e_1 += (-0.00278276521739130*t_c -0.251959130434783)*al**2
e_1 += (0.00278276521739130*t_c -0.251959130434783)*al**2
e_d = (-0.00799306086956534*t_c +36.3120565217391)
e_d += (-0.0265130956521739*t_c +2.25562739130435)*al
......@@ -242,9 +242,9 @@ def afromovitz_varshni_real_algaas_refractive_index(al, wavelength):
e_g = (1 -al)*1.424 +al*3.02 -al*(1-al)*0.37
# Varshni
alpha = 5.405 +4.038*al*1e-4
beta = 204/370*(370 +54*al +22*al**2)
e_var = e_g +alpha*298**2/(298 +beta) -(alpha*T**2)/(T +beta)
alpha = 5.405 +4.038*al*1e-4 # [eV/K]
beta = 204/370*(370 +54*al +22*al**2) # [K]
e_var = e_g +alpha*298**2/(298 +beta) -(alpha*T**2)/(T +beta) # [eV?]
# Afromovitz
energy = e +1j*1e-2
......
......@@ -392,6 +392,50 @@ def plot_psie(lz=0.01e-9):
def plot_refra_bench(al, wavelength, indices_array):
# create a figure
fig = go.Figure()
# add the traces
for x in range(al.size):
fig.add_trace(go.Scatter(
x=wavelength,
y=indices_array[x],
name='refracitve_index_al=' +str(al[x])
))
# create axis objects
fig.update_layout(
xaxis=dict(
title='wavelength [m]'
),
yaxis=dict(
title='refractive index [1]',
titlefont=dict(
color='#1f77b4'
),
tickfont=dict(
color='#1f77b4'
)
)
)
# update layout properties
fig.update_layout(
title_text='refractive indices as a function of wavelength',
width=1600,
)
# show the figure
fig.show()
def plot_eos_spectrum_gold_plate(wavelength, data_mean_sample, data_empty, data_diff):
fig = make_subplots(rows=1, cols=2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment