Skip to content
Snippets Groups Projects
Commit 91a6f706 authored by Guillaume Demesy's avatar Guillaume Demesy
Browse files

retrieve paper finland

parent 4005a31a
No related branches found
No related tags found
1 merge request!6Check Mmatrix
...@@ -11,8 +11,8 @@ DefineConstant[ ...@@ -11,8 +11,8 @@ DefineConstant[
thetadeg = {40 , Name StrCat[pp1,"/2theta0 [deg]"]}, thetadeg = {40 , Name StrCat[pp1,"/2theta0 [deg]"]},
phideg = {36 , Name StrCat[pp1,"/3phi0 [deg]"]}, phideg = {36 , Name StrCat[pp1,"/3phi0 [deg]"]},
psideg = {72 , Name StrCat[pp1,"/4psi0 [deg]"]}, psideg = {72 , Name StrCat[pp1,"/4psi0 [deg]"]},
period_x = {250 , Name StrCat[pp2,"/1X period [nm]"]}, period_x = {473 , Name StrCat[pp2,"/1X period [nm]"]},
period_y = {250 , Name StrCat[pp2,"/2Y period [nm]"]}, period_y = {322 , Name StrCat[pp2,"/2Y period [nm]"]},
thick_L_1 = {50 , Name StrCat[pp2,"/3thickness layer 1 [nm] (superstrate)"]}, thick_L_1 = {50 , Name StrCat[pp2,"/3thickness layer 1 [nm] (superstrate)"]},
thick_L_2 = {50 , Name StrCat[pp2,"/4thickness layer 2 [nm]"]}, thick_L_2 = {50 , Name StrCat[pp2,"/4thickness layer 2 [nm]"]},
thick_L_3 = {100 , Name StrCat[pp2,"/5thickness layer 3 [nm]"]}, thick_L_3 = {100 , Name StrCat[pp2,"/5thickness layer 3 [nm]"]},
...@@ -25,16 +25,16 @@ DefineConstant[ ...@@ -25,16 +25,16 @@ DefineConstant[
rx = {107 , Name StrCat[pp3,"/1rx"]}, rx = {107 , Name StrCat[pp3,"/1rx"]},
ry = {47 , Name StrCat[pp3,"/2ry"]}, ry = {47 , Name StrCat[pp3,"/2ry"]},
rz = {40 , Name StrCat[pp3,"/3rz"]}, rz = {40 , Name StrCat[pp3,"/3rz"]},
flag_mat_scat = { 0 , Name StrCat[pp3,"/4Scatterer permittivity model"], Choices {0="Custom (Value Below)",1="SiO2",2="Ag (palik)",3="Al (palik)",4="Au (johnson)",5="Nb2O5",6="ZnSe",7="MgF2",8="TiO2",9="PMMA",10="Si",11="ITO",12="Cu (palik)"} }, flag_mat_scat = { 4 , Name StrCat[pp3,"/4Scatterer permittivity model"], Choices {0="Custom (Value Below)",1="SiO2",2="Ag (palik)",3="Al (palik)",4="Au (johnson)",5="Nb2O5",6="ZnSe",7="MgF2",8="TiO2",9="PMMA",10="Si",11="ITO",12="Cu (palik)"} },
eps_re_Scat = {-2.23, Name StrCat[pp3,"/7eps_re_Scat"]}, eps_re_Scat = {-2.23, Name StrCat[pp3,"/7eps_re_Scat"]},
eps_im_Scat = { 3.89, Name StrCat[pp3,"/8eps_im_Scat"]}, eps_im_Scat = { 3.89, Name StrCat[pp3,"/8eps_im_Scat"]},
flag_mat_1 = { 0 , Name StrCat[pp4,"/1Layer 1"], Choices {0="Custom (Value Below)",1="SiO2",2="Ag (palik)",3="Al (palik)",4="Au (johnson)",5="Nb2O5",6="ZnSe",7="MgF2",8="TiO2",9="PMMA",10="Si",11="ITO",12="Cu (palik)"} }, flag_mat_1 = { 0 , Name StrCat[pp4,"/1Layer 1"], Choices {0="Custom (Value Below)",1="SiO2",2="Ag (palik)",3="Al (palik)",4="Au (johnson)",5="Nb2O5",6="ZnSe",7="MgF2",8="TiO2",9="PMMA",10="Si",11="ITO",12="Cu (palik)"} },
flag_mat_2 = { 0 , Name StrCat[pp4,"/2Layer 2"], Choices {0="Custom (Value Below)",1="SiO2",2="Ag (palik)",3="Al (palik)",4="Au (johnson)",5="Nb2O5",6="ZnSe",7="MgF2",8="TiO2",9="PMMA",10="Si",11="ITO",12="Cu (palik)"} }, flag_mat_2 = { 0 , Name StrCat[pp4,"/2Layer 2"], Choices {0="Custom (Value Below)",1="SiO2",2="Ag (palik)",3="Al (palik)",4="Au (johnson)",5="Nb2O5",6="ZnSe",7="MgF2",8="TiO2",9="PMMA",10="Si",11="ITO",12="Cu (palik)"} },
flag_mat_3 = { 0 , Name StrCat[pp4,"/3Layer 3"], Choices {0="Custom (Value Below)",1="SiO2",2="Ag (palik)",3="Al (palik)",4="Au (johnson)",5="Nb2O5",6="ZnSe",7="MgF2",8="TiO2",9="PMMA",10="Si",11="ITO",12="Cu (palik)"} }, flag_mat_3 = { 0 , Name StrCat[pp4,"/3Layer 3"], Choices {0="Custom (Value Below)",1="SiO2",2="Ag (palik)",3="Al (palik)",4="Au (johnson)",5="Nb2O5",6="ZnSe",7="MgF2",8="TiO2",9="PMMA",10="Si",11="ITO",12="Cu (palik)"} },
flag_mat_4 = { 0 , Name StrCat[pp4,"/4Layer 4"], Choices {0="Custom (Value Below)",1="SiO2",2="Ag (palik)",3="Al (palik)",4="Au (johnson)",5="Nb2O5",6="ZnSe",7="MgF2",8="TiO2",9="PMMA",10="Si",11="ITO",12="Cu (palik)"} }, flag_mat_4 = { 1 , Name StrCat[pp4,"/4Layer 4"], Choices {0="Custom (Value Below)",1="SiO2",2="Ag (palik)",3="Al (palik)",4="Au (johnson)",5="Nb2O5",6="ZnSe",7="MgF2",8="TiO2",9="PMMA",10="Si",11="ITO",12="Cu (palik)"} },
flag_mat_5 = { 0 , Name StrCat[pp4,"/5Layer 5"], Choices {0="Custom (Value Below)",1="SiO2",2="Ag (palik)",3="Al (palik)",4="Au (johnson)",5="Nb2O5",6="ZnSe",7="MgF2",8="TiO2",9="PMMA",10="Si",11="ITO",12="Cu (palik)"} }, flag_mat_5 = { 1 , Name StrCat[pp4,"/5Layer 5"], Choices {0="Custom (Value Below)",1="SiO2",2="Ag (palik)",3="Al (palik)",4="Au (johnson)",5="Nb2O5",6="ZnSe",7="MgF2",8="TiO2",9="PMMA",10="Si",11="ITO",12="Cu (palik)"} },
flag_mat_6 = { 0 , Name StrCat[pp4,"/6Layer 6"], Choices {0="Custom (Value Below)",1="SiO2",2="Ag (palik)",3="Al (palik)",4="Au (johnson)",5="Nb2O5",6="ZnSe",7="MgF2",8="TiO2",9="PMMA",10="Si",11="ITO",12="Cu (palik)"} }, flag_mat_6 = { 1 , Name StrCat[pp4,"/6Layer 6"], Choices {0="Custom (Value Below)",1="SiO2",2="Ag (palik)",3="Al (palik)",4="Au (johnson)",5="Nb2O5",6="ZnSe",7="MgF2",8="TiO2",9="PMMA",10="Si",11="ITO",12="Cu (palik)"} },
eps_re_L_1 = {1 , Name StrCat[pp4,"/layer 1: real part of relative permittivity"]}, eps_re_L_1 = {1 , Name StrCat[pp4,"/layer 1: real part of relative permittivity"]},
eps_im_L_1 = {0 , Name StrCat[pp4,"/layer 1: imag part of relative permittivity"]}, eps_im_L_1 = {0 , Name StrCat[pp4,"/layer 1: imag part of relative permittivity"]},
eps_re_L_2 = {1 , Name StrCat[pp4,"/layer 2: real part of relative permittivity"]}, eps_re_L_2 = {1 , Name StrCat[pp4,"/layer 2: real part of relative permittivity"]},
......
import numpy as np import numpy as np
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import matplotlib as mpl import matplotlib as mpl
import scipy.constants as scc
plt.rcParams.update({"text.usetex": True, "font.family": "serif"}) plt.rcParams.update({"text.usetex": True, "font.family": "serif"})
def add_colorbar(mappable): def add_colorbar(mappable):
...@@ -22,10 +23,10 @@ def load_getdp_integral(fname): ...@@ -22,10 +23,10 @@ def load_getdp_integral(fname):
else: else:
return temp[:,1]+1j*temp[:,2] return temp[:,1]+1j*temp[:,2]
nb_lam = 200 nb_lam = 100
nb_phi = 60 nb_phi = 60
FLAG_TOT = 0 FLAG_TOT = 0
respath = 'res_Matrix_nb_lam200_nb_phi59_total0/' respath = 'res_Matrix_nb_lam100_nb_phi59_total0/'
rpp = np.zeros((nb_lam,nb_phi),dtype=complex) rpp = np.zeros((nb_lam,nb_phi),dtype=complex)
rps = np.zeros((nb_lam,nb_phi),dtype=complex) rps = np.zeros((nb_lam,nb_phi),dtype=complex)
rsp = np.zeros((nb_lam,nb_phi),dtype=complex) rsp = np.zeros((nb_lam,nb_phi),dtype=complex)
...@@ -44,6 +45,7 @@ Qscat_sin = np.zeros((nb_lam,nb_phi)) ...@@ -44,6 +45,7 @@ Qscat_sin = np.zeros((nb_lam,nb_phi))
tab_lam = np.linspace(350,1600,nb_lam) tab_lam = np.linspace(350,1600,nb_lam)
tab_phi = np.linspace(0,360,nb_phi) tab_phi = np.linspace(0,360,nb_phi)
tab_hnu = 2*scc.pi*scc.c/(tab_lam*1e-9/scc.hbar*scc.eV)
M = np.zeros((4,4,len(tab_lam),len(tab_phi)),dtype=complex) M = np.zeros((4,4,len(tab_lam),len(tab_phi)),dtype=complex)
...@@ -138,15 +140,16 @@ for form in range(2): ...@@ -138,15 +140,16 @@ for form in range(2):
plt.savefig('BALANCE_FLAG_TOT%g.jpg'%FLAG_TOT) plt.savefig('BALANCE_FLAG_TOT%g.jpg'%FLAG_TOT)
fig, axes = plt.subplots(4, 4, subplot_kw=dict(projection='polar') ,figsize=(12,12)) fig, axes = plt.subplots(4, 4, subplot_kw=dict(projection='polar') ,figsize=(12,12))
flag_lam = True flag_lam = False
rlabel = r"$\lambda_0$ (nm)" rlabel = r"$\hbar \nu$" if not flag_lam else r"$\lambda_0$"
which_r = tab_lam which_r = tab_hnu if not flag_lam else tab_lam
which_orig = 0 #if not flag_lam else 350 which_orig = 0 #if not flag_lam else 350
for i in range(4): for i in range(4):
for j in range(4): for j in range(4):
ax=axes[i,j] ax=axes[i,j]
if i!=0 or j!=0: if i!=0 or j!=0:
sm=ax.contourf(tab_phi*np.pi/180,which_r,M[i,j]/M[0,0],cmap=plt.cm.bwr,levels=30) sm=ax.contourf(tab_phi*np.pi/180,which_r,M[i,j]/M[0,0],cmap=plt.cm.bwr,levels=30,vmin=-1,vmax=1)
# sm=ax.contourf(tab_phi*np.pi/180,which_r,M[i,j]/M[0,0],cmap=plt.cm.bwr,levels=30)
ax.text(0. , 1. , r"$M_{%d%d}$"%(i+1,j+1) , fontsize=16 , transform=ax.transAxes) ax.text(0. , 1. , r"$M_{%d%d}$"%(i+1,j+1) , fontsize=16 , transform=ax.transAxes)
ax.set_xticks([]) ax.set_xticks([])
ax.set_yticks([]) ax.set_yticks([])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment