sky.py 文件源码

python
阅读 38 收藏 0 点赞 0 评论 0

项目:fg21sim 作者: liweitianux 项目源码 文件源码
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)


##########################################################################
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号