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, optional

Number of sources. Default is 100.

dimension{1, 2, 3}

Number of dimensions. Default is 3.

distance_maxQuantity, optional

Maximum distance. Default is “1 pc”.

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

Defines random number generator initialisation. Default is ‘random-seed’. Passed to get_random_state.

Returns
tableTable

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