Skip to content

Commit

Permalink
Fix undefined variables in ra2ll()
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyPechnikov committed Aug 3, 2023
1 parent 6898a6d commit 677d7f3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pygmtsar/pygmtsar/SBAS_geocode.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 677d7f3

Please sign in to comment.