コード例 #1
0
 def test_dist_from_orbit(self):
     beta = abs(-17.04 + np.arange(self.nray) * self.bw_pr)
     xy, r, z = georef.correct_parallax(self.pr_xy, self.nbin, self.dr, self.alpha)
     dists = georef.dist_from_orbit(self.zt, self.alpha, beta, r, re=self.re)
     bd = np.array(
         [
             426553.58667772,
             426553.50342119,
             426553.49658156,
             426553.51025979,
             426553.43461609,
             426553.42515894,
             426553.46559985,
             426553.37020786,
             426553.44407286,
             426553.42173696,
         ]
     )
     sd = np.array(
         [
             426553.58667772,
             424895.63462839,
             423322.25176564,
             421825.47714885,
             420405.9414294,
             419062.44208923,
             417796.86827302,
             416606.91482435,
             415490.82582636,
             414444.11587979,
         ]
     )
     np.testing.assert_allclose(dists[0:10, 0, 0], bd, rtol=1e-12)
     np.testing.assert_allclose(dists[0, 0:10, 0], sd, rtol=1e-12)
コード例 #2
0
ファイル: test_georef.py プロジェクト: lovechang1986/wradlib
 def test_dist_from_orbit(self):
     alpha = abs(-17.04 + np.arange(self.nray) * self.bw_pr)
     xy, r, z = georef.correct_parallax(self.pr_xy, self.nbin,
                                        self.dr, alpha)
     dists = georef.dist_from_orbit(self.zt, alpha, r)
     bd = np.array([425687.50748141, 424109.33230608, 422607.46970342,
                    421180.65286622, 419827.68811468, 418547.45236861,
                    417338.89079494, 416201.01462109, 415132.8991056,
                    414133.68165791])
     sd = np.array([425687.50748141, 425562.50748141, 425437.50748141,
                    425312.50748141, 425187.50748141, 425062.50748141,
                    424937.50748141, 424812.50748141, 424687.50748141,
                    424562.50748141])
     np.testing.assert_allclose(dists[0:10, 0], bd, rtol=1e-12)
     np.testing.assert_allclose(dists[0, 0:10], sd, rtol=1e-12)
コード例 #3
0
ファイル: test_georef.py プロジェクト: wradlib/wradlib
 def test_dist_from_orbit(self):
     beta = abs(-17.04 + np.arange(self.nray) * self.bw_pr)
     xy, r, z = georef.correct_parallax(self.pr_xy, self.nbin,
                                        self.dr, self.alpha)
     dists = georef.dist_from_orbit(self.zt, self.alpha, beta, r,
                                    re=self.re)
     bd = np.array([426553.58667772, 426553.50342119, 426553.49658156,
                    426553.51025979, 426553.43461609, 426553.42515894,
                    426553.46559985, 426553.37020786, 426553.44407286,
                    426553.42173696])
     sd = np.array([426553.58667772, 424895.63462839, 423322.25176564,
                    421825.47714885, 420405.9414294,  419062.44208923,
                    417796.86827302, 416606.91482435, 415490.82582636,
                    414444.11587979])
     np.testing.assert_allclose(dists[0:10, 0, 0], bd, rtol=1e-12)
     np.testing.assert_allclose(dists[0, 0:10, 0], sd, rtol=1e-12)