@pytest.fixture(scope='session')
def mock_dm_halo():
    '\n    Mock dark matter Halo.\n\n    Creates a mock DM halo of particles with masses\n    and velocities.\n    '

    def make(N_part=1000, rmax=100, seed=55):
        random = np.random.RandomState(seed=seed)
        r = (random.random_sample(size=N_part) * rmax)
        cos_t = ((random.random_sample(size=N_part) * 2.0) - 1)
        phi0 = ((2 * np.pi) * random.random_sample(size=N_part))
        sin_t = np.sqrt((1 - (cos_t ** 2)))
        mass = (10000000000.0 * np.ones_like(r))
        x = ((r * sin_t) * np.cos(phi0))
        y = ((r * sin_t) * np.sin(phi0))
        z = (r * cos_t)
        pos = np.array([x, y, z]).T
        return (mass, pos)
    return make
Mock dark matter Halo.

Creates a mock DM halo of particles with masses
and velocities.
@pytest.fixture(scope='session')
def mock_dm_halo():
    '\n    Mock dark matter Halo.\n\n    Creates a mock DM halo of particles with masses\n    and velocities.\n    '

    def make(N_part=1000, rmax=100, seed=55):
        random = np.random.RandomState(seed=seed)
        r = (random.random_sample(size=N_part) * rmax)
        cos_t = ((random.random_sample(size=N_part) * 2.0) - 1)
        phi0 = ((2 * np.pi) * random.random_sample(size=N_part))
        sin_t = np.sqrt((1 - (cos_t ** 2)))
        mass = (10000000000.0 * np.ones_like(r))
        x = ((r * sin_t) * np.cos(phi0))
        y = ((r * sin_t) * np.sin(phi0))
        z = (r * cos_t)
        pos = np.array([x, y, z]).T
        return (mass, pos)
    return make