make_catalog_random_positions_sphere

gammapy.astro.population.make_catalog_random_positions_sphere(size=100, distance_min='0 pc', distance_max='1 pc', random_state='random-seed')[source]

Sample random source locations in a sphere.

This can be used to generate an isotropic source population in a sphere, e.g. to represent extra-galactic sources.

Parameters:
size : int

Number of sources

distance_min, distance_max : Quantity

Minimum and maximum distance

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

Defines random number generator initialisation. Passed to get_random_state.

Returns:
catalog : Table

Table with 3D position spherical coordinates. Columns: lon (deg), lat (deg), distance(pc)