From 677d7f348b457aab7fb838cc1a6a6385870da2bb Mon Sep 17 00:00:00 2001 From: Alexey Pechnikov Date: Thu, 3 Aug 2023 15:45:08 +0700 Subject: [PATCH] Fix undefined variables in ra2ll() --- pygmtsar/pygmtsar/SBAS_geocode.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pygmtsar/pygmtsar/SBAS_geocode.py b/pygmtsar/pygmtsar/SBAS_geocode.py index bee524f7..8329f412 100644 --- a/pygmtsar/pygmtsar/SBAS_geocode.py +++ b/pygmtsar/pygmtsar/SBAS_geocode.py @@ -179,7 +179,9 @@ def get_intf_ra2ll(self, subswath=None, chunksize=None): return trans def intf_ra2ll(self, grid, chunksize=None): - # get transform table for interferogram grid + """ + Faster geocoding for interferogram grid. It uses usually decimated transformation table vs full table in ra2ll. + """ trans = self.get_intf_ra2ll() return self.ra2ll(grid, trans=trans, chunksize=chunksize) @@ -282,14 +284,15 @@ def intf_block(lats_block, lons_block, grid_ra): call SBAS.topo_ra_parallel() or SBAS.geocode_parallel() with less coarsing' # decimate the full trans grid to the required spacing if step_y>1 or step_x>1: - trans = trans.sel(lat=lats, lon=lons) + # define the equally spacing geographic coordinates grid + trans = trans.sel(lat=trans.lat[::step_y], lon=trans.lon[::step_x]) # select required variables only trans = trans[['azi', 'rng']] - + # define the equally spacing geographic coordinates grid lats = trans.lat[::step_y] lons = trans.lon[::step_x] - + # specify output coordinates lats = trans.lat lons = trans.lon