sample_sphere¶
-
gammapy.utils.random.
sample_sphere
(size, lon_range=None, lat_range=None, random_state='random-seed')[source]¶ Sample random points on the sphere.
Reference: http://mathworld.wolfram.com/SpherePointPicking.html
Parameters: - size : int
Number of samples to generate
- lon_range :
Angle
, optional Longitude range (min, max)
- lat_range :
Angle
, optional Latitude range (min, max)
- random_state : {int, ‘random-seed’, ‘global-rng’,
RandomState
} Defines random number generator initialisation. Passed to
get_random_state
.
Returns: - lon, lat: `~astropy.coordinates.Angle`
Longitude and latitude coordinate arrays