karpov_materials.py 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import numpy as np
  2. def evalDrudeParams(R, WLs):
  3. GammaB = 3.5 * 10**13
  4. Gamma = GammaB + ((1.4 * 10**6) / (R * 10**-9))
  5. w = (2 * np.pi * 3 * 1E8) / (WLs * 1E-9)
  6. wp = 1.4
  7. return w, wp, Gamma
  8. def eps_r(w, wp, Gamma):
  9. return 5 - (w**2 * (wp * 1E16)**2) / (w**4 - w**2 * Gamma**2)
  10. def eps_i(w, wp, Gamma):
  11. return (w * (wp * 1E16)**2 * Gamma) / (w**4 - w**2 * Gamma**2)
  12. def eps_drude(w, wp, Gamma):
  13. return eps_r(w, wp, Gamma) + 1j * eps_i(w, wp, Gamma)
  14. def get_d_params(WL_min, WL_max, d_param_filename):
  15. from_disk = np.loadtxt(d_param_filename[0])
  16. omega_star_ratio = from_disk[0, :]
  17. d_perp = from_disk[1, :] + 1j*from_disk[2, :]
  18. from_disk = np.loadtxt(d_param_filename[1])
  19. d_parl = from_disk[1, :] + 1j*from_disk[2, :]
  20. c = 299792458 # m/s
  21. h_reduced = 6.5821e-16 # eV s
  22. omega_p_star = 3.81 # eV
  23. # min_lim_omega_star_ratio = 0.87
  24. # max_lim_omega_star_ratio = 0.99
  25. d_perp_in, d_parl_in = [],[]
  26. WLs_nm = []
  27. om_rat_plot = []
  28. WL_d = 2*np.pi/((omega_star_ratio * omega_p_star/c)/h_reduced)*1e9 # nm
  29. for i in range(len(omega_star_ratio)):
  30. if WL_d[i] > WL_max:
  31. continue
  32. if WL_d[i] < WL_min:
  33. continue
  34. # om_star_rat = omega_star_ratio[i]
  35. # if (om_star_rat < min_lim_omega_star_ratio
  36. # or om_star_rat > max_lim_omega_star_ratio):
  37. # continue
  38. # om_rat_plot.append(om_star_rat)
  39. WLs_nm.append(WL_d[i])
  40. d_perp_in.append(d_perp[i])
  41. d_parl_in.append(d_parl[i])
  42. WLs_nm = np.array(WLs_nm)
  43. d_perp_in = np.array(d_perp_in)
  44. d_parl_in = np.array(d_parl_in)
  45. return WLs_nm, d_perp_in, d_parl_in