Commit 6b767275 authored by Lucas Laplanche's avatar Lucas Laplanche
Browse files

découpage amélioré, mtm par diffusion amélioré

parent 3a7470ad
......@@ -43,7 +43,7 @@ def reflectivity_meshgrid(temperature=T, bypass_dbr=True, start_wavelength=820e-
def electromagnetic_amplitude(bypass_dbr=True, electric_field=0., wavelength=850e-9):
sl = st.structure_eam(bypass_dbr=bypass_dbr)
sl = op.algaas_super_lattice_refractive_index(sl, electric_field, wavelength)
sl = pt.cut_in_equal_layers_thickness(sl, sl['thickness'].min())
sl = pt.cut_in_equal_layers_thickness(sl, 1e-9)
em = op.em_amplitude_smm(sl, wavelength)
sl.insert(sl.shape[1], 'electromagnetic_amplitude', value=em)
plt.plot_refra_em(sl)
......
......@@ -588,11 +588,11 @@ def em_amplitude_smm(super_lattice, wavelength):
el_i = concatenate_2x2x2x2_to_4x4(el_i)
psi = wv_i @ el_i @ c_i_i
# electromagnetic field amplitude on x axis
e[di] = np.abs(np.real(psi[0].item()))
e[di] = np.abs(np.real(psi[0].item()))**2
# normalize
e = e / np.max(e)
#e = e / np.max(e)
return e
......
......@@ -63,10 +63,9 @@ def cut_in_equal_layers_thickness(super_lattice, step):
# get the thickness of current layer
l = super_lattice.at[ini, 'thickness']
if l == step :
if l <= step :
# update iterator
i += 1
else:
# create the layer that will be inserted
# copy() avoids a warning
......
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