-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GMT-like shaded relief illumination in view.py
Rather than plotting DEM in the background and overlay the data with transparency, I attempt to view data with color adjusted by the shaded relief DEM when provided. Just like gmt grdimage -I option. Hereafter, I call this DEM-blended data. This can be done via matplotlib.colors.LightSource.shade_rgb() module (as opposed to what has been used in MintPy, i.e., the shade() module, that only produces the shaded relief of the DEM itself). Thus, I added two major functions in plot.py to handle this functionality of displaying DEM-blened data. Changes in MintPy code are as follows. + arg_utils.py: allow user to specify --dem-blend --shade-frac --base-color arguments to activate and tune the DEM-blended data plotting + plot.py: - shaded_image(): add illumination to the rgb data array based on a DEM file. - shaded_colorbar(): to plot a shaded illuminated colorbar. The shading is just schematic, not reflecting the real shades in the data. - plot_image4view(): handle the top layer plotting, this will call several other functinos in plot.py, including the above two new functions. + view.py: adjust the current code to call new functions in plot.py. For single plot, the DEM-blended data is shown well. Need to have some further tweaks for multiple subplots. update function comments
- Loading branch information
1 parent
cc23ae9
commit 0cdf593
Showing
3 changed files
with
288 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.