Commit 3af6ff04 authored by Lucas Laplanche's avatar Lucas Laplanche
Browse files

correction de l'impossibilité de calculer le dernier temps des cartes de chaleur

parent 65484b71
...@@ -2,6 +2,7 @@ import numpy as np ...@@ -2,6 +2,7 @@ import numpy as np
from scipy.interpolate import splrep, splev from scipy.interpolate import splrep, splev
import epitaxy as epx
import oes as oe import oes as oe
import optic as op import optic as op
import pandas_tools as pt import pandas_tools as pt
...@@ -33,6 +34,33 @@ def reflectivity(bypass_dbr=True, start_wavelength=820e-9, stop_wavelength=880e- ...@@ -33,6 +34,33 @@ def reflectivity(bypass_dbr=True, start_wavelength=820e-9, stop_wavelength=880e-
plt.plot_reflectivity(wavelength, r) plt.plot_reflectivity(wavelength, r)
def reflectivity_heatmap(bypass_dbr=True,
start_wavelength=700e-9,
stop_wavelength=1000e-9,
electric_field=0.,
n_wavelength=90,
n_time=160,
v_ga6=100,
v_ga11=850,
v_al5=900,
v_al12=150,
r_file_name='default_name'):
time, wavelength, r = epx.reflectivity_heatmap(bypass_dbr=bypass_dbr,
start_wavelength=start_wavelength,
stop_wavelength=stop_wavelength,
electric_field=electric_field,
n_wavelength=n_wavelength,
n_time=n_time,
v_ga6=v_ga6,
v_ga11=v_ga11,
v_al5=v_al5,
v_al12=v_al12)
np.savez_compressed(r_file_name, r)
np.savez_compressed('time', time)
np.savez_compressed('wavelength', wavelength)
plt.plot_reflectivity_heatmap(time, wavelength, r)
def electromagnetic_amplitude(bypass_dbr=True, electric_field=0., wavelength=850e-9): def electromagnetic_amplitude(bypass_dbr=True, electric_field=0., wavelength=850e-9):
......
...@@ -239,8 +239,8 @@ def reflectivity_heatmap(bypass_dbr=True, ...@@ -239,8 +239,8 @@ def reflectivity_heatmap(bypass_dbr=True,
start_wavelength=700e-9, start_wavelength=700e-9,
stop_wavelength=1000e-9, stop_wavelength=1000e-9,
electric_field=0., electric_field=0.,
n_wavelength=200, n_wavelength=9,
n_time=600, n_time=16,
v_ga6=100, v_ga6=100,
v_ga11=850, v_ga11=850,
v_al5=900, v_al5=900,
...@@ -281,15 +281,15 @@ def reflectivity_heatmap(bypass_dbr=True, ...@@ -281,15 +281,15 @@ def reflectivity_heatmap(bypass_dbr=True,
# wavelength in [m] # wavelength in [m]
# wavelength must be a numpy array # wavelength must be a numpy array
for j in range(len(wavelength)): for j in range(len(wavelength)):
sl_i = op.algaas_super_lattice_refractive_index(sl_i, electric_field, wavelength[j], lengyel=False) sl_j = op.algaas_super_lattice_refractive_index(sl_i, electric_field, wavelength[j], lengyel=False)
n = sl_i['refractive_index'].to_numpy(dtype=np.complex128) n = sl_j['refractive_index'].to_numpy(dtype=np.complex128)
d = sl_i['thickness'].to_numpy(dtype=np.complex128) d = sl_j['thickness'].to_numpy(dtype=np.complex128)
r[j, i] = op.reflection(n, d, wavelength[j]) r[j, i] = op.reflection(n, d, wavelength[j])
plt.plot_reflectivity_heatmap(time, wavelength, r) return time, wavelength, r
......
import calculation as cl
def eams_heatmaps():
cl.reflectivity_heatmap(bypass_dbr=False,
n_wavelength=1080,
n_time=1920,
r_file_name='r_eam_1')
cl.reflectivity_heatmap(bypass_dbr=True,
n_wavelength=1080,
n_time=1920,
r_file_name='r_eam_2')
\ No newline at end of file
...@@ -106,7 +106,11 @@ def cut_sl_at_time(sl, time): ...@@ -106,7 +106,11 @@ def cut_sl_at_time(sl, time):
idx -= 1 idx -= 1
# calculate its modified thickness # calculate its modified thickness
ratio = (time - sl.at[idx, 'start_time']) / (sl.at[idx, 'stop_time'] - sl.at[idx, 'start_time']) if idx > 0:
ratio = (time - sl.at[idx, 'start_time']) / (sl.at[idx, 'stop_time'] - sl.at[idx, 'start_time'])
# air case
else:
ratio = 1.
corrected_thickness = ratio * sl.at[idx, 'thickness'] corrected_thickness = ratio * sl.at[idx, 'thickness']
# copy and remove the unneeded # copy and remove the unneeded
......
Supports Markdown
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