Skip to content

Commit

Permalink
codacy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yunjunz committed Sep 18, 2023
1 parent 0cdf593 commit 30d47ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/mintpy/utils/arg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,16 @@ def add_dem_argument(parser):
dem = parser.add_argument_group('DEM', 'display topography in the background')
dem.add_argument('-d', '--dem', dest='dem_file', metavar='DEM_FILE',
help='DEM file to show topography as background')
dem.add_argument('--dem-blend', dest='disp_dem_blend', action='store_true',
help='blend the DEM shade with input image to have a GMT-like impression.')
dem.add_argument('--mask-dem', dest='mask_dem', action='store_true',
help='Mask out DEM pixels not coincident with valid data pixels')
dem.add_argument('--dem-noshade', dest='disp_dem_shade', action='store_false',
help='do not show DEM shaded relief')
dem.add_argument('--dem-blend', dest='disp_dem_blend', action='store_true',
help='blend the DEM shade with input image to have a GMT-like impression.')
dem.add_argument('--dem-nocontour', dest='disp_dem_contour', action='store_false',
help='do not show DEM contour lines')

# DEM contours
dem.add_argument('--contour-smooth', dest='dem_contour_smooth', type=float, default=3.0,
help='Background topography contour smooth factor - sigma of Gaussian filter. \n'
'Set to 0.0 for no smoothing; (default: %(default)s).')
Expand All @@ -116,19 +117,21 @@ def add_dem_argument(parser):
metavar='NUM', type=float, default=0.5,
help='Background topography contour linewidth (default: %(default)s).')

# DEM shade
dem.add_argument('--shade-az', dest='shade_azdeg', type=float, default=315., metavar='DEG',
help='The azimuth (0-360, degrees clockwise from North) of the light source '
'(default: %(default)s).')
dem.add_argument('--shade-alt', dest='shade_altdeg', type=float, default=45., metavar='DEG',
help='The altitude (0-90, degrees up from horizontal) of the light source '
'(default: %(default)s).')

dem.add_argument('--shade-min', dest='shade_min', type=float, default=-4000., metavar='MIN',
help='The min height in m of colormap of shaded relief topography (default: %(default)s).')
dem.add_argument('--shade-max', dest='shade_max', type=float, default=999., metavar='MAX',
help='The max height of colormap of shaded relief topography (default: max(DEM)+2000).')
dem.add_argument('--shade-exag', dest='shade_exag', type=float, default=0.5,
help='Vertical exaggeration ratio (default: %(default)s).')

# DEM-blended image
dem.add_argument('--shade-frac', dest='shade_frac', type=float, default=0.5,
help='Only for --dem-blend. Increases/decreases the contrast of the hillshade (default: %(default)s).')
dem.add_argument('--base-color', dest='base_color', type=float, default=0.9,
Expand Down
3 changes: 0 additions & 3 deletions src/mintpy/utils/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2225,9 +2225,6 @@ def plot_image4view(ax, data, dem=None, extent=None, geo_box=None, inps=None):
Examples : ax, im = pp.plot_image4view(ax, data, dem, inps=inps)
"""
imshow_data = True

# print messages
global vprint
vprint = print if inps.print_msg else lambda *args, **kwargs: None

# get plotting extent from geo_box if not given
Expand Down

0 comments on commit 30d47ba

Please sign in to comment.