示例#1
0
 def test_fill_col_borders(self):
     lons = np.arange(10).reshape((2, 5), order="F")
     lats = np.arange(10).reshape((2, 5), order="C")
     lines = np.array([2, 7])
     cols = np.array([2, 7, 12, 17, 22])
     hlines = np.arange(10)
     hcols = np.arange(24)
     satint = SatelliteInterpolator((lons, lats), (lines, cols),
                                    (hlines, hcols))
     satint._fill_col_borders()
     self.assertTrue(
         np.allclose(
             satint.tie_data[0],
             np.array([[
                 6372937.31273379, 6370997., 6366146.21816553,
                 6351605.98629588, 6327412.61244969, 6293626.50067273,
                 6286869.27831734
             ],
                       [
                           6353136.46335726, 6345786.79166939,
                           6327412.61244969, 6299445.69529922,
                           6261968.60390423, 6215087.60607344,
                           6205711.40650728
                       ]])))
     self.assertTrue(
         np.allclose(satint.col_indices, np.array([0, 2, 7, 12, 17, 22,
                                                   23])))
示例#2
0
 def test_fill_col_borders(self):
     lons = np.arange(10).reshape((2, 5), order="F")
     lats = np.arange(10).reshape((2, 5), order="C")
     lines = np.array([2, 7])
     cols = np.array([2, 7, 12, 17, 22])
     hlines = np.arange(10)
     hcols = np.arange(24)
     satint = SatelliteInterpolator(
         (lons, lats), (lines, cols), (hlines, hcols))
     satint._fill_col_borders()
     self.assertTrue(np.allclose(satint.tie_data[0], TIES_EXP3))
     self.assertTrue(np.allclose(satint.col_indices,
                                 np.array([0,  2,  7, 12, 17, 22, 23])))
示例#3
0
 def test_fill_col_borders(self):
     lons = np.arange(10).reshape((2, 5), order="F")
     lats = np.arange(10).reshape((2, 5), order="C")
     lines = np.array([2, 7])
     cols = np.array([2, 7, 12, 17, 22])
     hlines = np.arange(10)
     hcols = np.arange(24)
     satint = SatelliteInterpolator((lons, lats), (lines, cols), (hlines, hcols))
     satint._fill_col_borders()
     self.assertTrue(np.allclose(satint.tie_data[0],
       np.array([[ 6372937.31273379,  6370997.        ,  6366146.21816553,
                   6351605.98629588,  6327412.61244969,  6293626.50067273,
                   6286869.27831734],
                 [ 6353136.46335726,  6345786.79166939,  6327412.61244969,
                   6299445.69529922,  6261968.60390423,  6215087.60607344,
                   6205711.40650728]])))
     self.assertTrue(np.allclose(satint.col_indices,
                                 np.array([ 0,  2,  7, 12, 17, 22, 23])))