def runTest(self):
"""
This tests the MStar function found in the utilities
class at two different decimal levels.
"""
# make sure invalid raises proper exception
self.assertRaises(IOError,redmapper.utilities.MStar,'blah','junk')
# make an SDSS test...
ms = redmapper.utilities.MStar('sdss','i03')
mstar = ms([0.1,0.2,0.3,0.4,0.5])
# test against IDL...
testing.assert_almost_equal(mstar,np.array([16.2375,17.8500,18.8281,19.5878,20.1751]),decimal=4)
# and against regressions...
testing.assert_almost_equal(mstar,np.array([ 16.23748776, 17.85000035, 18.82812871, 19.58783337, 20.17514801]))
评论列表
文章目录