From 85e7ba0ab98ddcd37f2631a2c12e50841e4a53a0 Mon Sep 17 00:00:00 2001 From: Andrey Antipov Date: Tue, 10 Feb 2015 13:42:34 -0500 Subject: [PATCH] minor script update --- scripts/parse_df.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/parse_df.py b/scripts/parse_df.py index 3bef57c..eeb0f9a 100644 --- a/scripts/parse_df.py +++ b/scripts/parse_df.py @@ -27,8 +27,13 @@ def main(fname = "output.h5", verbosity = 2): # read self-energy (grids, sigma_lat) = read_hdf5(data["sigma_lat"]) - potential_energy = (sigma_lat*glat).sum()/pow(len(kgrid),2) + potential_energy = (sigma_lat*glat).sum()/pow(len(kgrid),2)/beta print "Tr[\Sigma * G] = ", potential_energy + + sigma_g = wgrid.copy() * 0.0j + for w in range(len(wgrid)): + sigma_g[w] = (sigma_lat[w,:]*glat[w,:]).sum()/pow(len(kgrid),2)/beta + np.savetxt("sigma_g.dat", np.vstack([wgrid,np.real(sigma_g)]).transpose()) def read_hdf5(group): ''' read gridobject from hdf5 '''