core.py 文件源码

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

项目:sbpy 作者: mommermi 项目源码 文件源码
def rho_as_length(rho, eph):
    """Angular distance to projected linear distance.

    Parameters
    ----------
    rho : `~astropy.units.Quantity`
      Projected distance in units of angle.

    eph : dictionary-like or `~sbpy.data.Ephem`
      Ephemerides; requires geocentric distance as `delta`.

    Returns
    -------
    rho_l : `~astropy.units.Quantity`

    """

    if rho.unit.is_equivalent(u.rad):
        rho_l = eph['delta'].to(u.m) * np.tan(rho)
    else:
        assert rho.unit.is_equivalent(u.m)
        rho_l = rho

    return rho_l
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号