astro.py 文件源码

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

项目:nmmn 作者: rsnemmen 项目源码 文件源码
def arcsec2pc(d=15.,a=1.):
    """
Given the input angular size and distance to the object, computes
the corresponding linear size in pc. 

:param d: distance in Mpc
:param a: angular size in arcsec
:returns: linear size in pc
    """

    # convert arcsec to radians
    a=a*4.848e-6    
    # convert distance to pc instead of Mpc
    d=d*1e6

    return d*numpy.tan(a)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号