Commit f2e1715a authored by Lucas Laplanche's avatar Lucas Laplanche
Browse files

ajout calcul temps couches et booléen cellules

parent 6790d024
<?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
......@@ -34,12 +34,6 @@ def reflectivity(bypass_dbr=True, start_wavelength=820e-9, stop_wavelength=880e-
plt.plot_reflectivity(wavelength, r)
def reflectivity_meshgrid(temperature=T, bypass_dbr=True, start_wavelength=820e-9, stop_wavelength=880e-9, electric_field=0., n_points=100):
wavelength = np.linspace(start_wavelength, stop_wavelength, num=n_points)
time, r = op.reflectivity_meshgrid(bypass_dbr, electric_field, wavelength, temperature)
plt.plot_reflectivity_heatmap(wavelength, time, r)
def electromagnetic_amplitude(bypass_dbr=True, electric_field=0., wavelength=850e-9):
......
......@@ -4,7 +4,9 @@ from plotly.subplots import make_subplots
from tqdm import tqdm
from globals import T
import optic as op
import plot as plt
import super_lattice_structure as sls
......@@ -233,6 +235,15 @@ def reflectivity_from_growth_speed_1x1(bypass_dbr=True, delta_speed=0.1, start_w
def reflectivity_meshgrid(temperature=T, bypass_dbr=True, start_wavelength=820e-9, stop_wavelength=880e-9, electric_field=0., n_points=100):
wavelength = np.linspace(start_wavelength, stop_wavelength, num=n_points)
time, r = op.reflectivity_meshgrid(bypass_dbr, electric_field, wavelength, temperature)
plt.plot_reflectivity_heatmap(wavelength, time, r)
def row_num(x):
if x>=2:
return 2
......
......@@ -3,6 +3,9 @@ import numpy as np
from tqdm import tqdm
import super_lattice_structure as slt
def insert_row(row_number, df, row_value):
......@@ -112,6 +115,63 @@ def add_depth_column(super_lattice):
return super_lattice
def add_epitaxial_time_columns(super_lattice,
v_ga6 = 100,
v_ga11 = 850,
v_al5 = 900,
v_al12 = 150):
# check wether the start_time column exist
if not 'start_time' in super_lattice:
super_lattice.insert(super_lattice.shape[1], 'start_time', value=np.nan)
# check wether the stop_time column exist
if not 'stop_time' in super_lattice:
super_lattice.insert(super_lattice.shape[1], 'stop_time', value=np.nan)
# calculate epitaxy time
# layer 0
lz = super_lattice.loc[0, 'thickness']
v = 0.
if super_lattice.at[0, 'ga6']:
v += v_ga6
if super_lattice.at[0, 'ga11']:
v += v_ga11
if super_lattice.at[0, '1l5']:
v += v_al5
if super_lattice.at[0, 'al12']:
v += v_al12
# [nm/h] -> [m/s]
v = slt.nmph_to_mps(v)
t = lz / v
super_lattice.at[0, 'start_time'] = 0.
super_lattice.at[0, 'stop_time'] = t
# run through the layers and compute the epitaxial time
for i in range(1, super_lattice.shape[0]):
lz = super_lattice.loc[i, 'thickness']
v = 0.
if super_lattice.at[i, 'ga6']:
v += v_ga6
if super_lattice.at[i, 'ga11']:
v += v_ga11
if super_lattice.at[i, '1l5']:
v += v_al5
if super_lattice.at[i, 'al12']:
v += v_al12
# [nm/h] -> [m/s]
v = slt.nmph_to_mps(v)
t = lz / v
super_lattice.at[i, 'start_time'] = super_lattice.loc[i -1, 'stop_time']
super_lattice.at[i, 'stop_time'] = super_lattice.loc[i, 'start_time'] + t
def fexp(number):
......
......@@ -35,20 +35,20 @@ def structure_eam(air = True,
# super lattice
sl = pd.DataFrame(columns = ['name', 'thickness', 'al', 'na', 'nd', 'refractive_index'])
sl = pd.DataFrame(columns = ['name', 'thickness', 'al', 'na', 'nd', 'refractive_index', 'ga6', 'ga11', 'al5', 'al12'])
# air
if air:
sl = sl.append(pd.DataFrame([['air', 100e-9, 0., 0., 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
sl = sl.append(pd.DataFrame([['air', 100e-9, 0., 0., 0., False, False, False, False]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
# top contact
if contact:
sl = sl.append(pd.DataFrame([['top contact', 50e-9, 0., 0., 5e18]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
sl = sl.append(pd.DataFrame([['top contact', 50e-9, 0., 0., 5e18, False, True, False, False]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
......@@ -145,8 +145,8 @@ def structure_eam(air = True,
# substrate
if substrate:
sl = sl.append(pd.DataFrame([['substrate', 600e-6, 0., 0., 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
sl = sl.append(pd.DataFrame([['substrate', 600e-6, 0., 0., 0., False, False, False, False]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
......@@ -170,9 +170,9 @@ def structure_mqw(amount_qw = 25,
# super lattice
sl = pd.DataFrame(columns = ['name', 'thickness', 'al', 'na', 'nd', 'refractive_index'])
clad = pd.DataFrame(columns = ['name', 'thickness', 'al', 'na', 'nd', 'refractive_index'])
cb = pd.DataFrame(columns = ['name', 'thickness', 'al', 'na', 'nd', 'refractive_index'])
sl = pd.DataFrame(columns = ['name', 'thickness', 'al', 'na', 'nd', 'refractive_index', 'ga6', 'ga11', 'al5', 'al12'])
clad = pd.DataFrame(columns = ['name', 'thickness', 'al', 'na', 'nd', 'refractive_index', 'ga6', 'ga11', 'al5', 'al12'])
cb = pd.DataFrame(columns = ['name', 'thickness', 'al', 'na', 'nd', 'refractive_index', 'ga6', 'ga11', 'al5', 'al12'])
# structure properties
......@@ -192,16 +192,16 @@ def structure_mqw(amount_qw = 25,
# layers definition
quantum_well = pd.DataFrame([['quantum well', l_qw, 0., 0., 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd'])
clad_low = pd.DataFrame([['cladding low Al ~ 15%', l_clad_low_al, low_al, 0., 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd'])
clad_high = pd.DataFrame([['cladding high Al ~ 60%', l_clad_high_al, high_al, 0., 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd'])
cb_low = pd.DataFrame([['confinement barrier low Al ~ 15%', l_cb_low_al, low_al, 0., 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd'])
cb_high = pd.DataFrame([['confinement barrier high Al ~ 60%', l_cb_high_al, high_al, 0., 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd'])
quantum_well = pd.DataFrame([['quantum well', l_qw, 0., 0., 0., True, False, False, False]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12'])
clad_low = pd.DataFrame([['cladding low Al ~ 15%', l_clad_low_al, low_al, 0., 0., False, True, False, True]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12'])
clad_high = pd.DataFrame([['cladding high Al ~ 60%', l_clad_high_al, high_al, 0., 0., True, False, False, True]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12'])
cb_low = pd.DataFrame([['confinement barrier low Al ~ 15%', l_cb_low_al, low_al, 0., 0., False, True, False, True]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12'])
cb_high = pd.DataFrame([['confinement barrier high Al ~ 60%', l_cb_high_al, high_al, 0., 0., True, False, False, True]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12'])
clad = clad.append(clad_high, ignore_index=True)
......@@ -261,7 +261,7 @@ def structure_dbr(period = 6,
# super lattice
sl = pd.DataFrame(columns = ['name', 'thickness', 'al', 'na', 'nd', 'refractive_index'])
sl = pd.DataFrame(columns = ['name', 'thickness', 'al', 'na', 'nd', 'refractive_index', 'ga6', 'ga11', 'al5', 'al12'])
# layers definition
......@@ -294,22 +294,22 @@ def structure_dbr(period = 6,
# dbr layers
if grading == 'linear':
low_al_layer = pd.DataFrame([['dbr ' + doping_type + ' low Al ~ 15%', l_dbr_low_al -grading_width, low_al, na, nd]],
columns=['name', 'thickness', 'al', 'na', 'nd'])
high_al_layer = pd.DataFrame([['dbr ' + doping_type + ' high Al ~ 90%', l_dbr_high_al -grading_width, high_al, na, nd]],
columns=['name', 'thickness', 'al', 'na', 'nd'])
low_al_layer = pd.DataFrame([['dbr ' + doping_type + ' low Al ~ 15%', l_dbr_low_al -grading_width, low_al, na, nd, False, True, False, True]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12'])
high_al_layer = pd.DataFrame([['dbr ' + doping_type + ' high Al ~ 90%', l_dbr_high_al -grading_width, high_al, na, nd, True, False, True, False]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12'])
else:
low_al_layer = pd.DataFrame([['dbr ' + doping_type + ' low Al ~ 15%', l_dbr_low_al, low_al, na, nd]],
columns=['name', 'thickness', 'al', 'na', 'nd'])
high_al_layer = pd.DataFrame([['dbr ' + doping_type + ' high Al ~ 90%', l_dbr_high_al, high_al, na, nd]],
columns=['name', 'thickness', 'al', 'na', 'nd'])
low_al_layer = pd.DataFrame([['dbr ' + doping_type + ' low Al ~ 15%', l_dbr_low_al, low_al, na, nd, False, True, False, True]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12'])
high_al_layer = pd.DataFrame([['dbr ' + doping_type + ' high Al ~ 90%', l_dbr_high_al, high_al, na, nd, True, False, True, False]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12'])
# special layers
high_al_three_half_grading = pd.DataFrame([['dbr ' + doping_type + ' high Al ~ 90%', l_dbr_high_al -3*grading_width/2, high_al, na, nd]],
columns=['name', 'thickness', 'al', 'na', 'nd'])
high_al_one_side_grading = pd.DataFrame([['dbr ' + doping_type + ' high Al ~ 90%', l_dbr_high_al -grading_width/2, high_al, na, nd]],
columns=['name', 'thickness', 'al', 'na', 'nd'])
high_al_three_half_grading = pd.DataFrame([['dbr ' + doping_type + ' high Al ~ 90%', l_dbr_high_al -3*grading_width/2, high_al, na, nd, True, False, True, False]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12'])
high_al_one_side_grading = pd.DataFrame([['dbr ' + doping_type + ' high Al ~ 90%', l_dbr_high_al -grading_width/2, high_al, na, nd, True, False, True, False]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12'])
# dbr
......@@ -378,7 +378,7 @@ def structure_linear_grading(grading_width = 20e-9,
# super lattice
sl = pd.DataFrame(columns = ['name', 'thickness', 'al', 'na', 'nd', 'refractive_index'])
sl = pd.DataFrame(columns = ['name', 'thickness', 'al', 'na', 'nd', 'refractive_index', 'ga6', 'ga11', 'al5', 'al12'])
if na > nd:
doping_type = 'P'
......@@ -396,11 +396,11 @@ def structure_linear_grading(grading_width = 20e-9,
al_thickness = layer_al_content * bi_layer_thickness # [nm]
ga_thickness = (1 -layer_al_content) * bi_layer_thickness # [nm]
sl = sl.append(pd.DataFrame([['dbr ' +doping_type +' linear grading', true_epitaxy_thickness(al_thickness, v_al5, al5=True), 1., na, nd]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
sl = sl.append(pd.DataFrame([['dbr ' +doping_type +' linear grading', true_epitaxy_thickness(al_thickness, v_al5, al5=True), 1., na, nd, False, False, True, False]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
sl = sl.append(pd.DataFrame([['dbr ' +doping_type +' linear grading', true_epitaxy_thickness(ga_thickness, v_ga11, ga11=True), 0., na, nd]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
sl = sl.append(pd.DataFrame([['dbr ' +doping_type +' linear grading', true_epitaxy_thickness(ga_thickness, v_ga11, ga11=True), 0., na, nd, False, True, False, False]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
......@@ -422,7 +422,7 @@ def structure_middle_contact(bypass_dbr = False,
# super lattice
sl = pd.DataFrame(columns = ['name', 'thickness', 'al', 'na', 'nd', 'refractive_index'])
sl = pd.DataFrame(columns = ['name', 'thickness', 'al', 'na', 'nd', 'refractive_index', 'ga6', 'ga11', 'al5', 'al12'])
# layers definition
......@@ -447,31 +447,31 @@ def structure_middle_contact(bypass_dbr = False,
# bypass contact
if bypass_dbr:
sl = sl.append(pd.DataFrame([['low index layer for middle contact', l_high_al -grading_width/2, high_al, 2e18, 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
sl = sl.append(pd.DataFrame([['low index layer for middle contact', l_high_al -grading_width/2, high_al, 2e18, 0., True, False, True, False]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
if grading_type == 'linear':
sl = sl.append(linear_grading_high_to_low_al, ignore_index=True)
sl = sl.append(pd.DataFrame([['middle contact', l_low_al -grading_width, low_al, 5e18, 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
sl = sl.append(pd.DataFrame([['middle contact', l_low_al -grading_width, low_al, 5e18, 0., False, True, False, True]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
else:
sl = sl.append(pd.DataFrame([['middle contact', l_low_al, low_al, 5e18, 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
sl = sl.append(pd.DataFrame([['middle contact', l_low_al, low_al, 5e18, 0., False, True, False, True]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
# normal contact
else:
if grading_type == 'linear':
sl = sl.append(pd.DataFrame([['middle contact', l_low_al -grading_width, low_al, 5e18, 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
sl = sl.append(pd.DataFrame([['middle contact', l_low_al -grading_width, low_al, 5e18, 0., False, True, False, True]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
else:
sl = sl.append(pd.DataFrame([['middle contact', l_low_al, low_al, 5e18, 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
sl = sl.append(pd.DataFrame([['middle contact', l_low_al, low_al, 5e18, 0., False, True, False, True]],
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
......@@ -485,7 +485,7 @@ def structure_middle_contact(bypass_dbr = False,
def structure_zandbergen():
# super lattice
sl = pd.DataFrame(columns = ['name', 'thickness', 'al', 'na', 'nd', 'refractive_index'])
sl = pd.DataFrame(columns = ['name', 'thickness', 'al', 'na', 'nd', 'refractive_index', 'ga6', 'ga11', 'al5', 'al12'])
# refractive indices
......@@ -500,40 +500,40 @@ def structure_zandbergen():
# air
sl = sl.append(pd.DataFrame([['air', 500e-9, 0., 0., 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
# distributed Bragg reflector
for i in range(14):
sl = sl.append(pd.DataFrame([['gaas', l_gaas, 0., 0., 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
sl = sl.append(pd.DataFrame([['algaas', l_algaas, 1., 0., 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
# micro-cavity
sl = sl.append(pd.DataFrame([['gaas', l_cavity, 0., 0., 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
# distributed Bragg reflector
sl = sl.append(pd.DataFrame([['algaas', l_algaas, 1., 0., 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
for i in range(15):
sl = sl.append(pd.DataFrame([['gaas', l_gaas, 0., 0., 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
sl = sl.append(pd.DataFrame([['algaas', l_algaas, 1., 0., 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
# substrate
sl = sl.append(pd.DataFrame([['substrate', 250e-9, 1., 0., 0.]],
columns=['name', 'thickness', 'al', 'na', 'nd']),
columns=['name', 'thickness', 'al', 'na', 'nd', 'ga6', 'ga11', 'al5', 'al12']),
ignore_index=True)
......
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