def test_getEntropy(self): """ Test the getEntropy() method. """ Tlist = numpy.array([300,500,1000,1500,2000]) Sexplist = numpy.array([6.340212, 6.851038, 7.544185, 7.949650, 8.237332]) for T, Sexp in zip(Tlist, Sexplist): Sact = getEntropy(T, self.energy, self.degeneracy, self.n0) self.assertAlmostEqual(Sexp / Sact, 1.0, 4, '{0} != {1} within 4 figures'.format(Sexp, Sact))
def getEntropy(self, T): return schrodinger.getEntropy(T,self.energy,nmax=len(self.evals))