Last active
June 16, 2018 04:44
-
-
Save wistaria/ee4cf2d7b01bfa8d8a85 to your computer and use it in GitHub Desktop.
結果のプロットのための ALPS Python スクリプト例
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyalps | |
import matplotlib.pyplot as plt | |
import pyalps.plot | |
#load the susceptibility and collect it as function of temperature T | |
data = pyalps.loadMeasurements(pyalps.getResultFiles(prefix='parm2c'),'Susceptibility') | |
susceptibility = pyalps.collectXY(data,x='T',y='Susceptibility') | |
#make plot | |
plt.figure() | |
pyalps.plot.plot(susceptibility) | |
plt.xlabel('Temperature $T/J$') | |
plt.ylabel('Susceptibility $\chi J$') | |
plt.ylim(0,0.22) | |
plt.title('Quantum Heisenberg chain') | |
plt.savefig('susceptibility.pdf') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment