|
@@ -13,15 +13,16 @@ import numpy as np
|
13
|
13
|
import os
|
14
|
14
|
import sys
|
15
|
15
|
|
16
|
|
-width = str(sys.argv[1])
|
|
16
|
+N = str(sys.argv[1])
|
|
17
|
+width = str(sys.argv[2])
|
17
|
18
|
|
18
|
19
|
|
19
|
20
|
# Get the list of interactions which have been computed
|
20
|
|
-dirlist = os.listdir('../store/')
|
|
21
|
+dirlist = os.listdir('../data/N_%s' % N)
|
21
|
22
|
clist = sorted([float(c.lstrip('c_')) for c in dirlist])
|
22
|
23
|
|
23
|
24
|
# Get the Omega file
|
24
|
|
-omegafile = glob.glob('../store/c_%s*/Omega*' % str(clist[0]).rstrip('.0')[:12])[0]
|
|
25
|
+omegafile = glob.glob('../data/N_%s/c_%s*/Omega*' % (N, str(clist[0]).rstrip('.0')[:12]))[0]
|
25
|
26
|
omega = np.loadtxt(omegafile)
|
26
|
27
|
|
27
|
28
|
# Load all the available dsfs from the data store
|
|
@@ -31,11 +32,22 @@ for c in clist:
|
31
|
32
|
# first try for exact match, stripping '.0' to treat integer values, e.g. 4.0 into 4
|
32
|
33
|
# and then (if it doesn't work) use only the first 12 characters, plus wildcard, to cover rounding errors
|
33
|
34
|
try:
|
34
|
|
- dsffile = glob.glob('../store/c_%s/*_w_%s.dsfs' % (str(c).rstrip('.0'), width))[0]
|
|
35
|
+ dsffile = glob.glob('../data/N_%s/c_%s/*_w_%s.dsfs' % (N, str(c).rstrip('.0'), width))[0]
|
35
|
36
|
except IndexError:
|
36
|
|
- dsffile = glob.glob('../store/c_%s*/*_w_%s.dsfs' % (str(c).rstrip('.0')[:12], width))[0]
|
|
37
|
+ dsffile = glob.glob('../data/N_%s/c_%s*/*_w_%s.dsfs' % (N, str(c).rstrip('.0')[:12], width))[0]
|
37
|
38
|
dsfs[str(c)] = np.loadtxt(dsffile)
|
38
|
39
|
|
|
40
|
+# Read some useful parameters from (last) file name:
|
|
41
|
+elements = dsffile.rpartition('/')[2].split('_')
|
|
42
|
+L = elements[5]
|
|
43
|
+#N = elements[7]
|
|
44
|
+iK = elements[12]
|
|
45
|
+width = elements[20].rpartition('.')[0]
|
|
46
|
+# which leads to
|
|
47
|
+rho = int(N)/int(L)
|
|
48
|
+kokF = int(iK)*0.5/int(L)
|
|
49
|
+
|
|
50
|
+
|
39
|
51
|
fig, ax = plt.subplots()
|
40
|
52
|
|
41
|
53
|
ax.set_xlim(omega[0], omega[-1])
|
|
@@ -43,9 +55,10 @@ ax.set_xlim(omega[0], omega[-1])
|
43
|
55
|
dsfsmax = max(dsfs[str(clist[0])])
|
44
|
56
|
print('dsfsmax = ', dsfsmax)
|
45
|
57
|
|
46
|
|
-ymax = 1.2 * dsfsmax
|
|
58
|
+ymax = 1.01 * dsfsmax
|
|
59
|
+ymax=4
|
47
|
60
|
xtext = 0.6 * omega[-1]
|
48
|
|
-ytext = 1.1 * dsfsmax
|
|
61
|
+ytext = 0.9 * ymax
|
49
|
62
|
|
50
|
63
|
ax.set_ylim([0, ymax])
|
51
|
64
|
ax.text(xtext, ytext, f'c = {clist[0]}')
|
|
@@ -54,6 +67,7 @@ def animate(i):
|
54
|
67
|
ax.clear()
|
55
|
68
|
ax.set_xlim(omega[0], omega[-1])
|
56
|
69
|
ax.set_ylim([0, ymax])
|
|
70
|
+ ax.set_title(f'c scan, rho={rho} (N={N}), k={kokF}k_F, w={width}')
|
57
|
71
|
ax.text(xtext, ytext, f'c = {clist[i]:10.6f}')
|
58
|
72
|
ax.plot(omega, dsfs[str(clist[i])])
|
59
|
73
|
|