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
- sizeint, optional
Number of sources. Default is 100.
- distance_min, distance_max
Quantity
, optional Minimum and maximum distance. Default is “0 pc” and “1 pc”, respectively.
- random_state{int, ‘random-seed’, ‘global-rng’,
RandomState
} Defines random number generator initialisation. Default is “random-state”. Passed to
get_random_state
.
- Returns
- catalog
Table
Table with 3D position spherical coordinates. Columns: lon (deg), lat (deg), distance(pc).
- catalog