def test_projected_mass(self): m200 = 1e15 c = 3 z = 0.3 nfw = NFW(m200, c, z) r = np.linspace(0.2, 3, 20) * u.Mpc m_proj = nfw.projected_mass(r) / 1e14 # Comparison array was computed by numerical integration m_comp = np.array([1.16764258, 2.43852383, 3.73913358, 5.00209594, 6.20564153, 7.34451809, 8.41992698, 9.43555485, 10.39589583, 11.3055228 , 12.16877709, 12.98964993, 13.77175259, 14.51832709, 15.23227395, 15.91618585, 16.57238171, 17.20293864, 17.80972092, 18.39440572]) assert_array_almost_equal(m_proj.value, m_comp)
def test_projected_mass(self): m200 = 1e15 c = 3 z = 0.3 nfw = NFW(m200, c, z) r = np.linspace(0.2, 3, 20) * u.Mpc m_proj = nfw.projected_mass(r) / 1e14 # Comparison array was computed by numerical integration m_comp = np.array([ 1.16764258, 2.43852383, 3.73913358, 5.00209594, 6.20564153, 7.34451809, 8.41992698, 9.43555485, 10.39589583, 11.3055228, 12.16877709, 12.98964993, 13.77175259, 14.51832709, 15.23227395, 15.91618585, 16.57238171, 17.20293864, 17.80972092, 18.39440572 ]) assert_array_almost_equal(m_proj.value, m_comp)
def test_projected_mass(self): m200 = 1e15 c = 3 z = 0.3 nfw = NFW(m200, c, z) r = np.linspace(0.2, 3, 20) * u.Mpc m_proj = nfw.projected_mass(r) / 1e14 # Comparison array was computed by numerical integration m_comp = np.array([ 1.16749071e+14, 2.43823901e+14, 3.73873287e+14, 5.00159715e+14, 6.20505986e+14, 7.34386597e+14, 8.41921446e+14, 9.43479009e+14, 1.03950855e+15, 1.13046724e+15, 1.21678913e+15, 1.29887325e+15, 1.37708069e+15, 1.45173558e+15, 1.52312796e+15, 1.59151704e+15, 1.65713471e+15, 1.72018864e+15, 1.78086525e+15, 1.83933223e+15 ]) / 1e14 assert_array_almost_equal(m_proj.value, m_comp)
def test_projected_mass(self): m200 = 1e15 c = 3 z = 0.3 nfw = NFW(m200, c, z) r = np.linspace(0.2, 3, 20) * u.Mpc m_proj = nfw.projected_mass(r) / 1e14 # Comparison array was computed by numerical integration m_comp = ( np.array( [ 1.16749071e14, 2.43823901e14, 3.73873287e14, 5.00159715e14, 6.20505986e14, 7.34386597e14, 8.41921446e14, 9.43479009e14, 1.03950855e15, 1.13046724e15, 1.21678913e15, 1.29887325e15, 1.37708069e15, 1.45173558e15, 1.52312796e15, 1.59151704e15, 1.65713471e15, 1.72018864e15, 1.78086525e15, 1.83933223e15, ] ) / 1e14 ) assert_array_almost_equal(m_proj.value, m_comp)