From 0e6cb7a68845cead49d539c5a179769866a5320a Mon Sep 17 00:00:00 2001 From: s-sasaki-earthsea-wizard Date: Wed, 23 Sep 2026 22:25:34 +0900 Subject: [PATCH] prep_nisar: fix the 90 deg offset in azimuthAngle The GUNW losUnitVectorX/Y layers are the east/north components of the target-to-sensor LOS unit vector, so the LOS azimuth angle in the ISCE-2 convention used across MintPy (measured from north, anti-clockwise positive; see utils0.enu2los) is atan2(-E, N). The previous expression, atan2(-N, -E), is offset from it by a constant -90 deg, which rotated the LOS direction seen by correct_SET and asc_desc2horz_vert.py. --- src/mintpy/prep_nisar.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mintpy/prep_nisar.py b/src/mintpy/prep_nisar.py index cc48884da..d456dcd4a 100644 --- a/src/mintpy/prep_nisar.py +++ b/src/mintpy/prep_nisar.py @@ -1087,8 +1087,9 @@ def interpolate_geometry(X_2d, Y_2d, dem, rdr_coords, valid_mask): losx = _interpolate_radar_grid_field(rdr_coords, "los_x", pts) losy = _interpolate_radar_grid_field(rdr_coords, "los_y", pts) - # Azimuth angle from horizontal LOS unit vector components. - az = np.degrees(np.arctan2(-losy, -losx)) + # Azimuth angle of the target-to-sensor LOS vector, measured from north, + # anti-clockwise positive (ISCE-2 convention, see utils0.enu2los). + az = np.degrees(np.arctan2(-losx, losy)) out_slant[ii, jj] = sl.astype(np.float32) out_incid[ii, jj] = inc.astype(np.float32)