You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

plot_dsf_k_fixed.py 673B

123456789101112131415161718192021222324252627282930313233343536
  1. #! /usr/bin/env python
  2. """
  3. Plot fixed momentum DSF.
  4. Usage: python plot_dsf_k_fixed.py [omega file] [dsf file]
  5. """
  6. import matplotlib.pyplot as plt
  7. import numpy as np
  8. import sys
  9. omegafile = str(sys.argv[1])
  10. dsffile = str(sys.argv[2])
  11. omega = np.loadtxt(omegafile)
  12. dsf = np.loadtxt(dsffile)
  13. plt.plot(omega, dsf)
  14. plt.xlabel('$\omega$')
  15. plt.ylabel('$S (k, \omega)$')
  16. elements = dsffile.split('_')
  17. c_int = elements[3]
  18. L = elements[5]
  19. N = elements[7]
  20. iK = elements[12]
  21. width = elements[20].partition('.')[0]
  22. rho = int(N)/int(L)
  23. kokF = int(iK)*0.5/int(L)
  24. plt.title(f'c={c_int}, rho={rho} (N={N}), k={kokF}k_F, w={width}')
  25. plt.savefig(dsffile.replace('.', '_') + '.png')