test_profiles.py 文件源码

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

项目:formulas 作者: jzuhone 项目源码 文件源码
def test_AM06_temperature():
    p = AM06_temperature_profile()
    a_c = 60*ytu.kpc
    a = 600.*ytu.kpc
    c = 0.17
    T_0 = 10.*ytu.keV
    p.set_param_values(T_0=T_0, a_c=a_c, c=c, a=a)
    assert_allclose(p(r_yt).value, (T_0/(1.+r_yt/a)*(c+r_yt/a_c)/(1.+r_yt/a_c)).value)
    assert str(p(r_yt).units) == str(T_0.units)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号