Skip to content

Commit

Permalink
added missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
yomichi committed Oct 2, 2023
1 parent 214889c commit 730df7d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sample/07_timeevolution/plot.plt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set yr [-0.5:0.5]
set ytics 0.25
set key bottom
set xl "time"
set yl "magnetization"

plot \
"magnetization_strong.dat" w lp pt 5 t"hx=2.0", \
"magnetization_middle.dat" w lp pt 7 t"hx=0.8", \
"magnetization_weak.dat" w lp pt 9 t"hx=0.5", \
0.0 lc "black" t""
17 changes: 17 additions & 0 deletions sample/08_finitetemperature/calcspec.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import numpy as np
from scipy.interpolate import splrep, splev


def spec(name):
data = np.loadtxt(f"./energy_{name}.dat")
bs = data[:, 0]
Es = data[:, 1]
spl = splrep(bs, Es)
Cs = -bs * bs * splev(bs, spl, der=1)
with open(f"./spec_{name}.dat", "w") as f:
for b, C in zip(bs, Cs):
f.write(f"{b} {C}\n")


for name in ("weak", "middle", "strong"):
spec(name)

0 comments on commit 730df7d

Please sign in to comment.