Skip to content

Commit

Permalink
minor script update
Browse files Browse the repository at this point in the history
  • Loading branch information
aeantipov committed Feb 10, 2015
1 parent ae32477 commit 85e7ba0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/parse_df.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 '''
Expand Down

0 comments on commit 85e7ba0

Please sign in to comment.