Skip to content

Commit

Permalink
README/badge: flat-square style + docker status + conda download (#948)
Browse files Browse the repository at this point in the history
+ docs/README/badge:
   - switch the style from flat to flat-square
   - add a badge for the github docker constainer build status
   - add a badge for the conda-forge download

+ scripts/load_data_aoi: save DEM as HDF5 file, instead of binary, to reduce the number of generated files.

+ cli/save_kmz: clarify -u/--unit help msg
  • Loading branch information
yunjunz authored Jan 21, 2023
1 parent ed3ce70 commit 86b8116
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 32 deletions.
5 changes: 2 additions & 3 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ is a great starting point if you are new to version control.
- `upstream`, which refers to the `insarlab` repository
- `origin`, which refers to your personal fork

+ Setting up `pre-commit` within `MintPy` directory:
- Run `pre-commit install` to set up the git hook scripts, so that `pre-commit` will run automatically on `git commit` ([https://pre-commit.com/](https://pre-commit.com/)).
- If the error of `No .pre-commit-config.yaml file was found` occurrs while doing `git commit`, update MintPy to the latest upstream to have this config file.
+ Setting up [`pre-commit`](https://pre-commit.com/) within `MintPy` directory:
- Run `pre-commit install` to set up the git hook scripts, so that `pre-commit` will run automatically on `git commit`. If the `No .pre-commit-config.yaml file was found` error occurrs, update your local MintPy to the latest upstream version to have this config file.


#### 2. Develop your contribution: ####
Expand Down
16 changes: 9 additions & 7 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[![Language](https://img.shields.io/badge/python-3.6%2B-blue.svg)](https://www.python.org/)
[![CircleCI](https://img.shields.io/circleci/build/github/insarlab/MintPy.svg?logo=circleci&label=CI)](https://circleci.com/gh/insarlab/MintPy)
[![Docs Status](https://readthedocs.org/projects/mintpy/badge/?color=green&version=latest)](https://mintpy.readthedocs.io/?badge=latest)
[![Version](https://img.shields.io/github/v/release/insarlab/MintPy?color=green&label=version)](https://github.com/insarlab/MintPy/releases)
[![License](https://img.shields.io/badge/license-GPLv3+-yellow.svg)](https://github.com/insarlab/MintPy/blob/main/LICENSE)
[![Forum](https://img.shields.io/badge/forum-Google%20Groups-orange.svg)](https://groups.google.com/g/mintpy)
[![Citation](https://img.shields.io/badge/doi-10.1016%2Fj.cageo.2019.104331-blue)](https://doi.org/10.1016/j.cageo.2019.104331)
[![Language](https://img.shields.io/badge/python-3.6%2B-blue.svg?style=flat-square)](https://www.python.org/)
[![Docs Status](https://readthedocs.org/projects/mintpy/badge/?color=green&version=latest&style=flat-square)](https://mintpy.readthedocs.io/?badge=latest)
[![CircleCI](https://img.shields.io/circleci/build/github/insarlab/MintPy.svg?logo=circleci&label=test&style=flat-square)](https://circleci.com/gh/insarlab/MintPy)
[![Docker Status](https://img.shields.io/github/actions/workflow/status/insarlab/MintPy/build-docker.yml?label=docker&style=flat-square)](https://github.com/insarlab/MintPy/pkgs/container/mintpy)
[![Version](https://img.shields.io/github/v/release/insarlab/MintPy?color=brightgreen&label=version&style=flat-square)](https://github.com/insarlab/MintPy/releases)
[![Conda Download](https://img.shields.io/conda/dn/conda-forge/mintpy?color=green&style=flat-square)](https://anaconda.org/conda-forge/mintpy)
[![License](https://img.shields.io/badge/license-GPLv3+-yellow.svg?style=flat-square)](https://github.com/insarlab/MintPy/blob/main/LICENSE)
[![Forum](https://img.shields.io/badge/forum-Google%20Groups-orange.svg?style=flat-square)](https://groups.google.com/g/mintpy)
[![Citation](https://img.shields.io/badge/doi-10.1016%2Fj.cageo.2019.104331-blue?style=flat-square)](https://doi.org/10.1016/j.cageo.2019.104331)

## MintPy ##

Expand Down
2 changes: 1 addition & 1 deletion scripts/load_data_aoi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ subset_opt=" --lat $S $N --lon $W $E"

echo "subset - DEM"
src_file=$inputs_dir_src"/../../../DEM/gsi10m.dem.wgs84" #adjust filename for specific dataset
dst_file=$inputs_dir_dst"/gsi10m.dem.wgs84" #adjust filename for specific dataset
dst_file=$inputs_dir_dst"/gsi10m.h5" #adjust filename for specific dataset
echo "subset.py $src_file -o $dst_file $subset_opt"
subset.py $src_file -o $dst_file $subset_opt

Expand Down
5 changes: 3 additions & 2 deletions src/mintpy/cli/save_kmz.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ def create_parser(subparsers=None):

# data
parser.add_argument('-v','--vlim', dest='vlim', nargs=2, metavar=('MIN', 'MAX'), type=float,
help='Y/value limits for plotting.')
parser.add_argument('-u', dest='disp_unit', metavar='UNIT', help='unit for display.')
help='Y/value limits in the unit of {-u/--unit} for plotting.')
parser.add_argument('-u','--unit', dest='disp_unit', metavar='UNIT', default='cm/year',
help='unit for display (default: %(default)s).')
parser.add_argument('-c', '--cm', '--colormap', dest='cmap_name', default='jet',
help='Colormap for plotting (default: %(default)s), such as jet, RdBu, etc.\n'
'More details at https://mintpy.readthedocs.io/en/latest/api/colormaps/')
Expand Down
3 changes: 2 additions & 1 deletion src/mintpy/utils/isce_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,11 @@ def alos2_acquisition_modes():
'''

spotlightModes = ['SBS']
# StripMap: Ultrafine [3 m], High sensitive [6 m], Fine [10 m]
stripmapModes = ['UBS', 'UBD', 'HBS', 'HBD', 'HBQ', 'FBS', 'FBD', 'FBQ']
scansarNominalModes = ['WBS', 'WBD', 'WWS', 'WWD']
scansarWideModes = ['VBS', 'VBD']
scansarModes = ['WBS', 'WBD', 'WWS', 'WWD', 'VBS', 'VBD']
scansarModes = scansarNominalModes + scansarWideModes

return (spotlightModes, stripmapModes, scansarNominalModes, scansarWideModes, scansarModes)

Expand Down
21 changes: 3 additions & 18 deletions src/mintpy/utils/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,7 @@ def plot_gps(ax, SNWE, inps, metadata=dict(), print_msg=True):
inps.gps_component = None
vprint(f'WARNING: --gps-comp is not implemented for {k} file yet, set --gps-comp = None and continue')

plot_kwargs = dict(s=inps.gps_marker_size**2, edgecolors='k', lw=0.5, zorder=10)
if inps.gps_component:
# plot GPS velocity/displacement along LOS direction
vprint('-'*30)
Expand Down Expand Up @@ -1209,28 +1210,12 @@ def plot_gps(ax, SNWE, inps, metadata=dict(), print_msg=True):
for lat, lon, obs in zip(site_lats, site_lons, site_obs):
if not np.isnan(obs):
color = cmap( (obs - vmin) / (vmax - vmin) )
ax.scatter(
lon,
lat,
color=color,
s=inps.gps_marker_size**2,
edgecolors='k',
lw=0.5,
zorder=10,
)
ax.scatter(lon, lat, color=color, **plot_kwargs)

else:
# plot GPS locations only
vprint('showing GPS locations')
ax.scatter(
site_lons,
site_lats,
s=inps.gps_marker_size**2,
color='w',
edgecolors='k',
lw=0.5,
zorder=10,
)
ax.scatter(site_lons, site_lats, color='w', **plot_kwargs)

# plot GPS label
if inps.disp_gps_label:
Expand Down

0 comments on commit 86b8116

Please sign in to comment.