Commit 60585fd2 authored by Lucas Laplanche's avatar Lucas Laplanche
Browse files

ajout curve fit ftir

parent c8614a6e
......@@ -200,6 +200,8 @@ def reflectivity_from_growth_speed(v_ga6, v_ga11, v_al5, v_al12,
wavelength_exp, r_exp = ft.import_ftir_mbe_maison('A1397_centre.dat')
# slice and shrink the arrays
wavelength_exp, r_exp = resize_w_r_length(wavelength_exp, r_exp, start_wavelength, stop_wavelength, n_points)
# normalize
r_exp = r_exp / np.max(r_exp)
if figure:
......@@ -314,69 +316,93 @@ def reflectivity_from_growth_speed_slider(delta_speed=0.2,
fig.show()
def reflectivity_from_growth_speed_slider_fixed_fp(fp_resonnance_wavelength,
delta_speed=0.2,
n_points_slider=40,
start_wavelength=700e-9,
stop_wavelength=1000e-9,
tmm_resolution=300):
# reflectivity computation parameters
wavelength = np.linspace(start_wavelength, stop_wavelength, num=tmm_resolution)
r = np.zeros(len(wavelength))
def reflectivity_heatmap(bypass_dbr=True,
eam_only=False,
start_wavelength=700e-9,
stop_wavelength=1000e-9,
electric_field=0.,
n_wavelength=9,
n_time=16,
v_ga6=100,
v_ga11=850,
v_al5=900,
v_al12=150):
# create the wavelength array
wavelength = np.linspace(start_wavelength, stop_wavelength, num=n_wavelength)
# create the vector of different speeds [1]
speed_vector = np.linspace(1. -delta_speed, 1. +delta_speed, num=n_points_slider)
v_ga11_arr = 850. * speed_vector * 1.05
v_ga11_fp = 850.
v_al5_arr = 900. * speed_vector
# create the super lattice
sl = sls.structure_eam_vcsel(bypass_dbr=bypass_dbr,
eam_only=eam_only,
v_ga6=v_ga6,
v_ga11=v_ga11,
v_al5=v_al5,
v_al12=v_al12)
# add the depth column
sl = pdt.add_depth_column(sl)
# create figure
fig = go.Figure()
# add time column
sl = pdt.add_epitaxial_time_columns(sl,
v_ga6=v_ga6,
v_ga11=v_ga11,
v_al5=v_al5,
v_al12=v_al12)
# get the total time of epitaxy
total_epitaxy_time = sl.at[0, 'stop_time']
# add traces, one for each slider step
for v_al5 in tqdm(v_al5_arr):
# determine the pair of growth speed that gives the right fp resonnance
for v_ga11 in np.flip(v_ga11_arr, 0):
cells_arg = {'v_al5': v_al5,
'v_ga11': v_ga11,}
argument = stm.eam_vcsel_classic_arguments() | cells_arg
# create the time array
time = np.linspace(1.0, total_epitaxy_time, num=n_time)
sl = sls.structure_eam_vcsel(**argument)
# create the reflectivity array
r = np.zeros([len(wavelength), len(time)])
delta_w = 6e-9
wavelength_valley_set = np.linspace(fp_resonnance_wavelength -delta_w, fp_resonnance_wavelength +delta_w, num=7)
# calculate the reflectivity
for i in tqdm(range(n_time)):
sl_i = pdt.cut_sl_at_time(sl, time[i])
for k in range(len(wavelength_valley_set)):
sl = op.algaas_super_lattice_refractive_index(sl, 0., wavelength_valley_set[k])
# wavelength in [m]
# wavelength must be a numpy array
for j in range(len(wavelength)):
sl_j = op.algaas_super_lattice_refractive_index(sl_i, electric_field, wavelength[j], temperature=550+273.15, lengyel=False, only_real=True)
n = sl['refractive_index'].to_numpy(dtype=np.complex128)
d = sl['thickness'].to_numpy(dtype=np.complex128)
n = sl_j['refractive_index'].to_numpy(dtype=np.complex128)
d = sl_j['thickness'].to_numpy(dtype=np.complex128)
r[k] = tmm.reflection(n, d, wavelength_valley_set[k])
if is_valley(r):
v_ga11_fp = v_ga11
print('v_ga11 = ', v_ga11_fp)
break
r[j, i] = tmm.reflection(n, d, wavelength[j])
# arguments to create the corresponding structure
cells_arg = {'v_al5': v_al5,
'v_ga11': v_ga11_fp,}
argument = stm.eam_vcsel_classic_arguments() | cells_arg
# create the structure
sl = sls.structure_eam_vcsel(**argument)
# calculate the reflectivity
for k in range(len(wavelength)):
sl = op.algaas_super_lattice_refractive_index(sl, 0., 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])
return time, wavelength, r
# add the trace with the current growth speed configuration
fig.add_trace(
go.Scatter(
visible=False,
x=wavelength,
y=r,
name='v_al5 = ' +str(np.floor(v_al5)) +' v_ga11 = ' +str(np.floor(v_ga11_fp)),
)
)
# make first trace visible
fig.data[1].update(visible=True)
fig.update_layout(
sliders=slider_generator('Al5', fig.data, n_points_slider)
)
fig.show()
......@@ -429,8 +455,6 @@ def growth_speed_fit(delta_speed=0.2,
print(values)
def reflectivity_alias(wavelength, v_ga6, v_ga11, v_al5, v_al12):
# reflectivity array
r = np.zeros(len(wavelength))
......@@ -464,6 +488,71 @@ def reflectivity_alias(wavelength, v_ga6, v_ga11, v_al5, v_al12):
def reflectivity_heatmap(bypass_dbr=True,
eam_only=False,
start_wavelength=700e-9,
stop_wavelength=1000e-9,
electric_field=0.,
n_wavelength=9,
n_time=16,
v_ga6=100,
v_ga11=850,
v_al5=900,
v_al12=150):
# create the wavelength array
wavelength = np.linspace(start_wavelength, stop_wavelength, num=n_wavelength)
# create the super lattice
sl = sls.structure_eam_vcsel(bypass_dbr=bypass_dbr,
eam_only=eam_only,
v_ga6=v_ga6,
v_ga11=v_ga11,
v_al5=v_al5,
v_al12=v_al12)
# add the depth column
sl = pdt.add_depth_column(sl)
# add time column
sl = pdt.add_epitaxial_time_columns(sl,
v_ga6=v_ga6,
v_ga11=v_ga11,
v_al5=v_al5,
v_al12=v_al12)
# get the total time of epitaxy
total_epitaxy_time = sl.at[0, 'stop_time']
# create the time array
time = np.linspace(1.0, total_epitaxy_time, num=n_time)
# create the reflectivity array
r = np.zeros([len(wavelength), len(time)])
# calculate the reflectivity
for i in tqdm(range(n_time)):
sl_i = pdt.cut_sl_at_time(sl, time[i])
# wavelength in [m]
# wavelength must be a numpy array
for j in range(len(wavelength)):
sl_j = op.algaas_super_lattice_refractive_index(sl_i, electric_field, wavelength[j], temperature=550+273.15, lengyel=False, only_real=True)
n = sl_j['refractive_index'].to_numpy(dtype=np.complex128)
d = sl_j['thickness'].to_numpy(dtype=np.complex128)
r[j, i] = tmm.reflection(n, d, wavelength[j])
return time, wavelength, r
def row_num(x):
if x>=2:
return 2
......@@ -493,7 +582,7 @@ def slider_generator(slider_name, slider_array, n_points_slider):
slider = [dict(
active=10,
currentvalue={'prefix': 'Ga6: '},
currentvalue={'prefix': 'Growth speed: '},
pad={'t': n_points_slider},
steps=steps
)]
......@@ -531,3 +620,18 @@ def resize_w_r_length(w, r, start_wavelength, stop_wavelength, tmm_resolution):
return w, r
def is_valley(r):
l = r.shape[0]
mid = int((l -1) / 2)
for i in range(1, mid +1):
if r[i] > r[i -1] :
return False
for i in range(mid, l):
if r[i] < r[i -1] :
return False
return True
......@@ -167,7 +167,7 @@ def almuneau_complex_550C_algaas_refractive_index(al, wavelength, temperature=55
# temperature dependent bandgap, high temperature range, neglecting bowing effects
alpha_x = (5.405 +4.038 * al) * 1e-4 # [eV/K]
beta_x = 204. / 370. * (370. +54. * al +22. * al**2) # [K]
beta_x = 204. / 370. * (370. +54.*al +22.*al**2) # [K]
e_gamma = (1.424 +1.266 * al +0.26 * al**2 +(alpha_x * 298.**2) / (298. +beta_x)) -(alpha_x * temperature**2) / (temperature +beta_x) # [eV]
# Urbach tail model
......@@ -180,6 +180,8 @@ def almuneau_complex_550C_algaas_refractive_index(al, wavelength, temperature=55
return n
def e_vegard(al):
# al content in [1]
......@@ -230,6 +232,9 @@ def johnson_abs_algaas(al, wavelength, temperature):
def c_absorbtion(e_g):
# e_g in [eV]
return -7.63792e-11 +2.81092e-12 * e_g
......
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