Skip to content

Commit

Permalink
resample the z_gate when downsampling
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainp committed Dec 14, 2020
1 parent 91957fd commit e7fbd8c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions smrt/rtsolver/nadir_lrm_altimetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def solve(self, snowpack, emmodels, sensor, atmosphere=None):
# downsample
if self.oversampling > 1 and not self.return_oversampled:
t_gate = t_gate[::self.oversampling]
self.z_gate = self.z_gate[::self.oversampling]
newshape = list(waveform.shape[0:-1]) + [-1, self.oversampling] # split the last dimension into two, to agregate the subgates
waveform = np.mean(waveform.reshape(newshape), axis=-1)

Expand All @@ -125,6 +126,7 @@ def solve(self, snowpack, emmodels, sensor, atmosphere=None):
if self.return_contributions:
if self.return_theta_inc_sampling:
# we still have all the incident angles
nmu = len(t_inc_sample)
surface_vs_incidence = waveform[0:nmu]
interfaces_vs_incidence = waveform[nmu:2 * nmu]
volume = waveform[-1]
Expand Down

0 comments on commit e7fbd8c

Please sign in to comment.