Skip to content

Commit

Permalink
Enhance aligment filtering out NaN evelation values. It should not af…
Browse files Browse the repository at this point in the history
…fect processing but simplifies debug.
  • Loading branch information
AlexeyPechnikov committed Mar 9, 2024
1 parent 15491b6 commit 6ef79e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pygmtsar/pygmtsar/Stack_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ def _get_topo_llt(self, subswath, degrees, debug=False):

lats, lons, z = xr.broadcast(dem_area.lat, dem_area.lon, dem_area)
topo_llt = np.column_stack([lons.values.ravel(), lats.values.ravel(), z.values.ravel()])
return topo_llt
# filter out records where the third column (index 2) is NaN
return topo_llt[~np.isnan(topo_llt[:, 2])]

# aligning for reference image
def _align_ref_subswath(self, subswath, debug=False):
Expand Down

0 comments on commit 6ef79e3

Please sign in to comment.