Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add prep nisar #4

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
89c1611
add prep nisar
Jun 29, 2023
e054eff
Use arbitrary bounding box in lat/lon
Jun 29, 2023
a2ba92a
Use speed of light from mintpy constants
mirzaees Jun 29, 2023
dae973f
remove extra line
mirzaees Jun 29, 2023
b9910dc
Use earth radius from mintpy constants
mirzaees Jun 29, 2023
2a765a6
import constants from mintpy
mirzaees Jun 29, 2023
530ca9d
account for half a pixel difference in origin of the coordinates
Jun 30, 2023
33e017c
correct x-first to be the upper left pixel
Jul 1, 2023
7476d0f
pyupgrade: v3.7.0 → v3.8.0 (#1039)
pre-commit-ci[bot] Jul 4, 2023
ccff336
add prep_nisar to setup and __main__
yunjunz Jul 5, 2023
cb52331
Update __main__.py
yunjunz Jul 5, 2023
2115549
fix bug in gdal -> mintpy corner coordinate convention (#1034)
sssangha Jul 5, 2023
a1db4bf
pyupgrade: v3.8.0 → v3.9.0 (#1043)
pre-commit-ci[bot] Jul 11, 2023
f1fc2e9
readfile: generalize gamma LUT file ext + ~pi value handling
yunjunz Jun 20, 2023
97fcad7
bugfix in geocode.py --bbox option for gamma products
yunjunz Jun 21, 2023
3a646ae
pyupgrade: v3.9.0 → v3.10.1 (#1051)
pre-commit-ci[bot] Aug 1, 2023
fec802b
hdfeos5: calc/write latitude/longitude if missing in geometry file (#…
yunjunz Aug 1, 2023
308024a
convert coord btw. UTM and lat/lon (#1052)
yunjunz Aug 1, 2023
6cd22a7
fix the UTM_ZONE confusion (#1053)
yunjunz Aug 3, 2023
5d330ad
isce_utils: add filter_goldstein() (#1058)
yunjunz Aug 6, 2023
1c8e7a1
tsview --figsize-img & relaxed subset tmpl reading (#1059)
yunjunz Aug 6, 2023
b74fffc
`load2hdf5 --compression` & `view --faultline-min-dist` (#1062)
yunjunz Aug 7, 2023
2af3905
read_attribute: translate DATA_TYPE ci2 to float32 for roipac (#1064)
yunjunz Aug 8, 2023
0cd227b
tropo_pyaps3: bugfix for hyp3 product (#1061)
yunjunz Aug 8, 2023
6605a95
seq. closure phase: bring back spatial referencing for ARIA products …
yunjunz Aug 9, 2023
23b87d9
dep/doc: add tab completion via `argcomplete` (#1065)
yunjunz Aug 9, 2023
559b8d7
fix zero step size bug in unwrap_error_phase_closure (#1067)
yunjunz Aug 9, 2023
29d901d
`isce_utils.extract_multilook_number()`: search XML and VRT files (#1…
yunjunz Aug 9, 2023
62b369d
dep: add shapely (#1069)
yunjunz Aug 10, 2023
4f09c58
tsview: improved auto figsize for geocoded TS file (#1071)
yunjunz Aug 15, 2023
11a9020
`read_gdal`: switch back to gdal kwargs to leverage its subsetting ca…
scottstanie Aug 19, 2023
f068ec5
`view.prep_slice()`: support quoted lists of characters as inputs (#1…
yunjunz Aug 23, 2023
136e67e
`mintpy.geocode.laloStep`: support single value input (#1075)
yunjunz Aug 23, 2023
b800d64
`subset`: support hdf5 <--> binary (#1076)
yunjunz Aug 23, 2023
1493c9a
`prep_hyp3`: support burst-wide interferograms from hyp3-isce2 (#1074)
cirrusasf Aug 25, 2023
09daaac
Correct example command line
mirzaees Aug 28, 2023
7ff149b
Run `fix_typos.sh` on repo to catch spelling errors (#1082)
scottstanie Aug 30, 2023
183819d
Merge branch 'main' into prep_script_for_NISAR
yunjunz Aug 31, 2023
018ddbd
pre-commit suggestions
yunjunz Aug 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
dep/doc: add tab completion via argcomplete (insarlab#1065)
+ add `argcomplete` to the dependency for tab completion capability. This package is light (only depends on pure Python), and available on pip and conda-forge (as noarch package).
   - requirements.txt: add argcomplete
   - setup.py: move argcomplete from optional to required

+ docs/installation.md: add "tab complete sub-commands" as another sub-section in Post-Installation Setup.
  • Loading branch information
yunjunz committed Aug 9, 2023
commit 23b87d9e9a774c0d133da0e436c4e3497009e255
67 changes: 57 additions & 10 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ mamba install -c conda-forge mintpy
<details>
<p><summary>via docker</summary></p>

Docker allows one to run MintPy in a dedicated container, which is essentially an efficient virtual machine, and to be independent of platform OS. First, install <a href="https://docs.docker.com/install">docker</a> if you have not already done so. Then run the following to pull the latest stable released constainer image version from <a href="https://github.com/insarlab/MintPy/pkgs/container/mintpy">MintPy GitHub Container Registry</a> to your local machine:
Docker allows one to run MintPy in a dedicated container, which is essentially an efficient virtual machine, and to be independent of the platform OS. First, install <a href="https://docs.docker.com/install">docker</a> if you have not already done so. Then run the following to pull the latest stable released container image version from <a href="https://github.com/insarlab/MintPy/pkgs/container/mintpy">MintPy GitHub Container Registry</a> to your local machine:

```bash
docker pull ghcr.io/insarlab/mintpy:latest
```

<p>Check <a href="./docker.md">docker.md</a> for more details on Docker container image usage, e.g. pulling development version and running in shell or Jupyter server.</p>
<p>Check <a href="./docker.md">docker.md</a> for more details on Docker container image usage, e.g. pulling the development version and running in a shell or Jupyter server.</p>
</details>

<details>
<p><summary>via apt (Linux Debian)</summary></p>

MintPy is available in the main archive of the <a href="https://tracker.debian.org/pkg/mintpy">Debian</a> GNU/Linux OS. It can be installed by using your favourite package manager or running the following command:
MintPy is available in the main archive of the <a href="https://tracker.debian.org/pkg/mintpy">Debian</a> GNU/Linux OS. It can be installed by using your favorite package manager or running the following command:

```bash
apt install mintpy
```

The same procedure, in priciple, can be used in <a href="https://ubuntu.com">Ubuntu</a> and all the other <a href="https://wiki.debian.org/Derivatives/Census">Debian derivatives</a>. Check the <a href="https://salsa.debian.org/debian-gis-team/mintpy/-/blob/master/debian/README.Debian">Debian GIS Project</a> page for more detailed usage.
The same procedure, in principle, can be used in <a href="https://ubuntu.com">Ubuntu</a> and all the other <a href="https://wiki.debian.org/Derivatives/Census">Debian derivatives</a>. Check the <a href="https://salsa.debian.org/debian-gis-team/mintpy/-/blob/master/debian/README.Debian">Debian GIS Project</a> page for more detailed usage.
</details>
</p>

Expand Down Expand Up @@ -69,7 +69,7 @@ git clone https://github.com/insarlab/MintPy.git
Install <a href="https://docs.conda.io/en/latest/miniconda.html">miniconda</a> if you have not already done so. You may need to close and restart the shell for changes to take effect.

```bash
# use wget or curl to download in command line or click from the web browser
# use wget or curl to download in the command line or click from the web browser
# for macOS, use Miniconda3-latest-MacOSX-x86_64.sh instead.
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p ~/tools/miniconda3
Expand Down Expand Up @@ -105,7 +105,7 @@ conda activate mintpy
<details open>
<p><summary>via pip [recommended]</summary></p>

We recommend installing mintpy in the "editable" mode. This mode installs the package without copying files to your interpreter directory (e.g. the <code>site-packages</code> directory), thus, one could "edit" the source code and have changes take effect immediately without having to rebuild and reinstall.
We recommend installing MintPy in the "editable" mode. This mode installs the package without copying files to your interpreter directory (e.g. the <code>site-packages</code> directory), thus, one could "edit" the source code and have changes take effect immediately without having to rebuild and reinstall.

```bash
python -m pip install -e ~/tools/MintPy
Expand Down Expand Up @@ -163,13 +163,13 @@ export MANPATH=/opt/local/share/man:${MANPATH}
# Finished adapting your PATH environment variable for use with MacPorts.
```

Update the port tree with the following command. If your network prevent the use of rsync or svn via http of port tree, try <a href="https://trac.macports.org/wiki/howto/PortTreeTarball">Portfile Sync via a Snapshot Tarball</a>.
Update the port tree with the following command. If your network prevents the use of rsync or svn via HTTP of the port tree, try <a href="https://trac.macports.org/wiki/howto/PortTreeTarball">Portfile Sync via a Snapshot Tarball</a>.

```
sudo port selfupdate
```

Install the dependencies by running:
Install the dependencies by running the following:

```bash
# install dependencies with macports
Expand Down Expand Up @@ -205,7 +205,7 @@ Same as the <a href="#21-install-on-linux">instruction for Linux</a>, except for

Set up an account for ERA5 to download weather re-analysis datasets for tropospheric delay correction as described in <a href="https://github.com/insarlab/pyaps#2-account-setup-for-era5">insarlab/PyAPS</a>.

<code>WEATHER_DIR</code>: Optionally, if you defined an environment variable named <code>WEATHER_DIR</code> to contain the path to a directory, MintPy will download the GAM files into the indicated directory. Also, MintPy will look for the GAM files in the directory before downloading a new one to prevent downloading multiple copies if you work with different dataset that cover the same date/time.
<code>WEATHER_DIR</code>: Optionally, if you defined an environment variable named <code>WEATHER_DIR</code> to contain the path to a directory, MintPy will download the GAM files into the indicated directory. Also, MintPy will look for the GAM files in the directory before downloading a new one to prevent downloading multiple copies if you work with different datasets that cover the same date/time.

#### b. Dask for parallel processing ####

Expand All @@ -214,7 +214,7 @@ We recommend setting the <code>temporary-directory</code> in your <a href="https
```yaml
temporary-directory: /tmp # Directory for local disk like /tmp, /scratch, or /local

# If you are sharing the same machine with others, use the following instead to avoid permission issues with others.
# If you share the same machine with others, use the following instead to avoid permission issues.
# temporary-directory: /tmp/{replace_this_with_your_user_name}
```

Expand All @@ -227,3 +227,50 @@ export VRT_SHARED_SOURCE=0 # do not share dataset while using GDAL V
export HDF5_DISABLE_VERSION_CHECK=2 # supress the HDF5 version warning message (0 for abort; 1/2 for printout/suppress warning message)
export HDF5_USE_FILE_LOCKING=FALSE # request that HDF5 file locks should NOT be used
```

#### d. Tab complete sub-commands ####

We recommend activating the <a href="https://kislyuk.github.io/argcomplete/">tab completion</a> as below if you:
1. Use bash or zsh shells
2. On Linux or macOS
3. Run MintPy in sub-commands style, e.g. <code>mintpy view</code> instead of <code>view.py</code>

```bash
activate-global-python-argcomplete --user
```

On macOS, there is a <a href="https://kislyuk.github.io/argcomplete/#global-completion">bash version compatibility</a> issue, which can be fixed as below. If you use the default zsh shell, no fix is needed.

<p>
<details>
<p><summary>Click to expand for more details</summary></p>

macOS ships with an older version of the bash shell, but <code>argcomplete</code> requires the newer version, which can be installed as below.

```bash
# check the current bash version: argcomplete requires bash>=4.2
echo $BASH_VERSION

# install via mamba
mamba install bash

# add the path to /etc/shells file
echo "${CONDA_PREFIX}/bin/bash" | sudo tee -a /etc/shells

# change your shell via chsh
chsh -s "${CONDA_PREFIX}/bin/bash"

# check the current bash version
echo $BASH_VERSION
```

Then run <code>activate-global-python-argcomplete --user</code> again. You may need to add the following to your <code>~/.bash_profile</code> file.

```bash
# bash completion
if [ -f ~/.bash_completion ]; then
. ~/.bash_completion
fi
```
</details>
</p>
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# docs/requirements4rtd.txt for readthedocs, which uses pip with limited memory usage
python>=3.6
pip
argcomplete
cartopy
cvxopt
dask>=1.0
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
# dependencies
python_requires=">=3.6",
install_requires=[
"argcomplete",
"cartopy",
"cvxopt",
"dask>=1.0",
Expand All @@ -74,14 +75,12 @@
"utm",
],
extras_require={
"cli": ["argcomplete"],
"extra": ["gdal"],
"fractal": ["pyfftw"],
"gbis": ["geoid"], # not available on pypi
"isce": ["isce"], # not available on pypi
"kite": ["kite"],
"all": [
"cli",
"extra",
"fractal",
"gbis",
Expand Down