diff --git a/src/mintpy/simulation/iono.py b/src/mintpy/simulation/iono.py index 697fbd983..6557882fa 100644 --- a/src/mintpy/simulation/iono.py +++ b/src/mintpy/simulation/iono.py @@ -198,7 +198,7 @@ def incidence_angle_ground2iono(inc_angle, iono_height=450e3): def lalo_ground2iono(lat, lon, inc_angle, az_angle=None, head_angle=None, iono_height=450e3, method='spherical_distance'): """Calculate lat/lon of IPP with the given lat/lon on the ground and LOS geometry - Equation (12) in Yunjun et al. (2021, TGRS). + Equation (12) in Yunjun et al. (2022, TGRS). Parameters: lat/lon - float, latitude/longitude of the point on the ground in degrees inc_angle - float/np.ndarray, incidence angle of the line-of-sight vector on the ground in degrees diff --git a/src/mintpy/tsview.py b/src/mintpy/tsview.py index 61163dfec..f010a2621 100644 --- a/src/mintpy/tsview.py +++ b/src/mintpy/tsview.py @@ -160,10 +160,13 @@ def read_init_info(inps): if not inps.ref_yx and 'REF_Y' in atr.keys(): inps.ref_yx = (int(atr['REF_Y']), int(atr['REF_X'])) - # ref_yx --> ref_lalo if in geo-coord - # for plotting purpose only - if inps.ref_yx and 'Y_FIRST' in atr.keys(): - inps.ref_lalo = inps.coord.radar2geo(inps.ref_yx[0], inps.ref_yx[1], print_msg=False)[0:2] + # print/plot ref_yx/lalo info + if inps.ref_yx: + vprint(f'reference point in y/x: {inps.ref_yx}') + # ref_yx --> ref_lalo if in geo-coord [for plotting purpose only] + if 'Y_FIRST' in atr.keys(): + inps.ref_lalo = inps.coord.radar2geo(inps.ref_yx[0], inps.ref_yx[1], print_msg=False)[0:2] + vprint(f'reference point in lat/lon: {inps.ref_lalo}') # do not plot native reference point if it's out of the coverage due to subset if (inps.ref_yx and 'Y_FIRST' in atr.keys() @@ -171,7 +174,7 @@ def read_init_info(inps): and not ( inps.pix_box[0] <= inps.ref_yx[1] < inps.pix_box[2] and inps.pix_box[1] <= inps.ref_yx[0] < inps.pix_box[3])): inps.disp_ref_pixel = False - print('the native REF_Y/X is out of subset box, thus do not display') + vprint('the native REF_Y/X is out of subset box, thus do not display') ## initial pixel coord if inps.lalo: diff --git a/src/mintpy/utils/map.py b/src/mintpy/utils/map.py index db49e7af7..4e4fb6355 100644 --- a/src/mintpy/utils/map.py +++ b/src/mintpy/utils/map.py @@ -77,6 +77,11 @@ def auto_lalo_sequence(geo_box, lalo_step=None, lalo_max_num=4, step_candidate=[ Example: geo_box = (128.0, 37.0, 138.0, 30.0) lats, lons, step = m.auto_lalo_sequence(geo_box) """ + # check input arguments + if geo_box[1] <= geo_box[3] or geo_box[2] < geo_box[0]: + raise ValueError(f'Input geo_box {geo_box} has N <= S or E <= W! Check the order of (W, N, E, S).') + if lalo_step and lalo_step <= 0: + raise ValueError(f'Input lalo_step ({lalo_step}) must be positive!') max_lalo_dist = max([geo_box[1] - geo_box[3], geo_box[2] - geo_box[0]])