Commit 7ab1a13f authored by Lucas Laplanche's avatar Lucas Laplanche
Browse files

modification des dictionnaires

parent cb6af5ac
......@@ -6,13 +6,14 @@ from tqdm import tqdm
import optic as op
import pandas_tools as pdt
import structure_macro as stm
import super_lattice_structure as sls
import transfer_matrix_method as tmm
def reflectivity_from_growth_speed_2x2(bypass_dbr=True, delta_speed=0.1, start_wavelength=700e-9, stop_wavelength=1000e-9, electric_field=0., n_points=100):
def reflectivity_from_growth_speed_2x2(delta_speed=0.05, start_wavelength=700e-9, stop_wavelength=1000e-9, electric_field=0., n_points=300):
# reflectivity computation parameters
wavelength = np.linspace(start_wavelength, stop_wavelength, num=n_points)
r = np.zeros(len(wavelength))
......@@ -34,10 +35,9 @@ def reflectivity_from_growth_speed_2x2(bypass_dbr=True, delta_speed=0.1, start_w
for i in tqdm(range(len(cell_list))):
for j in range(len(cell_list[i])):
argument = {cell_names[i]: cell_list[i][j]}
argument = stm.eam_vcsel_classic_arguments() | {cell_names[i]: cell_list[i][j]}
sl = sls.structure_eam_vcsel(bypass_dbr=bypass_dbr, eam_only=True,
**argument)
sl = sls.structure_eam_vcsel(**argument)
for k in range(len(wavelength)):
sl = op.algaas_super_lattice_refractive_index(sl, electric_field, wavelength[k])
......@@ -45,7 +45,8 @@ def reflectivity_from_growth_speed_2x2(bypass_dbr=True, delta_speed=0.1, start_w
n = sl['refractive_index'].to_numpy(dtype=np.complex128)
d = sl['thickness'].to_numpy(dtype=np.complex128)
r[k] = op.reflection(n, d, wavelength[k])
r[k] = tmm.reflection(n, d, wavelength[k])
# add the traces
fig.add_trace(
......@@ -162,65 +163,136 @@ def reflectivity_from_growth_speed_1x2(bypass_dbr=True, delta_speed=0.1, start_w
def reflectivity_from_growth_speed_1x1(bypass_dbr=True, delta_speed=0.1, start_wavelength=700e-9, stop_wavelength=1000e-9, electric_field=0., n_points=200):
def reflectivity_from_growth_speed(v_ga6, v_ga11, v_al5, v_al12, start_wavelength=700e-9, stop_wavelength=1000e-9, electric_field=0., n_points=300):
# reflectivity computation parameters
wavelength = np.linspace(start_wavelength, stop_wavelength, num=n_points)
r = np.zeros(len(wavelength))
# epitaxy structure parameters
speed_array = np.array([1.05, 1.10])
v_al5 = 900 * speed_array
cell_list = [v_al5]
cell_names = ['v_al5']
cells_arg = {'v_ga6' : v_ga6,
'v_ga11' : v_ga11,
'v_al5' : v_al5,
'v_al12' : v_al12,}
argument = stm.eam_vcsel_classic_arguments() | cells_arg
sl = sls.structure_eam_vcsel(**argument)
for k in tqdm(range(len(wavelength))):
sl = op.algaas_super_lattice_refractive_index(sl, electric_field, wavelength[k])
n = sl['refractive_index'].to_numpy(dtype=np.complex128)
d = sl['thickness'].to_numpy(dtype=np.complex128)
r[k] = tmm.reflection(n, d, wavelength[k])
# figure parameters
# create a figure
fig = make_subplots(rows=1, cols=1,
subplot_titles=(cell_names[0]))
fig = go.Figure()
# add the traces
fig.add_trace(
go.Scatter(
x=wavelength,
y=r,
name='v_ga6 = ' +str(v_ga6) +' , '
+'v_ga11 = ' +str(v_ga11) +' , '
+'v_al5 = ' +str(v_al5) +' , '
+'v_al12 = ' +str(v_al12),
)
)
for i in tqdm(range(len(cell_list))):
for j in range(len(cell_list[i])):
argument = {cell_names[i]: cell_list[i][j]}
# create axis objects
fig.update_layout(
xaxis=dict(
title='wavelength [m]'
),
yaxis=dict(
title='reflectivity [1]',
titlefont=dict(
color='#1f77b4'
),
tickfont=dict(
color='#1f77b4'
)
)
)
sl = sls.structure_eam(bypass_dbr=bypass_dbr,
**argument,
v_ga6=100.*0.95,
v_ga11=850.*0.95)
for k in range(len(wavelength)):
sl = op.algaas_super_lattice_refractive_index(sl, electric_field, wavelength[k])
# update layout properties
fig.update_layout(
title_text='reflectivity as a function of wavelength',
width=1600,
)
n = sl['refractive_index'].to_numpy(dtype=np.complex128)
d = sl['thickness'].to_numpy(dtype=np.complex128)
# show the figure
fig.show()
r[k] = op.reflection(n, d, wavelength[k])
# add the traces
fig.add_trace(
go.Scatter(
x=wavelength,
y=r,
name=cell_names[i] +' = ' +str(cell_list[i][j]) +' um/h'),
row=row_num(i),
col=col_num(i),
)
# create axis objects
fig.update_layout(
xaxis=dict(
title='wavelength [m]'
),
yaxis=dict(
title='reflectivity [1]',
titlefont=dict(
color='#1f77b4'
),
tickfont=dict(
color='#1f77b4'
)
)
def reflectivity_from_growth_speed_slider(delta_speed=0.1, start_wavelength=700e-9, stop_wavelength=1000e-9, electric_field=0., n_points=300):
# reflectivity computation parameters
wavelength = np.linspace(start_wavelength, stop_wavelength, num=n_points)
r = np.zeros(len(wavelength))
# epitaxy structure parameters
speed_array = np.array([1. - delta_speed, 1. + delta_speed])
v_ga6 = 100 * speed_array
v_ga11 = 850 * speed_array
v_al5 = 900 * speed_array
v_al12 = 150 * speed_array
cell_list = [v_ga6, v_ga11, v_al5, v_al12]
cell_names = ['v_ga6', 'v_ga11', 'v_al5', 'v_al12']
argument = stm.eam_vcsel_classic_arguments()
sl = sls.structure_eam_vcsel(**argument)
for k in tqdm(range(len(wavelength))):
sl = op.algaas_super_lattice_refractive_index(sl, electric_field, wavelength[k])
n = sl['refractive_index'].to_numpy(dtype=np.complex128)
d = sl['thickness'].to_numpy(dtype=np.complex128)
r[k] = tmm.reflection(n, d, wavelength[k])
# figure parameters
# create a figure
fig = go.Figure()
# add the traces
fig.add_trace(
go.Scatter(
x=wavelength,
y=r,
name='v_ga6 = ' +str(v_ga6) +' , '
+'v_ga11 = ' +str(v_ga11) +' , '
+'v_al5 = ' +str(v_al5) +' , '
+'v_al12 = ' +str(v_al12),
)
)
# create axis objects
fig.update_layout(
xaxis=dict(
title='wavelength [m]'
),
yaxis=dict(
title='reflectivity [1]',
titlefont=dict(
color='#1f77b4'
),
tickfont=dict(
color='#1f77b4'
)
)
)
# update layout properties
......@@ -229,7 +301,6 @@ def reflectivity_from_growth_speed_1x1(bypass_dbr=True, delta_speed=0.1, start_w
width=1600,
)
# show the figure
fig.show()
......
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