def test_extrapolate_rows(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 = GeoInterpolator((lons, lats), (lines, cols), (hlines, hcols)) np.testing.assert_allclose( satint._extrapolate_rows(satint.tie_data[0], hlines, -0.4, 9.4), TIES_EXP4)
def test_extrapolate_rows(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 = GeoInterpolator((lons, lats), (lines, cols), (hlines, hcols)) np.testing.assert_allclose(satint._extrapolate_rows(satint.tie_data[0], hlines, -0.4, 9.4), TIES_EXP4)
def test_extrapolate_rows(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 = GeoInterpolator((lons, lats), (lines, cols), (hlines, hcols)) self.assertTrue(np.allclose(satint._extrapolate_rows(satint.tie_data[0]), np.array([[ 6381081.08333225, 6381639.66045187, 6372470.10269454, 6353590.21586788, 6325042.05851245], [ 6370997. , 6366146.21816553, 6351605.98629588, 6327412.61244969, 6293626.50067273], [ 6345786.79166939, 6327412.61244969, 6299445.69529922, 6261968.60390423, 6215087.60607344], [ 6335702.70833714, 6311919.17016336, 6278581.57890056, 6235791.00048604, 6183672.04823372]])))