Commit 65484b71 authored by Lucas Laplanche's avatar Lucas Laplanche
Browse files

carte de chaleur fonctionelle

parent 530fafb0
......@@ -235,10 +235,9 @@ def reflectivity_from_growth_speed_1x1(bypass_dbr=True, delta_speed=0.1, start_w
def reflectivity_heatmap(bypass_dbr=True,
start_wavelength=820e-9,
stop_wavelength=880e-9,
start_wavelength=700e-9,
stop_wavelength=1000e-9,
electric_field=0.,
n_wavelength=200,
n_time=600,
......@@ -267,7 +266,7 @@ def reflectivity_heatmap(bypass_dbr=True,
v_al12=v_al12)
# get the total time of epitaxy minus substrate
total_epitaxy_time = sl.at[sl.shape[0] -1, 'stop_time']
total_epitaxy_time = sl.at[0, 'stop_time']
# create the time array
time = np.linspace(1.0, total_epitaxy_time, num=n_time)
......
......@@ -604,16 +604,16 @@ def em_amplitude_smm(super_lattice, wavelength):
def confinement_barrier_mean_al_content(super_lattice, i):
name = super_lattice.at[i -1, 'name']
name = super_lattice.at[i +1, 'name']
al = 0.
total_thickness = 0.
while 'barrier' in name:
al += super_lattice.at[i -1, 'al'] * super_lattice.at[i -1, 'thickness']
total_thickness += super_lattice.at[i -1, 'thickness']
al += super_lattice.at[i +1, 'al'] * super_lattice.at[i +1, 'thickness']
total_thickness += super_lattice.at[i +1, 'thickness']
i -= 1
name = super_lattice.at[i -1, 'name']
i += 1
name = super_lattice.at[i +1, 'name']
al = al / total_thickness
......
......@@ -103,20 +103,24 @@ def cut_sl_at_time(sl, time):
# get index of corresponding layer
idx = find_nearest_index(sl['stop_time'].to_numpy(), time)
if time > sl.at[idx, 'stop_time']:
idx += 1
idx -= 1
# calculate its modified thickness
ratio = (time - sl.at[idx, 'start_time']) / (sl.at[idx, 'stop_time'] - sl.at[idx, 'start_time'])
corrected_thickness = ratio * sl.at[idx, 'thickness']
# copy and remove the unneeded
sl_cut = sl.copy().loc[0:idx]
sl_cut = sl.loc[idx:sl.shape[0]]
# modify last layer thickness
sl_cut.at[:, 'thickness'] = corrected_thickness
# reset the indices so the following lines can work
sl_cut = sl_cut.reset_index(drop=True)
# modify first layer thickness
sl_cut.at[0, 'thickness'] = corrected_thickness
# modify first layer stop time
sl_cut.at[0, 'stop_time'] = time
# modify last layer stop time
sl_cut.at[:, 'stop_time'] = time
return sl_cut
......@@ -152,6 +156,11 @@ def add_epitaxial_time_columns(super_lattice,
super_lattice.insert(super_lattice.shape[1], 'stop_time', value=np.nan)
# reverse order of rows
super_lattice = super_lattice[::-1]
super_lattice = super_lattice.reset_index(drop=True)
# calculate epitaxy time
# layer 0
lz = super_lattice.loc[0, 'thickness']
......@@ -168,7 +177,6 @@ def add_epitaxial_time_columns(super_lattice,
# [nm/h] -> [m/s]
v = slt.nmph_to_mps(v)
# bof bof :/
if v==0.:
t = 0.
else:
......@@ -193,7 +201,6 @@ def add_epitaxial_time_columns(super_lattice,
# [nm/h] -> [m/s]
v = slt.nmph_to_mps(v)
# de même :/
if v == 0.:
t = 0.
else:
......@@ -203,6 +210,11 @@ def add_epitaxial_time_columns(super_lattice,
super_lattice.at[i, 'stop_time'] = super_lattice.loc[i, 'start_time'] + t
# reverse order of rows
super_lattice = super_lattice[::-1]
super_lattice = super_lattice.reset_index(drop=True)
return super_lattice
......
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