|
@@ -5,33 +5,28 @@ from matplotlib import markers, pyplot as plt
|
|
import numpy as np
|
|
import numpy as np
|
|
from scipy import interpolate
|
|
from scipy import interpolate
|
|
|
|
|
|
-arr2D = np.loadtxt('rs4-im-d_perp.csv', delimiter=',')
|
|
|
|
-im_d = arr2D[arr2D[:, 0].argsort()]
|
|
|
|
-arr2D = np.loadtxt('rs4-re-d_perp.csv', delimiter=',')
|
|
|
|
-re_d = arr2D[arr2D[:, 0].argsort()]
|
|
|
|
|
|
+import scipy.io
|
|
|
|
+mat = scipy.io.loadmat('d-parameters/rs=4.mat')
|
|
|
|
+x_mat = mat['omegav'][0]
|
|
|
|
+d_perp_mat = mat['dperp'][0]*10
|
|
|
|
|
|
-xmin_im = np.min(im_d[:, 0])
|
|
|
|
-xmin_re = np.min(re_d[:, 0])
|
|
|
|
-xmax_im = np.max(im_d[:, 0])
|
|
|
|
-xmax_re = np.max(re_d[:, 0])
|
|
|
|
-x = np.linspace(np.max([xmin_im, xmin_re]), np.min([xmax_im, xmax_re]), 1000)
|
|
|
|
-im_d_y = interpolate.interp1d(im_d[:, 0], im_d[:, 1])
|
|
|
|
-re_d_y = interpolate.interp1d(re_d[:, 0], re_d[:, 1])
|
|
|
|
|
|
+# arr2D = np.loadtxt('rs4-im-d_perp.csv', delimiter=',')
|
|
|
|
+# im_d = arr2D[arr2D[:, 0].argsort()]
|
|
|
|
+# arr2D = np.loadtxt('rs4-re-d_perp.csv', delimiter=',')
|
|
|
|
+# re_d = arr2D[arr2D[:, 0].argsort()]
|
|
|
|
+
|
|
|
|
+x = np.linspace(x_mat[0], x_mat[-1], 1001)
|
|
|
|
+im_d_y = interpolate.interp1d(x_mat, np.imag(d_perp_mat), kind='cubic')
|
|
|
|
+re_d_y = interpolate.interp1d(x_mat, np.real(d_perp_mat))
|
|
|
|
|
|
data = np.array([x.T, re_d_y(x).T, im_d_y(x).T])
|
|
data = np.array([x.T, re_d_y(x).T, im_d_y(x).T])
|
|
-np.savetxt('rs4-d_perp.txt', data)
|
|
|
|
|
|
+np.savetxt('rs4-d_perp_interpolated.txt', data)
|
|
|
|
|
|
-# print(data)
|
|
|
|
-# plt.plot(im_d[:, 0], im_d[:, 1], marker='o', ls='')
|
|
|
|
-# plt.plot(x, im_d_y(x))
|
|
|
|
-# plt.plot(re_d[:, 0], re_d[:, 1], marker='o', ls='')
|
|
|
|
-# plt.plot(x, re_d_y(x))
|
|
|
|
-# plt.xlim((0, 1))
|
|
|
|
-# plt.ylim((-4, 5))
|
|
|
|
-# plt.show()
|
|
|
|
|
|
|
|
-from_disk = np.loadtxt('rs4-d_perp.txt')
|
|
|
|
|
|
+from_disk = np.loadtxt('rs4-d_perp_interpolated.txt')
|
|
plt.plot(from_disk[0, :], from_disk[1, :], label='re d')
|
|
plt.plot(from_disk[0, :], from_disk[1, :], label='re d')
|
|
plt.plot(from_disk[0, :], from_disk[2, :], label='im d')
|
|
plt.plot(from_disk[0, :], from_disk[2, :], label='im d')
|
|
|
|
+plt.plot(x_mat, np.real(d_perp_mat), label='re d mat')
|
|
|
|
+plt.plot(x_mat, np.imag(d_perp_mat), label='re d mat')
|
|
plt.legend()
|
|
plt.legend()
|
|
plt.show()
|
|
plt.show()
|