make_catalog_random_positions_cube

gammapy.astro.population.make_catalog_random_positions_cube(size=100, dimension=3, distance_max='1 pc', random_state='random-seed')[source]

Make a catalog of sources randomly distributed on a line, square or cube.

This can be used to study basic source population distribution effects, e.g. what the distance distribution looks like, or for a given luminosity function what the resulting flux distributions are for different spatial configurations.

Parameters
sizeint

Number of sources

dimension{1, 2, 3}

Number of dimensions

distance_maxQuantity

Maximum distance

random_state{int, ‘random-seed’, ‘global-rng’, RandomState}

Defines random number generator initialisation. Passed to get_random_state.

Returns
tableTable

Table with 3D position cartesian coordinates. Columns: x (pc), y (pc), z (pc)