|
@@ -2,6 +2,7 @@
|
|
|
# -*- coding: UTF-8 -*-
|
|
|
import numpy as np
|
|
|
import matplotlib.pyplot as plt
|
|
|
+import os
|
|
|
c = 299792458
|
|
|
pi = np.pi
|
|
|
verbose = 6
|
|
@@ -146,7 +147,8 @@ def analyze(data, dist, z_vec, wl_idx):
|
|
|
print(dirname)
|
|
|
print("Power: plasmon %4.3g W of dipoles %4.3g W, efficiency %5.3g%% from:"%(ppw, float(np.abs(dip_power[0])),float(np.abs( eta0))), ppw, eta0)
|
|
|
plt.plot(lambd*1e9, plasmon_power/ dip_power)
|
|
|
- plt.ylim(0,0.04)
|
|
|
+ np.save(dirname,np.real(plasmon_power/ dip_power))
|
|
|
+ #plt.ylim(0,0.04)
|
|
|
plt.xlim(550,800)
|
|
|
|
|
|
#plt.plot(lambd*1e9, np.real(eps2))
|
|
@@ -164,7 +166,7 @@ def analyze(data, dist, z_vec, wl_idx):
|
|
|
plt.clf()
|
|
|
plt.close()
|
|
|
|
|
|
-file_ext="pdf"
|
|
|
+file_ext="png"
|
|
|
#dirname="template-dipole-on-sphere-on-surf-z.fsp.results"
|
|
|
#dirname="Au-JC-R100-Au-JC.fsp.results"
|
|
|
#dirname="Au-McPeak-R100-Si-Green.fsp.results"
|
|
@@ -180,7 +182,7 @@ file_ext="pdf"
|
|
|
# dirname=""
|
|
|
# dirname=""
|
|
|
# dirname=""
|
|
|
-dirname="bg-Au-sub-Si-dipole-Au.fsp.results"
|
|
|
+#dirname="bg-Au-sub-Si-dipole-Au.fsp.results"
|
|
|
#dirname="bg-Au-sub-dipole-Au.fsp.results"
|
|
|
#dirname="bg-Au-sub-Au-dipole-Au.fsp.results"
|
|
|
#dirname="Au-McPeak-R0.fsp.results"
|
|
@@ -191,7 +193,7 @@ dirname="bg-Au-sub-Si-dipole-Au.fsp.results"
|
|
|
#dirname="Au-sub-dipole-W.fsp.results"
|
|
|
#dirname="Au-sub-Au-dipole-W.fsp.results"
|
|
|
#dirname="Au-sub-Si-dipole-W.fsp.results"
|
|
|
-def main ():
|
|
|
+def main (dirname):
|
|
|
distance = [1,2,3,4,5,6,7,8,9,10] #mkm
|
|
|
zshift = ["5","20"]
|
|
|
# zshift = ["5","20","200","400","600"]
|
|
@@ -230,4 +232,11 @@ def main ():
|
|
|
# plt.savefig(dirname+"_WLs."+file_ext)
|
|
|
# plt.clf()
|
|
|
# plt.close()
|
|
|
-main()
|
|
|
+
|
|
|
+from glob import glob
|
|
|
+paths = glob('*.results')
|
|
|
+for dirname in paths:
|
|
|
+ main(dirname)
|
|
|
+# dir_list = next(os.walk('.'))[1]
|
|
|
+# print(dir_list)
|
|
|
+#main()
|