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