test_ipol.py 文件源码

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

项目:wradlib 作者: wradlib 项目源码 文件源码
def setUp(self):
        NX = 2
        nx = np.linspace(-NX + 0.5, NX - 0.5, num=2 * NX, endpoint=True)
        vx = np.linspace(-NX, NX, num=2 * NX, endpoint=True)
        meshx, meshy = np.meshgrid(nx, nx)
        self.cartgrid = np.dstack((meshx, meshy))
        self.values = np.repeat(vx[:, np.newaxis], 2 * NX, 1)

        coord = georef.sweep_centroids(4, 1, NX, 0.)
        xx = coord[..., 0]
        yy = np.degrees(coord[..., 1])

        xxx = xx * np.cos(np.radians(90. - yy))
        x = xx * np.sin(np.radians(90. - yy))
        y = xxx

        self.newgrid = np.dstack((x, y))

        self.result = np.array([[0.47140452, 1.41421356],
                                [0.47140452, 1.41421356],
                                [-0.47140452, -1.41421356],
                                [-0.47140452, -1.41421356]])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号