Skip to content

Commit

Permalink
Refs #39. added a testcase for sqe2dos
Browse files Browse the repository at this point in the history
  • Loading branch information
yxqd committed Aug 6, 2017
1 parent 3d0c787 commit 896ed85
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/backward/sqe2dos_TestCase.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,24 @@ def test2a(self):
return


def test2a2(self):
iqehist = hh.load(os.path.join(datadir, "V-iqe.h5"))
from multiphonon.sqe import interp
newiqe = interp(iqehist, newE = np.arange(-15.5, 80, 1.))
iterdos = sqe2dos.sqe2dos(
newiqe, T=300, Ecutoff=55., elastic_E_cutoff=(-12., 6.7), M=50.94,
C_ms=.2, Ei=120., workdir='work-V')
from multiphonon.backward.singlephonon_sqe2dos import EnergyAxisMissingBinCenterAtZero
with self.assertRaises(EnergyAxisMissingBinCenterAtZero):
for i, dos in enumerate(iterdos):
# print dos
# plot
if interactive:
# print '*' * 70
pylab.plot(dos.E, dos.I, label='%d' % i)
return


def test2b(self):
iqehist = hh.load(os.path.join(datadir, "Al-iqe.h5"))
from multiphonon.sqe import interp
Expand Down

0 comments on commit 896ed85

Please sign in to comment.