def random_points(self, n=1):
"""
Generate uniformly distributed random points within the sky
(i.e., all sky; on an unit sphere).
Returns
-------
lon : float, or 1D `~numpy.ndarray`
Longitudes (Galactic/equatorial), [0, 360) [deg].
lat : float, or 1D `~numpy.ndarray`
Latitudes (Galactic/equatorial), [-90, 90] [deg].
"""
theta, phi = spherical_uniform(n)
lon = np.degrees(phi)
lat = 90.0 - np.degrees(theta)
return (lon, lat)
##########################################################################
评论列表
文章目录