def main(): wls = np.linspace(500, 2000, 100) fig, axs = plt.subplots(2, sharex=True, figsize=(5.5, 7)) eps = putil.getEps('cu', wls) eps_drude = putil.getEpsDrude('Cu', wls) axs[0].plot(wls, eps.real, c='r', lw=2) axs[0].plot(wls, eps_drude.real, c='r', lw=2, ls=':') axs[1].plot(wls, eps.imag, c='r', lw=2) axs[1].plot(wls, eps_drude.imag, c='r', lw=2, ls=':') axs[0].set_xlim(np.amin(wls), np.amax(wls)) axs[1].set_xlabel('Wavelength (nm)') axs[0].set_ylabel(r'Re{$\epsilon$}') axs[1].set_ylabel(r'Im{$\epsilon$}') plt.tight_layout() plt.show() return
def main(): wls = np.linspace(500, 2000, 100) metals = ['al', 'pt', 'cu', 'co'] fig, axs = plt.subplots(2, sharex=True, figsize=(5.5, 7)) for i, m in enumerate(metals): print m eps = putil.getEps(m, wls) print np.shape(wls), np.shape(eps) axs[0].plot(wls, eps.real, c=colors[i], lw=2) axs[1].plot(wls, eps.imag, c=colors[i], lw=2) axs[0].legend(metals, loc='best') axs[0].set_xlim(np.amin(wls), np.amax(wls)) axs[1].set_xlabel('Wavelength (nm)') axs[0].set_ylabel(r'Re{$\epsilon$}') axs[1].set_ylabel(r'Im{$\epsilon$}') plt.tight_layout() plt.show() return
def main(): ''' thicknesses in microns (um) ''' eps = putil.getEps('al', 1500.) print eps exit() # Set layer indices ni = 1. nf = 4. nt = sqrt(-100 + 1j) ns_film = np.array([nf]) ns_bare = np.array([ni]) # Set layer thicknesses ds = np.array([1]) # um # Set excitation propeties wls = np.linspace(1., 2., 100) # um # ths = np.linspace(0.0, 90, 1000) * pi/180. ths = np.array([45. * pi / 180]) pol = 'p' # Collect data R_bare = pl.zeros((len(wls), len(ths)), dtype='float') R_film = pl.zeros((len(wls), len(ths)), dtype='float') for ith, th in enumerate(ths): for iwl, wl in enumerate(wls): R_film[iwl, ith] = tm.solvestack(ni, nt, ns_film, ds, wl, pol, th)[0] R_bare[iwl, ith] = tm.solvestack(ni, nt, ns_bare, ds, wl, pol, th)[0] R = R_film / R_bare # Plot data pl.figure(figsize=(10, 7.5)) pl.plot(wls, R[:, 0], 'r', lw=2, label='R') #pl.xlim(ths[0], ths[-1]) #pl.ylim(0, 1) pl.ylabel(r'$R$', fontsize=18) pl.xlabel(r'$\theta$', fontsize=18) pl.show() return
def CompareGST(): ev = np.linspace(0.1, 2, 1000) wl = putil.ev2nm(ev) c225 = putil.getEps('c-gst225', wl) a225 = putil.getEps('a-gst225', wl) c326 = putil.getEps('c-gst326', wl) a326 = putil.getEps('a-gst326', wl) cgete = putil.getEps('c-gete', wl) agete = putil.getEps('a-gete', wl) n_a225 = sp.emath.sqrt(a225) n_c225 = sp.emath.sqrt(c225) n_a326 = sp.emath.sqrt(a326) n_c326 = sp.emath.sqrt(c326) n_agete = sp.emath.sqrt(agete) n_cgete = sp.emath.sqrt(cgete) fig, ax = plt.subplots(2, figsize=(7, 6), sharex=True) wl *= 1e-3 ax[0].plot(wl, n_a225.real, 'b:') ax[0].plot(wl, n_a326.real, 'b') ax[0].plot(wl, n_agete.real, 'b--') ax[1].plot(wl, n_a225.imag, 'b:') ax[1].plot(wl, n_a326.imag, 'b') ax[1].plot(wl, n_agete.imag, 'b--') ax[0].plot(wl, n_c225.real, 'r:') ax[0].plot(wl, n_c326.real, 'r') ax[0].plot(wl, n_cgete.real, 'r--') ax[1].plot(wl, n_c225.imag, 'r:') ax[1].plot(wl, n_c326.imag, 'r') ax[1].plot(wl, n_cgete.imag, 'r--') plt.xlim(0.6, 10) ax[1].set_ylim(0, 2) ax[0].set_ylabel('n') ax[1].set_ylabel('k') ax[1].set_xlabel(r'Wavelength ($\mu m$)') ax[1].legend( ('a-GST225', 'a-GST326', 'a-GeTe', 'c-GST225', 'c-GST326', 'c-GeTe')) plt.tight_layout() plt.show()
def main(): nm = 1e-9 um = 1e-6 cm = 1e-3 wls = np.linspace(1500,6000,100) # e_agst = putil.getEps('a-gete', wls) # e_cgst = putil.getEps('c-gete', wls) e_agst = putil.getEps('a-gst225', wls) e_cgst = putil.getEps('c-gst225', wls) n_agst = sqrt(e_agst) n_agst = n_agst.real + 1j * n_agst.imag n_cgst = sqrt(e_cgst) n_cgst = n_cgst.real + 1j * n_cgst.imag e_al = putil.getEps('al',wls) n_al = sqrt(e_al) n_al = n_al.real + 1j * n_al.imag Nths = 10 ths = np.linspace(10,40,Nths) * pi/180. pol = 'p' ds = np.array([175]) # nm R = np.zeros((len(wls),Nths,2), dtype='float') T = np.zeros((len(wls),Nths,2), dtype='float') A = np.zeros((len(wls),Nths,2), dtype='float') plt.figure(figsize=(5,4)) for phase in ['a','c']: for ip, p in enumerate(['p','s']): for ith, th in enumerate(ths): for iwl, wl in enumerate(wls): ni = 1+0j ns_a = np.array([n_agst[iwl]]) ns_c = np.array([n_cgst[iwl]]) nt = n_al[iwl] # reflection from aluminum with no GST ref = tm.solvestack(ni, nt, np.array([1]), ds, wl, p, th)[0] if phase == 'a': R[iwl,ith,ip], T[iwl,ith,ip], A[iwl,ith,ip] = tm.solvestack(ni, nt, ns_a, ds, wl, p, th) else: R[iwl,ith,ip], T[iwl,ith,ip], A[iwl,ith,ip] = tm.solvestack(ni, nt, ns_c, ds, wl, p, th) R[iwl,ith,ip] /= ref Rav = np.sum(np.sum(R,axis=1), axis=1) / (2*Nths) c = 'b' if phase == 'a' else 'r' plt.plot(wls/1e3, Rav, c, lw=2, label='R') plt.ylabel(r'$R$', fontsize=18) plt.xlabel(r'$\lambda$ ($\mu m$)', fontsize=18) plt.legend(('amor.','crys.'), loc='best') plt.tight_layout() plt.show()