Skip to content

Commit

Permalink
Add sign for elevation calculation following the used convension to i…
Browse files Browse the repository at this point in the history
…nterferogram pairs order and baseline sign
  • Loading branch information
AlexeyPechnikov committed Feb 29, 2024
1 parent fee1636 commit aa6416f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pygmtsar/pygmtsar/Stack_incidence.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,14 +430,15 @@ def elevation_m(self, unwrap, baseline):
import numpy as np

assert self.is_ra(unwrap), 'ERROR: unwrapped phase needs to be defined in radar coordinates'

# expected accuracy about 0.01%
#wavelength, slant_range = self.PRM().get('radar_wavelength','SC_height')
wavelength, slant_range_start,slant_range_end = self.PRM().get('radar_wavelength', 'SC_height_start', 'SC_height_end')
slant_range = xr.DataArray(np.linspace(slant_range_start,slant_range_end, unwrap.shape[1]),
coords=[unwrap.coords['x']])
incidence = self.incidence_angle().reindex_like(unwrap, method='nearest')
return (wavelength*unwrap*slant_range*np.cos(incidence)/(4*np.pi*baseline)).rename('ele')
# sign corresponding to baseline and phase signs
return -(wavelength*unwrap*slant_range*np.cos(incidence)/(4*np.pi*baseline)).rename('ele')

def compute_satellite_look_vector(self, interactive=False):
#import dask
Expand Down

0 comments on commit aa6416f

Please sign in to comment.