def setUp(self): mock.set_loglevel(3) mock.cosmology_set(0.31) self.ps = mock.PowerSpectrum('../data/planck1_matterpower.dat') self.s = mock.Sigma(self.ps) self.mf = mock.MassFunction(self.s)
def test_max(self): s = mock.Sigma(self.ps, M_max=1.0e15) self.assertAlmostEqual(s.M_range[1], 1.0e15)
def test_n(self): s = mock.Sigma(self.ps, n=1200) self.assertEqual(len(s), 1200)
def test_min(self): s = mock.Sigma(self.ps, M_min=1.0e9) self.assertAlmostEqual(s.M_range[0], 1.0e9) self.assertAlmostEqual(s(1.0e9), 4.686409600351472)