Commit 83ec2e92 authored by Lucas Laplanche's avatar Lucas Laplanche
Browse files

ajout des calculs de réflectivités en fonction des vitesses de croissances

parent 5eedccb5
import numpy as np
import plotly.graph_objects as go
from plotly.subplots import make_subplots
from tqdm import tqdm
import optic as op
import super_lattice_structure as sls
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=200):
# 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., 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']
# figure parameters
# create a figure
fig = make_subplots(rows=2, cols=2,
subplot_titles=(cell_names[0], cell_names[1], cell_names[2], cell_names[3]))
for i in tqdm(range(len(cell_list))):
for j in range(len(cell_list[i])):
argument = {cell_names[i]: cell_list[i][j]}
sl = sls.structure_eam(bypass_dbr=bypass_dbr,
**argument)
for k in 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] = 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'
)
)
)
# update layout properties
fig.update_layout(
title_text='reflectivity as a function of wavelength',
width=1600,
)
# show the figure
fig.show()
def row_num(x):
if x>=2:
return 2
else:
return 1
def col_num(x):
# even
if x%2==0:
return 1
# odd
else:
return 2
\ No newline at end of file
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