def kx_photon_glass(omega): e1 = real(LDBB('BK7','LD',array([2*pi*constants.c/omega]))[0]) return sqrt(e1)*omega/constants.c
def kx_photon_glass_tilted(omega): e1 = real(LDBB('BK7','LD',array([2*pi*constants.c/omega]))[0]) return sqrt(e1)*omega/(constants.c*sin(0.77))
def kx_sp_metal_vacuum(omega): e1 = 1.0 e2 = real(LDBB('Ag','LD',array([2*pi*constants.c/omega]))[0]) return (omega/constants.c)*sqrt(e1*e2/(e1+e2))
def kx_sp_metal_glass(omega): e1 = real(LDBB('BK7','LD',array([2*pi*constants.c/omega]))[0]) e2 = real(LDBB('Ag','LD',array([2*pi*constants.c/omega]))[0]) return (omega/constants.c)*sqrt(e1*e2/(e1+e2))
if val == "er": print "(%s, %s)" % (one[i], real(two[i])) if val == "ei": print "(%s, %s)" % (one[i], imag(two[i])) q = (1 / sqrt(2)) * sqrt( sqrt(real(two)**2 + imag(two)**2) + real(two)) + 1.0J * sqrt( sqrt(real(two)**2 + imag(two)**2) - real(two)) if val == "nr": print "(%s, %s)" % (one[i], real(q[i])) if val == "ni": print "(%s, %s)" % (one[i], imag(q[i])) for metal in metals: lambda0 = linspace(200e-9, 2000e-9, 100) data_LD = LDBB(metal, "LD", lambda0) data_D = LDBB(metal, "D", lambda0) data_BB = LDBB(metal, "BB", lambda0) print "\\newpage" print "\\subsection{%s}" % metal print "\\begin{figure}[h!]" print "\\centering" print "\\begin{tabular}{l}" for i in range(0, 4): #print "\\subfigure{" print "\\begin{tikzpicture}[baseline,trim axis left]" print "\\begin{axis}[xlabel=%s,ylabel=%s]" % (xlabels[3], ylabels[i]) print "\\addplot[color=colora] coordinates {" prettyprint(lambda0, data_D, params[i])
1.01046945*pow(x*1e6,2)/(pow(x*1e6,2)-103.560653))\ # dielectric function for LAH79, in nanometers n_LAH79 = lambda x:\ sqrt( 1 + 2.32557148E+00*pow(x*1e6,2)/(pow(x*1e6,2)-1.32895208E-02) +\ 5.07967133E-01*pow(x*1e6,2)/(pow(x*1e6,2)-5.28335449E-02) +\ 2.43087198E+00*pow(x*1e6,2)/(pow(x*1e6,2)-1.61122408E+02) ) metals = ['Ag', 'Au', 'Cu', 'Al', 'Be', 'Cr', 'Ni', 'Pd', 'Pt', 'Ti', 'W'] # global variables # wavelength of incident radiation lambda0 = 632.8e-9 for metal in metals: # dielectric properties epsilon = array([ n_BK7(lambda0)**2, LDBB(metal,'LD',array([lambda0]))[0], 1.0]) k0 = 2*pi/lambda0 # z component of k vector kz = lambda i,theta : sqrt(k0**2*epsilon[i]-(k0*sqrt(epsilon[0])*sin(theta))**2) # reflectivity guys r = lambda i,j,theta : (epsilon[j]*kz(i,theta)-epsilon[i]*kz(j,theta))/(epsilon[j]*kz(i,theta)+epsilon[i]*kz(j,theta)) # combined fresnel relation fr123 = lambda x0: abs((r(0,1,x0[0])+r(1,2,x0[0])*exp(2J*kz(1,x0[0])*x0[1]))/(1+r(0,1,x0[0])*r(1,2,x0[0])*exp(2J*kz(1,x0[0])*x0[1]))) r123 = lambda theta,d: \ (r(0,1,theta)+r(1,2,theta)*exp(2J*kz(1,theta)*d))/ \ (1+r(0,1,theta)*r(1,2,theta)*exp(2J*kz(1,theta)*d)) theta = linspace(0,pi/2,1000) dat = [ abs(r123(theta,d)) for d in linspace(0,100e-9,1000) ]
sqrt( 1 + 2.32557148E+00*pow(x*1e6,2)/(pow(x*1e6,2)-1.32895208E-02) +\ 5.07967133E-01*pow(x*1e6,2)/(pow(x*1e6,2)-5.28335449E-02) +\ 2.43087198E+00*pow(x*1e6,2)/(pow(x*1e6,2)-1.61122408E+02) ) eps_h2o = complex(1.7692, 0.051569) metals = ['Ag', 'Au', 'Cu', 'Al', 'Be', 'Cr', 'Ni', 'Pd', 'Pt', 'Ti', 'W'] # global variables # wavelength of incident radiation lambda0 = 632.8e-9 for metal in metals: # dielectric properties epsilon = array( [n_BK7(lambda0)**2, LDBB(metal, 'LD', array([lambda0]))[0], eps_h2o]) k0 = 2 * pi / lambda0 # z component of k vector kz = lambda i, theta: sqrt(k0**2 * epsilon[i] - (k0 * sqrt(epsilon[0]) * sin(theta))**2) # reflectivity guys r = lambda i, j, theta: (epsilon[j] * kz(i, theta) - epsilon[i] * kz( j, theta)) / (epsilon[j] * kz(i, theta) + epsilon[i] * kz(j, theta)) # combined fresnel relation fr123 = lambda x0: abs( (r(0, 1, x0[0]) + r(1, 2, x0[0]) * exp(2J * kz(1, x0[0]) * x0[1])) / (1 + r(0, 1, x0[0]) * r(1, 2, x0[0]) * exp(2J * kz(1, x0[0]) * x0[1]))) r123 = lambda theta,d: \ (r(0,1,theta)+r(1,2,theta)*exp(2J*kz(1,theta)*d))/ \ (1+r(0,1,theta)*r(1,2,theta)*exp(2J*kz(1,theta)*d))