test_Model.py 文件源码

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

项目:MulensModel 作者: rpoleski 项目源码 文件源码
def test_BLPS_01():
    """simple binary lens with point source"""
    params = ModelParameters({
            't_0':6141.593, 'u_0':0.5425, 't_E':62.63*u.day, 
            'alpha':49.58*u.deg, 's':1.3500, 'q':0.00578})
    model = Model(parameters=params)
    t = np.array([6112.5])
    data = MulensData(data_list=[t, t*0.+16., t*0.+0.01])
    model.set_datasets([data])
    magnification = model.data_magnification[0][0]
    np.testing.assert_almost_equal(magnification, 4.691830781584699) # This value comes from early version of this code.
    # np.testing.assert_almost_equal(m, 4.710563917) # This value comes from Andy's getbinp().
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号