forked from joaogci/SSE
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot.py
More file actions
executable file
·91 lines (75 loc) · 2.41 KB
/
plot.py
File metadata and controls
executable file
·91 lines (75 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/usr/bin/env python3
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from post_processing import read_sse_output
import sys
plt.style.use('seaborn')
matplotlib.rcParams['mathtext.fontset'] = 'stix'
matplotlib.rcParams['font.family'] = 'STIXGeneral'
# Read the output file
FILENAME = sys.argv[1]
sim_info, sampled = read_sse_output(FILENAME)
# Plot the variables
fig, _ = plt.subplots(3, 3)
plt.figure(1)
fig.suptitle(FILENAME)
plt.subplot(3, 3, 1)
plt.errorbar(sampled["T"], sampled["E"], sampled["E_std"], fmt=".--")
plt.xlabel(r"$T$")
plt.ylabel(r"$\langle E \rangle$")
plt.legend()
plt.subplot(3, 3, 2)
plt.errorbar(sampled["T"], sampled["C"], sampled["C_std"], fmt=".--")
plt.xlabel(r"$T$")
plt.ylabel(r"$C$")
plt.legend()
plt.subplot(3, 3, 3)
plt.errorbar(sampled["T"], sampled["corr_mean"][:, 0], sampled["corr_std"][:, 0], fmt=".--")
plt.xlabel(r"$T$")
plt.ylabel(r"$C(0, 0)$")
plt.legend()
plt.subplot(3, 3, 4)
plt.errorbar(sampled["T"], sampled["ms"], sampled["m2_std"], fmt=".--")
plt.xlabel(r"$T$")
plt.ylabel(r"$\langle m_s \rangle$")
plt.legend()
plt.subplot(3, 3, 5)
plt.errorbar(sampled["T"], sampled["m2s"], sampled["m2s_std"], fmt=".--")
plt.xlabel(r"$T$")
plt.ylabel(r"$\langle m_s^2 \rangle$")
plt.legend()
plt.subplot(3, 3, 6)
plt.errorbar(sampled["T"], sampled["S_mean"], sampled["S_std"], fmt=".--")
plt.xlabel(r"$T$")
plt.ylabel(r"$S(\pi)$")
plt.legend()
plt.subplot(3, 3, 7)
plt.errorbar(sampled["T"], sampled["m"], sampled["m_std"], fmt=".--")
plt.xlabel(r"$T$")
plt.ylabel(r"$\langle m \rangle$")
plt.legend()
plt.subplot(3, 3, 8)
plt.errorbar(sampled["T"], sampled["m2"], sampled["m2_std"], fmt=".--")
plt.xlabel(r"$T$")
plt.ylabel(r"$\langle m^2 \rangle$")
plt.legend()
plt.subplot(3, 3, 9)
plt.errorbar(sampled["T"], sampled["m_sus"], sampled["m_sus_std"], fmt=".--")
plt.xlabel(r"$T$")
plt.ylabel(r"$\chi$")
plt.legend()
plt.figure(2)
for j, T in enumerate(sampled["T"]):
plt.errorbar(np.arange(sim_info["L"]), sampled["corr_mean"][j, :], sampled["corr_std"][j, :], fmt=".--", label=fr"$T={T}$")
plt.xlabel(r"$i$")
plt.ylabel(r"$C(0, i)$")
plt.legend()
if sim_info["n_k"] != 0:
plt.figure(3)
for j, T in enumerate(sampled["T"]):
plt.errorbar(sampled["w_k"][j, :], sampled["g_spin_mean"][j, :], sampled["g_spin_std"][j, :], fmt=".--", label=fr"$T={T}$")
plt.xlabel(r"$\omega_k$")
plt.ylabel(r"$g(\omega_k)$")
plt.legend()
plt.show()