Skip to content

Commit

Permalink
Fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
pnuu committed Jan 30, 2017
1 parent a8506e6 commit a6bb7e9
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions mpop/projector.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,12 @@ def __init__(self, in_area, out_area,
self._cache['ewa_rows'] = rows

elif self.mode == "bilinear":
from pyresample.bilinear import calc_params
from pyresample.bilinear import get_bil_info

bilinear_t, bilinear_s, input_idxs, idx_arr = \
calc_params(self.in_area, self.out_area,
self.radius, neighbours=32,
nprocs=nprocs, masked=False)
get_bil_info(self.in_area, self.out_area,
self.radius, neighbours=32,
nprocs=nprocs, masked=False)

self._cache = {}
self._cache['bilinear_s'] = bilinear_s
Expand Down Expand Up @@ -297,18 +297,19 @@ def project_array(self, data):
rows_per_scan=rows_per_scan)

elif self.mode == "bilinear":
from pyresample.bilinear import resample_bilinear
from pyresample.bilinear import get_sample_from_bil_info

if not 'bilinear_t' in self._cache:
self._cache['bilinear_t'] = self._file_cache['bilinear_t']
self._cache['bilinear_s'] = self._file_cache['bilinear_s']
self._cache['input_idxs'] = self._file_cache['input_idxs']
self._cache['idx_arr'] = self._file_cache['idx_arr']

res = resample_bilinear(data, self._cache['bilinear_t'],
self._cache['bilinear_s'],
self._cache['input_idxs'],
self._cache['idx_arr'],
self.out_area.shape)
res = get_sample_from_bil_info(data.ravel(),
self._cache['bilinear_t'],
self._cache['bilinear_s'],
self._cache['input_idxs'],
self._cache['idx_arr'],
output_shape=self.out_area.shape)

return res

0 comments on commit a6bb7e9

Please sign in to comment.