diff --git a/examples/eels/nanorod/run.py b/examples/eels/nanorod/run.py new file mode 100644 index 00000000..9cd2ef42 --- /dev/null +++ b/examples/eels/nanorod/run.py @@ -0,0 +1,88 @@ +import sys, os, multiprocessing, numpy as np +if sys.path[1] != os.path.abspath(__file__ + "/../../../../misc/ADDAwrapper") : sys.path.insert(1,os.path.abspath(__file__ + "/../../../../misc/ADDAwrapper")) #This is to import ADDA Wrapper from parent directory +import ADDAwrapper as aw + +# ADDAWrapper parameters +aw_parameters = dict( + #adda_exec = os.path.abspath(__file__ + "/../../../../win64/adda.exe"), #path to ADDA executable + adda_exec = aw.addaexec_find(mode="seq"), #path to ADDA executable + parallel_procs = multiprocessing.cpu_count()-1, #number of parallel processes is equal to the number of processor cores minus 1 + + mp_files = [os.path.abspath(__file__ + "/../../../../misc/ADDAwrapper/refractive_index/" + "Au_JHW.csv")], #file with refractive index of the particle, each string contains: ev,mp_re,mp_im + ev_range = np.arange(0.5,3+.01,0.05), #[eV]. Used in "spectrum_" functions. (ev_min,ev_max): range from ev_min[eV] to ev_max[eV] + + #Used in "scan_" functions. Beam propagation must be orthogonal to the grid. + #So "prop" must be "0 0 whatever" and rotations with "orient" must be made by 90 degrees. + scan_x_range = (-15,15), #[nm], (x_left, x_right) + scan_y_range = (-50,50), #[nm], (y_bottom, y_top) + scan_step = 1 #dipoles per each step, must be an integer >= 1. Set to 1 for the finest resolution. + #The beam must always blast exactly in the middle between the dipoles, + #so start and stop coordinates will be adjusted, covering more area than you entered. Obligatory to use "no_vol_cor" with scan. +) + +hd = (92.6-7.8)/7.8 + +# ADDA command line arguments +adda_cmdlineargs = dict( + # Particle + shape = f"capsule {hd}", + size = 7.8, #[nm] + grid = 8, #dipoles per x-axis size of the particle + mhost = "1.45 0", #refractive index of the host medium + orient = "90 90 0", #rotating the particle + + # Beam + beam = "electron 100", #Energy[keV] + beam_center = "10 20 0", # x[nm] y[nm] z[nm] - beam center coordinates + prop = "0 0 -1", #beam propagation direction vector + + # Precision and performance + eps = 2, #Residual norm + + # Additional options + sym = "enf", #Do not simulate second polarization + scat_matr = "none", #Do not calculate the Mueller matrix + no_vol_cor = "", #Disable volume correction + iter = "qmr2", #Iterative solver + pol = "igt_so", #Polarizability prescription + int = "igt_so", #Interaction term + Csca = "", #Calculate Csca with the Romberg integral. Needed to properly calculate Cathodoluminesce + alldir_inp = os.path.abspath(__file__ + "/../../../../misc/ADDAwrapper/Csca_default.txt") +) + +### Executing commands +if __name__ == '__main__': + + # Execute spectra simulations for different positions of the beam to find plasmon peaks + aw_parameters['dirname'] = os.path.abspath(__file__ + "/../" + "spectrumline") + aw_parameters["spectrumline_startpoint"] = (10,0) # (x,y) [nm] + aw_parameters["spectrumline_endpoint"] = (10,50) # (x,y) [nm] + aw_parameters["spectrumline_points"] = 15 # how many points, including startpoint and endpoint + aw.spectrumline_execute(aw_parameters,adda_cmdlineargs) # Execute simulation + aw.spectrumline_collect("Peels",aw_parameters) # Collect EELS spectrum + aw.spectrumline_plot("Peels",aw_parameters) # Plot EELS spectrum + aw.spectrumline_collect("Pcl",aw_parameters) # Collect CL spectrum + aw.spectrumline_plot("Pcl",aw_parameters) # Plot CL spectrum + + # Execute scan of particle's cross-section for single energy ev + aw_parameters['dirname'] = os.path.abspath(__file__ + "/../" + "scan2.4") + aw_parameters["ev"] = 2.4 + aw.scan_execute(aw_parameters,adda_cmdlineargs) + # Collect and map scanned EELS/CL probabilities on particle's cross-section + aw.scan_collect("Peels",aw_parameters) + aw.scan_plot("Peels",aw_parameters) + aw.scan_collect("Pcl",aw_parameters) + aw.scan_plot("Pcl",aw_parameters) + + # Visual representation of the dipole set + cmdline = aw.cmdline_construct(aw_parameters,adda_cmdlineargs) + cmdline += f" -dir {os.path.abspath(__file__ + '/../geom/')}" + cmdline += " -save_geom" + cmdline += " -prognosis" + cmdline += " > /dev/null" + os.system(cmdline) + fig1,ax1 = aw.geometry("geom/capsule.geom", ["gold"]) + ax1.axis("off") + ax1.view_init(30, -30) + fig1.savefig("geometry.svg", bbox_inches='tight') + diff --git a/examples/eels/sphere/run.py b/examples/eels/sphere/run.py new file mode 100644 index 00000000..75d822d4 --- /dev/null +++ b/examples/eels/sphere/run.py @@ -0,0 +1,102 @@ +import sys, os, multiprocessing, numpy as np +if sys.path[1] != os.path.abspath(__file__ + "/../../../../misc/ADDAwrapper") : sys.path.insert(1,os.path.abspath(__file__ + "/../../../../misc/ADDAwrapper")) #This is to import ADDA wrapper from parent directory +import ADDAwrapper as aw + +# ADDAWrapper parameters +aw_parameters = dict( + #adda_exec = os.path.abspath(__file__ + "/../../../../win64/adda.exe"), #path to ADDA executable + adda_exec = aw.addaexec_find(mode="seq"), #path to ADDA executable + parallel_procs = multiprocessing.cpu_count()-1, #number of parallel processes is equal to the number of processor cores minus 1 + + mp_files = [os.path.abspath(__file__ + "/../../../../misc/ADDAwrapper/refractive_index/" + "Ag_JHW.csv")], #file with refractive index of the particle, each string contains: ev,mp_re,mp_im + ev_range = np.arange(2.5,4.5+.01,0.05), #[eV]. Used in "spectrum_" functions. + ev = 3.45, #[eV]. Used in "scan_" and "extrapolation_" functions. + + spectrumline_startpoint = (0,50), # (x,y) [nm] + spectrumline_endpoint = (50,50), # (x,y) [nm] + spectrumline_points = 10, #how many points, including startpoint and endpoint + + #Used in "scan_" functions. Beam propagation must be orthogonal to the grid. + #So "prop" must be "0 0 whatever" and rotations with "orient" must be made by 90 degrees. + scan_x_range = (0,30), #[nm], (x_left, x_right) + scan_y_range = (0,30), #[nm], (y_bottom, y_top) + scan_step = 1 #dipoles per each step, must be an integer >= 1 + #The beam must always blast exactly in the middle between the dipoles, + #so start and stop coordinates will be adjusted, covering more area than you entered. Obligatory to use "no_vol_cor" with scan. +) + +# ADDA command line arguments +adda_cmdlineargs = dict( + # Particle + shape = "sphere", + size = 40, #[nm] + grid = 32, #dipoles per x-axis size of the particle + mhost = "1 0", #refractive index of the host medium + + # Beam + beam = "electron 100", #Energy[keV] + beam_center = "60 0 0", # x[nm] y[nm] z[nm] - beam center coordinates + prop = "0 0 -1", #beam propagation direction vector + + # Precision and performance + eps = 2, #Residual norm + + # Additional options + sym = "enf", #Do not simulate second polarization + scat_matr = "none", #Do not calculate the Mueller matrix + no_vol_cor = "", #Disable volume correction + iter = "qmr2", #Iterative solver + pol = "igt_so", #Polarizability prescription + int = "igt_so", #Interaction term + Csca = "", #Calculate Csca with the Romberg integral. Needed to properly calculate Cathodoluminesce + alldir_inp = os.path.abspath(__file__ + "/../../../../misc/ADDAwrapper/Csca_default.txt") +) + +### Executing commands +if __name__ == '__main__': + + # Execute spectrum + aw_parameters["dirname"] = os.path.abspath(__file__ + "/../" + "spectrum") + aw.spectrum_execute(aw_parameters,adda_cmdlineargs) + # Collect and plot EELS probabilities + aw.spectrum_collect("Peels",aw_parameters) + aw.spectrum_plot("Peels",aw_parameters) + # Collect and plot CL probabilities + aw.spectrum_collect("Pcl",aw_parameters) + aw.spectrum_plot("Pcl",aw_parameters) + + # Execute extrapolation for single energy ev + aw_parameters["dirname"] = os.path.abspath(__file__ + "/../" + "extrapolation") + aw.extrapolation_execute(aw_parameters,adda_cmdlineargs) + # Collect and plot EELS probabilities for different y~1/grid with extrapolated value in y=0 (with errorbar) + aw.extrapolation_collect("Peels",aw_parameters) + aw.extrapolation_plot("Peels",aw_parameters) + + # Execute spectrum with extrapolation at each energy ev + aw_parameters["dirname"] = os.path.abspath(__file__ + "/../" + "spectrum_with_extrapolation") + aw.spectrum_with_extrapolation_execute(aw_parameters,adda_cmdlineargs) + # Collect and plot fit EELS probabilities spectrum (with errorbar) + aw.spectrum_with_extrapolation_collect("Peels",aw_parameters) + aw.spectrum_with_extrapolation_plot("Peels",aw_parameters) + + # Execute scan of particle's cross-section for single energy ev + aw_parameters["dirname"] = os.path.abspath(__file__ + "/../" + "scan") + aw.scan_execute(aw_parameters,adda_cmdlineargs) + # Collect and map scanned EELS probabilities on particle's cross-section + aw.scan_collect("Peels",aw_parameters) + aw.scan_plot("Peels",aw_parameters) + aw.scan_collect("Pcl",aw_parameters) + aw.scan_plot("Pcl",aw_parameters) + + # Visual representation of the dipole set + cmdline = aw.cmdline_construct(aw_parameters,adda_cmdlineargs) + cmdline += f" -dir {os.path.abspath(__file__ + '/../geom/')}" + cmdline += " -save_geom" + cmdline += " -prognosis" + cmdline += " > /dev/null" + os.system(cmdline) + fig1,ax1 = aw.geometry("geom/sphere.geom", ["silver"]) + ax1.axis("off") + ax1.view_init(30, -30) + fig1.savefig("geometry.svg", bbox_inches='tight') + diff --git a/misc/ADDAwrapper/ADDAwrapper.py b/misc/ADDAwrapper/ADDAwrapper.py new file mode 100644 index 00000000..906b2458 --- /dev/null +++ b/misc/ADDAwrapper/ADDAwrapper.py @@ -0,0 +1,902 @@ +import os, shutil, re, csv, time, multiprocessing, tqdm, math +import numpy as np +import matplotlib.pyplot as plt +from matplotlib.ticker import AutoMinorLocator, ScalarFormatter + +def addaexec_find(mode="seq"): + if mode!="seq" and mode!="mpi" and mode!="ocl": + print(f"ERROR: unkwnown mode {mode}") + return + if mode == "seq": + name="adda" + else: + name=f"adda_{mode}" + if os.system(name + " > " + os.devnull + " 2>&1") == 0 : return name + cmdline = os.path.abspath(__file__ + f"/../../../src/seq/{name}") + if os.system(cmdline + " -V > " + os.devnull + " 2>&1") == 0 : return cmdline + cmdline = os.path.abspath(__file__ + f"/../../../win64/{name}") + if os.name == "nt" and os.system(cmdline + " -V > " + os.devnull + " 2>&1") == 0 : return cmdline + print(f"ERROR: No working {name} binary found") + +def label_for_plot(match): + if match[0] == "P": + if match[1:] == "ext": return r"$\it{PCQ}$" + r"$_{\rm ext}$" + ", eV$^{-1}$" + return r"$\it{" + match[0] + r"}$" + r"$_{\rm " + match[1:].upper() + "}$" + ", eV$^{-1}$" + elif match[0] == "C": + return r"$\it{" + match[0] + r"}$" + r"$_{\rm " + match[1:] + "}$" + ", nm$^2$" + elif match[0] == "Q": + return r"$\it{" + match[0] + r"}$" + r"$_{\rm " + match[1:] + "}$" + else: + return match + +def label_for_plot_arbunits(match): + if match[0] == "P": + return match[0] + r"$_{\rm " + match[1:].upper() + "}$" + ", arb. units" + elif match[0] == "C": + return match + ", arb. units" + elif match[0] == "Q": + return match + else: + return match + +def color_for_plot(match): + if match == "Peels": + return "royalblue" + elif match == "Pcl": + return "violet" + else: + return "black" + +def print_log(string, dirname=False, silent=False): + if silent == False: + print(string) + if dirname != False: + with open(dirname + "/log.txt", 'a') as file: + file.write(string + "\n") + +def delkeys_silent(dictionary, keys): + for key in keys: + if key in dictionary: + del dictionary[key] + +def mp_range_read(mp_file,ev_min,ev_max): + mdata = np.genfromtxt(mp_file,delimiter=',') + mdata_slice = mdata[(mdata[:,0] <= ev_min),0] + ev_min_nearest = max(mdata_slice) if len(mdata_slice) != 0 else mdata[0,0] + mdata_slice = mdata[(mdata[:,0] >= ev_max),0] + ev_max_nearest = min(mdata_slice) if len(mdata_slice) != 0 else mdata[-1,0] + mdata = mdata[(mdata[:,0] >= ev_min_nearest) & (mdata[:,0] <= ev_max_nearest),:] + return mdata + +def dipole_middles(point1, point2, d, odd): + (x_left,y_bottom) = point1 + (x_right,y_top) = point2 + left = math.floor(x_left/d + odd) - odd + right = math.ceil(x_right/d + odd) - odd + bottom = math.floor(y_bottom/d + odd) - odd + top = math.ceil(y_top/d + odd) - odd + #print(left,right,bottom,top) + x0s = np.linspace(left*d, right*d, abs(round(right - left))+1) + x0s = np.around(x0s,8) + y0s = np.linspace(bottom*d, top*d, abs(round(top - bottom))+1) + y0s = np.around(y0s,8) + return x0s, y0s + +def mp_single_read(mp_file,ev): + mdata = np.genfromtxt(mp_file,delimiter=',') + mdata = min(mdata, key=lambda x: abs(x[0] - ev)) + return mdata + +def cmdline_construct(aw_parameters,adda_cmdlineargs): + cmdline = aw_parameters["adda_exec"] + for arg in adda_cmdlineargs: + cmdline += f" -{arg} {adda_cmdlineargs[arg]}" + return cmdline + +def ev_to_nm(ev): + return 1239.8419842361123824 / ev + +def nm_to_ev(nm): + return 1239.8419842361123824 / nm + +def parse_value(file,match): + with open(file, "r") as file: + for line in file: + if match in line: + value = float(re.findall("[ \t][-+]?\ *[0-9]+\.?[0-9]*(?:[Ee]\ *[-+]?\ *[0-9]+)?",line)[0]) + break + return value + +def midpoints(x): + sl = () + for i in range(x.ndim): + x = (x[sl + np.index_exp[:-1]] + x[sl + np.index_exp[1:]]) / 2.0 + sl += np.index_exp[:] + return x + +def geom_gen(aw_parameters,adda_cmdlineargs): + cmdline = cmdline_construct(aw_parameters,adda_cmdlineargs) + #cmdline = aw_parameters["adda_exec"] + cmdline += f" -dir {aw_parameters['dirname']}/geom" + cmdline += " -prognosis" + #cmdline += " -no_vol_cor" + #cmdline += f" -shape {adda_cmdlineargs['shape']}" + #cmdline += f" -grid {adda_cmdlineargs['grid']}" + cmdline += " -save_geom" + cmdline += " > " + os.devnull + os.system(cmdline) + #print(cmdline) + +def geometry(geom_path,colorlist=None,half=False): + skip_header = 0 + with open(geom_path, "r") as file: + for line in file: + if "Nmat" in line: + skip_header=1 + data = np.genfromtxt(geom_path, delimiter=' ', dtype="int", skip_header=skip_header) + if half == True: + #data = data[(data[:,0]<.5*(max(data[:,0]) + min(data[:,0]))) | (data[:,2]<.5*(max(data[:,2]) + min(data[:,2])))] #quarter + data = data[data[:,0]<.5*(max(data[:,0]) + min(data[:,0]))] #half + xs, ys, zs = data[:,0], data[:,1], data[:,2] + xs, ys, zs = xs-min(xs), ys-min(ys), zs-min(zs) + x, y, z = np.indices((max(xs)-min(xs)+2,max(ys)-min(ys)+2,max(zs)-min(zs)+2)).astype(float) + xc = midpoints(x) + voxels = np.zeros(xc.shape, dtype=bool) + colors = np.empty(xc.shape, dtype=object) + if data.shape[1] == 4: + ms = data[:,3] - 1 + else: + if colorlist == None: + ms = np.ones(xs.shape, dtype="int") + else: + ms = np.zeros(xs.shape, dtype="int") + if colorlist == None: + colorlist = ["deepskyblue", "silver", "gold", "yellowgreen", "tomato", "darkviolet", "peru", "lime"] + for i in range(len(xs)): + voxels[xs[i],ys[i],zs[i]] = True + colors[xs[i],ys[i],zs[i]] = colorlist[ms[i]] + + + fig = plt.figure() + ax = fig.add_subplot(projection='3d') + #print(voxels) + ax.voxels(x, y, z, voxels, facecolors=colors, edgecolors="grey", linewidth=0.05, alpha=0.9, zorder=1) + + ax.set_xlim([0, xc.shape[0]]) + ax.set_ylim([0, xc.shape[1]]) + ax.set_zlim([0, xc.shape[2]]) + ax.set(xlabel='x', ylabel='y', zlabel='z') + ax.set_box_aspect([max(xs)-min(xs)+1,max(ys)-min(ys)+1,max(zs)-min(zs)+1]) + ax.view_init(30, -120) + return fig,ax + +def plot_create(): + fig = plt.figure(constrained_layout=True) + ax = fig.add_subplot(1, 1, 1) + #ax.ticklabel_format(axis="y", style="sci", scilimits=(0,0)) + formatter = ScalarFormatter(useMathText=True) + formatter.set_scientific(True) + formatter.set_powerlimits((0,0)) + ax.yaxis.set_major_formatter(formatter) + ax.set_xlabel("Energy, eV") + ax.xaxis.set_minor_locator(AutoMinorLocator()) + ax.yaxis.set_minor_locator(AutoMinorLocator()) + ax.grid(which="both", axis="x", linestyle="dotted", zorder=0) + ax.tick_params(bottom=True, top=True, left=True, right=True, which = "both") + ax.tick_params(labelbottom=True, labeltop=False, labelleft=True, labelright=False) + plot_setrcparams() + return fig, ax + +def plot_setaspect(ax): + xleft, xright = ax.get_xlim() + ybottom, ytop = ax.get_ylim() + ax.set_aspect(abs((xright-xleft)/(ytop-ybottom))*.5625) + +def plot_setrcparams(): + SMALL_SIZE = 12 + MEDIUM_SIZE = 14 + BIGGER_SIZE = 16 + + # SMALL_SIZE = 16 + # MEDIUM_SIZE = 18 + # BIGGER_SIZE = 16 + + # SMALL_SIZE = 24 + # MEDIUM_SIZE = 32 + # BIGGER_SIZE = 32 + + plt.rc('font', **{'family': 'serif', 'serif': 'Arial'}) + plt.rc('font', size=SMALL_SIZE) # controls default text sizes + plt.rc('axes', titlesize=SMALL_SIZE) # fontsize of the axes title + plt.rc('axes', labelsize=MEDIUM_SIZE) # fontsize of the x and y labels + plt.rc('xtick', labelsize=SMALL_SIZE) # fontsize of the tick labels + plt.rc('ytick', labelsize=SMALL_SIZE) # fontsize of the tick labels + plt.rc('legend', fontsize=SMALL_SIZE) # legend fontsize + plt.rc('figure', titlesize=BIGGER_SIZE) # fontsize of the figure title + + #plt.rc('legend', fontsize=32) # legend fontsize + +def exec_cmdlines(cmdlines,parallel_procs): + pool = multiprocessing.Pool(parallel_procs) + result_list_tqdm = [] + for result in tqdm.tqdm(pool.imap(os.system, cmdlines, 1), total=len(cmdlines)): + result_list_tqdm.append(result) + return result_list_tqdm + +def varyany_execute(aw_parameters,adda_cmdlineargs,dirname,var,var_range): + aw_parameters, adda_cmdlineargs = dict(aw_parameters), dict(adda_cmdlineargs) + start_time = time.time() + shutil.rmtree(dirname, ignore_errors=True) + os.makedirs(dirname, exist_ok=True) + os.makedirs(f"{dirname}/ADDA_output", exist_ok=True) + print() + print_log("--- Vary any parameter: executing simulations",dirname) + print_log(f"Number of parallel threads: {aw_parameters['parallel_procs']}",dirname) + if var in adda_cmdlineargs: + del adda_cmdlineargs[var] + mp_file = aw_parameters["mp_file"] + ev = aw_parameters["ev"] + mdata = mp_single_read(mp_file,ev) + lam = ev_to_nm(ev) + adda_cmdlineargs["lambda"] = lam + mre = mdata[1] + mim = mdata[2] + adda_cmdlineargs["m"] = f"{mre} {mim}" + cmdline = cmdline_construct(aw_parameters,adda_cmdlineargs) + print_log(f"{cmdline}",dirname) + print_log(f"mp = {mre} + {mim}*I",dirname) + print_log(f"Varying {var} from {var_range[0]} to {var_range[-1]}",dirname) + cmdlines = [] + for i in var_range: + cmdline_i = cmdline + output_dir = os.path.abspath(dirname + f"/ADDA_output/{i}") + cmdline_i += f' -dir "{output_dir}"' + cmdline_i += f" -{var} %s" % str(i) + cmdline_i += " > " + os.devnull + cmdlines.append(cmdline_i) + #print(cmdlines) + exec_cmdlines(cmdlines,aw_parameters["parallel_procs"]) + print_log("--- %s seconds" % round((time.time() - start_time),2),dirname) + +def varyany_collect(match,dirname, silent=False): + xs = sorted([d.name for d in os.scandir(f"{dirname}/ADDA_output") if d.is_dir()]) + #print(xs) + values = [] + for x in xs: + values.append(parse_value(f"{dirname}/ADDA_output/{x}/CrossSec-Y",match)) + with open(f"{dirname}/{match}.csv", 'w') as file: + writer = csv.writer(file, delimiter=',', lineterminator='\n') + writer.writerow(["var",match]) + writer.writerows(zip(xs,values)) + print_log(f"Saved {dirname}/{match}.csv", silent=silent) + +def varyany_plot(match,dirname): + data = np.genfromtxt(f"{dirname}/{match}.csv", delimiter=',')[1:] + fig,ax = plot_create() + ax.plot(data[:,0], data[:,1], label=label_for_plot(match), color=color_for_plot(match), linestyle="none", marker=".") + ax.set_xlim([min(data[:,0]),max(data[:,0])]) + ax.set_ylabel(label_for_plot(match)) + #ax.legend() + plot_setaspect(ax) + ax.set_xlabel("") + fig.savefig(f"{dirname}/{match}.svg", bbox_inches='tight') + print_log(f"Saved {dirname}/{match}.svg") + +def spectrum_execute(aw_parameters,adda_cmdlineargs): + aw_parameters, adda_cmdlineargs = dict(aw_parameters), dict(adda_cmdlineargs) + start_time = time.time() + dirname = aw_parameters["dirname"] + shutil.rmtree(dirname, ignore_errors=True) + os.makedirs(dirname, exist_ok=True) + os.makedirs(f"{dirname}/ADDA_output", exist_ok=True) + print() + print_log("--- Spectrum: executing simulations",dirname) + print_log(f"Number of parallel threads: {aw_parameters['parallel_procs']}",dirname) + delkeys_silent(adda_cmdlineargs, ["lambda"]) + if 'ms_files' in aw_parameters.keys(): + surfheight = adda_cmdlineargs["surf"].split(" ")[0] + delkeys_silent(adda_cmdlineargs, ["surf"]) + msdata = np.genfromtxt(aw_parameters["ms_files"][0],delimiter=',') + cmdline = cmdline_construct(aw_parameters,adda_cmdlineargs) + mp_files = aw_parameters["mp_files"] + if 'ev_range' in aw_parameters.keys(): + evs = [round(x,2) for x in aw_parameters["ev_range"]] + else: + evs = [round(x,2) for x in aw_parameters["nm_range"]] + mdata = dict() + for i in range(len(mp_files)): + mdata[i] = np.genfromtxt(mp_files[i],delimiter=',') + mps = dict() + for ev in evs: + mps[ev] = "" + for i in mdata: + nk = min(mdata[i], key=lambda x: abs(x[0] - ev)) + nk = str(nk[1]) + " " + str(nk[2]) + " " + mps[ev] += str(nk) + with open(f"{dirname}/ADDA_cmdlineargs.csv", 'w') as file: + writer = csv.writer(file, delimiter=',', lineterminator='\n') + for key, value in adda_cmdlineargs.items(): + writer.writerow([key, value]) + print_log(f"{cmdline}",dirname) + print_log(f"mp_files: {mp_files}",dirname) + if 'ev_range' in aw_parameters.keys(): + print_log(f"Varying energy from {evs[0]} to {evs[-1]} eV",dirname) + else: + print_log(f"Varying wavelength from {evs[0]} to {evs[-1]} nm",dirname) + cmdlines = [] + for ev in evs: + cmdline_i = cmdline + output_dir = os.path.abspath(dirname + f"/ADDA_output/{float(ev)}") + cmdline_i += f' -dir "{output_dir}"' + if 'ev_range' in aw_parameters.keys(): + cmdline_i += " -lambda %s" % ev_to_nm(ev) + else: + cmdline_i += " -lambda %s" % ev + cmdline_i += " -m " + f" {mps[ev]} " + if 'ms_files' in aw_parameters.keys(): + nk = min(msdata, key=lambda x: abs(x[0] - ev)) + nk = str(nk[1]) + " " + str(nk[2]) + cmdline_i += " -surf " + f" {surfheight} {nk}" + cmdline_i += " > " + os.devnull + cmdlines.append(cmdline_i) + #print(cmdlines) + exec_cmdlines(cmdlines,aw_parameters["parallel_procs"]) + print_log("--- %s seconds" % round((time.time() - start_time),2),dirname) + +def spectrum_collect(match,aw_parameters,silent=False): + dirname = aw_parameters["dirname"] + evs = sorted([float(d.name) for d in os.scandir(f"{dirname}/ADDA_output") if d.is_dir()]) + values = [] + for ev in evs: + values.append(parse_value(f"{dirname}/ADDA_output/{ev}/CrossSec-Y",match)) + with open(f"{dirname}/{match}.csv", 'w') as file: + writer = csv.writer(file, delimiter=',', lineterminator='\n') + if 'ev_range' in aw_parameters.keys(): + writer.writerow(["eV",match]) + else: + writer.writerow(["nm",match]) + writer.writerows(zip(evs,values)) + print_log(f"Saved {dirname}/{match}.csv", silent=silent) + +def spectrum_plot(match,aw_parameters): + dirname = aw_parameters["dirname"] + data = np.genfromtxt(f"{dirname}/{match}.csv", delimiter=',')[1:] + fig,ax = plot_create() + if 'ev_range' in aw_parameters.keys(): + ax.set_xlabel("Energy, eV") + else: + ax.set_xlabel("Wavelength, nm") + #print(data) + ax.plot(data[:,0], data[:,1], label=label_for_plot(match), color=color_for_plot(match), linewidth=3) + ax.set_xlim([min(data[:,0]),max(data[:,0])]) + ax.set_ylabel(label_for_plot(match)) + #ax.legend() + #plot_setaspect(ax) + fig.savefig(f"{dirname}/{match}.png", bbox_inches='tight', dpi=600) + print_log(f"Saved {dirname}/{match}.png") + return fig,ax + +def spectrumline_execute(aw_parameters,adda_cmdlineargs): + dirname = aw_parameters["dirname"] + aw_parameters, adda_cmdlineargs = dict(aw_parameters), dict(adda_cmdlineargs) + start_time = time.time() + shutil.rmtree(dirname, ignore_errors=True) + os.makedirs(dirname, exist_ok=True) + print() + print_log("--- Spectrum for a set of points on a line: executing simulations",dirname) + print_log(f"Number of parallel threads: {aw_parameters['parallel_procs']}",dirname) + mp_files = aw_parameters["mp_files"] + if 'ev_range' in aw_parameters.keys(): + evs = [round(x,2) for x in aw_parameters["ev_range"]] + else: + evs = [round(x,2) for x in aw_parameters["nm_range"]] + mdata = dict() + for i in range(len(mp_files)): + mdata[i] = np.genfromtxt(mp_files[i],delimiter=',') + + mps = dict() + for ev in evs: + mps[ev] = "" + for i in mdata: + nk = min(mdata[i], key=lambda x: abs(x[0] - ev)) + nk = str(nk[1]) + " " + str(nk[2]) + " " + mps[ev] += str(nk) + with open(f"{dirname}/ADDA_cmdlineargs.csv", 'w') as file: + writer = csv.writer(file, delimiter=',', lineterminator='\n') + for key, value in adda_cmdlineargs.items(): + writer.writerow([key, value]) + size = adda_cmdlineargs["size"] + grid = adda_cmdlineargs["grid"] + point1 = aw_parameters["spectrumline_startpoint"] + point2 = aw_parameters["spectrumline_endpoint"] + howmanypoints = aw_parameters["spectrumline_points"] + x_step, y_step = (point2[0]-point1[0])/(howmanypoints-1), (point2[1]-point1[1])/(howmanypoints-1) + #adjusting area so the points are exactly in the middle between the dipoles + d = size/grid #nm + odd = 0.5*(grid % 2) + x0s, y0s = dipole_middles(point1,point2,d,odd) + # print(x0s) + # print(y0s) + points = [] + for i in range(0,howmanypoints): + x0_i = point1[0] + x_step*i + y0_i = point1[1] + y_step*i + x_i = min(x0s, key=lambda val: abs(val - x0_i)) + y_i = min(y0s, key=lambda val: abs(val - y0_i)) + #print(i, x0_i, x_i, y0_i, y_i) + points.append((x_i,y_i)) + points = np.array(points) + #print(points) + + # fig = plt.figure(constrained_layout=True) + # ax = fig.add_subplot(1, 1, 1) + # ax.plot(points[:,0], points[:,1], linewidth=3, marker="o") + # #return + + beam_list = adda_cmdlineargs["beam_center"].split(" ") + delkeys_silent(adda_cmdlineargs, ["lambda","m","beam_center"]) + cmdline = cmdline_construct(aw_parameters,adda_cmdlineargs) + print_log(f"{cmdline}",dirname) + print_log(f"mp_files: {mp_files}",dirname) + print_log(f"dipole size = {d} nm",dirname) + print_log(f"Varying position from {tuple(points[0,:])} nm to {tuple(points[-1,:])} nm ({howmanypoints} points)",dirname) + if 'ev_range' in aw_parameters.keys(): + print_log(f"Varying energy from {evs[0]} to {evs[-1]} eV",dirname) + else: + print_log(f"Varying wavelength from {evs[0]} to {evs[-1]} nm",dirname) + + cmdlines = [] + counter = 0 + for p in points: + counter += 1 + point_dir = f"{dirname}/" + "{:03d}".format(counter) + f"_{p[0]}_{p[1]}" + #print(point_dir) + os.mkdir(point_dir) + os.mkdir(point_dir+"/ADDA_output") + beam_list[0], beam_list[1] = str(p[0]), str(p[1]) + beam_center = (" ").join(beam_list) + #print(beam) + for ev in evs: + cmdline_i = cmdline + cmdline_i += f" -beam_center {beam_center}" + dir_fixed = os.path.abspath(point_dir + f"/ADDA_output/{float(ev)}") + cmdline_i += f' -dir "{dir_fixed}"' + if 'ev_range' in aw_parameters.keys(): + cmdline_i += " -lambda %s" % ev_to_nm(ev) + else: + cmdline_i += " -lambda %s" % ev + cmdline_i += " -m" + f" {mps[ev]} " + cmdline_i += " > " + os.devnull + cmdlines.append(cmdline_i) + exec_cmdlines(cmdlines,aw_parameters["parallel_procs"]) + print_log("--- %s seconds" % round((time.time() - start_time),2),dirname) + +def spectrumline_collect(match, aw_parameters): + dirname = aw_parameters["dirname"] + dirs = sorted([d.name for d in os.scandir(dirname) if d.is_dir()]) + #print(dirs) + points = [] + ys = [] + for dir_i in dirs: + aw_parameters["dirname"] = f"{dirname}/{dir_i}" + spectrum_collect(match,aw_parameters, silent=True) + ys_i = np.genfromtxt(f"{dirname}/{dir_i}/{match}.csv", delimiter=',')[1:,1] + ys.append(ys_i) + points.append(dir_i.split("_")) + aw_parameters["dirname"] = dirname + #points = np.array(points) + #print(points) + xs = np.genfromtxt(f"{dirname}/{dirs[0]}/{match}.csv", delimiter=',')[1:,0] + with open(f"{dirname}/{match}.csv", 'w') as file: + writer = csv.writer(file, delimiter=',', lineterminator='\n') + writer.writerows(zip(["Point no.", "x [nm]", "y [nm]"],*points)) + writer.writerow("-"*(len(points)+1)) + if 'ev_range' in aw_parameters.keys(): + valuenames = ["eV"] + [f'{match}']*len(points) + else: + valuenames = ["nm"] + [f'{match}']*len(points) + + writer.writerow(valuenames) + writer.writerows(zip(xs,*ys)) + print(f"Saved to {dirname}/{match}.csv") + +def spectrumline_plot(match, aw_parameters): + dirname = aw_parameters["dirname"] + #alldata = np.genfromtxt(f"{dirname}/{match}.csv", delimiter=',',dtype=None, encoding=None) + data = np.genfromtxt(f"{dirname}/{match}.csv", delimiter=',') + fig1,ax1 = plot_create() + ax1.set_ylabel(label_for_plot_arbunits(match)) + fig2,ax2 = plot_create() + if 'ev_range' in aw_parameters.keys(): + ax1.set_xlabel("Energy, eV") + ax2.set_xlabel("Energy, eV") + ax1.set_xlabel("Энергия, эВ") + ax2.set_xlabel("Энергия, эВ") + ax1.set_ylabel(r"P$_{\rm EELS}$" + ", п. е.") + ax2.set_ylabel(r"P$_{\rm CL}$" + ", п. е.") + else: + ax1.set_xlabel("Wavelength, nm") + ax2.set_xlabel("Wavelength, nm") + ax1.set_xlabel("Длина волны, нм") + ax2.set_xlabel("Длина волны, нм") + ax1.set_ylabel(r"P$_{\rm CL}$" + ", п. е.") + ax2.set_ylabel(r"P$_{\rm CL}$" + ", п. е.") + ax2.set_ylabel(label_for_plot(match)) + + xs = data[5:,0] + #print(xs) + ys2 = np.zeros(np.shape(data.T[0][5:])) + for point in data.T[1:]: + num = int(point[0]) + ys = point[5:]/max(point[5:]) + .02*num + ys2 += point[5:] + #print(num) + #print(ys) + ax1.plot(xs, ys, color=color_for_plot(match), linewidth=1.5, zorder=(1-0.001*num)) + ax1.fill_between(xs, min(ys), ys, facecolor="white", alpha=.3, zorder=(1-0.001*num)) + ys2 /= num + ax1.set_xlim([min(xs),max(xs)]) + ax2.set_xlim([min(xs),max(xs)]) + ax2.plot(xs, ys2, color=color_for_plot(match), linewidth=3) + #ax1.set_yscale('log') + plot_setaspect(ax1) + plot_setaspect(ax2) + fig1.savefig(f"{dirname}/{match}.png", bbox_inches='tight', dpi=600) + print_log(f"Saved {dirname}/{match}.png") + fig2.savefig(f"{dirname}/{match}_averaged.png", bbox_inches='tight', dpi=600) + print_log(f"Saved {dirname}/{match}_averaged.png") + return fig1,ax1 + +def extrapolation_execute(aw_parameters,adda_cmdlineargs): + dirname = aw_parameters["dirname"] + aw_parameters, adda_cmdlineargs = dict(aw_parameters), dict(adda_cmdlineargs) + start_time = time.time() + shutil.rmtree(dirname, ignore_errors=True) + os.makedirs(dirname, exist_ok=True) + os.makedirs(f"{dirname}/ADDA_output", exist_ok=True) + print() + print_log("--- Extrapolation: executing simulations",dirname) + print_log(f"Number of parallel threads: {aw_parameters['parallel_procs']}",dirname) + mp_files = aw_parameters["mp_files"] + ev = aw_parameters["ev"] + mdata = dict() + for i in range(len(mp_files)): + mdata[i] = np.genfromtxt(mp_files[i],delimiter=',') + mps = dict() + mps[ev] = "" + m_abs = 0 + for i in mdata: + nk = min(mdata[i], key=lambda x: abs(x[0] - ev)) + if m_abs < math.sqrt(float(nk[1])**2 + float(nk[2])**2): + m_abs = math.sqrt(float(nk[1])**2 + float(nk[2])**2) + nk = str(nk[1]) + " " + str(nk[2]) + " " + mps[ev] += str(nk) + " " + + lam = ev_to_nm(ev) + adda_cmdlineargs["lambda"] = lam + adda_cmdlineargs["m"] = f"{mps[ev]}" + size = adda_cmdlineargs["size"] + grid = adda_cmdlineargs["grid"] + y_min = (2*math.pi/lam)*(size/grid)*m_abs #y = k*d*|m| + y_max = 4*y_min + ys = np.exp(np.linspace(math.log(y_min), math.log(y_max), 9)) + grids = np.rint((2*math.pi/lam)*(size/ys)*m_abs).astype(np.int32) + #grids = np.asarray([128, 112, 96, 80, 64, 56, 48, 40, 32]) + del adda_cmdlineargs["grid"] + cmdline = cmdline_construct(aw_parameters,adda_cmdlineargs) + print_log(f"{cmdline}",dirname) + print_log(f"mp_files: {mp_files}",dirname) + print_log(f"ev = {ev}",dirname) + print_log(f"m_p = {mps[ev]}",dirname) + print_log(f"Varying grids: {grids}",dirname) + cmdlines = [] + for i in grids: + cmdline_i = cmdline + dir_fixed = os.path.abspath(dirname + f"/ADDA_output/{i}") + cmdline_i += f' -dir "{dir_fixed}"' + cmdline_i += f" -grid {i}" + cmdline_i += " > " + os.devnull + cmdlines.append(cmdline_i) + exec_cmdlines(cmdlines,aw_parameters["parallel_procs"]) + with open(f"{dirname}/ADDA_cmdlineargs.csv", 'w') as file: + writer = csv.writer(file, delimiter=',', lineterminator='\n') + for key, value in adda_cmdlineargs.items(): + writer.writerow([key, value]) + print_log("--- %s seconds" % round((time.time() - start_time),2),dirname) + +def extrapolation_collect(match, aw_parameters): + dirname = aw_parameters["dirname"] + with open(f"{dirname}/ADDA_cmdlineargs.csv") as file: + reader = csv.reader(file) + adda_cmdlineargs = dict(reader) + m_abs = 0 + mdata = re.split(" +",adda_cmdlineargs["m"]) + print(mdata) + for i in range(int(len(mdata)/2)): + if m_abs < math.sqrt(float(mdata[2*i])**2 + float(mdata[2*i+1])**2): + m_abs = math.sqrt(float(mdata[2*i])**2 + float(mdata[2*i+1])**2) + grids = np.array(sorted([int(d.name) for d in os.scandir(f"{dirname}/ADDA_output") if d.is_dir()])) + values = [] + for grid_i in grids: + values.append(parse_value(f"{dirname}/ADDA_output/{grid_i}/CrossSec-Y",match)) + ys = (2*math.pi/float(adda_cmdlineargs["lambda"]))*(float(adda_cmdlineargs["size"])/grids)*m_abs #y = k*d*|m| + weights = ys**-3 + fit,cov = np.polyfit(ys, values, 2, w=weights, cov=True) + a = np.flip(fit) + error = 2*np.sqrt(np.flip(np.diag(cov))) + with open(f"{dirname}/{match}.csv", 'w') as file: + writer = csv.writer(file, delimiter=',', lineterminator='\n') + writer.writerow(["grids","ys","values"]) + writer.writerows(zip(grids,ys,values)) + print(f"Saved to {dirname}/{match}.csv") + with open(f"{dirname}/{match}_fit.csv", 'w') as file: + writer = csv.writer(file, delimiter=',', lineterminator='\n') + writer.writerow(["a[i]","error[i]"]) + writer.writerows(zip(a,error)) + print(f"Saved to {dirname}/{match}_fit.csv") + +def extrapolation_plot(match, aw_parameters): + dirname = aw_parameters["dirname"] + data = np.genfromtxt(f"{dirname}/{match}.csv",delimiter=',')[1:] + fig,ax = plot_create() + ax.plot(data[:,1], data[:,2], label=label_for_plot(match)+" (simulated)", color=color_for_plot(match), marker="o", markersize=12, linestyle="none", zorder=2) + ys_fitted = np.linspace(data[:,1][0],0,100) + results_fit = np.genfromtxt(f"{dirname}/{match}_fit.csv",delimiter=',')[1:] + a = results_fit[:,0] + error = results_fit[:,1] + points_fitted = a[0] + a[1]*ys_fitted + a[2]*ys_fitted**2 + ax.plot(ys_fitted, points_fitted, label=label_for_plot(match)+" (fit)", color="black", linewidth=3, zorder=3) + ax.errorbar(0, a[0], yerr=error[0], color="black", linestyle="", marker="s", capsize=3, barsabove=True, label = "Confidence interval") + ax.set_xlabel("y = kd|m|") + ax.legend() + plot_setaspect(ax) + plt.savefig(f"{dirname}/{match}.svg", bbox_inches='tight') + print_log(f"Saved {dirname}/{match}.svg") + +def spectrum_with_extrapolation_execute(aw_parameters,adda_cmdlineargs): + dirname = aw_parameters["dirname"] + aw_parameters, adda_cmdlineargs = dict(aw_parameters), dict(adda_cmdlineargs) + start_time = time.time() + shutil.rmtree(dirname, ignore_errors=True) + os.makedirs(dirname,exist_ok=True) + os.makedirs(f"{dirname}/ADDA_output", exist_ok=True) + print() + print_log("--- Spectrum with extrapolation: executing simulations",dirname) + print_log(f"Number of parallel threads: {aw_parameters['parallel_procs']}",dirname) + mp_files = aw_parameters["mp_files"] + evs = [x for x in aw_parameters["ev_range"]] + mdata = dict() + for i in range(len(mp_files)): + mdata[i] = np.genfromtxt(mp_files[i],delimiter=',') + mps = dict() + m_abs = 0 + for ev in evs: + mps[ev] = "" + for i in mdata: + nk = min(mdata[i], key=lambda x: abs(x[0] - ev)) + mre = float(nk[1]) + mim = float(nk[2]) + if m_abs < math.sqrt(mre**2 + mim**2): + m_abs = math.sqrt(mre**2 + mim**2) + maxmre = mre + maxmim = mim + nk = str(nk[1]) + " " + str(nk[2]) + " " + mps[ev] += str(nk) + size = adda_cmdlineargs["size"] + grid = adda_cmdlineargs["grid"] + ev = evs[0] + lam = ev_to_nm(ev) + y_min = (2*math.pi/lam)*(size/grid)*m_abs #y = k*d*|m| + y_max = 4*y_min + ys = np.exp(np.linspace(math.log(y_min), math.log(y_max), 9)) + grids = np.rint((2*math.pi/lam)*(size/ys)*m_abs).astype(np.int32) #using same grids for all ev - they would not change + #grids = np.flip([220,186,156,132,110,92,78,66,56]) + adda_cmdlineargs["lambda"] = lam + adda_cmdlineargs["m"] = f"{maxmre} {maxmim}" + with open(f"{dirname}/ADDA_cmdlineargs.csv", 'w') as file: + writer = csv.writer(file, delimiter=',', lineterminator='\n') + for key, value in adda_cmdlineargs.items(): + writer.writerow([key, value]) + del adda_cmdlineargs["lambda"] + del adda_cmdlineargs["m"] + del adda_cmdlineargs["grid"] + cmdline = cmdline_construct(aw_parameters,adda_cmdlineargs) + print_log(f"{cmdline}",dirname) + print_log(f"mp_files: {mp_files}",dirname) + print_log(f"Varying energy from {evs[0]} to {evs[-1]} eV",dirname) + print_log(f"Varying grids: {grids}",dirname) + cmdlines = [] + for grid_i in grids: + os.mkdir(f"{dirname}/ADDA_output/{grid_i}") + for ev in evs: + cmdline_i = cmdline + dir_fixed = os.path.abspath(dirname + f"/ADDA_output/{grid_i}/{ev}") + cmdline_i += f' -dir "{dir_fixed}"' + cmdline_i += f" -grid {grid_i}" + cmdline_i += " -lambda %s" % ev_to_nm(ev) + cmdline_i += " -m " + f" {mps[ev]} " + cmdline_i += " > " + os.devnull + cmdlines.append(cmdline_i) + exec_cmdlines(cmdlines,aw_parameters["parallel_procs"]) + print_log("--- %s seconds" % round((time.time() - start_time),2),dirname) + +def spectrum_with_extrapolation_collect(match, aw_parameters): + dirname = aw_parameters["dirname"] + with open(f"{dirname}/ADDA_cmdlineargs.csv") as file: + reader = csv.reader(file) + adda_cmdlineargs = dict(reader) + mre = float(adda_cmdlineargs["m"].split(" ")[0]) + mim = float(adda_cmdlineargs["m"].split(" ")[1]) + m_abs = math.sqrt(mre**2 + mim**2) + grids = np.array(sorted([int(d.name) for d in os.scandir(f"{dirname}/ADDA_output") if d.is_dir()])) + evs = sorted([float(d.name) for d in os.scandir(f"{dirname}/ADDA_output/{grids[0]}") if d.is_dir()]) + ys = (2*math.pi/float(adda_cmdlineargs["lambda"]))*(float(adda_cmdlineargs["size"])/grids)*m_abs #y = k*d*|m| + weights = ys**-3 + fit_values = [] + fit_errors = [] + for ev_i in evs: + values = [] + for grid_j in grids: + values.append(parse_value(f"{dirname}/ADDA_output/{grid_j}/{ev_i}/CrossSec-Y",match)) + fit,cov = np.polyfit(ys, values, 2, w=weights, cov=True) + a = np.flip(fit) + error = 2*np.sqrt(np.flip(np.diag(cov))) + fit_values.append(a[0]) + fit_errors.append(error[0]) + with open(f"{dirname}/{match}_fit.csv", 'w') as file: + writer = csv.writer(file, delimiter=',', lineterminator='\n') + writer.writerow(["ev",match,"error"]) + writer.writerows(zip(evs,fit_values,fit_errors)) + print(f"Saved to {dirname}/{match}_fit.csv") + +def spectrum_with_extrapolation_plot(match,aw_parameters): + dirname = aw_parameters["dirname"] + data = np.genfromtxt(f"{dirname}/{match}_fit.csv",delimiter=',')[1:] + fig,ax = plot_create() + ax.plot(data[:,0], data[:,1], label=label_for_plot(match), color=color_for_plot(match), linewidth=3) + ax.fill_between(data[:,0], data[:,1]-data[:,2], data[:,1]+data[:,2], label="Confidence interval", color="blue", alpha=0.2) + ax.set_xlim([min(data[:,0]),max(data[:,0])]) + ax.legend() + plot_setaspect(ax) + plt.savefig(f"{dirname}/{match}_fit.svg", bbox_inches='tight') + print_log(f"Saved {dirname}/{match}_fit.svg") + +def scan_execute(aw_parameters,adda_cmdlineargs): + aw_parameters, adda_cmdlineargs = dict(aw_parameters), dict(adda_cmdlineargs) + dirname = aw_parameters["dirname"] + start_time = time.time() + shutil.rmtree(dirname, ignore_errors=True) + os.makedirs(dirname, exist_ok=True) + os.makedirs(f"{dirname}/ADDA_output", exist_ok=True) + print() + print_log("--- Scan: executing simulations",dirname) + print_log(f"Number of parallel threads: {aw_parameters['parallel_procs']}",dirname) + mp_files = aw_parameters["mp_files"] + if "ev" in aw_parameters.keys(): + ev = aw_parameters["ev"] + adda_cmdlineargs["lambda"] = ev_to_nm(ev) + else: + ev = aw_parameters["nm"] + adda_cmdlineargs["lambda"] = ev + mdata = dict() + for i in range(len(mp_files)): + mdata[i] = np.genfromtxt(mp_files[i],delimiter=',') + mps = dict() + mps[ev] = "" + for i in mdata: + nk = min(mdata[i], key=lambda x: abs(x[0] - ev)) + nk = str(nk[1]) + " " + str(nk[2]) + " " + mps[ev] += str(nk) + " " + adda_cmdlineargs["m"] = f"{mps[ev]}" + if 'ms_files' in aw_parameters.keys(): + surfheight = adda_cmdlineargs["surf"].split(" ")[0] + delkeys_silent(adda_cmdlineargs, ["surf"]) + msdata = np.genfromtxt(aw_parameters["ms_files"][0],delimiter=',') + nk = min(msdata, key=lambda x: abs(x[0] - ev)) + nk = str(nk[1]) + " " + str(nk[2]) + adda_cmdlineargs["surf"] = f"{surfheight} {nk}" + size = adda_cmdlineargs["size"] + grid = adda_cmdlineargs["grid"] + x_left,x_right = aw_parameters["scan_x_range"] + y_bottom,y_top = aw_parameters["scan_y_range"] + step = aw_parameters["scan_step"] + #adjusting area so the points are exactly in the middle between the dipoles + d = size/grid #nm + print_log(f"dipole size = {d} nm",dirname) + odd = 0.5*(grid % 2) + x0s, y0s = dipole_middles((x_left,y_bottom),(x_right,y_top),d,odd) + x0s, y0s = x0s[0::step], y0s[0::step] + # print(x0s) + # print(y0s) + beam_list = adda_cmdlineargs["beam_center"].split(" ") + del adda_cmdlineargs["beam_center"] + cmdline = cmdline_construct(aw_parameters,adda_cmdlineargs) + with open(f"{dirname}/ADDA_cmdlineargs.csv", 'w') as file: + writer = csv.writer(file, delimiter=',', lineterminator='\n') + for key, value in adda_cmdlineargs.items(): + writer.writerow([key, value]) + print_log(f"{cmdline}",dirname) + print_log(f"mp_files: {mp_files}",dirname) + if "ev" in aw_parameters.keys(): + print_log(f"ev = {ev}",dirname) + else: + print_log(f"nm = {ev}",dirname) + + print_log(f"m_p = {mps[ev]}",dirname) + print_log(f"Varying (x_left,x_right) = ({x_left},{x_right}) nm",dirname) + print_log(f"Varying (y_bottom,y_top) = ({y_bottom},{y_top}) nm",dirname) + cmdlines = [] + for x0_i in x0s: + for y0_i in y0s: + cmdline_i = cmdline + dir_fixed = os.path.abspath(dirname + f"/ADDA_output/{x0_i}_{y0_i}") + cmdline_i += f' -dir "{dir_fixed}"' + beam_list[0], beam_list[1] = str(x0_i), str(y0_i) + beam_center = (" ").join(beam_list) + cmdline_i += f" -beam_center {beam_center}" + cmdline_i += " > " + os.devnull + cmdlines.append(cmdline_i) + exec_cmdlines(cmdlines,aw_parameters["parallel_procs"]) + print_log("--- %s seconds" % round((time.time() - start_time),2),dirname) + +def scan_collect(match, aw_parameters): + aw_parameters = dict(aw_parameters) + dirname = aw_parameters["dirname"] + dirs = sorted([d.name for d in os.scandir(f"{dirname}/ADDA_output") if d.is_dir()]) + xs = [] + ys = [] + values = [] + for dir_i in dirs: + xy = dir_i.split("_") + xs.append(float(xy[0])) + ys.append(float(xy[1])) + values.append(parse_value(f"{dirname}/ADDA_output/{dir_i}/CrossSec-Y",match)) + with open(f"{dirname}/{match}.csv", 'w') as file: + writer = csv.writer(file, delimiter=',', lineterminator='\n') + writer.writerow(["x","y",match]) + writer.writerows(zip(xs,ys,values)) + print(f"Saved to {dirname}/{match}.csv") + +def scan_plot(match, aw_parameters, details=True): + aw_parameters = dict(aw_parameters) + dirname = aw_parameters["dirname"] + with open(f"{dirname}/ADDA_cmdlineargs.csv") as file: + reader = csv.reader(file) + adda_cmdlineargs = dict(reader) + size = float(adda_cmdlineargs["size"]) + grid = float(adda_cmdlineargs["grid"]) + data = np.genfromtxt(f"{dirname}/{match}.csv",delimiter=',',dtype=None, encoding=None) + axNames = data[0].astype("str") + data = data[1:].astype("float") + #print(axNames) + xs = data[:,0] + ys = data[:,1] + zs = data[:,2] + Nx = len(np.unique(xs)) + Ny = len(np.unique(ys)) + ind = np.lexsort((xs,ys)) + (x,y,z) = (xs[ind].reshape((Ny, Nx)),ys[ind].reshape((Ny, Nx)),zs[ind].reshape((Ny, Nx))) + # print(x) + # print(y) + # print(z) + fig = plt.figure() + ax = fig.add_subplot(1, 1, 1) + plot_setrcparams() + ax.set_aspect('equal') + d = size/grid + from matplotlib.colors import LogNorm + im = ax.imshow(z, extent=(min(xs)-d/2, max(xs)+d/2, min(ys)-d/2, max(ys)+d/2), origin="lower", cmap="rainbow")#, norm=LogNorm(vmin=0.01, vmax=1)) + #plt.scatter(x, y, c=z, marker="s") # scatter is the most stable function for visualization, so use this for debugging + ax.set_xlabel(f"{axNames[0]}, nm") + ax.set_ylabel(f"{axNames[1]}, nm") + + if details == True: + cbar = fig.colorbar(im) + cbar.set_label(label_for_plot(axNames[2])) + #cbar.formatter.set_powerlimits((0, 0)) + else: + plt.axis('off') + + plt.savefig(f"{dirname}/{match}.png", bbox_inches='tight',dpi=600) + print_log(f"Saved {dirname}/{match}.png") + diff --git a/misc/ADDAwrapper/Csca_default.txt b/misc/ADDAwrapper/Csca_default.txt new file mode 100644 index 00000000..bf08d551 --- /dev/null +++ b/misc/ADDAwrapper/Csca_default.txt @@ -0,0 +1,43 @@ +# Description of the coverage of the whole solid angle for integration +# +# This file should be manually modified by user. +# Program does not assume any symmetries of the particle. Therefore, possible symmetries should be considered by user +# and this can lead to decrease of integration limits + +theta: +# default: min=0;max=180;Jmin=2;Jmax=6;eps=0;equiv=false;periodic=false +min=0 +max=180 +Jmin=2 +Jmax=5 +eps=0 +equiv=false +periodic=false + +phi: +# default: min=0;max=360;Jmin=2;Jmax=5;eps=0;equiv=true;periodic=true +# axysymmmetrical: max=90;equiv=false;Jmax=3 -> discard values of g.x and g.y (consider them zero) +min=0 +max=360 +Jmin=2 +Jmax=3 +eps=0 +equiv=true +periodic=true + +# all angles are specified in degrees +# all values are precalculated; so high 'eps' does not decrease computational time, but may decrease accuracy. +# If eps=0, Jmin is not used. + +# Jmin,Jmax are minimum and maximum numbers of refinement stages +# Nmax = 2^Jmax + 1 +# for those with equiv=true Nmax is effectively less by 1 +# total calls of function <= Nmax_theta * Nmax_phi + +# equiv means whether it is assumed that max and min values are completely equivalent. If true only one of them is +# calculated. + +# periodic means whether function is periodic in the integrated interval. If true trapezoid rule is used; it is possible +# that interval is half of the function period. + +# axysymmetrical <=> particle with z - axis of symmetry diff --git a/misc/ADDAwrapper/Csca_upper_default.txt b/misc/ADDAwrapper/Csca_upper_default.txt new file mode 100644 index 00000000..a5146ee1 --- /dev/null +++ b/misc/ADDAwrapper/Csca_upper_default.txt @@ -0,0 +1,43 @@ +# Description of the coverage of the whole solid angle for integration +# +# This file should be manually modified by user. +# Program does not assume any symmetries of the particle. Therefore, possible symmetries should be considered by user +# and this can lead to decrease of integration limits + +theta: +# default: min=0;max=180;Jmin=2;Jmax=6;eps=0;equiv=false;periodic=false +min=0 +max=90 +Jmin=2 +Jmax=5 +eps=0 +equiv=false +periodic=false + +phi: +# default: min=0;max=360;Jmin=2;Jmax=5;eps=0;equiv=true;periodic=true +# axysymmmetrical: max=90;equiv=false;Jmax=3 -> discard values of g.x and g.y (consider them zero) +min=0 +max=360 +Jmin=2 +Jmax=3 +eps=0 +equiv=true +periodic=true + +# all angles are specified in degrees +# all values are precalculated; so high 'eps' does not decrease computational time, but may decrease accuracy. +# If eps=0, Jmin is not used. + +# Jmin,Jmax are minimum and maximum numbers of refinement stages +# Nmax = 2^Jmax + 1 +# for those with equiv=true Nmax is effectively less by 1 +# total calls of function <= Nmax_theta * Nmax_phi + +# equiv means whether it is assumed that max and min values are completely equivalent. If true only one of them is +# calculated. + +# periodic means whether function is periodic in the integrated interval. If true trapezoid rule is used; it is possible +# that interval is half of the function period. + +# axysymmetrical <=> particle with z - axis of symmetry diff --git a/misc/ADDAwrapper/Csca_upper_integration.txt b/misc/ADDAwrapper/Csca_upper_integration.txt new file mode 100644 index 00000000..e9c76d8d --- /dev/null +++ b/misc/ADDAwrapper/Csca_upper_integration.txt @@ -0,0 +1,43 @@ +# Description of the coverage of the whole solid angle for integration +# +# This file should be manually modified by user. +# Program does not assume any symmetries of the particle. Therefore, possible symmetries should be considered by user +# and this can lead to decrease of integration limits + +theta: +# Only z>0 is considered (theta from 0 to 90) +min=0 +max=90 +Jmin=2 +Jmax=3 +eps=0 +equiv=false +periodic=false + +phi: +# default: min=0;max=360;Jmin=2;Jmax=5;eps=0;equiv=true;periodic=true +# axysymmmetrical: max=90;equiv=false;Jmax=3 -> discard values of g.x and g.y (consider them zero) +min=0 +max=360 +Jmin=2 +Jmax=3 +eps=0 +equiv=true +periodic=true + +# all angles are specified in degrees +# all values are precalculated; so high 'eps' does not decrease computational time, but may decrease accuracy. +# If eps=0, Jmin is not used. + +# Jmin,Jmax are minimum and maximum numbers of refinement stages +# Nmax = 2^Jmax + 1 +# for those with equiv=true Nmax is effectively less by 1 +# total calls of function <= Nmax_theta * Nmax_phi + +# equiv means whether it is assumed that max and min values are completely equivalent. If true only one of them is +# calculated. + +# periodic means whether function is periodic in the integrated interval. If true trapezoid rule is used; it is possible +# that interval is half of the function period. + +# axysymmetrical <=> particle with z - axis of symmetry diff --git a/misc/ADDAwrapper/Readme.txt b/misc/ADDAwrapper/Readme.txt new file mode 100644 index 00000000..bd748915 --- /dev/null +++ b/misc/ADDAwrapper/Readme.txt @@ -0,0 +1,11 @@ +ADDA Wrapper +2021.08 Version 0.6 +2022.02 Version 0.7. Optimized to work under Windows. Added a function "varyany" to vary anyb of the desired variable in ADDA, for example, "mhost" to see how Peels changes when the Cherenkov effect starts. +2022.08 Version 0.8 Added geometry file visualization, supporting different colors for different domains. + +Script performs batch simulations using ADDA. For more info read the following articles. The easiest way to see how it works is to go to /adda/examples/eels/ and run any of the examples. + +For more info read the following articles. +ADDA: Maxim A. Yurkin, "User Manual for the Discrete Dipole Approximation Code ADDA" +EELS and CL: Kichigin & Yurkin, "Simulating electron energy-loss spectroscopy and cathodoluminescence for particles in arbitrary host medium using the discrete dipole approximation" +Extrapolation: Yurkin et al., "Convergence of the discrete dipole approximation. II. An extrapolation technique to increase the accuracy" diff --git a/misc/ADDAwrapper/finish.mp3 b/misc/ADDAwrapper/finish.mp3 new file mode 100644 index 00000000..2b0e431e Binary files /dev/null and b/misc/ADDAwrapper/finish.mp3 differ diff --git a/misc/ADDAwrapper/refractive_index/Ag_JC.csv b/misc/ADDAwrapper/refractive_index/Ag_JC.csv new file mode 100644 index 00000000..cb3f0d7f --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/Ag_JC.csv @@ -0,0 +1,49 @@ +0.64,0.24,14.08 +0.77,0.15,11.85 +0.89,0.13,10.10 +1.02,0.09,8.83 +1.14,0.04,7.80 +1.26,0.04,6.99 +1.39,0.04,6.31 +1.51,0.04,5.73 +1.64,0.03,5.24 +1.76,0.04,4.84 +1.88,0.05,4.48 +2.01,0.06,4.15 +2.13,0.05,3.86 +2.26,0.06,3.59 +2.38,0.05,3.32 +2.5,0.05,3.09 +2.63,0.05,2.87 +2.75,0.04,2.66 +2.88,0.04,2.46 +3,0.05,2.28 +3.12,0.05,2.07 +3.25,0.05,1.86 +3.37,0.07,1.66 +3.5,0.10,1.42 +3.62,0.14,1.14 +3.74,0.17,0.83 +3.87,0.81,0.39 +3.99,1.13,0.62 +4.12,1.34,0.96 +4.24,1.39,1.16 +4.36,1.41,1.26 +4.49,1.41,1.33 +4.61,1.38,1.37 +4.74,1.35,1.39 +4.86,1.33,1.39 +4.98,1.31,1.39 +5.11,1.30,1.38 +5.23,1.28,1.37 +5.36,1.28,1.36 +5.48,1.26,1.34 +5.6,1.25,1.34 +5.73,1.22,1.34 +5.85,1.20,1.33 +5.98,1.18,1.31 +6.1,1.15,1.30 +6.22,1.14,1.28 +6.35,1.12,1.26 +6.47,1.10,1.23 +6.6,1.07,1.21 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/Ag_JHW.csv b/misc/ADDAwrapper/refractive_index/Ag_JHW.csv new file mode 100644 index 00000000..db7ec2f6 --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/Ag_JHW.csv @@ -0,0 +1,170 @@ +0.10,5.08,86.53 +0.15,3.23,59.73 +0.20,1.85,45.26 +0.25,1.23,36.37 +0.30,0.86,30.37 +0.35,0.64,26.05 +0.40,0.50,22.80 +0.45,0.40,20.26 +0.50,0.33,18.23 +0.55,0.27,16.56 +0.60,0.23,15.17 +0.65,0.20,13.98 +0.70,0.17,12.97 +0.75,0.15,12.08 +0.80,0.14,11.31 +0.85,0.13,10.63 +0.90,0.11,10.02 +0.95,0.11,9.47 +1.00,0.10,8.98 +1.05,0.09,8.53 +1.10,0.08,8.13 +1.15,0.08,7.76 +1.20,0.07,7.41 +1.25,0.07,7.10 +1.30,0.07,6.80 +1.35,0.06,6.53 +1.40,0.06,6.28 +1.45,0.06,6.04 +1.50,0.06,5.81 +1.55,0.05,5.61 +1.60,0.05,5.41 +1.65,0.05,5.22 +1.70,0.05,5.05 +1.75,0.05,4.88 +1.80,0.05,4.72 +1.85,0.05,4.57 +1.90,0.05,4.43 +1.95,0.05,4.30 +2.00,0.05,4.16 +2.05,0.05,4.04 +2.10,0.05,3.92 +2.15,0.05,3.80 +2.20,0.05,3.69 +2.25,0.05,3.59 +2.30,0.05,3.48 +2.35,0.05,3.38 +2.40,0.05,3.29 +2.45,0.05,3.20 +2.50,0.05,3.10 +2.55,0.05,3.02 +2.60,0.05,2.93 +2.65,0.05,2.85 +2.70,0.05,2.76 +2.75,0.05,2.68 +2.80,0.05,2.60 +2.85,0.05,2.53 +2.90,0.05,2.45 +2.95,0.05,2.37 +3.00,0.05,2.29 +3.05,0.05,2.22 +3.10,0.05,2.14 +3.15,0.05,2.06 +3.20,0.05,1.98 +3.25,0.05,1.90 +3.30,0.06,1.81 +3.35,0.07,1.73 +3.40,0.08,1.64 +3.45,0.09,1.56 +3.50,0.11,1.47 +3.55,0.12,1.37 +3.60,0.14,1.27 +3.65,0.16,1.16 +3.70,0.19,1.04 +3.75,0.22,0.89 +3.80,0.31,0.65 +3.85,0.62,0.44 +3.90,0.86,0.47 +3.95,1.08,0.54 +4.00,1.27,0.66 +4.05,1.35,0.78 +4.10,1.41,0.89 +4.15,1.43,1.00 +4.20,1.43,1.08 +4.25,1.42,1.14 +4.30,1.40,1.18 +4.35,1.39,1.22 +4.40,1.38,1.25 +4.45,1.37,1.27 +4.50,1.35,1.29 +4.55,1.33,1.30 +4.60,1.32,1.31 +4.65,1.31,1.32 +4.70,1.29,1.33 +4.75,1.28,1.33 +4.80,1.27,1.33 +4.85,1.26,1.33 +4.90,1.25,1.33 +4.95,1.24,1.33 +5.00,1.23,1.33 +5.05,1.22,1.32 +5.10,1.21,1.32 +5.15,1.21,1.31 +5.20,1.20,1.31 +5.25,1.19,1.30 +5.30,1.19,1.30 +5.35,1.19,1.29 +5.40,1.18,1.29 +5.45,1.18,1.29 +5.50,1.17,1.28 +5.55,1.16,1.28 +5.60,1.16,1.28 +5.65,1.15,1.28 +5.70,1.14,1.27 +5.75,1.13,1.27 +5.80,1.12,1.27 +5.85,1.11,1.26 +5.90,1.10,1.26 +5.95,1.09,1.25 +6.00,1.08,1.25 +6.05,1.07,1.24 +6.10,1.05,1.23 +6.42,0.99,1.15 +6.92,0.92,1.01 +7.42,0.91,0.87 +7.92,0.92,0.72 +8.42,1.01,0.60 +8.92,1.11,0.55 +9.42,1.18,0.56 +9.92,1.21,0.57 +10.42,1.23,0.57 +10.92,1.25,0.57 +11.42,1.26,0.58 +11.92,1.27,0.59 +12.42,1.27,0.59 +12.92,1.28,0.61 +13.42,1.28,0.63 +13.92,1.26,0.66 +14.42,1.24,0.68 +14.92,1.20,0.69 +15.42,1.16,0.69 +15.92,1.12,0.67 +16.42,1.09,0.65 +16.92,1.07,0.63 +17.42,1.06,0.61 +17.92,1.05,0.59 +18.42,1.05,0.57 +18.92,1.05,0.56 +19.42,1.05,0.55 +19.92,1.05,0.54 +20.42,1.05,0.54 +20.92,1.06,0.55 +21.42,1.05,0.57 +21.92,1.03,0.60 +22.42,0.98,0.61 +22.92,0.93,0.60 +23.42,0.89,0.57 +23.92,0.87,0.53 +24.42,0.86,0.50 +24.92,0.85,0.47 +25.42,0.85,0.45 +25.92,0.85,0.42 +26.42,0.85,0.40 +26.92,0.85,0.39 +27.42,0.86,0.38 +27.92,0.86,0.37 +28.42,0.85,0.35 +28.92,0.86,0.34 +29.42,0.86,0.33 +29.92,0.86,0.32 +30.42,0.85,0.31 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/Ag_Palik.csv b/misc/ADDAwrapper/refractive_index/Ag_Palik.csv new file mode 100644 index 00000000..888aff15 --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/Ag_Palik.csv @@ -0,0 +1,110 @@ +0.13,13.11,53.7 +0.2,5.36,37 +0.3,2.45,25.1 +0.4,1.39,18.8 +0.5,0.94,15.1 +0.6,0.67,12.6 +0.7,0.56,10.7 +0.8,0.47,9.32 +0.9,0.41,8.37 +1,0.33,8.49 +1.1,0.25,7.67 +1.2,0.23,6.99 +1.3,0.2,6.43 +1.4,0.16,5.95 +1.5,0.15,5.5 +1.6,0.14,5.09 +1.7,0.15,4.74 +1.8,0.14,4.44 +1.9,0.14,4.15 +2,0.13,3.88 +2.1,0.12,3.66 +2.2,0.12,3.45 +2.3,0.13,3.25 +2.4,0.13,3.07 +2.5,0.13,2.88 +2.6,0.13,2.72 +2.7,0.14,2.56 +2.8,0.16,2.4 +2.9,0.16,2.26 +3,0.17,2.11 +3.1,0.17,1.95 +3.2,0.19,1.81 +3.3,0.2,1.67 +3.4,0.19,1.61 +3.5,0.21,1.44 +3.6,0.24,1.24 +3.7,0.29,0.99 +3.8,0.53,0.66 +3.9,0.93,0.5 +4,1.32,0.65 +4.1,1.5,0.88 +4.2,1.52,1.08 +4.3,1.5,1.19 +4.4,1.48,1.26 +4.5,1.44,1.31 +4.6,1.4,1.33 +4.7,1.37,1.35 +4.8,1.34,1.35 +4.9,1.32,1.35 +5,1.3,1.35 +5.2,1.27,1.33 +5.4,1.24,1.31 +5.6,1.21,1.3 +5.8,1.17,1.29 +6,1.13,1.27 +6.2,1.07,1.24 +6.3,1.05,1.21 +6.4,1.03,1.18 +6.6,1,1.13 +6.8,0.97,1.07 +7,0.95,1.01 +7.2,0.94,0.95 +7.4,0.94,0.89 +7.6,0.94,0.83 +7.8,0.94,0.77 +8,0.96,0.71 +8.2,0.99,0.65 +8.4,1.03,0.61 +8.6,1.07,0.58 +8.8,1.11,0.56 +9,1.15,0.55 +9.2,1.18,0.55 +9.7,1.23,0.57 +10,1.24,0.57 +10.3,1.25,0.56 +10.6,1.27,0.56 +10.9,1.28,0.56 +11.2,1.29,0.57 +11.5,1.3,0.57 +11.8,1.3,0.58 +12.1,1.31,0.58 +12.5,1.32,0.59 +13,1.32,0.6 +13.5,1.32,0.63 +14,1.31,0.66 +14.5,1.28,0.68 +15,1.24,0.69 +15.5,1.2,0.69 +16,1.17,0.68 +17,1.12,0.64 +18,1.1,0.59 +19,1.1,0.57 +20,1.1,0.55 +20.5,1.11,0.55 +21,1.11,0.56 +21.5,1.1,0.58 +22,1.08,0.62 +22.5,1.03,0.62 +23,0.98,0.61 +23.5,0.94,0.58 +24.5,0.91,0.52 +25.5,0.89,0.47 +26,0.89,0.44 +26.5,0.89,0.42 +27,0.88,0.4 +27.5,0.85,0.62 +28,0.9,0.59 +28.5,0.91,0.57 +29,0.92,0.57 +30,0.93,0.54 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/Ag_Palik_Garcia.csv b/misc/ADDAwrapper/refractive_index/Ag_Palik_Garcia.csv new file mode 100644 index 00000000..668bafca --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/Ag_Palik_Garcia.csv @@ -0,0 +1,81 @@ +1,0.328999978,8.489999704 +1.05,0.29160511,8.090359391 +1.1,0.251000052,7.670000659 +1.15,0.238823042,7.337881358 +1.2,0.22600001,6.990000143 +1.25,0.212399414,6.715837287 +1.3,0.197999972,6.429999555 +1.35,0.181042737,6.194641663 +1.4,0.163000012,5.949999701 +1.45,0.154234664,5.729418759 +1.5,0.144999991,5.499999974 +1.55,0.143930937,5.298965145 +1.6,0.143000004,5.090000516 +1.65,0.145319077,4.918108705 +1.7,0.147999997,4.739999951 +1.75,0.144053824,4.59245028 +1.8,0.140000008,4.440000104 +1.85,0.139920377,4.297444374 +1.9,0.140000007,4.150000003 +1.95,0.13557469,4.017269012 +2,0.130999989,3.880000094 +2.05,0.126092226,3.771604241 +2.1,0.120999999,3.65999999 +2.15,0.120462279,3.55654917 +2.2,0.119999999,3.450000399 +2.25,0.124310664,3.351482289 +2.3,0.128999993,3.249999909 +2.35,0.129433379,3.161278661 +2.4,0.129999991,3.070000184 +2.45,0.129933886,2.976513796 +2.5,0.129999988,2.880000347 +2.55,0.130918182,2.801138685 +2.6,0.132000011,2.719999811 +2.65,0.137755969,2.641192185 +2.7,0.143999989,2.559999986 +2.75,0.150213751,2.481264188 +2.8,0.157000003,2.400000144 +2.85,0.158384043,2.331042944 +2.9,0.159999995,2.259999942 +2.95,0.16618159,2.186252826 +3,0.172999989,2.109999874 +3.05,0.17286677,2.031564309 +3.1,0.172999996,1.949999956 +3.15,0.182026889,1.881232973 +3.2,0.191999972,1.81000016 +3.25,0.195685286,1.741367492 +3.3,0.199999985,1.669999926 +3.35,0.193096178,1.640270732 +3.4,0.18600003,1.610000038 +3.45,0.196574892,1.527204347 +3.5,0.209000046,1.439999805 +3.55,0.221858987,1.343375893 +3.6,0.237999978,1.240000137 +3.65,0.259000042,1.119999858 +3.7,0.293999806,0.986000652 +3.75,0.37099967,0.813000575 +3.8,0.514777354,0.675192153 +3.85,0.708000387,0.564999839 +3.9,0.931998905,0.504000168 +3.95,1.148999648,0.539999917 +4,1.32300004,0.647000105 +4.05,1.431999501,0.765999419 +4.1,1.496000164,0.882000612 +4.15,1.521999928,0.991999909 +4.2,1.519000026,1.08000012 +4.25,1.509726636,1.135271803 +4.3,1.501999999,1.189999965 +4.35,1.488638599,1.224991661 +4.4,1.476000022,1.259999792 +4.45,1.458289701,1.284885194 +4.5,1.44099999,1.309999898 +4.55,1.422480888,1.319887645 +4.6,1.403999971,1.330000052 +4.65,1.387971405,1.339912334 +4.7,1.371999877,1.350000034 +4.75,1.357538939,1.349961318 +4.8,1.34300013,1.350000041 +4.85,1.331524563,1.349975197 +4.9,1.320000034,1.350000011 +4.95,1.309022425,1.349976922 +5,1.298000021,1.350000032 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/Al_nm_McPeak.csv b/misc/ADDAwrapper/refractive_index/Al_nm_McPeak.csv new file mode 100644 index 00000000..fa93a9d9 --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/Al_nm_McPeak.csv @@ -0,0 +1,297 @@ +150,0.095390828,1.283666394 +155,0.095510386,1.337393822 +160,0.09903925,1.402928641 +165,0.098692838,1.46616516 +170,0.100850207,1.532569987 +175,0.1069563,1.596539899 +180,0.099715746,1.657661977 +185,0.108316112,1.734368006 +190,0.106567769,1.79116071 +195,0.111513266,1.853411775 +200,0.110803374,1.908606137 +205,0.111587326,1.969936987 +210,0.11365555,2.028057589 +215,0.115928445,2.091850713 +220,0.116173424,2.151998203 +225,0.119771906,2.213039835 +230,0.124315543,2.274896559 +235,0.129276519,2.336773934 +240,0.133002743,2.395514502 +245,0.139688588,2.457358928 +250,0.141162655,2.515219055 +255,0.148765766,2.573777623 +260,0.150722638,2.633214255 +265,0.161465056,2.693431077 +270,0.164610587,2.750035753 +275,0.172365826,2.81099804 +280,0.178635303,2.868973784 +285,0.18587018,2.923276881 +290,0.188953314,2.98248275 +295,0.197315218,3.042340102 +300,0.204991638,3.100858199 +305,0.210097266,3.157347124 +310,0.218816718,3.214790935 +315,0.224454799,3.267473023 +320,0.237666454,3.323775766 +325,0.24464928,3.37932734 +330,0.251892832,3.436779015 +335,0.259391824,3.493749292 +340,0.267481852,3.550147397 +345,0.275201252,3.607178361 +350,0.28349792,3.663518946 +355,0.291774119,3.719829584 +360,0.300125667,3.776251503 +365,0.308578012,3.831608068 +370,0.317597538,3.889198914 +375,0.32692637,3.945995546 +380,0.335956002,4.002607455 +385,0.345714203,4.058265431 +390,0.354901676,4.114238107 +395,0.364968364,4.169676475 +400,0.375150842,4.226433266 +405,0.385211589,4.281283449 +410,0.396086448,4.336805792 +415,0.40706511,4.391435073 +420,0.417647849,4.447407079 +425,0.429543735,4.503499508 +430,0.440996226,4.559109307 +435,0.452837879,4.613682059 +440,0.464232752,4.669101846 +445,0.477070026,4.724044433 +450,0.489220122,4.778319404 +455,0.501228231,4.832828338 +460,0.514817248,4.887948117 +465,0.528042125,4.943260916 +470,0.53987657,4.997345967 +475,0.554932886,5.051331558 +480,0.568005038,5.105940631 +485,0.582771419,5.159226931 +490,0.596705366,5.212874187 +495,0.610784373,5.265933683 +500,0.625686295,5.320477736 +505,0.640306464,5.374848125 +510,0.655709839,5.428163169 +515,0.672565753,5.481545831 +520,0.688336416,5.535955836 +525,0.704045108,5.58799423 +530,0.720793584,5.641767754 +535,0.737603948,5.693773756 +540,0.75446839,5.746496546 +545,0.772330366,5.799008035 +550,0.789405353,5.851936501 +555,0.808351698,5.905288517 +560,0.829205097,5.958236408 +565,0.848630853,6.009090973 +570,0.867376853,6.060226283 +575,0.887661988,6.112687118 +580,0.908569739,6.165184423 +585,0.928308533,6.215605902 +590,0.948955518,6.267417058 +595,0.9714896,6.317103137 +600,0.992465612,6.368986418 +605,1.016073317,6.417351867 +610,1.038145667,6.46681888 +615,1.062059906,6.517052343 +620,1.088160063,6.566589093 +625,1.112663572,6.61475776 +630,1.136328574,6.66312559 +635,1.165731637,6.710806975 +640,1.190265203,6.759417967 +645,1.218505245,6.807110623 +650,1.246364405,6.852329839 +655,1.275302761,6.898361917 +660,1.304382818,6.942363757 +665,1.333854457,6.987643931 +670,1.365410391,7.031951759 +675,1.395892303,7.071104251 +680,1.426024482,7.116287362 +685,1.457391234,7.157652493 +690,1.493230683,7.197481356 +695,1.5274935,7.23603734 +700,1.559751729,7.27391404 +705,1.596346402,7.311383032 +710,1.631621525,7.34575992 +715,1.669698976,7.380372258 +720,1.706780893,7.414249862 +725,1.745260386,7.446739811 +730,1.786398844,7.475374294 +735,1.827772224,7.502849546 +740,1.872189153,7.528352557 +745,1.916802427,7.55216072 +750,1.958355454,7.571403838 +755,2.005349601,7.585211073 +760,2.054224115,7.599462923 +765,2.09984451,7.605086914 +770,2.144528834,7.61216158 +775,2.189915668,7.610567038 +780,2.231500036,7.603853787 +785,2.275479945,7.589387919 +790,2.314643646,7.572223927 +795,2.350258044,7.547894599 +800,2.373653298,7.522581337 +805,2.399438967,7.486541749 +810,2.409296598,7.449477169 +815,2.414395973,7.410756231 +820,2.410049326,7.369351244 +825,2.399462094,7.325600203 +830,2.375277499,7.288411569 +835,2.342102357,7.253098886 +840,2.301774531,7.225729444 +845,2.257656113,7.204374444 +850,2.204898553,7.188085811 +855,2.148111401,7.177700369 +860,2.092718783,7.181328004 +865,2.03127715,7.184642431 +870,1.973568962,7.198887028 +875,1.915492386,7.218248477 +880,1.854996083,7.243411521 +885,1.802564727,7.274079983 +890,1.750120449,7.309782595 +895,1.694671727,7.350096072 +900,1.64715608,7.393045594 +905,1.602399525,7.439468008 +910,1.557188172,7.48978204 +915,1.516837858,7.542665118 +920,1.483545494,7.592621895 +925,1.447230511,7.647710517 +930,1.415213787,7.70342976 +935,1.385433286,7.756057335 +940,1.355589911,7.812465936 +945,1.325884954,7.872100794 +950,1.302164463,7.928721983 +955,1.280288795,7.985307721 +960,1.25976713,8.04593147 +965,1.23821822,8.1051949 +970,1.218188621,8.163760378 +975,1.201067407,8.22268587 +980,1.182294465,8.279240316 +985,1.167631515,8.338247019 +990,1.153696234,8.399524689 +995,1.140905235,8.457757667 +1000,1.126639087,8.511598888 +1005,1.114680776,8.571960874 +1010,1.102964941,8.629920722 +1015,1.09358083,8.687515124 +1020,1.08727974,8.74843856 +1025,1.081445553,8.809967337 +1030,1.071397488,8.867857271 +1035,1.061537336,8.920081923 +1040,1.055494597,8.978255334 +1045,1.051806876,9.036830069 +1050,1.043454926,9.083765639 +1055,1.036482441,9.148731926 +1060,1.033133204,9.204040646 +1065,1.02747793,9.264432573 +1070,1.025591906,9.318521275 +1075,1.024418445,9.373122913 +1080,1.020244607,9.42862127 +1085,1.015304156,9.479917855 +1090,1.014378517,9.5368739 +1095,1.011890304,9.593431189 +1100,1.009905005,9.649917519 +1105,1.008451539,9.704482186 +1110,1.005344855,9.750882949 +1115,1.00382405,9.806001363 +1120,1.004294808,9.860152537 +1125,1.003882164,9.917498646 +1130,1.003972742,9.968398129 +1135,1.00500573,10.02382345 +1140,1.002828586,10.07500199 +1145,1.003941179,10.12708734 +1150,1.005317282,10.18335224 +1155,1.003754384,10.23706613 +1160,1.008818757,10.28628773 +1165,1.007932489,10.34146643 +1170,1.008357257,10.39215013 +1175,1.012688334,10.44200832 +1180,1.015213183,10.49336256 +1185,1.014759181,10.5517646 +1190,1.017683803,10.60545522 +1195,1.01813905,10.65817091 +1200,1.021736807,10.70579031 +1205,1.022859293,10.75807795 +1210,1.024257787,10.80782605 +1215,1.026450838,10.85926339 +1220,1.029738722,10.9110202 +1225,1.035047848,10.96181208 +1230,1.038667581,11.01266681 +1235,1.039978895,11.06849385 +1240,1.043389606,11.11569439 +1245,1.046657092,11.16984741 +1250,1.049913391,11.21616325 +1255,1.051297547,11.26655345 +1260,1.056495057,11.31619114 +1265,1.057188404,11.36079431 +1270,1.061492702,11.41081797 +1275,1.066383574,11.47288865 +1280,1.070500901,11.51937378 +1285,1.073080696,11.56250415 +1290,1.078091053,11.61775711 +1295,1.081263285,11.66829595 +1300,1.08667656,11.71967858 +1305,1.090905752,11.7737027 +1310,1.094227716,11.82020872 +1315,1.097106966,11.86438552 +1320,1.104427092,11.91930196 +1325,1.108138114,11.96737106 +1330,1.109282178,12.01542787 +1335,1.112492808,12.06389822 +1340,1.123987022,12.1162431 +1345,1.129233973,12.16532652 +1350,1.132981867,12.21775953 +1355,1.135566133,12.26700903 +1430,1.20897633,12.99198306 +1435,1.215774284,13.0402495 +1440,1.222359347,13.08984959 +1445,1.225637477,13.13438949 +1450,1.232348412,13.19350911 +1455,1.235053048,13.23424936 +1460,1.23989324,13.2825952 +1465,1.245674136,13.32973008 +1470,1.25590184,13.37524914 +1475,1.252421713,13.42119816 +1480,1.265153644,13.46516297 +1485,1.264792932,13.51960433 +1490,1.275023692,13.56523813 +1495,1.277693673,13.61515704 +1500,1.285699173,13.66027168 +1505,1.290149697,13.70964938 +1510,1.296809948,13.75760575 +1515,1.304059962,13.81378197 +1520,1.313924676,13.8577198 +1525,1.31627889,13.90548777 +1530,1.325289614,13.94978109 +1535,1.332565366,13.9955611 +1540,1.338103685,14.0463704 +1545,1.342317392,14.08906725 +1550,1.347399401,14.13278052 +1555,1.354287918,14.18605286 +1560,1.36162657,14.2300396 +1565,1.367953829,14.27204602 +1570,1.374881699,14.33214219 +1575,1.374949427,14.37325593 +1580,1.385662006,14.41873986 +1585,1.390425967,14.47146449 +1590,1.400170689,14.51965833 +1595,1.39786136,14.56653756 +1600,1.400984694,14.60865354 +1605,1.402928097,14.65292487 +1610,1.421414675,14.70647543 +1615,1.424742484,14.75635087 +1620,1.436002763,14.82100212 +1625,1.439358574,14.84862799 +1630,1.44609075,14.8956765 +1635,1.447904247,14.94712102 +1640,1.45643876,14.99170484 +1645,1.458873135,15.02392461 +1650,1.469917493,15.08179888 +1655,1.478177828,15.1223348 +1660,1.474977808,15.17582154 +1665,1.477843053,15.23233469 +1670,1.462292742,15.2773787 +1675,1.425778483,15.34740513 +1680,1.427335087,15.38951869 +1685,1.454908413,15.4724516 +1690,1.514176047,15.49621661 +1695,1.555668449,15.53351552 +1700,1.584018511,15.55632073 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/Au_JC.csv b/misc/ADDAwrapper/refractive_index/Au_JC.csv new file mode 100644 index 00000000..2e6fdbe1 --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/Au_JC.csv @@ -0,0 +1,49 @@ +0.64,0.92,13.78 +0.77,0.56,11.21 +0.89,0.43,9.52 +1.02,0.35,8.15 +1.14,0.27,7.15 +1.26,0.22,6.35 +1.39,0.17,5.66 +1.51,0.16,5.08 +1.64,0.14,4.54 +1.76,0.13,4.10 +1.88,0.14,3.70 +2.01,0.21,3.27 +2.13,0.29,2.86 +2.26,0.43,2.46 +2.38,0.62,2.08 +2.5,1.04,1.83 +2.63,1.31,1.85 +2.75,1.38,1.91 +2.88,1.45,1.95 +3,1.46,1.96 +3.12,1.47,1.95 +3.25,1.46,1.93 +3.37,1.48,1.90 +3.5,1.50,1.87 +3.62,1.48,1.87 +3.74,1.48,1.88 +3.87,1.54,1.90 +3.99,1.53,1.89 +4.12,1.53,1.89 +4.24,1.49,1.88 +4.36,1.47,1.87 +4.49,1.43,1.85 +4.61,1.38,1.80 +4.74,1.35,1.75 +4.86,1.33,1.69 +4.98,1.33,1.63 +5.11,1.32,1.58 +5.23,1.32,1.54 +5.36,1.30,1.50 +5.48,1.31,1.46 +5.6,1.30,1.43 +5.73,1.30,1.39 +5.85,1.30,1.35 +5.98,1.30,1.30 +6.1,1.33,1.28 +6.22,1.33,1.25 +6.35,1.34,1.23 +6.47,1.32,1.20 +6.6,1.28,1.19 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/Au_JHW.csv b/misc/ADDAwrapper/refractive_index/Au_JHW.csv new file mode 100644 index 00000000..8869c54f --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/Au_JHW.csv @@ -0,0 +1,168 @@ +0.10,8.96,84.09 +0.15,4.02,56.47 +0.20,2.26,42.44 +0.25,1.45,33.95 +0.30,1.00,28.27 +0.35,0.74,24.20 +0.40,0.56,21.09 +0.45,0.53,18.72 +0.50,0.43,16.86 +0.55,0.35,15.30 +0.60,0.30,14.00 +0.65,0.25,12.89 +0.70,0.22,11.93 +0.75,0.19,11.08 +0.80,0.19,10.35 +0.85,0.17,9.72 +0.90,0.15,9.14 +0.95,0.13,8.61 +1.00,0.14,8.14 +1.05,0.12,7.72 +1.10,0.11,7.33 +1.15,0.10,6.97 +1.20,0.10,6.63 +1.25,0.10,6.33 +1.30,0.09,6.04 +1.35,0.09,5.77 +1.40,0.09,5.52 +1.45,0.08,5.28 +1.50,0.08,5.05 +1.55,0.08,4.83 +1.60,0.08,4.63 +1.65,0.08,4.43 +1.70,0.08,4.24 +1.75,0.08,4.05 +1.80,0.08,3.87 +1.85,0.10,3.70 +1.90,0.11,3.53 +1.95,0.12,3.37 +2.00,0.14,3.20 +2.05,0.15,3.04 +2.10,0.18,2.88 +2.15,0.21,2.72 +2.20,0.24,2.57 +2.25,0.28,2.41 +2.30,0.33,2.25 +2.35,0.40,2.05 +2.40,0.50,1.85 +2.45,0.66,1.72 +2.50,0.86,1.63 +2.55,1.05,1.53 +2.60,1.27,1.56 +2.65,1.40,1.65 +2.70,1.46,1.74 +2.75,1.46,1.78 +2.80,1.49,1.80 +2.85,1.51,1.80 +2.90,1.53,1.81 +2.95,1.55,1.82 +3.00,1.56,1.83 +3.05,1.57,1.83 +3.10,1.57,1.84 +3.15,1.57,1.83 +3.20,1.57,1.82 +3.25,1.57,1.81 +3.30,1.58,1.80 +3.35,1.58,1.79 +3.40,1.59,1.78 +3.45,1.60,1.77 +3.50,1.61,1.75 +3.55,1.63,1.75 +3.60,1.64,1.75 +3.65,1.66,1.76 +3.70,1.67,1.78 +3.75,1.67,1.80 +3.80,1.66,1.82 +3.85,1.63,1.83 +3.90,1.61,1.83 +3.95,1.59,1.83 +4.00,1.57,1.83 +4.05,1.55,1.82 +4.10,1.54,1.81 +4.15,1.52,1.81 +4.20,1.50,1.80 +4.25,1.49,1.79 +4.30,1.47,1.79 +4.35,1.45,1.79 +4.40,1.43,1.78 +4.45,1.40,1.77 +4.50,1.37,1.76 +4.55,1.35,1.74 +4.60,1.32,1.71 +4.65,1.30,1.68 +4.70,1.29,1.66 +4.75,1.28,1.63 +4.80,1.27,1.61 +4.85,1.25,1.58 +4.90,1.25,1.56 +4.95,1.24,1.53 +5.00,1.24,1.50 +5.05,1.23,1.48 +5.10,1.23,1.46 +5.15,1.23,1.44 +5.20,1.23,1.42 +5.25,1.23,1.40 +5.30,1.23,1.38 +5.35,1.23,1.36 +5.40,1.23,1.35 +5.45,1.23,1.33 +5.50,1.23,1.31 +5.55,1.23,1.30 +5.60,1.23,1.28 +5.65,1.22,1.26 +5.70,1.23,1.24 +5.75,1.23,1.23 +5.80,1.23,1.21 +5.85,1.23,1.20 +5.90,1.24,1.18 +5.95,1.24,1.17 +6.00,1.24,1.15 +6.10,1.25,1.13 +6.51,1.28,1.04 +7.01,1.36,0.96 +7.51,1.41,0.98 +8.01,1.33,0.97 +8.51,1.33,0.89 +9.01,1.32,0.84 +9.51,1.37,0.79 +10.01,1.39,0.81 +10.51,1.37,0.80 +11.01,1.36,0.76 +11.51,1.38,0.73 +12.01,1.42,0.72 +12.51,1.46,0.76 +13.01,1.46,0.83 +13.51,1.40,0.86 +14.01,1.35,0.87 +14.51,1.30,0.86 +15.01,1.27,0.84 +15.51,1.23,0.82 +16.01,1.22,0.80 +16.51,1.21,0.78 +17.01,1.20,0.76 +17.51,1.20,0.75 +18.01,1.20,0.74 +18.51,1.21,0.74 +19.01,1.22,0.75 +19.51,1.22,0.80 +20.01,1.19,0.83 +20.51,1.14,0.86 +21.01,1.08,0.88 +21.51,1.01,0.88 +22.01,0.94,0.86 +22.51,0.88,0.82 +23.01,0.84,0.76 +23.51,0.81,0.70 +24.01,0.80,0.65 +24.51,0.80,0.60 +25.01,0.81,0.56 +25.51,0.83,0.53 +26.01,0.84,0.51 +26.51,0.85,0.49 +27.01,0.86,0.48 +27.51,0.86,0.47 +28.01,0.87,0.47 +28.51,0.87,0.46 +29.01,0.87,0.47 +29.51,0.86,0.46 +30.01,0.84,0.45 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/Au_Palik.csv b/misc/ADDAwrapper/refractive_index/Au_Palik.csv new file mode 100644 index 00000000..2e4b2d47 --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/Au_Palik.csv @@ -0,0 +1,95 @@ +0.13,12.24,54.70 +0.15,9.02,47.60 +0.20,5.42,37.50 +0.25,3.75,30.50 +0.30,2.75,25.40 +0.40,1.73,19.20 +0.50,1.21,15.50 +0.60,0.90,13.00 +0.70,0.70,11.20 +0.80,0.56,9.81 +0.90,0.45,8.77 +1.00,0.37,8.77 +1.10,0.31,7.93 +1.20,0.27,7.07 +1.30,0.24,6.47 +1.40,0.21,5.88 +1.50,0.19,5.39 +1.60,0.17,4.86 +1.70,0.16,4.35 +1.80,0.16,3.80 +1.90,0.17,3.15 +2.20,0.31,2.88 +2.30,0.40,2.54 +2.40,0.61,2.12 +2.50,0.92,1.84 +2.60,1.24,1.80 +2.70,1.43,1.85 +2.80,1.56,1.90 +2.90,1.62,1.94 +3.00,1.64,1.96 +3.10,1.66,1.96 +3.20,1.67,1.94 +3.30,1.70,1.91 +3.40,1.72,1.86 +3.50,1.74,1.85 +3.60,1.77,1.85 +3.70,1.80,1.86 +3.80,1.82,1.88 +3.90,1.84,1.90 +4.00,1.83,1.92 +4.10,1.81,1.92 +4.20,1.78,1.92 +4.30,1.74,1.90 +4.40,1.69,1.88 +4.50,1.65,1.85 +4.60,1.60,1.82 +4.70,1.55,1.78 +4.80,1.50,1.75 +4.90,1.49,1.70 +5.00,1.48,1.64 +5.10,1.48,1.59 +5.20,1.47,1.55 +5.30,1.46,1.51 +5.40,1.45,1.48 +5.50,1.45,1.44 +5.60,1.44,1.42 +5.70,1.44,1.39 +5.80,1.43,1.36 +5.90,1.43,1.33 +6.00,1.42,1.31 +6.53,1.43,1.14 +7.09,1.50,1.07 +8.00,1.45,1.11 +8.98,1.35,1.06 +9.47,1.31,1.03 +10.00,1.28,0.99 +10.51,1.25,0.95 +11.07,1.23,0.91 +11.59,1.22,0.88 +12.04,1.21,0.85 +12.52,1.19,0.83 +13.62,1.10,0.80 +14.42,1.05,0.78 +15.50,1.03,0.75 +16.31,1.03,0.71 +17.22,1.05,0.69 +18.23,1.11,0.69 +19.68,1.15,0.75 +20.00,1.15,0.77 +21.01,1.09,0.83 +21.75,1.02,0.85 +22.54,0.95,0.84 +22.96,0.92,0.83 +23.84,0.87,0.74 +24.31,0.86,0.70 +24.80,0.85,0.65 +25.30,0.85,0.60 +25.83,0.85,0.57 +26.00,0.90,0.68 +26.38,0.86,0.55 +27.00,0.90,0.64 +28.00,0.90,0.61 +29.00,0.91,0.60 +29.50,0.90,0.60 +30.00,0.89,0.60 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/Au_nm_McPeak.csv b/misc/ADDAwrapper/refractive_index/Au_nm_McPeak.csv new file mode 100644 index 00000000..4e6e7588 --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/Au_nm_McPeak.csv @@ -0,0 +1,141 @@ +300,1.699838715,1.973157788 +310,1.746948702,1.974499878 +320,1.782941044,1.959795593 +330,1.804652963,1.931950392 +340,1.804621334,1.896796816 +350,1.763712432,1.870684779 +360,1.713434851,1.887670254 +370,1.689202065,1.922090949 +380,1.678059067,1.948381952 +390,1.672504217,1.966512231 +400,1.665616091,1.973924254 +410,1.653911114,1.975227068 +420,1.63743714,1.970304643 +430,1.612343317,1.959477219 +440,1.581523054,1.940313163 +450,1.538326354,1.910745397 +460,1.475285274,1.872315849 +470,1.386263242,1.827683172 +480,1.252905499,1.782097694 +490,1.064360219,1.76786953 +500,0.848474841,1.828280492 +510,0.661635502,1.964525779 +520,0.52912664,2.129735899 +530,0.438041087,2.294990195 +540,0.372502061,2.451664289 +550,0.323930966,2.597158307 +560,0.284960267,2.738978341 +570,0.254069233,2.871855006 +580,0.228936734,2.999518633 +590,0.207122197,3.1213458 +600,0.188789629,3.241703491 +610,0.172726107,3.356759495 +620,0.160071695,3.465634566 +630,0.14636792,3.577628204 +640,0.135417727,3.685964997 +650,0.125499436,3.792327795 +660,0.117832095,3.896137113 +670,0.111117685,3.999543366 +680,0.105744888,4.102704228 +690,0.101509306,4.205033191 +700,0.098607898,4.305081128 +710,0.097790271,4.403812319 +720,0.098623269,4.499191766 +730,0.096903666,4.59580138 +740,0.099463321,4.687205239 +750,0.098537395,4.78107829 +760,0.099206649,4.872354868 +770,0.101706737,4.958865219 +780,0.101315225,5.051560628 +790,0.103067755,5.148069829 +800,0.10422723,5.223682926 +810,0.105937788,5.313023886 +820,0.104338656,5.407391844 +830,0.104534544,5.49244276 +840,0.107001078,5.577046641 +850,0.111012574,5.659268839 +860,0.11076329,5.749197205 +870,0.112038779,5.830570529 +880,0.114173034,5.912954886 +890,0.116004573,5.992867182 +900,0.116828465,6.081993825 +910,0.116997234,6.163820922 +920,0.11945701,6.241575921 +930,0.120635837,6.328550624 +940,0.122558964,6.410383818 +950,0.124002721,6.491793025 +960,0.123935366,6.573991175 +970,0.126244253,6.662877577 +980,0.127974627,6.73805443 +990,0.129942772,6.819155749 +1000,0.132311724,6.904527963 +1010,0.133907614,6.978318655 +1020,0.135401137,7.061609835 +1030,0.138148809,7.141574413 +1040,0.137937636,7.222466808 +1050,0.139246667,7.302149658 +1060,0.134049061,7.406616579 +1070,0.135717763,7.48280825 +1080,0.140363062,7.556831465 +1090,0.138686104,7.637030433 +1100,0.138418628,7.719336741 +1110,0.139442944,7.79996438 +1120,0.141677831,7.874202982 +1130,0.141308241,7.960965269 +1140,0.140235564,8.050382973 +1150,0.142817756,8.114887363 +1160,0.146729336,8.201495565 +1170,0.152747848,8.26754691 +1180,0.149693183,8.350413645 +1190,0.147906483,8.443510901 +1200,0.149395088,8.515005513 +1210,0.151984867,8.589999965 +1220,0.153423422,8.666864413 +1230,0.153670698,8.744347585 +1240,0.157748208,8.81753279 +1250,0.159662147,8.900982642 +1260,0.165494236,8.987624177 +1270,0.159382324,9.068759713 +1280,0.163849184,9.146521008 +1290,0.166211578,9.226192405 +1300,0.166156462,9.303580384 +1310,0.170115488,9.372456417 +1320,0.169795214,9.445201449 +1330,0.174809869,9.530926424 +1340,0.176209118,9.61244244 +1350,0.179585571,9.687582308 +1360,0.177483381,9.769365402 +1370,0.184295562,9.839357949 +1380,0.186297714,9.916385775 +1390,0.190837556,9.992267959 +1400,0.191102283,10.07156989 +1410,0.194361931,10.14138928 +1420,0.205426553,10.22263176 +1430,0.208361137,10.32150252 +1440,0.206557078,10.37509835 +1450,0.208044,10.46581494 +1460,0.205758558,10.54050931 +1470,0.212405614,10.6421387 +1480,0.216697642,10.70593097 +1490,0.219902453,10.78046182 +1500,0.215398722,10.85893165 +1510,0.21956893,10.91137986 +1520,0.222004156,11.00587506 +1530,0.230589098,11.08617027 +1540,0.235210701,11.16849695 +1550,0.238229889,11.26307034 +1560,0.236761828,11.31706924 +1570,0.235275342,11.38092063 +1580,0.240819258,11.44281407 +1590,0.246290147,11.53172402 +1600,0.243652913,11.64299647 +1610,0.25211538,11.70912303 +1620,0.248830057,11.78354431 +1630,0.264448459,11.86507198 +1640,0.258451056,11.92798378 +1650,0.265882655,12.01168987 +1660,0.278561249,12.06969744 +1670,0.278188678,12.1875916 +1680,0.28090035,12.2404618 +1690,0.290244511,12.34683125 +1700,0.316481841,12.37053599 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/Cu_JC.csv b/misc/ADDAwrapper/refractive_index/Cu_JC.csv new file mode 100644 index 00000000..45ba66b7 --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/Cu_JC.csv @@ -0,0 +1,49 @@ +0.64,1.09,13.43 +0.77,0.76,11.12 +0.89,0.60,9.44 +1.02,0.48,8.25 +1.14,0.36,7.22 +1.26,0.32,6.42 +1.39,0.30,5.77 +1.51,0.26,5.18 +1.64,0.24,4.67 +1.76,0.21,4.21 +1.88,0.22,3.75 +2.01,0.30,3.21 +2.13,0.70,2.70 +2.26,1.02,2.58 +2.38,1.18,2.61 +2.50,1.22,2.56 +2.63,1.25,2.48 +2.75,1.24,2.40 +2.88,1.25,2.31 +3.00,1.28,2.21 +3.12,1.32,2.12 +3.25,1.33,2.05 +3.37,1.36,1.98 +3.50,1.37,1.92 +3.62,1.36,1.86 +3.74,1.34,1.82 +3.87,1.38,1.78 +3.99,1.38,1.73 +4.12,1.40,1.68 +4.24,1.42,1.63 +4.36,1.45,1.63 +4.49,1.46,1.65 +4.61,1.45,1.67 +4.74,1.41,1.69 +4.86,1.41,1.74 +4.98,1.37,1.78 +5.11,1.34,1.80 +5.23,1.28,1.80 +5.36,1.23,1.79 +5.48,1.18,1.77 +5.60,1.13,1.74 +5.73,1.08,1.70 +5.85,1.04,1.65 +5.98,1.01,1.60 +6.10,0.99,1.55 +6.22,0.98,1.49 +6.35,0.97,1.44 +6.47,0.95,1.39 +6.60,0.94,1.34 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/Cu_JHW.csv b/misc/ADDAwrapper/refractive_index/Cu_JHW.csv new file mode 100644 index 00000000..a1fa4d82 --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/Cu_JHW.csv @@ -0,0 +1,169 @@ +0.10,11.18,85.47 +0.15,5.13,58.62 +0.20,2.97,44.35 +0.25,1.92,35.62 +0.30,1.33,29.73 +0.35,0.98,25.48 +0.40,0.75,22.28 +0.45,0.59,19.78 +0.50,0.48,17.78 +0.55,0.40,16.14 +0.60,0.33,14.76 +0.65,0.28,13.59 +0.70,0.24,12.59 +0.75,0.21,11.72 +0.80,0.19,10.95 +0.85,0.16,10.27 +0.90,0.15,9.66 +0.95,0.13,9.11 +1.00,0.12,8.62 +1.05,0.11,8.17 +1.10,0.10,7.76 +1.15,0.09,7.38 +1.20,0.08,7.03 +1.25,0.08,6.70 +1.30,0.07,6.40 +1.35,0.07,6.12 +1.40,0.07,5.85 +1.45,0.06,5.60 +1.50,0.06,5.36 +1.55,0.06,5.13 +1.60,0.06,4.92 +1.65,0.06,4.71 +1.70,0.06,4.51 +1.75,0.07,4.31 +1.80,0.07,4.12 +1.85,0.08,3.94 +1.90,0.09,3.76 +1.95,0.09,3.58 +2.00,0.09,3.38 +2.05,0.10,3.18 +2.10,0.13,2.92 +2.15,0.25,2.62 +2.20,0.52,2.41 +2.25,0.79,2.36 +2.30,0.97,2.41 +2.35,1.05,2.47 +2.40,1.09,2.50 +2.45,1.10,2.50 +2.50,1.12,2.48 +2.55,1.13,2.47 +2.60,1.13,2.45 +2.65,1.14,2.41 +2.70,1.15,2.37 +2.75,1.15,2.34 +2.80,1.17,2.30 +2.85,1.18,2.27 +2.90,1.19,2.24 +2.95,1.19,2.20 +3.00,1.20,2.16 +3.05,1.21,2.11 +3.10,1.24,2.08 +3.15,1.26,2.05 +3.20,1.28,2.04 +3.25,1.28,2.01 +3.30,1.29,1.99 +3.35,1.31,1.96 +3.40,1.32,1.94 +3.45,1.34,1.92 +3.50,1.35,1.90 +3.55,1.36,1.89 +3.60,1.37,1.87 +3.65,1.37,1.86 +3.70,1.38,1.85 +3.75,1.38,1.84 +3.80,1.38,1.81 +3.85,1.38,1.79 +3.90,1.39,1.77 +3.95,1.40,1.75 +4.00,1.40,1.73 +4.05,1.41,1.72 +4.10,1.42,1.70 +4.15,1.44,1.68 +4.20,1.46,1.66 +4.25,1.48,1.65 +4.30,1.51,1.65 +4.35,1.53,1.66 +4.40,1.54,1.66 +4.45,1.55,1.67 +4.50,1.56,1.68 +4.55,1.57,1.69 +4.60,1.58,1.70 +4.65,1.58,1.72 +4.70,1.58,1.73 +4.75,1.58,1.75 +4.80,1.57,1.77 +4.85,1.56,1.79 +4.90,1.55,1.81 +4.95,1.52,1.83 +5.00,1.49,1.84 +5.05,1.46,1.84 +5.10,1.44,1.84 +5.15,1.42,1.85 +5.20,1.39,1.85 +5.25,1.36,1.85 +5.30,1.33,1.84 +5.35,1.30,1.83 +5.40,1.28,1.82 +5.45,1.25,1.81 +5.50,1.23,1.80 +5.55,1.20,1.79 +5.60,1.18,1.77 +5.65,1.16,1.76 +5.70,1.13,1.74 +5.75,1.11,1.72 +5.80,1.09,1.70 +5.85,1.07,1.68 +5.90,1.05,1.65 +5.95,1.04,1.63 +6.00,1.02,1.60 +6.05,1.01,1.57 +6.10,1.01,1.55 +6.42,0.98,1.41 +6.92,0.98,1.23 +7.42,1.02,1.12 +7.92,1.04,1.05 +8.42,1.05,1.00 +8.92,1.04,0.94 +9.42,1.05,0.88 +9.92,1.05,0.83 +10.42,1.07,0.79 +10.92,1.09,0.76 +11.42,1.10,0.74 +11.92,1.11,0.74 +12.42,1.11,0.73 +12.92,1.11,0.73 +13.42,1.10,0.73 +13.92,1.08,0.73 +14.42,1.06,0.72 +14.92,1.04,0.72 +15.42,1.01,0.71 +15.92,0.98,0.69 +16.42,0.96,0.66 +16.92,0.94,0.64 +17.42,0.92,0.61 +17.92,0.91,0.58 +18.42,0.90,0.55 +18.92,0.90,0.52 +19.42,0.90,0.49 +19.92,0.90,0.47 +20.42,0.90,0.44 +20.92,0.91,0.42 +21.42,0.92,0.40 +21.92,0.93,0.39 +22.42,0.94,0.38 +22.92,0.96,0.37 +23.42,0.97,0.37 +23.92,0.98,0.38 +24.42,0.98,0.39 +24.92,0.98,0.40 +25.42,0.97,0.41 +25.92,0.95,0.41 +26.42,0.92,0.41 +26.92,0.90,0.39 +27.42,0.89,0.38 +27.92,0.88,0.36 +28.42,0.87,0.34 +28.92,0.87,0.32 +29.42,0.87,0.30 +29.92,0.87,0.28 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/Cu_Palik.csv b/misc/ADDAwrapper/refractive_index/Cu_Palik.csv new file mode 100644 index 00000000..b3a48e09 --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/Cu_Palik.csv @@ -0,0 +1,66 @@ +0.13,10.80,47.50 +0.30,2.59,22.20 +0.50,1.15,13.20 +0.72,0.70,9.16 +0.88,0.55,7.53 +0.98,0.50,6.78 +1.00,0.43,8.46 +1.50,0.26,5.26 +1.70,0.22,4.43 +1.75,0.21,4.24 +1.80,0.21,4.05 +1.85,0.22,3.86 +1.90,0.21,3.67 +2.00,0.27,3.24 +2.10,0.47,2.81 +2.20,0.83,2.60 +2.30,1.04,2.59 +2.40,1.12,2.60 +2.60,1.15,2.50 +2.80,1.17,2.36 +3.00,1.18,2.21 +3.20,1.18,2.21 +3.40,1.27,1.95 +3.60,1.31,1.87 +3.80,1.34,1.81 +4.00,1.34,1.72 +4.20,1.42,1.64 +4.40,1.49,1.64 +4.60,1.52,1.67 +4.80,1.53,1.71 +5.00,1.47,1.78 +5.20,1.38,1.80 +5.40,1.28,1.78 +5.60,1.18,1.74 +5.80,1.10,1.67 +6.00,1.04,1.59 +6.50,0.96,1.37 +7.00,0.97,1.20 +7.50,1.01,1.09 +8.00,1.03,1.03 +8.50,1.03,0.98 +9.00,1.03,0.92 +9.50,1.03,0.87 +10.00,1.04,0.82 +11.00,1.07,0.75 +12.00,1.09,0.73 +13.00,1.06,0.72 +14.00,1.08,0.72 +14.50,1.03,0.72 +15.00,1.01,0.71 +15.50,0.98,0.70 +16.00,0.95,0.67 +17.00,0.91,0.62 +18.00,0.89,0.56 +19.00,0.88,0.51 +20.00,0.88,0.46 +21.00,0.90,0.41 +22.00,0.92,0.38 +23.00,0.94,0.37 +24.00,0.96,0.37 +25.00,0.96,0.40 +26.00,0.92,0.40 +27.00,0.88,0.38 +28.00,0.86,0.35 +29.00,0.85,0.30 +30.00,0.86,0.26 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/Readme.txt b/misc/ADDAwrapper/refractive_index/Readme.txt new file mode 100644 index 00000000..10b2d88b --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/Readme.txt @@ -0,0 +1,3 @@ +Data is taken from http://jhweaver.matse.illinois.edu/optical-prop/periodic-opticalprop.html +Each string contains ev,n,k +ev - energy in electron-volts, and refractive index of a particle is m_p = n + I*k \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/Ti_nm_Palm2.csv b/misc/ADDAwrapper/refractive_index/Ti_nm_Palm2.csv new file mode 100644 index 00000000..79d4bbbc --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/Ti_nm_Palm2.csv @@ -0,0 +1,685 @@ +226,1.190343,1.096289 +228,1.188528,1.101484 +229,1.186753,1.106461 +231,1.184955,1.111367 +232,1.183112,1.116306 +234,1.181223,1.121359 +236,1.179298,1.126587 +237,1.177357,1.132037 +239,1.175429,1.137744 +240,1.173546,1.143731 +242,1.171744,1.150007 +244,1.170051,1.15657 +245,1.16849,1.163416 +247,1.167085,1.170542 +248,1.165859,1.177939 +250,1.164835,1.185598 +252,1.164037,1.193504 +253,1.163486,1.201643 +255,1.163208,1.209995 +256,1.163229,1.218532 +258,1.163571,1.227211 +260,1.164231,1.235986 +261,1.165202,1.244822 +263,1.166472,1.253689 +264,1.168027,1.26256 +266,1.169853,1.271416 +268,1.171934,1.280235 +269,1.174255,1.289003 +271,1.1768,1.297705 +272,1.179554,1.306329 +274,1.182501,1.314865 +276,1.185627,1.323301 +277,1.188915,1.33163 +279,1.192346,1.339843 +280,1.195904,1.347937 +282,1.199571,1.355909 +284,1.203331,1.363757 +285,1.207165,1.371482 +287,1.211057,1.379085 +288,1.214991,1.386571 +290,1.218948,1.393944 +292,1.222912,1.401211 +293,1.226861,1.408383 +295,1.230774,1.415477 +296,1.234632,1.422527 +298,1.238442,1.42957 +300,1.242216,1.436629 +301,1.245968,1.443724 +303,1.249716,1.450869 +304,1.253476,1.458075 +306,1.257267,1.465348 +307,1.261108,1.472693 +309,1.265015,1.480112 +311,1.26901,1.487605 +312,1.273109,1.495168 +314,1.277334,1.502795 +315,1.281703,1.510478 +317,1.28624,1.518206 +319,1.290969,1.525959 +320,1.295909,1.533699 +322,1.301055,1.54139 +323,1.3064,1.549005 +325,1.31193,1.556521 +327,1.317633,1.563921 +328,1.323494,1.57119 +330,1.329501,1.578316 +331,1.335638,1.585289 +333,1.341891,1.592101 +335,1.348247,1.598746 +336,1.35469,1.605219 +338,1.361209,1.611516 +339,1.367788,1.617635 +341,1.374416,1.623575 +343,1.38108,1.629335 +344,1.387766,1.634917 +346,1.394462,1.640321 +347,1.401155,1.645553 +349,1.407836,1.650619 +351,1.414497,1.655524 +352,1.421131,1.660273 +354,1.427731,1.664872 +355,1.434292,1.669324 +357,1.440808,1.673635 +359,1.447274,1.677809 +360,1.453685,1.68185 +362,1.460035,1.685763 +363,1.466322,1.689551 +365,1.472539,1.693221 +367,1.478682,1.696775 +368,1.484748,1.700218 +370,1.490732,1.703555 +371,1.49663,1.70679 +373,1.502438,1.709929 +375,1.508152,1.712976 +376,1.513766,1.715937 +378,1.519277,1.718817 +379,1.524679,1.721623 +381,1.529966,1.724364 +383,1.535135,1.727054 +384,1.540188,1.729703 +386,1.545128,1.732321 +387,1.549959,1.734915 +389,1.554684,1.737493 +391,1.559307,1.740061 +392,1.563832,1.742624 +394,1.568263,1.745187 +395,1.572604,1.747754 +397,1.576859,1.75033 +398,1.581033,1.752917 +400,1.585129,1.75552 +402,1.589152,1.75814 +403,1.593106,1.76078 +405,1.596995,1.763443 +406,1.600823,1.766129 +408,1.604594,1.768841 +410,1.608311,1.77158 +411,1.61198,1.774346 +413,1.615604,1.77714 +414,1.619187,1.779964 +416,1.622732,1.782816 +418,1.626245,1.785697 +419,1.629729,1.788606 +421,1.633189,1.791542 +422,1.636629,1.794502 +424,1.640051,1.797482 +426,1.643456,1.800479 +427,1.646845,1.803491 +429,1.650218,1.806516 +430,1.653576,1.809552 +432,1.656918,1.812598 +434,1.660245,1.815652 +435,1.663557,1.818713 +437,1.666853,1.821781 +438,1.670133,1.824854 +440,1.673398,1.827932 +442,1.676646,1.831013 +443,1.679878,1.834097 +445,1.683093,1.837184 +446,1.686291,1.840273 +448,1.689471,1.843365 +450,1.692633,1.846457 +451,1.695776,1.849552 +453,1.6989,1.852647 +454,1.702004,1.855744 +456,1.705087,1.858842 +458,1.708149,1.861942 +459,1.71119,1.865043 +461,1.714208,1.868146 +462,1.717202,1.871251 +464,1.720172,1.874358 +465,1.723117,1.877469 +467,1.726036,1.880584 +469,1.728927,1.883704 +470,1.731789,1.886829 +472,1.73462,1.889963 +473,1.73742,1.893108 +475,1.740189,1.896269 +477,1.742927,1.899448 +478,1.745638,1.902646 +480,1.748322,1.905866 +481,1.75098,1.909109 +483,1.753615,1.912377 +485,1.756229,1.915671 +486,1.758822,1.918992 +488,1.761397,1.922341 +489,1.763956,1.925719 +491,1.7665,1.929125 +493,1.76903,1.932562 +494,1.77155,1.936028 +496,1.77406,1.939525 +497,1.776561,1.943053 +499,1.779057,1.946611 +501,1.781548,1.9502 +502,1.784036,1.95382 +504,1.786522,1.957471 +505,1.789008,1.961153 +507,1.791496,1.964864 +509,1.793987,1.968606 +510,1.796482,1.972377 +512,1.798983,1.976178 +513,1.801492,1.980008 +515,1.804009,1.983866 +517,1.806536,1.987752 +518,1.809074,1.991665 +520,1.811625,1.995606 +521,1.81419,1.999572 +523,1.816769,2.003564 +524,1.819366,2.007581 +526,1.821979,2.011621 +528,1.824611,2.015685 +529,1.827263,2.019771 +531,1.829935,2.023878 +532,1.83263,2.028006 +534,1.835349,2.032154 +536,1.838091,2.036319 +537,1.84086,2.040501 +539,1.843656,2.044698 +540,1.846478,2.048908 +542,1.849326,2.053129 +544,1.852203,2.05736 +545,1.855106,2.0616 +547,1.858037,2.065848 +548,1.860994,2.070103 +550,1.863979,2.074363 +552,1.866992,2.078627 +553,1.870031,2.082895 +555,1.873097,2.087165 +556,1.876191,2.091437 +558,1.879311,2.09571 +560,1.882457,2.099982 +561,1.88563,2.104253 +563,1.88883,2.108523 +564,1.892055,2.11279 +566,1.895306,2.117054 +567,1.898583,2.121314 +569,1.901886,2.125569 +571,1.905214,2.129819 +572,1.908566,2.134063 +574,1.911944,2.1383 +575,1.915347,2.14253 +577,1.918773,2.146753 +579,1.922224,2.150967 +580,1.925699,2.155173 +582,1.929198,2.159369 +583,1.93272,2.163555 +585,1.936266,2.167731 +587,1.939834,2.171896 +588,1.943426,2.17605 +590,1.94704,2.180192 +591,1.950676,2.184321 +593,1.954335,2.188438 +595,1.958016,2.192542 +596,1.961719,2.196633 +598,1.965443,2.200709 +599,1.969189,2.204771 +601,1.972956,2.208818 +602,1.976744,2.21285 +604,1.980553,2.216867 +606,1.984382,2.220867 +607,1.988233,2.224852 +609,1.992104,2.228819 +610,1.995995,2.232769 +612,1.999907,2.236702 +614,2.003839,2.240616 +615,2.007791,2.244512 +617,2.011764,2.248389 +618,2.015756,2.252247 +620,2.019769,2.256084 +622,2.023803,2.2599 +623,2.027857,2.263694 +625,2.031931,2.267464 +626,2.036024,2.27121 +628,2.040135,2.274931 +629,2.044265,2.278625 +631,2.048411,2.282294 +633,2.052573,2.285935 +634,2.056751,2.289549 +636,2.060943,2.293135 +637,2.065149,2.296693 +639,2.069368,2.300222 +641,2.0736,2.303723 +642,2.077843,2.307194 +644,2.082098,2.310635 +645,2.086362,2.314047 +647,2.090636,2.317429 +649,2.094919,2.320782 +650,2.099209,2.324104 +652,2.103507,2.327396 +653,2.107812,2.330657 +655,2.112123,2.333889 +656,2.116438,2.33709 +658,2.120759,2.340261 +660,2.125083,2.343401 +661,2.129411,2.346511 +663,2.133742,2.349591 +664,2.138075,2.35264 +666,2.142409,2.35566 +668,2.146744,2.358649 +669,2.15108,2.361609 +671,2.155415,2.364538 +672,2.15975,2.367438 +674,2.164083,2.370308 +676,2.168414,2.373149 +677,2.172743,2.37596 +679,2.177069,2.378742 +680,2.181392,2.381495 +682,2.185711,2.38422 +683,2.190026,2.386916 +685,2.194335,2.389583 +687,2.198639,2.392222 +688,2.202938,2.394833 +690,2.20723,2.397416 +691,2.211515,2.399972 +693,2.215794,2.4025 +695,2.220065,2.405001 +696,2.224327,2.407475 +698,2.228582,2.409923 +699,2.232827,2.412344 +701,2.237064,2.414739 +703,2.241291,2.417108 +704,2.245508,2.419451 +706,2.249714,2.421769 +707,2.25391,2.424061 +709,2.258095,2.426329 +710,2.262268,2.428572 +712,2.266429,2.430791 +714,2.270579,2.432986 +715,2.274715,2.435158 +717,2.278839,2.437305 +718,2.28295,2.43943 +720,2.287047,2.441532 +722,2.29113,2.443611 +723,2.295199,2.445668 +725,2.299253,2.447704 +726,2.303293,2.449718 +728,2.307317,2.45171 +729,2.311326,2.453682 +731,2.315318,2.455633 +733,2.319294,2.457565 +734,2.323254,2.459476 +736,2.327196,2.461369 +737,2.331121,2.463243 +739,2.335027,2.465099 +741,2.338916,2.466938 +742,2.342787,2.468761 +744,2.346639,2.470569 +745,2.350473,2.472361 +747,2.354289,2.474138 +748,2.358088,2.475902 +750,2.361868,2.477651 +752,2.365631,2.479388 +753,2.369375,2.481112 +755,2.373103,2.482824 +756,2.376812,2.484524 +758,2.380505,2.486212 +760,2.38418,2.487889 +761,2.387838,2.489556 +763,2.391479,2.491212 +764,2.395103,2.492857 +766,2.398711,2.494494 +767,2.402302,2.49612 +769,2.405876,2.497738 +771,2.409434,2.499346 +772,2.412976,2.500947 +774,2.416502,2.502538 +775,2.420011,2.504122 +777,2.423506,2.505697 +778,2.426984,2.507265 +780,2.430447,2.508826 +782,2.433895,2.510379 +783,2.437327,2.511925 +785,2.440745,2.513465 +786,2.444147,2.514998 +788,2.447535,2.516525 +790,2.450908,2.518045 +791,2.454267,2.51956 +793,2.457611,2.521069 +794,2.460941,2.522572 +796,2.464257,2.524069 +797,2.467558,2.525561 +799,2.470846,2.527048 +801,2.474121,2.52853 +802,2.477382,2.530007 +804,2.480629,2.53148 +805,2.483864,2.532947 +807,2.487085,2.53441 +808,2.490293,2.535869 +810,2.493488,2.537323 +812,2.49667,2.538774 +813,2.49984,2.54022 +815,2.502997,2.541662 +816,2.506142,2.543101 +818,2.509274,2.544536 +820,2.512394,2.545967 +821,2.515503,2.547395 +823,2.518599,2.548819 +824,2.521683,2.55024 +826,2.524756,2.551658 +827,2.527817,2.553072 +829,2.530867,2.554484 +831,2.533906,2.555892 +832,2.536933,2.557298 +834,2.539949,2.558701 +835,2.542954,2.560101 +837,2.545948,2.561498 +838,2.548932,2.562893 +840,2.551904,2.564285 +842,2.554866,2.565675 +843,2.557818,2.567062 +845,2.560759,2.568447 +846,2.56369,2.569829 +848,2.56661,2.57121 +849,2.569521,2.572588 +851,2.572422,2.573964 +853,2.575312,2.575338 +854,2.578193,2.57671 +856,2.581064,2.578079 +857,2.583925,2.579447 +859,2.586777,2.580813 +860,2.58962,2.582177 +862,2.592453,2.583539 +864,2.595276,2.5849 +865,2.598091,2.586259 +867,2.600896,2.587616 +868,2.603693,2.588971 +870,2.60648,2.590325 +872,2.609259,2.591677 +873,2.612029,2.593027 +875,2.61479,2.594376 +876,2.617543,2.595724 +878,2.620287,2.59707 +879,2.623022,2.598414 +881,2.625749,2.599757 +883,2.628468,2.601099 +884,2.631179,2.602439 +886,2.633881,2.603778 +887,2.636575,2.605116 +889,2.639262,2.606452 +890,2.64194,2.607787 +892,2.644611,2.609121 +894,2.647274,2.610454 +895,2.649928,2.611785 +897,2.652576,2.613115 +898,2.655215,2.614444 +900,2.657847,2.615772 +901,2.660472,2.617099 +903,2.663089,2.618425 +905,2.665699,2.619749 +906,2.668301,2.621073 +908,2.670897,2.622395 +909,2.673485,2.623716 +911,2.676066,2.625036 +912,2.678639,2.626355 +914,2.681206,2.627673 +916,2.683766,2.628991 +917,2.686319,2.630307 +919,2.688865,2.631622 +920,2.691405,2.632936 +922,2.693938,2.634249 +923,2.696464,2.635562 +925,2.698983,2.636873 +926,2.701496,2.638183 +928,2.704002,2.639493 +930,2.706502,2.640801 +931,2.708996,2.642109 +933,2.711483,2.643416 +934,2.713964,2.644722 +936,2.716438,2.646027 +937,2.718906,2.647331 +939,2.721368,2.648634 +941,2.723824,2.649936 +942,2.726274,2.651237 +944,2.728718,2.652538 +945,2.731156,2.653838 +947,2.733588,2.655137 +948,2.736014,2.656435 +950,2.738434,2.657732 +952,2.740848,2.659028 +953,2.743257,2.660324 +955,2.74566,2.661618 +956,2.748057,2.662912 +958,2.750448,2.664206 +959,2.752834,2.665498 +961,2.755214,2.666789 +963,2.757589,2.66808 +964,2.759959,2.669369 +966,2.762322,2.670658 +967,2.764681,2.671946 +969,2.767034,2.673234 +970,2.769382,2.67452 +972,2.771724,2.675806 +973,2.774061,2.677091 +975,2.776392,2.678375 +977,2.778719,2.679658 +978,2.781041,2.68094 +980,2.783357,2.682222 +981,2.785668,2.683503 +983,2.787974,2.684783 +984,2.790275,2.686062 +986,2.792571,2.68734 +988,2.794862,2.688618 +989,2.797148,2.689895 +991,2.799429,2.691171 +992,2.801706,2.692446 +994,2.803977,2.69372 +995,2.806243,2.694993 +997,2.808505,2.696266 +998,2.810762,2.697538 +1011,2.829335,2.708075 +1015,2.834137,2.71082 +1018,2.838919,2.713561 +1022,2.843683,2.7163 +1025,2.848427,2.719036 +1028,2.853153,2.721769 +1032,2.85786,2.724499 +1035,2.862549,2.727226 +1039,2.86722,2.729949 +1042,2.871872,2.73267 +1045,2.876507,2.735388 +1049,2.881124,2.738103 +1052,2.885724,2.740814 +1056,2.890307,2.743523 +1059,2.894872,2.746228 +1062,2.899421,2.74893 +1066,2.903952,2.751629 +1069,2.908467,2.754325 +1073,2.912966,2.757018 +1076,2.917448,2.759707 +1079,2.921913,2.762394 +1083,2.926363,2.765077 +1086,2.930797,2.767756 +1089,2.935214,2.770433 +1093,2.939616,2.773106 +1096,2.944002,2.775776 +1100,2.948372,2.778443 +1103,2.952727,2.781106 +1106,2.957067,2.783766 +1110,2.961391,2.786423 +1113,2.9657,2.789076 +1117,2.969994,2.791727 +1120,2.974272,2.794373 +1124,2.978536,2.797017 +1127,2.982785,2.799657 +1130,2.987018,2.802294 +1134,2.991237,2.804928 +1137,2.995441,2.807558 +1141,2.99963,2.810186 +1144,3.003805,2.81281 +1147,3.007965,2.815431 +1151,3.01211,2.818048 +1154,3.016241,2.820663 +1158,3.020357,2.823275 +1161,3.024458,2.825883 +1164,3.028545,2.828489 +1168,3.032617,2.831091 +1171,3.036674,2.833691 +1175,3.040717,2.836289 +1178,3.044745,2.838883 +1181,3.048758,2.841475 +1185,3.052756,2.844065 +1188,3.056739,2.846654 +1192,3.060707,2.849241 +1195,3.064661,2.851827 +1198,3.0686,2.854413 +1202,3.072526,2.856998 +1205,3.076437,2.859582 +1209,3.080334,2.862166 +1212,3.084219,2.86475 +1216,3.08809,2.867334 +1219,3.091948,2.869919 +1222,3.095794,2.872504 +1226,3.099627,2.875088 +1229,3.103448,2.877674 +1233,3.107258,2.88026 +1236,3.111056,2.882847 +1239,3.114842,2.885434 +1243,3.118617,2.888022 +1246,3.122381,2.89061 +1250,3.126135,2.8932 +1253,3.129878,2.89579 +1257,3.133611,2.898381 +1260,3.137335,2.900972 +1263,3.141048,2.903565 +1267,3.144752,2.906158 +1270,3.148447,2.908752 +1274,3.152132,2.911347 +1277,3.155809,2.913942 +1281,3.159477,2.916538 +1284,3.163136,2.919135 +1287,3.166788,2.921733 +1291,3.170431,2.924331 +1294,3.174067,2.926929 +1298,3.177695,2.929528 +1301,3.181315,2.932128 +1305,3.184928,2.934728 +1308,3.188534,2.937328 +1311,3.192133,2.939929 +1315,3.195726,2.94253 +1318,3.199311,2.945131 +1322,3.202891,2.947732 +1325,3.206464,2.950333 +1329,3.210031,2.952935 +1332,3.213592,2.955536 +1335,3.217148,2.958137 +1339,3.220698,2.960738 +1342,3.224242,2.963338 +1346,3.227781,2.965939 +1349,3.231315,2.968538 +1353,3.234844,2.971138 +1356,3.238368,2.973736 +1359,3.241888,2.976334 +1363,3.245402,2.978931 +1366,3.248913,2.981528 +1370,3.252419,2.984123 +1373,3.255921,2.986717 +1377,3.259418,2.989311 +1380,3.262912,2.991903 +1384,3.266402,2.994494 +1387,3.269888,2.997084 +1390,3.273371,2.999672 +1394,3.27685,3.002259 +1397,3.280326,3.004843 +1401,3.283799,3.007427 +1404,3.287268,3.010009 +1408,3.290735,3.012589 +1411,3.294198,3.015166 +1414,3.297659,3.017742 +1418,3.301117,3.020316 +1421,3.304573,3.022887 +1425,3.308025,3.025456 +1428,3.311476,3.028023 +1432,3.314924,3.030587 +1435,3.31837,3.033149 +1439,3.321814,3.035707 +1442,3.325256,3.038264 +1446,3.328696,3.040817 +1449,3.332134,3.043367 +1452,3.33557,3.045915 +1456,3.339005,3.048459 +1459,3.342438,3.051 +1463,3.34587,3.053538 +1466,3.3493,3.056072 +1470,3.352729,3.058603 +1473,3.356156,3.06113 +1477,3.359583,3.063653 +1480,3.363008,3.066173 +1483,3.366433,3.068689 +1487,3.369856,3.071201 +1490,3.373279,3.073709 +1494,3.376701,3.076212 +1497,3.380123,3.078712 +1501,3.383543,3.081207 +1504,3.386964,3.083697 +1508,3.390384,3.086184 +1511,3.393804,3.088665 +1515,3.397223,3.091141 +1518,3.400643,3.093613 +1521,3.404062,3.096081 +1525,3.407481,3.098542 +1528,3.410901,3.100999 +1532,3.41432,3.103451 +1535,3.41774,3.105897 +1539,3.42116,3.108338 +1542,3.424581,3.110773 +1546,3.428002,3.113203 +1549,3.431423,3.115627 +1553,3.434846,3.118045 +1556,3.438269,3.120458 +1560,3.441693,3.122864 +1563,3.445118,3.125264 +1566,3.448544,3.127658 +1570,3.451971,3.130046 +1573,3.455399,3.132427 +1577,3.458829,3.134801 +1580,3.46226,3.137169 +1584,3.465693,3.13953 +1587,3.469127,3.141884 +1591,3.472563,3.144231 +1594,3.476001,3.146571 +1598,3.479441,3.148904 +1601,3.482882,3.151229 +1605,3.486326,3.153547 +1608,3.489773,3.155857 +1612,3.493221,3.158159 +1615,3.496672,3.160454 +1618,3.500126,3.16274 +1622,3.503582,3.165019 +1625,3.507042,3.167289 +1629,3.510504,3.16955 +1632,3.51397,3.171803 +1636,3.517439,3.174047 +1639,3.520911,3.176282 +1643,3.524387,3.178508 +1646,3.527867,3.180724 +1650,3.531351,3.182931 +1653,3.53484,3.185129 +1657,3.538332,3.187316 +1660,3.541829,3.189494 +1664,3.545332,3.191661 +1667,3.548839,3.193818 +1671,3.552351,3.195964 +1674,3.55587,3.198098 +1678,3.559394,3.200222 +1681,3.562924,3.202333 +1685,3.566462,3.204432 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/const_1.45.csv b/misc/ADDAwrapper/refractive_index/const_1.45.csv new file mode 100644 index 00000000..f020f57c --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/const_1.45.csv @@ -0,0 +1,140 @@ +0.05,1.45,0 +0.1,1.45,0 +0.15,1.45,0 +0.2,1.45,0 +0.25,1.45,0 +0.3,1.45,0 +0.35,1.45,0 +0.4,1.45,0 +0.45,1.45,0 +0.5,1.45,0 +0.55,1.45,0 +0.6,1.45,0 +0.65,1.45,0 +0.7,1.45,0 +0.75,1.45,0 +0.8,1.45,0 +0.85,1.45,0 +0.9,1.45,0 +0.95,1.45,0 +1,1.45,0 +1.05,1.45,0 +1.1,1.45,0 +1.15,1.45,0 +1.2,1.45,0 +1.25,1.45,0 +1.3,1.45,0 +1.35,1.45,0 +1.4,1.45,0 +1.45,1.45,0 +1.5,1.45,0 +1.55,1.45,0 +1.6,1.45,0 +1.65,1.45,0 +1.7,1.45,0 +1.75,1.45,0 +1.8,1.45,0 +1.85,1.45,0 +1.9,1.45,0 +1.95,1.45,0 +2,1.45,0 +2.05,1.45,0 +2.1,1.45,0 +2.15,1.45,0 +2.2,1.45,0 +2.25,1.45,0 +2.3,1.45,0 +2.35,1.45,0 +2.4,1.45,0 +2.45,1.45,0 +2.5,1.45,0 +2.55,1.45,0 +2.6,1.45,0 +2.65,1.45,0 +2.7,1.45,0 +2.75,1.45,0 +2.8,1.45,0 +2.85,1.45,0 +2.9,1.45,0 +2.95,1.45,0 +3,1.45,0 +3.05,1.45,0 +3.1,1.45,0 +3.15,1.45,0 +3.2,1.45,0 +3.25,1.45,0 +3.3,1.45,0 +3.35,1.45,0 +3.4,1.45,0 +3.45,1.45,0 +3.5,1.45,0 +3.55,1.45,0 +3.6,1.45,0 +3.65,1.45,0 +3.7,1.45,0 +3.75,1.45,0 +3.8,1.45,0 +3.85,1.45,0 +3.9,1.45,0 +3.95,1.45,0 +4,1.45,0 +4.05,1.45,0 +4.1,1.45,0 +4.15,1.45,0 +4.2,1.45,0 +4.25,1.45,0 +4.3,1.45,0 +4.35,1.45,0 +4.4,1.45,0 +4.45,1.45,0 +4.5,1.45,0 +4.55,1.45,0 +4.6,1.45,0 +4.65,1.45,0 +4.7,1.45,0 +4.75,1.45,0 +4.8,1.45,0 +4.85,1.45,0 +4.9,1.45,0 +4.95,1.45,0 +5,1.45,0 +5.05,1.45,0 +5.1,1.45,0 +5.15,1.45,0 +5.2,1.45,0 +5.25,1.45,0 +5.3,1.45,0 +5.35,1.45,0 +5.4,1.45,0 +5.45,1.45,0 +5.5,1.45,0 +5.55,1.45,0 +5.6,1.45,0 +5.65,1.45,0 +5.7,1.45,0 +5.75,1.45,0 +5.8,1.45,0 +5.85,1.45,0 +5.9,1.45,0 +5.95,1.45,0 +6,1.45,0 +6.05,1.45,0 +6.1,1.45,0 +6.15,1.45,0 +6.2,1.45,0 +6.25,1.45,0 +6.3,1.45,0 +6.35,1.45,0 +6.4,1.45,0 +6.45,1.45,0 +6.5,1.45,0 +6.55,1.45,0 +6.6,1.45,0 +6.65,1.45,0 +6.7,1.45,0 +6.75,1.45,0 +6.8,1.45,0 +6.85,1.45,0 +6.9,1.45,0 +6.95,1.45,0 +7,1.45,0 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/const_1.5.csv b/misc/ADDAwrapper/refractive_index/const_1.5.csv new file mode 100644 index 00000000..2566ef09 --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/const_1.5.csv @@ -0,0 +1,140 @@ +0.05,1.5,0 +0.1,1.5,0 +0.15,1.5,0 +0.2,1.5,0 +0.25,1.5,0 +0.3,1.5,0 +0.35,1.5,0 +0.4,1.5,0 +0.45,1.5,0 +0.5,1.5,0 +0.55,1.5,0 +0.6,1.5,0 +0.65,1.5,0 +0.7,1.5,0 +0.75,1.5,0 +0.8,1.5,0 +0.85,1.5,0 +0.9,1.5,0 +0.95,1.5,0 +1,1.5,0 +1.05,1.5,0 +1.1,1.5,0 +1.15,1.5,0 +1.2,1.5,0 +1.25,1.5,0 +1.3,1.5,0 +1.35,1.5,0 +1.4,1.5,0 +1.45,1.5,0 +1.5,1.5,0 +1.55,1.5,0 +1.6,1.5,0 +1.65,1.5,0 +1.7,1.5,0 +1.75,1.5,0 +1.8,1.5,0 +1.85,1.5,0 +1.9,1.5,0 +1.95,1.5,0 +2,1.5,0 +2.05,1.5,0 +2.1,1.5,0 +2.15,1.5,0 +2.2,1.5,0 +2.25,1.5,0 +2.3,1.5,0 +2.35,1.5,0 +2.4,1.5,0 +2.45,1.5,0 +2.5,1.5,0 +2.55,1.5,0 +2.6,1.5,0 +2.65,1.5,0 +2.7,1.5,0 +2.75,1.5,0 +2.8,1.5,0 +2.85,1.5,0 +2.9,1.5,0 +2.95,1.5,0 +3,1.5,0 +3.05,1.5,0 +3.1,1.5,0 +3.15,1.5,0 +3.2,1.5,0 +3.25,1.5,0 +3.3,1.5,0 +3.35,1.5,0 +3.4,1.5,0 +3.45,1.5,0 +3.5,1.5,0 +3.55,1.5,0 +3.6,1.5,0 +3.65,1.5,0 +3.7,1.5,0 +3.75,1.5,0 +3.8,1.5,0 +3.85,1.5,0 +3.9,1.5,0 +3.95,1.5,0 +4,1.5,0 +4.05,1.5,0 +4.1,1.5,0 +4.15,1.5,0 +4.2,1.5,0 +4.25,1.5,0 +4.3,1.5,0 +4.35,1.5,0 +4.4,1.5,0 +4.45,1.5,0 +4.5,1.5,0 +4.55,1.5,0 +4.6,1.5,0 +4.65,1.5,0 +4.7,1.5,0 +4.75,1.5,0 +4.8,1.5,0 +4.85,1.5,0 +4.9,1.5,0 +4.95,1.5,0 +5,1.5,0 +5.05,1.5,0 +5.1,1.5,0 +5.15,1.5,0 +5.2,1.5,0 +5.25,1.5,0 +5.3,1.5,0 +5.35,1.5,0 +5.4,1.5,0 +5.45,1.5,0 +5.5,1.5,0 +5.55,1.5,0 +5.6,1.5,0 +5.65,1.5,0 +5.7,1.5,0 +5.75,1.5,0 +5.8,1.5,0 +5.85,1.5,0 +5.9,1.5,0 +5.95,1.5,0 +6,1.5,0 +6.05,1.5,0 +6.1,1.5,0 +6.15,1.5,0 +6.2,1.5,0 +6.25,1.5,0 +6.3,1.5,0 +6.35,1.5,0 +6.4,1.5,0 +6.45,1.5,0 +6.5,1.5,0 +6.55,1.5,0 +6.6,1.5,0 +6.65,1.5,0 +6.7,1.5,0 +6.75,1.5,0 +6.8,1.5,0 +6.85,1.5,0 +6.9,1.5,0 +6.95,1.5,0 +7,1.5,0 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/const_2.csv b/misc/ADDAwrapper/refractive_index/const_2.csv new file mode 100644 index 00000000..99f1de7e --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/const_2.csv @@ -0,0 +1,140 @@ +0.05,2,0 +0.1,2,0 +0.15,2,0 +0.2,2,0 +0.25,2,0 +0.3,2,0 +0.35,2,0 +0.4,2,0 +0.45,2,0 +0.5,2,0 +0.55,2,0 +0.6,2,0 +0.65,2,0 +0.7,2,0 +0.75,2,0 +0.8,2,0 +0.85,2,0 +0.9,2,0 +0.95,2,0 +1,2,0 +1.05,2,0 +1.1,2,0 +1.15,2,0 +1.2,2,0 +1.25,2,0 +1.3,2,0 +1.35,2,0 +1.4,2,0 +1.45,2,0 +1.5,2,0 +1.55,2,0 +1.6,2,0 +1.65,2,0 +1.7,2,0 +1.75,2,0 +1.8,2,0 +1.85,2,0 +1.9,2,0 +1.95,2,0 +2,2,0 +2.05,2,0 +2.1,2,0 +2.15,2,0 +2.2,2,0 +2.25,2,0 +2.3,2,0 +2.35,2,0 +2.4,2,0 +2.45,2,0 +2.5,2,0 +2.55,2,0 +2.6,2,0 +2.65,2,0 +2.7,2,0 +2.75,2,0 +2.8,2,0 +2.85,2,0 +2.9,2,0 +2.95,2,0 +3,2,0 +3.05,2,0 +3.1,2,0 +3.15,2,0 +3.2,2,0 +3.25,2,0 +3.3,2,0 +3.35,2,0 +3.4,2,0 +3.45,2,0 +3.5,2,0 +3.55,2,0 +3.6,2,0 +3.65,2,0 +3.7,2,0 +3.75,2,0 +3.8,2,0 +3.85,2,0 +3.9,2,0 +3.95,2,0 +4,2,0 +4.05,2,0 +4.1,2,0 +4.15,2,0 +4.2,2,0 +4.25,2,0 +4.3,2,0 +4.35,2,0 +4.4,2,0 +4.45,2,0 +4.5,2,0 +4.55,2,0 +4.6,2,0 +4.65,2,0 +4.7,2,0 +4.75,2,0 +4.8,2,0 +4.85,2,0 +4.9,2,0 +4.95,2,0 +5,2,0 +5.05,2,0 +5.1,2,0 +5.15,2,0 +5.2,2,0 +5.25,2,0 +5.3,2,0 +5.35,2,0 +5.4,2,0 +5.45,2,0 +5.5,2,0 +5.55,2,0 +5.6,2,0 +5.65,2,0 +5.7,2,0 +5.75,2,0 +5.8,2,0 +5.85,2,0 +5.9,2,0 +5.95,2,0 +6,2,0 +6.05,2,0 +6.1,2,0 +6.15,2,0 +6.2,2,0 +6.25,2,0 +6.3,2,0 +6.35,2,0 +6.4,2,0 +6.45,2,0 +6.5,2,0 +6.55,2,0 +6.6,2,0 +6.65,2,0 +6.7,2,0 +6.75,2,0 +6.8,2,0 +6.85,2,0 +6.9,2,0 +6.95,2,0 +7,2,0 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/const_nm_1.5.csv b/misc/ADDAwrapper/refractive_index/const_nm_1.5.csv new file mode 100644 index 00000000..d17c52ea --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/const_nm_1.5.csv @@ -0,0 +1,141 @@ +300,1.5000001,0 +310,1.5000001,0 +320,1.5000001,0 +330,1.5000001,0 +340,1.5000001,0 +350,1.5000001,0 +360,1.5000001,0 +370,1.5000001,0 +380,1.5000001,0 +390,1.5000001,0 +400,1.5000001,0 +410,1.5000001,0 +420,1.5000001,0 +430,1.5000001,0 +440,1.5000001,0 +450,1.5000001,0 +460,1.5000001,0 +470,1.5000001,0 +480,1.5000001,0 +490,1.5000001,0 +500,1.5000001,0 +510,1.5000001,0 +520,1.5000001,0 +530,1.5000001,0 +540,1.5000001,0 +550,1.5000001,0 +560,1.5000001,0 +570,1.5000001,0 +580,1.5000001,0 +590,1.5000001,0 +600,1.5000001,0 +610,1.5000001,0 +620,1.5000001,0 +630,1.5000001,0 +640,1.5000001,0 +650,1.5000001,0 +660,1.5000001,0 +670,1.5000001,0 +680,1.5000001,0 +690,1.5000001,0 +700,1.5000001,0 +710,1.5000001,0 +720,1.5000001,0 +730,1.5000001,0 +740,1.5000001,0 +750,1.5000001,0 +760,1.5000001,0 +770,1.5000001,0 +780,1.5000001,0 +790,1.5000001,0 +800,1.5000001,0 +810,1.5000001,0 +820,1.5000001,0 +830,1.5000001,0 +840,1.5000001,0 +850,1.5000001,0 +860,1.5000001,0 +870,1.5000001,0 +880,1.5000001,0 +890,1.5000001,0 +900,1.5000001,0 +910,1.5000001,0 +920,1.5000001,0 +930,1.5000001,0 +940,1.5000001,0 +950,1.5000001,0 +960,1.5000001,0 +970,1.5000001,0 +980,1.5000001,0 +990,1.5000001,0 +1000,1.5000001,0 +1010,1.5000001,0 +1020,1.5000001,0 +1030,1.5000001,0 +1040,1.5000001,0 +1050,1.5000001,0 +1060,1.5000001,0 +1070,1.5000001,0 +1080,1.5000001,0 +1090,1.5000001,0 +1100,1.5000001,0 +1110,1.5000001,0 +1120,1.5000001,0 +1130,1.5000001,0 +1140,1.5000001,0 +1150,1.5000001,0 +1160,1.5000001,0 +1170,1.5000001,0 +1180,1.5000001,0 +1190,1.5000001,0 +1200,1.5000001,0 +1210,1.5000001,0 +1220,1.5000001,0 +1230,1.5000001,0 +1240,1.5000001,0 +1250,1.5000001,0 +1260,1.5000001,0 +1270,1.5000001,0 +1280,1.5000001,0 +1290,1.5000001,0 +1300,1.5000001,0 +1310,1.5000001,0 +1320,1.5000001,0 +1330,1.5000001,0 +1340,1.5000001,0 +1350,1.5000001,0 +1360,1.5000001,0 +1370,1.5000001,0 +1380,1.5000001,0 +1390,1.5000001,0 +1400,1.5000001,0 +1410,1.5000001,0 +1420,1.5000001,0 +1430,1.5000001,0 +1440,1.5000001,0 +1450,1.5000001,0 +1460,1.5000001,0 +1470,1.5000001,0 +1480,1.5000001,0 +1490,1.5000001,0 +1500,1.5000001,0 +1510,1.5000001,0 +1520,1.5000001,0 +1530,1.5000001,0 +1540,1.5000001,0 +1550,1.5000001,0 +1560,1.5000001,0 +1570,1.5000001,0 +1580,1.5000001,0 +1590,1.5000001,0 +1600,1.5000001,0 +1610,1.5000001,0 +1620,1.5000001,0 +1630,1.5000001,0 +1640,1.5000001,0 +1650,1.5000001,0 +1660,1.5000001,0 +1670,1.5000001,0 +1680,1.5000001,0 +1690,1.5000001,0 +1700,1.5000001,0 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/const_nm_2.csv b/misc/ADDAwrapper/refractive_index/const_nm_2.csv new file mode 100644 index 00000000..d65e6f28 --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/const_nm_2.csv @@ -0,0 +1,141 @@ +300,2,0 +310,2,0 +320,2,0 +330,2,0 +340,2,0 +350,2,0 +360,2,0 +370,2,0 +380,2,0 +390,2,0 +400,2,0 +410,2,0 +420,2,0 +430,2,0 +440,2,0 +450,2,0 +460,2,0 +470,2,0 +480,2,0 +490,2,0 +500,2,0 +510,2,0 +520,2,0 +530,2,0 +540,2,0 +550,2,0 +560,2,0 +570,2,0 +580,2,0 +590,2,0 +600,2,0 +610,2,0 +620,2,0 +630,2,0 +640,2,0 +650,2,0 +660,2,0 +670,2,0 +680,2,0 +690,2,0 +700,2,0 +710,2,0 +720,2,0 +730,2,0 +740,2,0 +750,2,0 +760,2,0 +770,2,0 +780,2,0 +790,2,0 +800,2,0 +810,2,0 +820,2,0 +830,2,0 +840,2,0 +850,2,0 +860,2,0 +870,2,0 +880,2,0 +890,2,0 +900,2,0 +910,2,0 +920,2,0 +930,2,0 +940,2,0 +950,2,0 +960,2,0 +970,2,0 +980,2,0 +990,2,0 +1000,2,0 +1010,2,0 +1020,2,0 +1030,2,0 +1040,2,0 +1050,2,0 +1060,2,0 +1070,2,0 +1080,2,0 +1090,2,0 +1100,2,0 +1110,2,0 +1120,2,0 +1130,2,0 +1140,2,0 +1150,2,0 +1160,2,0 +1170,2,0 +1180,2,0 +1190,2,0 +1200,2,0 +1210,2,0 +1220,2,0 +1230,2,0 +1240,2,0 +1250,2,0 +1260,2,0 +1270,2,0 +1280,2,0 +1290,2,0 +1300,2,0 +1310,2,0 +1320,2,0 +1330,2,0 +1340,2,0 +1350,2,0 +1360,2,0 +1370,2,0 +1380,2,0 +1390,2,0 +1400,2,0 +1410,2,0 +1420,2,0 +1430,2,0 +1440,2,0 +1450,2,0 +1460,2,0 +1470,2,0 +1480,2,0 +1490,2,0 +1500,2,0 +1510,2,0 +1520,2,0 +1530,2,0 +1540,2,0 +1550,2,0 +1560,2,0 +1570,2,0 +1580,2,0 +1590,2,0 +1600,2,0 +1610,2,0 +1620,2,0 +1630,2,0 +1640,2,0 +1650,2,0 +1660,2,0 +1670,2,0 +1680,2,0 +1690,2,0 +1700,2,0 \ No newline at end of file diff --git a/misc/ADDAwrapper/refractive_index/graphene_nm_Song.csv b/misc/ADDAwrapper/refractive_index/graphene_nm_Song.csv new file mode 100644 index 00000000..7f483fa4 --- /dev/null +++ b/misc/ADDAwrapper/refractive_index/graphene_nm_Song.csv @@ -0,0 +1,1084 @@ +193,1.168344,2.036747 +194,1.191337,2.044814 +195,1.213306,2.04994 +196,1.233971,2.052392 +197,1.253075,2.052453 +198,1.270393,2.050426 +199,1.285734,2.046631 +200,1.298944,2.041404 +201,1.309912,2.035088 +202,1.31857,2.028031 +203,1.324894,2.020579 +204,1.328902,2.01307 +205,1.330655,2.005826 +206,1.330248,1.999153 +207,1.327814,1.993333 +208,1.323514,1.988618 +209,1.317534,1.985236 +210,1.310079,1.983377 +211,1.301371,1.983204 +212,1.291641,1.984842 +213,1.281125,1.988387 +214,1.270062,1.993901 +215,1.258686,2.001417 +216,1.247225,2.010939 +217,1.235898,2.022444 +218,1.224912,2.03589 +219,1.214456,2.05121 +220,1.204707,2.068322 +221,1.195823,2.087132 +222,1.187943,2.107532 +223,1.181191,2.129408 +224,1.175671,2.152642 +225,1.171474,2.177112 +226,1.168673,2.202696 +227,1.167329,2.229274 +228,1.167489,2.256728 +229,1.169193,2.284944 +230,1.172468,2.313812 +231,1.177337,2.343229 +232,1.183814,2.373095 +233,1.191911,2.403313 +234,1.201635,2.433795 +235,1.21299,2.464454 +236,1.225981,2.495208 +237,1.240609,2.525976 +238,1.256878,2.55668 +239,1.274789,2.587244 +240,1.294347,2.617592 +241,1.315553,2.647646 +242,1.338413,2.677329 +243,1.362931,2.706559 +244,1.389111,2.735253 +245,1.416956,2.763322 +246,1.446469,2.790673 +247,1.477648,2.817208 +248,1.510491,2.842818 +249,1.544987,2.867394 +250,1.581121,2.890814 +251,1.61887,2.912952 +252,1.658197,2.933672 +253,1.699057,2.952834 +254,1.741386,2.970292 +255,1.785106,2.985895 +256,1.830118,2.999492 +257,1.876304,3.010933 +258,1.923519,3.020071 +259,1.971601,3.026769 +260,2.020357,3.030902 +261,2.069578,3.032364 +262,2.119028,3.03107 +263,2.168456,3.026963 +264,2.217594,3.020018 +265,2.266169,3.010244 +266,2.313901,2.99769 +267,2.360516,2.98244 +268,2.405749,2.964622 +269,2.449356,2.944396 +270,2.491115,2.921959 +271,2.530837,2.897533 +272,2.568365,2.871364 +273,2.603582,2.843714 +274,2.63641,2.814852 +275,2.66681,2.785047 +276,2.694781,2.754566 +277,2.720356,2.72366 +278,2.743599,2.692565 +279,2.764601,2.661497 +280,2.783471,2.630649 +281,2.800339,2.600188 +282,2.815342,2.570255 +283,2.828625,2.540969 +284,2.840339,2.512422 +285,2.850629,2.484687 +286,2.85964,2.457814 +287,2.867512,2.431835 +288,2.874375,2.406768 +289,2.880353,2.382617 +290,2.885559,2.359374 +291,2.890096,2.337022 +292,2.894061,2.315536 +293,2.897537,2.294888 +294,2.9006,2.275042 +295,2.903317,2.255961 +296,2.905747,2.237606 +297,2.907942,2.219938 +298,2.909944,2.202914 +299,2.911792,2.186497 +300,2.913519,2.170646 +301,2.915151,2.155323 +302,2.91671,2.140492 +303,2.918216,2.126119 +304,2.919683,2.112169 +305,2.921123,2.098613 +306,2.922544,2.08542 +307,2.923955,2.072564 +308,2.925359,2.06002 +309,2.92676,2.047763 +310,2.92816,2.035773 +311,2.929559,2.024029 +312,2.930956,2.012512 +313,2.932351,2.001207 +314,2.933742,1.990098 +315,2.935125,1.979172 +316,2.936499,1.968415 +317,2.93786,1.957816 +318,2.939204,1.947366 +319,2.94053,1.937054 +320,2.941831,1.926873 +321,2.943106,1.916815 +322,2.944351,1.906874 +323,2.945562,1.897044 +324,2.946736,1.88732 +325,2.94787,1.877698 +326,2.94896,1.868173 +327,2.950003,1.858742 +328,2.950998,1.849403 +329,2.95194,1.840152 +330,2.952828,1.830988 +331,2.95366,1.821909 +332,2.954433,1.812914 +333,2.955146,1.804001 +334,2.955797,1.795169 +335,2.956384,1.786418 +336,2.956906,1.777747 +337,2.957362,1.769157 +338,2.957751,1.760646 +339,2.958072,1.752215 +340,2.958325,1.743864 +341,2.958508,1.735593 +342,2.958623,1.727402 +343,2.958668,1.719292 +344,2.958643,1.711263 +345,2.958548,1.703315 +346,2.958384,1.695449 +347,2.958152,1.687666 +348,2.95785,1.679966 +349,2.95748,1.672349 +350,2.957043,1.664817 +351,2.956538,1.657369 +352,2.955968,1.650006 +353,2.955333,1.642729 +354,2.954633,1.635538 +355,2.953869,1.628434 +356,2.953043,1.621418 +357,2.952157,1.614488 +358,2.95121,1.607647 +359,2.950205,1.600894 +360,2.949142,1.59423 +361,2.948022,1.587655 +362,2.946848,1.58117 +363,2.94562,1.574774 +364,2.94434,1.568468 +365,2.94301,1.562252 +366,2.94163,1.556126 +367,2.940202,1.550091 +368,2.938728,1.544145 +369,2.937209,1.538291 +370,2.935647,1.532526 +371,2.934043,1.526853 +372,2.932398,1.521269 +373,2.930715,1.515775 +374,2.928994,1.510372 +375,2.927238,1.505058 +376,2.925447,1.499834 +377,2.923623,1.494699 +378,2.921768,1.489653 +379,2.919883,1.484695 +380,2.917969,1.479827 +381,2.916029,1.475046 +382,2.914063,1.470352 +383,2.912073,1.465746 +384,2.91006,1.461226 +385,2.908026,1.456792 +386,2.905972,1.452444 +387,2.903899,1.448181 +388,2.90181,1.444002 +389,2.899704,1.439907 +390,2.897584,1.435895 +391,2.89545,1.431965 +392,2.893304,1.428118 +393,2.891148,1.424351 +394,2.888982,1.420666 +395,2.886807,1.417059 +396,2.884625,1.413532 +397,2.882437,1.410083 +398,2.880243,1.406712 +399,2.878046,1.403417 +400,2.875846,1.400198 +401,2.873644,1.397054 +402,2.871441,1.393984 +403,2.869238,1.390987 +404,2.867037,1.388064 +405,2.864837,1.385211 +406,2.86264,1.38243 +407,2.860447,1.379719 +408,2.858259,1.377076 +409,2.856076,1.374502 +410,2.853899,1.371995 +411,2.85173,1.369555 +412,2.849568,1.36718 +413,2.847415,1.36487 +414,2.845272,1.362623 +415,2.843138,1.360439 +416,2.841015,1.358317 +417,2.838903,1.356256 +418,2.836804,1.354255 +419,2.834717,1.352314 +420,2.832642,1.35043 +421,2.830582,1.348604 +422,2.828536,1.346835 +423,2.826504,1.345121 +424,2.824487,1.343462 +425,2.822487,1.341856 +426,2.820502,1.340304 +427,2.818534,1.338803 +428,2.816582,1.337353 +429,2.814649,1.335954 +430,2.812732,1.334604 +431,2.810834,1.333303 +432,2.808954,1.332049 +433,2.807093,1.330842 +434,2.805251,1.329681 +435,2.803428,1.328565 +436,2.801624,1.327494 +437,2.79984,1.326466 +438,2.798077,1.32548 +439,2.796333,1.324536 +440,2.79461,1.323634 +441,2.792907,1.322771 +442,2.791225,1.321948 +443,2.789564,1.321163 +444,2.787925,1.320417 +445,2.786305,1.319707 +446,2.784708,1.319034 +447,2.783132,1.318396 +448,2.781577,1.317794 +449,2.780044,1.317225 +450,2.778532,1.31669 +451,2.777042,1.316187 +452,2.775574,1.315717 +453,2.774128,1.315278 +454,2.772703,1.314869 +455,2.7713,1.314491 +456,2.769918,1.314141 +457,2.768559,1.313821 +458,2.767221,1.313528 +459,2.765905,1.313263 +460,2.764611,1.313025 +461,2.763338,1.312812 +462,2.762087,1.312625 +463,2.760857,1.312463 +464,2.759649,1.312326 +465,2.758462,1.312212 +466,2.757296,1.312122 +467,2.756152,1.312054 +468,2.755028,1.312008 +469,2.753926,1.311983 +470,2.752845,1.31198 +471,2.751784,1.311998 +472,2.750745,1.312035 +473,2.749725,1.312092 +474,2.748726,1.312167 +475,2.747748,1.312262 +476,2.746789,1.312374 +477,2.745851,1.312504 +478,2.744933,1.312651 +479,2.744034,1.312815 +480,2.743155,1.312995 +481,2.742296,1.313191 +482,2.741455,1.313402 +483,2.740634,1.313628 +484,2.739832,1.313869 +485,2.739048,1.314124 +486,2.738284,1.314392 +487,2.737538,1.314674 +488,2.73681,1.31497 +489,2.7361,1.315277 +490,2.735408,1.315598 +491,2.734734,1.31593 +492,2.734078,1.316273 +493,2.733439,1.316628 +494,2.732817,1.316994 +495,2.732212,1.317371 +496,2.731624,1.317758 +497,2.731053,1.318155 +498,2.730499,1.318561 +499,2.729961,1.318977 +500,2.729439,1.319402 +501,2.728932,1.319836 +502,2.728442,1.320279 +503,2.727967,1.32073 +504,2.727508,1.321189 +505,2.727064,1.321656 +506,2.726635,1.32213 +507,2.72622,1.322612 +508,2.725821,1.3231 +509,2.725436,1.323596 +510,2.725065,1.324098 +511,2.724708,1.324607 +512,2.724365,1.325121 +513,2.724036,1.325642 +514,2.723721,1.326169 +515,2.723418,1.326701 +516,2.72313,1.327238 +517,2.722854,1.327781 +518,2.72259,1.328329 +519,2.72234,1.328882 +520,2.722102,1.329439 +521,2.721876,1.33 +522,2.721663,1.330567 +523,2.721461,1.331137 +524,2.721271,1.331711 +525,2.721093,1.332289 +526,2.720926,1.332871 +527,2.72077,1.333457 +528,2.720626,1.334046 +529,2.720492,1.334638 +530,2.720369,1.335233 +531,2.720257,1.335832 +532,2.720155,1.336433 +533,2.720063,1.337037 +534,2.719981,1.337644 +535,2.71991,1.338254 +536,2.719848,1.338866 +537,2.719795,1.33948 +538,2.719753,1.340097 +539,2.719719,1.340716 +540,2.719695,1.341337 +541,2.71968,1.341959 +542,2.719673,1.342584 +543,2.719675,1.343211 +544,2.719686,1.343839 +545,2.719705,1.344469 +546,2.719732,1.345101 +547,2.719768,1.345733 +548,2.719811,1.346368 +549,2.719862,1.347004 +550,2.719922,1.347641 +551,2.719988,1.348279 +552,2.720062,1.348918 +553,2.720143,1.349558 +554,2.720232,1.3502 +555,2.720327,1.350842 +556,2.72043,1.351486 +557,2.720539,1.35213 +558,2.720655,1.352775 +559,2.720777,1.35342 +560,2.720906,1.354067 +561,2.721041,1.354714 +562,2.721182,1.355362 +563,2.72133,1.35601 +564,2.721483,1.356659 +565,2.721642,1.357308 +566,2.721807,1.357958 +567,2.721977,1.358608 +568,2.722153,1.359259 +569,2.722334,1.35991 +570,2.72252,1.360561 +571,2.722712,1.361213 +572,2.722909,1.361865 +573,2.72311,1.362517 +574,2.723317,1.363169 +575,2.723528,1.363822 +576,2.723744,1.364475 +577,2.723964,1.365128 +578,2.72419,1.365781 +579,2.724419,1.366434 +580,2.724652,1.367087 +581,2.72489,1.367741 +582,2.725132,1.368394 +583,2.725378,1.369048 +584,2.725627,1.369702 +585,2.725881,1.370355 +586,2.726138,1.371009 +587,2.726399,1.371663 +588,2.726664,1.372316 +589,2.726932,1.37297 +590,2.727203,1.373624 +591,2.727478,1.374277 +592,2.727756,1.374931 +593,2.728037,1.375585 +594,2.728322,1.376239 +595,2.728609,1.376892 +596,2.728899,1.377546 +597,2.729192,1.378199 +598,2.729489,1.378853 +599,2.729787,1.379506 +600,2.730089,1.38016 +601,2.730393,1.380813 +602,2.730699,1.381467 +603,2.731009,1.38212 +604,2.73132,1.382773 +605,2.731634,1.383426 +606,2.73195,1.38408 +607,2.732268,1.384733 +608,2.732589,1.385386 +609,2.732911,1.386039 +610,2.733236,1.386692 +611,2.733563,1.387345 +612,2.733891,1.387998 +613,2.734222,1.388652 +614,2.734554,1.389305 +615,2.734888,1.389958 +616,2.735224,1.390611 +617,2.735561,1.391264 +618,2.7359,1.391918 +619,2.736241,1.392571 +620,2.736583,1.393224 +621,2.736927,1.393878 +622,2.737272,1.394531 +623,2.737618,1.395185 +624,2.737966,1.395839 +625,2.738315,1.396492 +626,2.738666,1.397146 +627,2.739017,1.3978 +628,2.73937,1.398454 +629,2.739724,1.399109 +630,2.740079,1.399763 +631,2.740434,1.400418 +632,2.740792,1.401073 +633,2.741149,1.401728 +634,2.741508,1.402383 +635,2.741868,1.403038 +636,2.742229,1.403694 +637,2.74259,1.40435 +638,2.742952,1.405006 +639,2.743315,1.405662 +640,2.743679,1.406319 +641,2.744043,1.406976 +642,2.744408,1.407633 +643,2.744774,1.408291 +644,2.74514,1.408948 +645,2.745507,1.409607 +646,2.745874,1.410265 +647,2.746242,1.410924 +648,2.74661,1.411583 +649,2.746979,1.412243 +650,2.747348,1.412903 +651,2.747718,1.413563 +652,2.748088,1.414224 +653,2.748458,1.414886 +654,2.748829,1.415547 +655,2.7492,1.41621 +656,2.749571,1.416872 +657,2.749942,1.417536 +658,2.750314,1.418199 +659,2.750685,1.418864 +660,2.751057,1.419528 +661,2.75143,1.420194 +662,2.751802,1.42086 +663,2.752175,1.421526 +664,2.752547,1.422193 +665,2.75292,1.422861 +666,2.753292,1.423529 +667,2.753665,1.424198 +668,2.754038,1.424867 +669,2.754411,1.425537 +670,2.754783,1.426208 +671,2.755156,1.42688 +672,2.755529,1.427552 +673,2.755901,1.428224 +674,2.756274,1.428898 +675,2.756646,1.429572 +676,2.757019,1.430247 +677,2.757391,1.430923 +678,2.757763,1.4316 +679,2.758135,1.432277 +680,2.758507,1.432955 +681,2.758878,1.433634 +682,2.75925,1.434314 +683,2.759621,1.434994 +684,2.759992,1.435676 +685,2.760363,1.436358 +686,2.760734,1.437041 +687,2.761104,1.437725 +688,2.761474,1.43841 +689,2.761844,1.439095 +690,2.762214,1.439782 +691,2.762583,1.44047 +692,2.762952,1.441158 +693,2.763321,1.441848 +694,2.76369,1.442538 +695,2.764058,1.44323 +696,2.764426,1.443922 +697,2.764793,1.444615 +698,2.76516,1.44531 +699,2.765527,1.446005 +700,2.765893,1.446701 +701,2.76626,1.447399 +702,2.766625,1.448097 +703,2.766991,1.448797 +704,2.767356,1.449497 +705,2.767721,1.450199 +706,2.768085,1.450902 +707,2.768449,1.451606 +708,2.768812,1.452311 +709,2.769176,1.453017 +710,2.769538,1.453724 +711,2.769901,1.454432 +712,2.770262,1.455142 +713,2.770624,1.455853 +714,2.770985,1.456564 +715,2.771346,1.457277 +716,2.771706,1.457992 +717,2.772066,1.458707 +718,2.772425,1.459424 +719,2.772784,1.460142 +720,2.773143,1.460861 +721,2.773501,1.461581 +722,2.773859,1.462302 +723,2.774216,1.463025 +724,2.774573,1.463749 +725,2.774929,1.464475 +726,2.775285,1.465201 +727,2.77564,1.465929 +728,2.775996,1.466658 +729,2.77635,1.467389 +730,2.776705,1.468121 +731,2.777058,1.468854 +732,2.777412,1.469588 +733,2.777765,1.470324 +734,2.778117,1.471061 +735,2.778469,1.4718 +736,2.778821,1.472539 +737,2.779171,1.473281 +738,2.779522,1.474023 +739,2.779872,1.474767 +740,2.780222,1.475513 +741,2.780572,1.476259 +742,2.780921,1.477007 +743,2.781269,1.477757 +744,2.781617,1.478508 +745,2.781965,1.47926 +746,2.782312,1.480014 +747,2.782659,1.48077 +748,2.783005,1.481526 +749,2.783351,1.482285 +750,2.783697,1.483044 +751,2.784042,1.483805 +752,2.784386,1.484568 +753,2.784731,1.485332 +754,2.785075,1.486097 +755,2.785418,1.486864 +756,2.785761,1.487633 +757,2.786104,1.488403 +758,2.786446,1.489174 +759,2.786788,1.489948 +760,2.787129,1.490722 +761,2.787471,1.491498 +762,2.787811,1.492276 +763,2.788152,1.493055 +764,2.788492,1.493836 +765,2.788831,1.494618 +766,2.789171,1.495402 +767,2.789509,1.496187 +768,2.789848,1.496974 +769,2.790186,1.497762 +770,2.790524,1.498552 +771,2.790861,1.499344 +772,2.791198,1.500137 +773,2.791535,1.500932 +774,2.791871,1.501728 +775,2.792207,1.502526 +776,2.792543,1.503325 +777,2.792879,1.504126 +778,2.793214,1.504929 +779,2.793549,1.505733 +780,2.793883,1.506539 +781,2.794217,1.507347 +782,2.794551,1.508156 +783,2.794885,1.508967 +784,2.795218,1.509779 +785,2.795551,1.510593 +786,2.795884,1.511409 +787,2.796216,1.512226 +788,2.796549,1.513045 +789,2.79688,1.513865 +790,2.797212,1.514688 +791,2.797544,1.515511 +792,2.797875,1.516337 +793,2.798206,1.517164 +794,2.798537,1.517992 +795,2.798867,1.518823 +796,2.799197,1.519655 +797,2.799527,1.520489 +798,2.799857,1.521324 +799,2.800187,1.522161 +800,2.800516,1.523 +801,2.800845,1.52384 +802,2.801174,1.524682 +803,2.801503,1.525526 +804,2.801832,1.526371 +805,2.80216,1.527219 +806,2.802488,1.528067 +807,2.802817,1.528918 +808,2.803144,1.52977 +809,2.803472,1.530624 +810,2.8038,1.531479 +811,2.804128,1.532336 +812,2.804455,1.533195 +813,2.804782,1.534056 +814,2.805109,1.534918 +815,2.805436,1.535782 +816,2.805763,1.536648 +817,2.80609,1.537515 +818,2.806417,1.538384 +819,2.806743,1.539255 +820,2.80707,1.540127 +821,2.807396,1.541001 +822,2.807723,1.541877 +823,2.808049,1.542754 +824,2.808375,1.543634 +825,2.808702,1.544514 +826,2.809028,1.545397 +827,2.809354,1.546281 +828,2.80968,1.547167 +829,2.810006,1.548055 +830,2.810332,1.548944 +831,2.810658,1.549836 +832,2.810984,1.550728 +833,2.81131,1.551623 +834,2.811636,1.552519 +835,2.811962,1.553417 +836,2.812288,1.554317 +837,2.812614,1.555218 +838,2.81294,1.556121 +839,2.813266,1.557026 +840,2.813592,1.557932 +841,2.813919,1.55884 +842,2.814245,1.55975 +843,2.814571,1.560662 +844,2.814898,1.561575 +845,2.815224,1.56249 +846,2.815551,1.563407 +847,2.815877,1.564325 +848,2.816204,1.565245 +849,2.81653,1.566167 +850,2.816857,1.56709 +851,2.817184,1.568015 +852,2.817511,1.568942 +853,2.817839,1.569871 +854,2.818166,1.570801 +855,2.818494,1.571733 +856,2.818821,1.572666 +857,2.819149,1.573602 +858,2.819477,1.574539 +859,2.819805,1.575477 +860,2.820133,1.576418 +861,2.820462,1.57736 +862,2.82079,1.578303 +863,2.821119,1.579249 +864,2.821448,1.580196 +865,2.821777,1.581145 +866,2.822107,1.582095 +867,2.822436,1.583047 +868,2.822766,1.584001 +869,2.823096,1.584957 +870,2.823426,1.585914 +871,2.823757,1.586872 +872,2.824087,1.587833 +873,2.824419,1.588795 +874,2.82475,1.589759 +875,2.825081,1.590724 +876,2.825413,1.591691 +877,2.825745,1.59266 +878,2.826077,1.593631 +879,2.82641,1.594603 +880,2.826743,1.595577 +881,2.827076,1.596552 +882,2.827409,1.597529 +883,2.827743,1.598508 +884,2.828077,1.599488 +885,2.828412,1.60047 +886,2.828746,1.601454 +887,2.829082,1.602439 +888,2.829417,1.603426 +889,2.829753,1.604414 +890,2.830089,1.605404 +891,2.830425,1.606396 +892,2.830762,1.60739 +893,2.831099,1.608385 +894,2.831437,1.609381 +895,2.831775,1.61038 +896,2.832113,1.611379 +897,2.832452,1.612381 +898,2.832791,1.613384 +899,2.833131,1.614389 +900,2.83347,1.615395 +901,2.833811,1.616403 +902,2.834152,1.617412 +903,2.834493,1.618424 +904,2.834834,1.619436 +905,2.835176,1.620451 +906,2.835519,1.621466 +907,2.835862,1.622484 +908,2.836205,1.623503 +909,2.836549,1.624524 +910,2.836894,1.625546 +911,2.837239,1.626569 +912,2.837584,1.627595 +913,2.83793,1.628622 +914,2.838276,1.62965 +915,2.838623,1.63068 +916,2.83897,1.631712 +917,2.839318,1.632745 +918,2.839666,1.633779 +919,2.840015,1.634816 +920,2.840364,1.635853 +921,2.840714,1.636893 +922,2.841064,1.637933 +923,2.841415,1.638976 +924,2.841767,1.64002 +925,2.842119,1.641065 +926,2.842471,1.642112 +927,2.842824,1.64316 +928,2.843178,1.64421 +929,2.843532,1.645262 +930,2.843887,1.646315 +931,2.844243,1.647369 +932,2.844599,1.648425 +933,2.844955,1.649483 +934,2.845312,1.650542 +935,2.84567,1.651602 +936,2.846029,1.652664 +937,2.846387,1.653728 +938,2.846747,1.654792 +939,2.847107,1.655859 +940,2.847468,1.656927 +941,2.84783,1.657996 +942,2.848192,1.659067 +943,2.848555,1.660139 +944,2.848918,1.661213 +945,2.849282,1.662288 +946,2.849647,1.663364 +947,2.850012,1.664442 +948,2.850378,1.665522 +949,2.850745,1.666603 +950,2.851112,1.667685 +951,2.85148,1.668769 +952,2.851849,1.669854 +953,2.852219,1.670941 +954,2.852589,1.672029 +955,2.85296,1.673118 +956,2.853331,1.674209 +957,2.853703,1.675301 +958,2.854076,1.676395 +959,2.85445,1.67749 +960,2.854824,1.678586 +961,2.8552,1.679684 +962,2.855575,1.680783 +963,2.855952,1.681884 +964,2.856329,1.682986 +965,2.856707,1.684089 +966,2.857086,1.685194 +967,2.857466,1.6863 +968,2.857846,1.687407 +969,2.858227,1.688516 +970,2.858609,1.689626 +971,2.858992,1.690737 +972,2.859375,1.69185 +973,2.859759,1.692964 +974,2.860144,1.69408 +975,2.86053,1.695196 +976,2.860917,1.696314 +977,2.861304,1.697434 +978,2.861692,1.698555 +979,2.862081,1.699677 +980,2.862471,1.7008 +981,2.862861,1.701925 +982,2.863253,1.703051 +983,2.863645,1.704178 +984,2.864038,1.705306 +985,2.864432,1.706436 +986,2.864826,1.707567 +987,2.865222,1.708699 +988,2.865618,1.709833 +989,2.866015,1.710968 +990,2.866414,1.712104 +991,2.866812,1.713241 +992,2.867212,1.71438 +993,2.867613,1.71552 +994,2.868014,1.716661 +995,2.868417,1.717803 +996,2.86882,1.718947 +997,2.869224,1.720092 +998,2.869629,1.721238 +999,2.870035,1.722385 +1000,2.870441,1.723534 +1002.5,2.871462,1.72641 +1005,2.872488,1.729294 +1007.5,2.87352,1.732185 +1010,2.874558,1.735084 +1012.5,2.875602,1.73799 +1015,2.876651,1.740903 +1017.5,2.877706,1.743824 +1020,2.878767,1.746751 +1022.5,2.879834,1.749685 +1025,2.880907,1.752627 +1027.5,2.881986,1.755575 +1030,2.883071,1.75853 +1032.5,2.884162,1.761491 +1035,2.88526,1.764459 +1037.5,2.886364,1.767434 +1040,2.887473,1.770415 +1042.5,2.88859,1.773402 +1045,2.889712,1.776396 +1047.5,2.890841,1.779396 +1050,2.891977,1.782402 +1052.5,2.893119,1.785415 +1055,2.894267,1.788433 +1057.5,2.895422,1.791457 +1060,2.896584,1.794487 +1062.5,2.897753,1.797523 +1065,2.898927,1.800564 +1067.5,2.900109,1.803612 +1070,2.901297,1.806664 +1072.5,2.902492,1.809723 +1075,2.903694,1.812786 +1077.5,2.904903,1.815855 +1080,2.906118,1.818929 +1082.5,2.907341,1.822009 +1085,2.90857,1.825093 +1087.5,2.909806,1.828183 +1090,2.911049,1.831277 +1092.5,2.912299,1.834377 +1095,2.913556,1.837481 +1097.5,2.91482,1.84059 +1100,2.916091,1.843704 +1102.5,2.91737,1.846822 +1105,2.918655,1.849945 +1107.5,2.919947,1.853072 +1110,2.921247,1.856204 +1112.5,2.922554,1.85934 +1115,2.923867,1.86248 +1117.5,2.925189,1.865624 +1120,2.926517,1.868773 +1122.5,2.927852,1.871925 +1125,2.929195,1.875082 +1127.5,2.930544,1.878242 +1130,2.931901,1.881406 +1132.5,2.933266,1.884574 +1135,2.934638,1.887746 +1137.5,2.936016,1.890921 +1140,2.937403,1.8941 +1142.5,2.938796,1.897282 +1145,2.940197,1.900467 +1147.5,2.941606,1.903656 +1150,2.943021,1.906848 +1152.5,2.944444,1.910044 +1155,2.945874,1.913242 +1157.5,2.947312,1.916443 +1160,2.948757,1.919648 +1162.5,2.950209,1.922855 +1165,2.951669,1.926066 +1167.5,2.953136,1.929279 +1170,2.954611,1.932494 +1172.5,2.956093,1.935713 +1175,2.957582,1.938934 +1177.5,2.959079,1.942157 +1180,2.960583,1.945383 +1182.5,2.962095,1.948612 +1185,2.963613,1.951842 +1187.5,2.96514,1.955076 +1190,2.966673,1.958311 +1192.5,2.968215,1.961548 +1195,2.969763,1.964787 +1197.5,2.971319,1.968029 +1200,2.972882,1.971272 +1202.5,2.974453,1.974518 +1205,2.976031,1.977765 +1207.5,2.977617,1.981014 +1210,2.97921,1.984264 +1212.5,2.98081,1.987517 +1215,2.982418,1.99077 +1217.5,2.984033,1.994026 +1220,2.985655,1.997283 +1222.5,2.987285,2.000541 +1225,2.988922,2.003801 +1227.5,2.990566,2.007062 +1230,2.992218,2.010324 +1232.5,2.993877,2.013587 +1235,2.995544,2.016852 +1237.5,2.997218,2.020118 +1240,2.998899,2.023384 +1242.5,3.000587,2.026652 +1245,3.002283,2.02992 +1247.5,3.003986,2.03319 +1250,3.005696,2.03646 +1252.5,3.007413,2.039731 +1255,3.009138,2.043003 +1257.5,3.01087,2.046275 +1260,3.012609,2.049548 +1262.5,3.014355,2.052821 +1265,3.016109,2.056095 +1267.5,3.017869,2.05937 +1270,3.019637,2.062644 +1272.5,3.021412,2.065919 +1275,3.023194,2.069195 +1277.5,3.024984,2.07247 +1280,3.02678,2.075746 +1282.5,3.028584,2.079022 +1285,3.030394,2.082298 +1287.5,3.032212,2.085574 +1290,3.034036,2.08885 +1292.5,3.035868,2.092126 +1295,3.037707,2.095402 +1297.5,3.039552,2.098678 +1300,3.041405,2.101954 +1302.5,3.043265,2.105229 +1305,3.045131,2.108504 +1307.5,3.047005,2.111778 +1310,3.048885,2.115053 +1312.5,3.050773,2.118327 +1315,3.052667,2.1216 +1317.5,3.054568,2.124873 +1320,3.056476,2.128146 +1322.5,3.058391,2.131418 +1325,3.060313,2.134689 +1327.5,3.062241,2.137959 +1330,3.064176,2.141229 +1332.5,3.066118,2.144498 +1335,3.068067,2.147766 +1337.5,3.070022,2.151034 +1340,3.071984,2.1543 +1342.5,3.073953,2.157566 +1345,3.075928,2.16083 +1347.5,3.07791,2.164094 +1350,3.079899,2.167357 +1352.5,3.081894,2.170618 +1355,3.083896,2.173879 +1357.5,3.085904,2.177138 +1360,3.087919,2.180396 +1362.5,3.089941,2.183653 +1365,3.091969,2.186909 +1367.5,3.094003,2.190163 +1370,3.096044,2.193416 +1372.5,3.098091,2.196668 +1375,3.100144,2.199918 +1377.5,3.102204,2.203167 +1380,3.10427,2.206414 +1382.5,3.106343,2.20966 +1385,3.108422,2.212904 +1387.5,3.110507,2.216147 +1390,3.112599,2.219388 +1392.5,3.114697,2.222628 +1395,3.116801,2.225866 +1397.5,3.118911,2.229102 +1400,3.121027,2.232336 +1402.5,3.12315,2.235569 +1405,3.125279,2.2388 +1407.5,3.127414,2.242029 +1410,3.129554,2.245256 +1412.5,3.131701,2.248482 +1415,3.133854,2.251705 +1417.5,3.136013,2.254926 +1420,3.138178,2.258146 +1422.5,3.140349,2.261364 +1425,3.142526,2.264579 +1427.5,3.144708,2.267792 +1430,3.146897,2.271004 +1432.5,3.149092,2.274213 +1435,3.151292,2.27742 +1437.5,3.153498,2.280625 +1440,3.15571,2.283828 +1442.5,3.157928,2.287029 +1445,3.160152,2.290227 +1447.5,3.162381,2.293423 +1450,3.164616,2.296617 +1452.5,3.166857,2.299809 +1455,3.169103,2.302998 +1457.5,3.171355,2.306184 +1460,3.173613,2.309369 +1462.5,3.175876,2.312551 +1465,3.178145,2.31573 +1467.5,3.180419,2.318907 +1470,3.182699,2.322082 +1472.5,3.184984,2.325254 +1475,3.187275,2.328424 +1477.5,3.189571,2.331591 +1480,3.191873,2.334756 +1482.5,3.19418,2.337918 +1485,3.196492,2.341077 +1487.5,3.19881,2.344234 +1490,3.201133,2.347388 +1492.5,3.203462,2.350539 +1495,3.205796,2.353688 +1497.5,3.208134,2.356834 +1500,3.210479,2.359977 +1502.5,3.212828,2.363118 +1505,3.215183,2.366255 +1507.5,3.217542,2.36939 +1510,3.219907,2.372523 +1512.5,3.222277,2.375652 +1515,3.224652,2.378778 +1517.5,3.227032,2.381902 +1520,3.229417,2.385023 +1522.5,3.231807,2.388141 +1525,3.234202,2.391256 +1527.5,3.236603,2.394368 +1530,3.239007,2.397477 +1532.5,3.241418,2.400584 +1535,3.243832,2.403687 +1537.5,3.246252,2.406787 +1540,3.248677,2.409884 +1542.5,3.251106,2.412978 +1545,3.253541,2.41607 +1547.5,3.25598,2.419158 +1550,3.258423,2.422243 +1552.5,3.260872,2.425325 +1555,3.263325,2.428404 +1557.5,3.265783,2.431479 +1560,3.268245,2.434552 +1562.5,3.270713,2.437622 +1565,3.273184,2.440688 +1567.5,3.275661,2.443751 +1570,3.278142,2.446811 +1572.5,3.280627,2.449868 +1575,3.283117,2.452922 +1577.5,3.285612,2.455973 +1580,3.288111,2.45902 +1582.5,3.290614,2.462064 +1585,3.293122,2.465105 +1587.5,3.295635,2.468142 +1590,3.298151,2.471177 +1592.5,3.300672,2.474208 +1595,3.303198,2.477235 +1597.5,3.305727,2.48026 +1600,3.308262,2.483281 +1602.5,3.3108,2.486299 +1605,3.313342,2.489313 +1607.5,3.315889,2.492324 +1610,3.31844,2.495332 +1612.5,3.320995,2.498336 +1615,3.323555,2.501337 +1617.5,3.326118,2.504335 +1620,3.328686,2.507329 +1622.5,3.331258,2.51032 +1625,3.333833,2.513308 +1627.5,3.336413,2.516292 +1630,3.338997,2.519273 +1632.5,3.341585,2.52225 +1635,3.344177,2.525223 +1637.5,3.346773,2.528194 +1640,3.349372,2.531161 +1642.5,3.351976,2.534124 +1645,3.354584,2.537084 +1647.5,3.357195,2.54004 +1650,3.359811,2.542994 +1652.5,3.36243,2.545943 +1655,3.365053,2.548889 +1657.5,3.36768,2.551831 +1660,3.370311,2.55477 +1662.5,3.372945,2.557706 +1665,3.375583,2.560638 +1667.5,3.378225,2.563566 +1670,3.380871,2.566491 +1672.5,3.38352,2.569412 +1675,3.386173,2.57233 +1677.5,3.388829,2.575245 +1680,3.39149,2.578155 +1682.5,3.394153,2.581063 +1685,3.396821,2.583966 +1687.5,3.399492,2.586866 +1690,3.402166,2.589762 \ No newline at end of file diff --git a/src/CalculateE.c b/src/CalculateE.c index c6c41a87..8b77ca6f 100644 --- a/src/CalculateE.c +++ b/src/CalculateE.c @@ -404,7 +404,7 @@ void MuellerMatrix(void) //====================================================================================================================== static bool TestSymVec(const double a[static 3]) -/* tests whether a and -a are equivalent under existing symmetries of the scattering problem, i.e. if there exist a +/* tests whether a and -a are equivalent under existing symmetries of the scattering problem, i.e. if there exists a * combination of symmetries that transforms a into -a. In particular, symR is sufficient for any vector in xy-plane, * since double such rotation is equivalent to the in-plane inversion. */ @@ -712,7 +712,7 @@ static void CalcIntegralScatQuantities(const enum incpol which) { // Scattering force, extinction force and radiation pressure per dipole double * restrict Frp; - double Cext,Cabs,Csca,Cdec, // Cross sections + double Cext,Cabs,Csca,Cenh, // Cross sections dummy[3], // asymmetry parameter*Csca Finc_tot[3],Fsca_tot[3],Frp_tot[3], // total extinction and scattering forces, and their sum (radiation pressure) Cnorm, // normalizing factor from force to cross section @@ -724,7 +724,7 @@ static void CalcIntegralScatQuantities(const enum incpol which) const char *f_suf; // redundant initialization to remove warnings - Cext=Cabs=Csca=Cdec=0; + Cext=Cabs=Csca=Cenh=0; CCfile=NULL; D("Calculation of cross sections started"); @@ -761,16 +761,20 @@ static void CalcIntegralScatQuantities(const enum incpol which) } } else { // not orient_avg - if (beamtype==B_DIPOLE) Cdec=DecayCross(); // this is here to be run by all processors + if (IFROOT) { SnprintfErr(ONE_POS,fname_cs,MAX_FNAME,"%s/"F_CS"%s",directory,f_suf); CCfile=FOpenErr(fname_cs,"w",ONE_POS); if (calc_Cext) PrintBoth(CCfile,"Cext\t= "GFORM"\nQext\t= "GFORM"\n",Cext,Cext*inv_G); if (calc_Cabs) PrintBoth(CCfile,"Cabs\t= "GFORM"\nQabs\t= "GFORM"\n",Cabs,Cabs*inv_G); - if (beamtype==B_DIPOLE) { + if (beamtype==B_DIPOLE || beamtype==B_ELECTRON) { + Cenh=EnhCross(); // this is here to be run by all processors + PrintBoth(CCfile,"Cenh\t= "GFORM"\nQenh\t= "GFORM"\n",Cenh,Cenh*inv_G); + } + if (beamtype==B_DIPOLE && !absorbing_host) { double self=1; if (surface) self+=C0dipole_refl/C0dipole; - double tot=self+Cdec/C0dipole; + double tot=self+Cenh/C0dipole; fprintf(CCfile,"\nDecay-rate enhancement\n\n"); PRINTFB("\nDecay-rate enhancement:\n"); PrintBoth(CCfile,"Total\t= "GFORM"\n",tot); @@ -788,6 +792,39 @@ static void CalcIntegralScatQuantities(const enum incpol which) Csca=ScaCross(f_suf); PrintBoth(CCfile,"Csca\t= "GFORM"\nQsca\t= "GFORM"\n",Csca,Csca*inv_G); } + if (beamtype==B_ELECTRON) { + double Pext, Peels, Pcl; + double hbar_SI = 1.054571817e-34; + double hbar_ev = 6.582119569e-16; + fprintf(CCfile,"\nEELS and Cathodoluminescence\n\n"); + printf("\nEELS and Cathodoluminescence:\n"); + Peels = creal(mhost)*0.1*Cenh/(FOUR_PI*PI*hbar_SI*hbar_ev*WaveNum0); //SI units are used, assuming Cenh is in nm^2 + Peels *= 1e-27; //(nm)^3 -> (cm)^3 + PrintBoth(CCfile,"Peels\t= "EFORM"\n",Peels); + Pext = creal(mhost)*0.1*Cext/(FOUR_PI*PI*hbar_SI*hbar_ev*WaveNum0); //SI units are used, assuming Cenh is in nm^2 + Pext *= 1e-27; //(nm)^3 -> (cm)^3 + PrintBoth(CCfile,"Pext\t= "EFORM"\n",Pext); + + //Csca = Cext-Cabs; + //PrintBoth(CCfile,"Csca=Cext-Cabs\t= "GFORM"\nQsca\t= "GFORM"\n",Csca,Csca*inv_G); + if (calc_Csca){ + //Pcl = (Cenh - (Cext - Csca))/((FOUR_PI*WaveNum)*PI*hbar*hbar_ev); + Pcl = creal(mhost)*0.1*(Cenh - (Cext - Csca))/(FOUR_PI*PI*hbar_SI*hbar_ev*WaveNum0); //SI units are used, assuming C is in nm^2 + } + else Pcl = creal(mhost)*0.1*(Cenh - Cabs)/(FOUR_PI*PI*hbar_SI*hbar_ev*WaveNum0); //SI units are used, assuming C is in nm^2 + Pcl *= 1e-27; //(nm)^3 -> (cm)^3 + PrintBoth(CCfile,"Pcl\t= "EFORM"\n",Pcl); + } + if(absorbing_host) { + double PV_integrals_particle[5]; + CrossSec_VolumeIntegral(PV_integrals_particle); + PrintBoth(CCfile,"Csca_p\t= "GFORM"\n",PV_integrals_particle[0]); + PrintBoth(CCfile,"Csca_p2\t= "GFORM"\n",PV_integrals_particle[1]); + PrintBoth(CCfile,"Cext_p\t= "GFORM"\n",PV_integrals_particle[2]); + PrintBoth(CCfile,"Cext_p2\t= "GFORM"\n",PV_integrals_particle[3]); + PrintBoth(CCfile,"Cinc_p2\t= "GFORM"\n",PV_integrals_particle[4]); + } + if (calc_vec) { AsymParm_x(dummy,f_suf); AsymParm_y(dummy+1,f_suf); diff --git a/src/GenerateB.c b/src/GenerateB.c index 91f9f71e..586dc25b 100644 --- a/src/GenerateB.c +++ b/src/GenerateB.c @@ -44,6 +44,8 @@ extern const char *beam_fnameY; extern const char *beam_fnameX; extern const opt_index opt_beam; +extern void cik01_(doublecomplex *z, doublecomplex *cbi0, doublecomplex *cdi0, doublecomplex *cbi1, doublecomplex *cdi1, doublecomplex *cbk0, doublecomplex *cdk0, doublecomplex *cbk1, doublecomplex *cdk1); + // used in CalculateE.c double C0dipole,C0dipole_refl; // inherent cross sections of exciting dipole (in free space and addition due to surface) int vorticity; // Vorticity of vortex beams (besN for Bessel beams) @@ -61,6 +63,10 @@ static double scale_x,scale_z; // multipliers for scaling coordinates static doublecomplex ki,kt; // abs of normal components of k_inc/k0, and ktran/k0 static doublecomplex ktVec[3]; // k_tran/k0 static double p0; // amplitude of the incident dipole moment +static doublecomplex gamma_eps_inv;// 1/gamma_eps +static doublecomplex e_pref; // prefactor of the field of the electron +static double e_w_v; // prefactor in an argument of a phase exponent in the incident field of the electron +static doublecomplex e_w_gv; // prefactor in an argument of the Bessel_K in the incident field of the electron #ifndef NO_FORTRAN static int besN; // Bessel beam order static double besAlpha; // half-cone angle (in radians) @@ -85,7 +91,16 @@ void InitBeam(void) // initialize beam; produce description string { double w0; // beam width + //CASE: B_ELECTRON + static double e_energy; // kinetic energy of the electron + static doublecomplex beta_eps;// v*m_host/c + static double e_v; // speed of the electron + double q_electron = -4.803204673e-10; //electric charge of an electron, cm^(3/2)*g^(1/2)*s^(-1) + double c_light = 29979245800; //speed of light in vacuum, cm/s + const double e_energy_rest = 510.99895; //Electron rest mass, keV const char *tmp_str; // temporary string + //q_electron *= sqrt(10)*1e10; //scale cm->nm + //c_light *= 1e7; //scale cm->nm /* TO ADD NEW BEAM * Add here all intermediate variables, which are used only inside this function. */ @@ -154,7 +169,7 @@ void InitBeam(void) * irradiance). Alternative definition is p0=1, but then the results will scale with unit of length * (breaking scale invariance) */ - p0=1/(WaveNum*WaveNum*WaveNum); + p0=1/(WaveNum*WaveNum*WaveNum); //Is it valid if WaveNum is complex? if (IFROOT) beam_descr="point dipole"; return; case B_LMINUS: @@ -164,7 +179,7 @@ void InitBeam(void) // initialize parameters w0=beam_pars[0]; TestPositive(w0,"beam width"); - s=1/(WaveNum*w0); + s=1/(WaveNum*w0); //Is it valid if WaveNum is complex? s2=s*s; scale_x=1/w0; scale_z=s*scale_x; // 1/(k*w0^2) @@ -186,6 +201,29 @@ void InitBeam(void) "\tWidth="GFORMDEF" (confinement factor s="GFORMDEF")",tmp_str,w0,s); } return; + case B_ELECTRON: + //Electron field is in CGS. Electron field in SI would look the same, except multiplied by 1/(4*pi*eps0) + if (surface) PrintError("Currently, electron incident beam is not supported for '-surf'"); + // initialize parameters + e_energy=beam_pars[0]; + TestPositive(e_energy,"kinetic energy of the electron"); + beam_asym=(beam_center_0[0]!=0 || beam_center_0[1]!=0 || beam_center_0[2]!=0); + //symX=symY=symZ=symR=false; + if (!beam_asym) vInit(beam_center); + e_v = c_light*sqrt(1-pow((e_energy_rest/(e_energy+e_energy_rest)),2)); + beta_eps = e_v*mhost/c_light; + gamma_eps_inv = cSqrtCut(1-beta_eps*beta_eps); + //printf("gamma_eps_inv\t=\t"CFORM"\n",REIM(gamma_eps_inv)); + //printf("omega = "EFORM"\n",WaveNum*c_light/scale_z); + //printf("v = "EFORM"\n",e_v); + e_w_v = WaveNum0*c_light/e_v; + //printf("e_w_v\t=\t"CFORM"\n",REIM(e_w_v)); + e_w_gv = e_w_v*gamma_eps_inv; + //printf("e_w_gv\t=\t"CFORM"\n",REIM(e_w_gv)); + e_pref = 2*q_electron*(WaveNum0*1e7)*gamma_eps_inv/(beta_eps*beta_eps*c_light); // (q*k0/c) must be in statV/cm => multiplying k0*1e7 + //printf("e_pref = "CFORM"\n",REIM(e_pref)); + if (IFROOT) beam_descr=dyn_sprintf("The electron with the %g keV energy moving through "GFORM3V,e_energy,COMP3V(beam_center_0)); + return; #ifndef NO_FORTRAN case B_BES_CS: case B_BES_CSp: @@ -312,12 +350,12 @@ void GenerateB (const enum incpol which, // x - or y polarized incident light size_t i,j; doublecomplex psi0,Q,Q2; doublecomplex v1[3],v2[3],v3[3],gt[6]; - double ro2,ro4; - double x,y,z,x2_s,xy_s; - doublecomplex t1,t2,t3,t4,t5,t6,t7,t8,ctemp; + double ro,ro2,ro4; + double x,y,z,x2_s,xy_s,temp; + doublecomplex t1,t2,t3,t4,t5,t6,t7,t8,ctemp,e_wb_gv; const double *ex; // coordinate axis of the beam reference frame double ey[3]; - double r1[3]; + double r1[3],r1par[3],r1per[3]; /* complex wave amplitudes of transmitted wave (with phase relative to beam center); * The transmitted wave can be inhomogeneous wave (when msub is complex), then eIncTran (e) is normalized * counter-intuitively. Before multiplying by tc, it satisfies (e,e)=1!=||e||^2. This normalization is consistent @@ -334,6 +372,7 @@ void GenerateB (const enum incpol which, // x - or y polarized incident light double phi,arg,td1[abs(besN)+3],td2[abs(besN)+3],jn1[abs(besN)+3]; // for Bessel beams #endif const char *fname; + /* TO ADD NEW BEAM * Add here all intermediate variables, which are used only inside this function. You may as well use 't1'-'t8' * variables defined above. @@ -349,6 +388,9 @@ void GenerateB (const enum incpol which, // x - or y polarized incident light vCopy(incPolY,ey); } + //printf("beam_center_0 = "EFORM3V"\n",COMP3V(beam_center_0)); + //printf("beam_center = "EFORM3V"\n",COMP3V(beam_center)); + switch (beamtype) { case B_PLANE: // plane is separate to be fast (for non-surface) if (surface) { @@ -484,9 +526,9 @@ void GenerateB (const enum incpol which, // x - or y polarized incident light z=DotProd(r1,prop)*scale_z; ro2=x*x+y*y; Q=1/(2*z-I); - psi0=-I*Q*cexp(I*Q*ro2); + psi0=-I*Q*imExp(Q*ro2); // ctemp=exp(ik*z0)*psi0, z0 - non-scaled coordinate (z/scale_z) - ctemp=imExp(WaveNum*z/scale_z)*psi0; + ctemp=imExpReal(WaveNum*z/scale_z)*psi0; //or should be imExp? // the following logic (if-else-if...) is hard to replace by a simple switch if (beamtype==B_LMINUS) cvMultScal_RVec(ctemp,ex,b+j); // b[i]=ctemp*ex else { @@ -537,6 +579,50 @@ void GenerateB (const enum incpol which, // x - or y polarized incident light } } return; + + case B_ELECTRON: + for (i=0;ikt @@ -681,7 +682,7 @@ static void CalcFieldSurf(doublecomplex ebuff[static restrict 3], // where to wr cs=FresnelTS(kt,ki); cp=FresnelTP(kt,ki,1/msub); // coefficient comes from k0->k in definition of F(n) (in denominator) - phSh=msub*cexp(I*WaveNum*hsub*(ki-kt)); + phSh=msub*imExp(WaveNum*hsub*(ki-kt)); } #ifndef SPARSE // prepare values of exponents, along each of the coordinates @@ -777,12 +778,12 @@ static void CalcFieldSurf(doublecomplex ebuff[static restrict 3], // where to wr if (above) { // ebuff+= [(I-nxn).sum=sum-nF*(nF.sum)] * exp(-2ik*r0*nz), where r0=box_origin_unif cvMultScal_RVec(crDotProd(sumF,nF),nF,t3); cvSubtr(sumF,t3,t3); - cvMultScal_cmplx(imExp(-2*WaveNum*creal(ki)*box_origin_unif[2]),t3,t3); // assumes real ki + cvMultScal_cmplx(imExpReal(-2*WaveNum*creal(ki)*box_origin_unif[2]),t3,t3); // assumes real ki AND real WaveNum - the latter is implicitly converted to "double" cvAdd(t3,ebuff,ebuff); } // ebuff=(-i*k^3)*exp(-ikr0.n)*tbuff, where r0=box_origin_unif // All m-scaling for substrate has been accounted in phSh above - doublecomplex sc=-I*WaveNum*WaveNum*WaveNum*cexp(-I*WaveNum*crDotProd(nN,box_origin_unif)); + doublecomplex sc=-I*WaveNum*WaveNum*WaveNum*imExp(-WaveNum*crDotProd(nN,box_origin_unif)); // the following additional multiplier implements IGT_SO; when above, it is the same for nF and nN if (ScatRelation==SQ_IGT_SO) sc*=eta2cmplx(nN); cvMultScal_cmplx(sc,ebuff,ebuff); @@ -803,28 +804,31 @@ void CalcField(doublecomplex ebuff[static restrict 3], // where to write calcula double ExtCross(const double * restrict incPol) // Calculate the Extinction cross-section { - doublecomplex ebuff[3]; + doublecomplex ebuff[3],escbuff[3]; double sum; size_t i; // this can be considered a legacy case, which works only for the simplest plane way centered at the particle if (beamtype==B_PLANE && !surface && !beam_asym) { CalcField (ebuff,prop); - sum=crDotProd_Re(ebuff,incPol); // incPol is real, so no conjugate is needed + //sum=crDotProd_Re(ebuff,incPol); // incPol is real, so no conjugate is needed + sum = creal(crDotProd(ebuff,incPol)/WaveNum)/(WaveNum0*WaveNum0); MyInnerProduct(&sum,double_type,1,&Timing_ScatQuanComm); - sum*=FOUR_PI/(WaveNum*WaveNum); + //sum*=FOUR_PI/(WaveNum*WaveNum); } /* more general formula; normalization is done assuming the unity amplitude of the electric field in the focal point * of the beam */ else { sum=0; - for (i=0;i Im(p0(*).Escat(r0)) = sum{Im(P.E_inc)} - * - * For complex p0 an efficient calculation strategy (not to waste evaluations of interaction) is to compute an array - * of G_i0.p0(*) together with Einc and use it here afterwards. - */ - sum=0; - for (i=0;i Im(p0(*).Escat(r0)) = sum{Im(P.E_inc)} + * + * For complex p0 an efficient calculation strategy (not to waste evaluations of interaction) is to compute an array + * of G_i0.p0(*) together with Einc and use it here afterwards. + */ + for (i=0;i","Field of an electron with in keV." + "Center of the beam coordinates are determined by -beam_center command line option. All coordinate arguments are in nm.\n" + "Propagation direction of the beam is determined by -prop command line option.\n",1,B_ELECTRON}, {"lminus"," [ ]","Simplest approximation of the Gaussian beam. The beam width is obligatory and " "x, y, z coordinates of the center of the beam (in laboratory reference frame) are optional (zero, by" " default). All arguments are in um. Specification of coordinates here is DEPRECATED, use -beam_center " @@ -397,6 +403,7 @@ PARSE_FUNC(jagged); PARSE_FUNC(lambda); PARSE_FUNC(m); PARSE_FUNC(maxiter); +PARSE_FUNC(mhost); PARSE_FUNC(no_reduced_fft); PARSE_FUNC(no_vol_cor); PARSE_FUNC(ntheta); @@ -448,13 +455,13 @@ static struct opt_struct options[]={ "reference frame). '-m' then accepts 6 arguments per each domain. Can not be used with '-pol cldr' and " "'-rect_dip'.",0,NULL}, {PAR(asym),"","Calculate the asymmetry vector. Implies '-Csca' and '-vec'",0,NULL}, + {PAR(beam_center)," ","Sets the center of the beam with respect to the initial point in time. " + "For plane, Gaussian, and Bessel field it determines the phase in space. " + "For a dipole and an electron it determines the position in space.\n" + "Default: 0 0 0",3,NULL}, {PAR(beam)," []","Sets the incident beam, either predefined or 'read' from file. All parameters of " "predefined beam types are floats except for or filenames.\n" "Default: plane",UNDEF,beam_opt}, - {PAR(beam_center)," ","Sets the center of the beam in the laboratory reference frame (in um). For most " - "beams it corresponds to the most symmetric point with zero phase, while for a point source or a fast " - "electron, it determines the real position in space.\n" - "Default: 0 0 0",3,NULL}, {PAR(chp_dir),"","Sets directory for the checkpoint (both for saving and loading).\n" "Default: "FD_CHP_DIR,1,NULL}, {PAR(chp_load),"","Restart a simulation from a checkpoint",0,NULL}, @@ -576,6 +583,8 @@ static struct opt_struct options[]={ "Default: 1.5 0",UNDEF,NULL}, {PAR(maxiter),"","Sets the maximum number of iterations of the iterative solver, integer.\n" "Default: very large, not realistic value",1,NULL}, + {PAR(mhost)," ","Complex refractive index of the host medium.\n" + "Default: 1+0i",2,NULL}, {PAR(no_reduced_fft),"","Do not use symmetry of the interaction matrix to reduce the storage space for the " "Fourier-transformed matrix.",0,NULL}, {PAR(no_vol_cor),"","Do not use 'dpl (volume) correction'. If this option is given, ADDA will try to match size of " @@ -625,7 +634,8 @@ static struct opt_struct options[]={ {PAR(prognosis),"","Do not actually perform simulation (not even memory allocation) but only estimate the required " "RAM. Implies '-test'.",0,NULL}, {PAR(prop)," ","Sets propagation direction of incident radiation, float. Normalization (to the unity " - "vector) is performed automatically. For point-dipole incident beam this determines its direction.\n" + "vector) is performed automatically. For point-dipole incident beam this determines its direction." + "For electron incident beam this determines electron propagation direction.\n" "Default: 0 0 1",3,NULL}, {PAR(recalc_resid),"","Recalculate residual at the end of iterative solver.",0,NULL}, {PAR(rect_dip)," ","Use rectangular-cuboid dipoles. Three arguments are the relative dipole sizes along " @@ -1049,6 +1059,9 @@ PARSE_FUNC(beam) if (Narg!=0 && Narg!=3) NargError(Narg,"0 or 3"); if (Narg==3) deprecated_bc_used=true; break; + case B_ELECTRON: + if (Narg!=1) NargError(Narg,"1"); + break; #ifndef NO_FORTRAN case B_BES_M: if (Narg!=6 && Narg!=10) NargError(Narg,"6 or 10"); break; #endif @@ -1352,9 +1365,9 @@ PARSE_FUNC(m) for (i=0;i=MAXIT) LogError(ALL_POS,"Failed to converge during calculation of sine integral of "GFORMDEF,x); - h*=imExp(-t); + h*=imExpReal(-t); *ci=-creal(h); *si=PI_OVER_TWO+cimag(h); } diff --git a/src/somnec.c b/src/somnec.c index 4339179b..27cb67b5 100644 --- a/src/somnec.c +++ b/src/somnec.c @@ -38,6 +38,8 @@ #include #include +#include "cmplx.h" + #ifndef TRUE #define TRUE 1 #endif @@ -101,17 +103,6 @@ static complex double ct1, ct2, ct3, ck1, ck1sq, cksm; /* common /cntour/ */ static complex double a, b; -/*-----------------------------------------------------------------------*/ - -// a single function from cmplx.h not to include the whole file -static inline double cAbs2(const complex double z) -// square of absolute value of complex number; |z|^2 -{ - return creal(z)*creal(z) + cimag(z)*cimag(z); -} - -/*-----------------------------------------------------------------------*/ - void som_init(complex double epscf) { complex double erv, ezv; @@ -222,7 +213,7 @@ static void bessel(complex double z, complex double *j0, complex double *j0p ) p1z=1.+(P11-P21*zi2)*zi2; q0z=(Q20*zi2-Q10)*zi; q1z=(Q11-Q21*zi2)*zi; - zk=cexp(I*(z-POF)); + zk=imExp(z-POF); zi2=1./zk; cz=.5*(zk+zi2); sz=I*.5*(zi2-zk); @@ -650,7 +641,7 @@ static void hankel( complex double z, complex double *h0, complex double *h0p ) p1z=1.+(P11-P21*zi2)*zi2; q0z=(Q20*zi2-Q10)*zi; q1z=(Q11-Q21*zi2)*zi; - zk=cexp(I*(z-POF))*csqrt(zi)*C3; + zk=imExp(z-POF)*csqrt(zi)*C3; *h0=zk*(p0z+I*q0z); *h0p=I*zk*(p1z+I*q1z); diff --git a/src/vars.c b/src/vars.c index 3ab83bf2..6dde5b72 100644 --- a/src/vars.c +++ b/src/vars.c @@ -24,11 +24,14 @@ double gridspace; // =dsX - DEPRECATED, may only be used in parts incomp double dsX,dsY,dsZ; // dipole sizes along each axis double rectScaleX,rectScaleY,rectScaleZ; // relative dipole sizes (scales), in many cases are round numbers double dipvol; // dipole volume -double kd; // =kdX - DEPRECATED, may only be used in parts incompatible with rectDip -double kdX,kdY,kdZ; // kdX=WaveNum*dsX, ... +doublecomplex kd; // =kdX - DEPRECATED, may only be used in parts incompatible with rectDip +doublecomplex kdX,kdY,kdZ; // kdX=WaveNum*dsX, ... double ka_eq; // volume-equivalent size parameter double inv_G; // inverse of equivalent cross section -double WaveNum; // wavenumber of incident light +doublecomplex WaveNum; // wavenumber of incident light - NOW MAY BE COMPLEX! +doublecomplex WaveNum0; // wavenumber of incident light as in vacuum: k=w/c +doublecomplex mhost; // refractive index of the medium +doublecomplex epshost; // dielectric permittivity of the medium double * restrict DipoleCoord; // vector to hold the coordinates of the dipoles double memory; // total memory usage in bytes double memPeak; // peak memory usage in bytes @@ -59,6 +62,7 @@ bool anisotropy; // whether the scattering medium is anisotropic bool save_memory; // whether to sacrifice some speed for memory bool ipr_required; /* whether inner product in MatVec will be used by iterative solver (causes additional initialization, e.g., for OpenCL) */ +bool absorbing_host; // absorbing host medium double propAlongZ; // equal 0 for general incidence, and +-1 for incidence along the z-axis (can be used as flag) bool rectDip; // whether using rectangular-cuboid (non-cubical) dipoles @@ -93,6 +97,7 @@ int maxiter; // maximum number of iterations doublecomplex *xvec; // total electric field on the dipoles doublecomplex *pvec; // polarization of dipoles, also an auxiliary vector in iterative solvers doublecomplex * restrict Einc; // incident field on dipoles +doublecomplex * restrict E1; // modified incident field for use in EELS // scattering at different angles int nTheta; // number of angles in scattering profile diff --git a/src/vars.h b/src/vars.h index a7ebd51e..dae2e32a 100644 --- a/src/vars.h +++ b/src/vars.h @@ -30,7 +30,11 @@ // basic variables extern int boxX,boxY,boxZ; extern size_t boxXY; -extern double gridspace,dsX,dsY,dsZ,rectScaleX,rectScaleY,rectScaleZ,dipvol,kd,kdX,kdY,kdZ,ka_eq,inv_G,WaveNum; +extern double gridspace,dsX,dsY,dsZ,rectScaleX,rectScaleY,rectScaleZ,dipvol,ka_eq,inv_G; + +extern doublecomplex kdX,kdY,kdZ,kd,WaveNum,WaveNum0; +extern doublecomplex mhost, epshost; + extern double * restrict DipoleCoord; extern double memory,memPeak; @@ -43,7 +47,7 @@ extern bool symX,symY,symZ,symR; // flags extern bool prognosis,yzplane,scat_plane,store_mueller,all_dir,scat_grid,phi_integr,sh_granul,reduced_FFT,orient_avg, - load_chpoint,beam_asym,anisotropy,save_memory,ipr_required,rectDip; + load_chpoint,beam_asym,anisotropy,save_memory,ipr_required,absorbing_host,rectDip; extern double propAlongZ; // 3D vectors @@ -64,7 +68,7 @@ extern unsigned char * restrict material; // iterative solver extern enum iter IterMethod; extern int maxiter; -extern doublecomplex *xvec,*pvec,* restrict Einc; +extern doublecomplex *xvec,*pvec,* restrict Einc,* restrict E1; // scattering at different angles extern int nTheta;