예제 #1
0
 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)
예제 #2
0
 def test_max(self):
     s = mock.Sigma(self.ps, M_max=1.0e15)
     self.assertAlmostEqual(s.M_range[1], 1.0e15)
예제 #3
0
 def test_n(self):
     s = mock.Sigma(self.ps, n=1200)
     self.assertEqual(len(s), 1200)
예제 #4
0
 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)