recon_one.py 文件源码

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

项目:jamespy_py3 作者: jskDr 项目源码 文件源码
def _interp2_r0(Data, Pow2factor, kind, disp=False):
    if disp:
        p30 = np.poly1d(np.polyfit([10, 30, 50, 60, 70, 80],
                                   np.log([0.8, 1.3, 6, 12, 28, 56]), 2))
        print('Expectd time for NxN data:', np.exp(p30(Data.shape[0])))

    x = np.arange(Data.shape[1])
    y = np.arange(Data.shape[0])
    xv, yv = np.meshgrid(x, y)
    f = interpolate.interp2d(xv, yv, Data, kind=kind)

    xnew = np.arange(0, Data.shape[1], 1 / (2**Pow2factor))
    ynew = np.arange(0, Data.shape[0], 1 / (2**Pow2factor))
    Upsampled = f(xnew, ynew)

    return Upsampled
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号