Exemplo n.º 1
0
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
import calc_sensitivity as cs
import nominal_param_values as npv

hartree = 4.36e-18  # J
bohr_radius = 5.29e-11  # m

# plot S vs C3

C3 = np.linspace(0.1, 1.5, 20)
S_max = np.zeros(C3.size)
S_kd = np.zeros(C3.size)

s_result_kd = cs.calc_sensitivity_kd(npv.I_inc_nom, npv.L_nom, npv.v_nom, npv.d_nom)

for i in range(C3.size):

    result = cs.calc_sensitivity_vdw(
        npv.I_inc_nom, npv.l_nom, npv.L_nom, npv.v_nom, C3[i] * hartree * bohr_radius ** 3, npv.d_nom
    )
    S_max[i] = result[0]
    S_kd[i] = s_result_kd
    print result


l1, l2 = plt.plot(C3, S_max, "b-", C3, S_kd, "r-")
plt.xlabel("C3 (atomic units)")
plt.ylabel("sensitivity (rad/s / sqrt(Hz))")
l1_str = "material gratings, optimal open fraction = " + str(cs.f_max(npv.d_nom))
Exemplo n.º 2
0
d = np.linspace(80.0e-9, 400.0e-9, 15)
V, D = np.meshgrid(v,d*1.0e9)
S = np.zeros([d.size, v.size], dtype = np.float)
S_kd = np.zeros([d.size, v.size], dtype = np.float)
f1 = np.zeros([d.size, v.size], dtype = np.float)
f2 = np.zeros([d.size, v.size], dtype = np.float)

for i in range(v.size):
    for j in range(d.size):
        print i,j

        result = cs.calc_sensitivity_vdw(npv.I_inc_nom, npv.l_nom, npv.L_nom, v[i], npv.C3_nom, fixed_d = d[j])
        S[j][i] = result[0]
        f1[j][i] = result[2]
        f2[j][i] = result[3]
        S_kd[j][i] = cs.calc_sensitivity_kd(npv.I_inc_nom, npv.L_nom, v[i], d[j])

fig = plt.figure(figsize=plt.figaspect(0.8))

ax = fig.add_subplot(2, 2, 1, projection='3d')
surf1 = ax.plot_surface(V, D, S, rstride=1, cstride=1, cmap=cm.coolwarm, linewidth=0, antialiased=True)
ax.set_xlabel("v (m/s)")
ax.set_ylabel("grating period (um)")
ax.set_zlabel("S (rad/s / sqrt(Hz))")
ax.set_title("a. material gratings")

ax = fig.add_subplot(2, 2, 2, projection='3d')
surf1 = ax.plot_surface(V, D, S_kd, rstride=1, cstride=1, cmap=cm.coolwarm, linewidth=0, antialiased=True)
ax.set_xlabel("v (m/s)")
ax.set_ylabel("grating period (um)")
ax.set_zlabel("S (rad/s / sqrt(Hz))")
Exemplo n.º 3
0
d = np.linspace(80.0e-9,400.0e-9,30)
d_plot = d*1.0e9
S_vdw = np.zeros(d.size, dtype=np.float)
S_kd = np.zeros(d.size, dtype=np.float)
f1 = np.zeros(d.size, dtype=np.float)
f2 = np.zeros(d.size, dtype=np.float)
f_max = cs.f_max(d)
for i in range(d.size):
    print d[i]

    result = cs.calc_sensitivity_vdw(npv.I_inc_nom, npv.l_nom, npv.L_nom, npv.v_nom, npv.C3_nom, d[i])
    S_vdw[i] = result[0]
    f1[i] = result[2]
    f2[i] = result[3]
    S_kd[i] = cs.calc_sensitivity_kd(npv.I_inc_nom, npv.L_nom, npv.v_nom, d[i])

plt.figure(figsize=plt.figaspect(1.4))

plt.subplot(211)
l1, l2 = plt.plot(d_plot, S_vdw, 'b-', d_plot, S_kd, 'r-')
plt.xlabel('grating period (nm)')
plt.ylabel('sensitivity (rad/s / sqrt(Hz))')
plt.legend((l1, l2), ('material gratings', 'Kapitza-Dirac gratings'), loc='upper right')

plt.subplot(212)
l3, l4, l5 = plt.plot(d_plot, f_max, 'k-', d_plot, f1, 'g-', d_plot, f2, 'm-')
plt.xlabel('grating period (nm)')
plt.ylabel('open fraction')
plt.legend((l3, l4, l5), ('max possible open fraction', 'best g1 open fraction', 'best g2 open fraction'), loc='lower right')
import time
import numpy as np
import matplotlib.pyplot as plt
import calc_sensitivity as cs
import nominal_param_values as npv


# Replicates Fig 5 of the Cronin 2005 paper, "Limitations on nanotechnology..."

d = np.linspace(10.0e-9,250.0e-9,30)
d_plot = d*1.0e9
S_vdw = np.zeros(d.size, dtype=np.float)
S_kd = np.zeros(d.size, dtype=np.float)
for i in range(d.size):
    S_vdw[i] = cs.calc_sensitivity_vdw(npv.I_inc_nom, 150.0e-9, 1.0, 1000.0, 4.8e-49, d[i], 0.5)[0]
    S_kd[i] = cs.calc_sensitivity_kd(npv.I_inc_nom, 1.0, 1000.0, d[i]) 

S_vdw_inv_sq = 1/S_vdw**2
S_kd_inv_sq = 1/S_kd**2

S_vdw_inv_sq_norm = S_vdw_inv_sq / np.linalg.norm(S_vdw_inv_sq)
S_kd_inv_sq_norm = S_kd_inv_sq / np.linalg.norm(S_kd_inv_sq)

plt.plot(d_plot, S_vdw_inv_sq_norm, 'bo', d_plot, S_kd_inv_sq_norm, 'ro')
plt.xlabel('grating period (nm)')
plt.ylabel('normalized inverse-squared sensitivity')
plt.show()