3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-25 22:03:43 +01:00
dft_tools/different_moves.ipynb

17 KiB

None <html> <head> </head>
In [8]:
from pytriqs.archive import HDFArchive
R = HDFArchive('histo.h5', 'r')  # Opens the file myfile.h5 in readonly mode 
H = R['H'] 
P = HDFArchive('params.h5', 'r')  # Opens the file myfile.h5 in readonly mode 
pl = P['pl'].real[0]
pr = P['pr'].real[0]
xmax = P['xmax'].real[0]
N_Cycles = P['N_Cycles'].real[0]
Length_Cycle = P['Length_Cycle'].real[0]

temp=(pr+pl)/2
pr/=temp
pl/=temp
sigma=sqrt(Length_Cycle*min(pr,pl))

plot(H, 'b')
x=[i for i in range(100)]
y=[ 1/ (sqrt(2*pi)*sigma) * exp( - (x[i]-xmax)**2 / (2*sigma**2) ) for i in range(100)]
plot(x, y, 'g')
Out[8]:
[<matplotlib.lines.Line2D at 0x3bbb7d0>]
In [ ]:

</html>