sweetcat.py 文件源码

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

项目:SWEETer-Cat 作者: DanielAndreasen 项目源码 文件源码
def absolute_magnitude(parallax, m):
    """Calculate the absolute magnitude based on distance and apparent mag.
    Inputs
    ------
    parallax : float
      The parallax in mas
    m : float
      The apparent magnitude

    Output
    ------
    M : float
      The absolute magnitude
    """
    d = 1. / (parallax*1e-3)  # Conversion to arcsecond before deriving distance
    mu = 5 * np.log10(d) - 5
    M = m - mu
    return M
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号