Skip to content

Commit

Permalink
merge updates from dev in release v1.1.2 (#279)
Browse files Browse the repository at this point in the history
* Update README.md (#277)

* Update README.md

typo fix

* A few more minor typo fixes

* ARIAproducts codacy patches

Co-authored-by: sssangha <[email protected]>

* Update gdal dependency (#278)

* Update gdal dependency

* Patch requirements with gdal constraint

Co-authored-by: BB <[email protected]>
Co-authored-by: sssangha <[email protected]>
  • Loading branch information
3 people authored Jul 30, 2021
1 parent 04f1400 commit 467d08c
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 16 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

ARIA-tools is an open-source package in Python which contains tools to manipulate ARIA standard InSAR products. This software is open source under the terms of the GNU General Public License. Its development was funded under the NASA Sea-level Change Team (NSLCT) program and the Earth Surface and Interior (ESI) program.

For a full overview of available ARIA standard products and their specification see the products page on the [ARIA website](https://aria.jpl.nasa.gov). Currently, support for the ARIA Geocoded Unwrapped Interferogram (GUNW) product is included. Products can be download for free from the [ARIA-products page](https://aria-products.jpl.nasa.gov) and the [ASF DAAC vertex page](https://vertex.daac.asf.alaska.edu/#) under missions and beta-products, but require log-on using the NASA Earthdata credentials.
For a full overview of available ARIA standard products and their specification, see the products page on the [ARIA website](https://aria.jpl.nasa.gov). Currently, support for the ARIA Geocoded Unwrapped Interferogram (GUNW) product is included. Products can be downloaded for free from the [ARIA-products page](https://aria-products.jpl.nasa.gov) and the [ASF DAAC vertex page](https://vertex.daac.asf.alaska.edu/#) under missions and beta-products, but require log-on using the NASA Earthdata credentials.
The ARIA-tools package includes functionality to crop/merge data and meta-data layers for multiple standard products, extraction of data and meta-data layers from these products, and the set-up and the preparation for time-series.

Actual time-series processing is not supported in ARIA-tools. However, outputs are compatible with thrid-party time-series InSAR packages such as the "Generic InSAR Analysis Toolbox" ([GIAnT](http://earthdef.caltech.edu/projects/giant/wiki)) and the "Miami INsar Time-series software in PYthon" ([MintPy](https://github.com/insarlab/MintPy)).
Actual time-series processing is not supported in ARIA-tools. However, outputs are compatible with third-party time-series InSAR packages such as the "Generic InSAR Analysis Toolbox" ([GIAnT](http://earthdef.caltech.edu/projects/giant/wiki)) and the "Miami INsar Time-series software in PYthon" ([MintPy](https://github.com/insarlab/MintPy)).
<p align="center">
<img height="250" src="https://github.com/aria-tools/ARIA-tools-docs/blob/master/images/Hawaii.png">
<img height="250" src="https://github.com/aria-tools/ARIA-tools-docs/blob/master/images/CA.png">
Expand Down Expand Up @@ -69,10 +69,10 @@ Below we list the dependencies for ARIA-tools

------
## Installation
ARIA-tools package can be easily installed and used after the dependencies are installed and activated. The third-party RelaxIV package is optional (not required), and only used when opting to minimizing phase-discontinuities. Prior to use of RelaxIV, users should conform to the RelaxIV license agreement. Easiest way of installing RelaxIV is by downloading the min-cost-flow repository in the third-party folder of the ARIAtools and use the setup.py script as outlined below. For the required dependencies, we strongly recommend using [Anaconda](https://www.anaconda.com/distribution/) package manager for easy installation of dependencies in the python environment.
ARIA-tools package can be easily installed and used after the dependencies are installed and activated. The third-party RelaxIV package is optional (not required), and only used when opting to minimizing phase-discontinuities. Prior to use of RelaxIV, users should conform to the RelaxIV license agreement. The easiest way of installing RelaxIV is by downloading the min-cost-flow repository in the third-party folder of the ARIAtools and using the setup.py script as outlined below. For the required dependencies, we strongly recommend using [Anaconda](https://www.anaconda.com/distribution/) package manager for easy installation of dependencies in the python environment.

### Conda
Below we outline the different steps for setting up the ARIA-tools while leveraging Anaconda for installation of the requirements. Running the commands below to download/clone the ARIA-tools package to your local directory:
Below we outline the different steps for setting up the ARIA-tools while leveraging Anaconda for installation of the requirements. Run the commands below to download/clone the ARIA-tools package to your local directory:

```.tcsh
git clone https://github.com/aria-tools/ARIA-tools.git
Expand All @@ -92,7 +92,7 @@ Or run the commands below to install dependencies to an existing conda environme
conda install -c conda-forge --yes --file ./ARIA-tools/requirements.txt
```

We have included a setup.py script which allows for easy compilation and installation of third-party dependencies (c-code), as well as setting up the ARIA-tools package itself (python and command line tools).
We have included a setup.py script which allows for easy compilation and installation of third-party dependencies (c-code), as well as for setting up the ARIA-tools package itself (python and command line tools).
```.tcsh
python setup.py build
python setup.py install
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ channels:
dependencies:
- python>=3.6
- cartopy
- gdal >=3.1.2
- gdal>=3.2.1
- hdf5
- joblib
- libgdal
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ joblib
scipy
matplotlib
pandas
gdal>=3
gdal>=3.2.1
requests
cartopy
45 changes: 36 additions & 9 deletions tools/ARIAtools/ARIAProduct.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,22 @@ def unwrap_self_readproduct(arg):
return ARIA_standardproduct.__readproduct__(arg[0], arg[1])[0]

class ARIA_standardproduct: #Input file(s) and bbox as either list or physical shape file.
"""Load ARIA standard products
"""
Load ARIA standard products
Load ARIA standard products and split them into
spatiotemporally contigeous interferograms.
"""
# import dependencies
import glob
def __init__(self, filearg, bbox=None, workdir='./', num_threads=1,
url_version='None', verbose=False):
"""
Parse products and input bounding box (if specified)
"""
# If user wants verbose mode
# Parse through file(s)/bbox input
if verbose: logger.setLevel(logging.DEBUG)
Expand Down Expand Up @@ -142,10 +149,13 @@ def __init__(self, filearg, bbox=None, workdir='./', num_threads=1,


def __readproduct__(self, fname):
"""Read products
"""
Read products.
Read product, determine expected layer names based off of version
number, and populate corresponding product dictionary accordingly.
"""
### Get standard product version from file
try:
Expand Down Expand Up @@ -178,7 +188,9 @@ def __readproduct__(self, fname):


def __OGmappingVersion__(self, fname, version):
"""Track the mapping of ARIA standard product versions.
"""
Track the mapping of ARIA standard product versions.
The order of the keys needs to be consistent with the keys in the
mappingData function.
Expand All @@ -187,6 +199,7 @@ def __OGmappingVersion__(self, fname, version):
"radarkeys" inside the mappingData function. Same protocol for new
expected layer keys in the list "sdskeys" below, and correspondingly in
"layerkeys" inside the mappingData function.
"""
import netCDF4
# ARIA standard product version 1a and 1b have same mapping
Expand All @@ -213,11 +226,16 @@ def __OGmappingVersion__(self, fname, version):


def __OGmappingData__(self, fname, rmdkeys, sdskeys):
"""Output and group together 2 dictionaries containing the
"""
Track the mapping of ARIA standard product versions.
Output and group together 2 dictionaries containing the
“radarmetadata info” and “data layer keys+paths”, respectively
The order of the dictionary keys below needs to be consistent with
the keys in the __mappingVersion__ function of the ARIA_standardproduct
class (see instructions on how to appropriately add new keys there).
"""
import netCDF4
# Expected radarmetadata
Expand Down Expand Up @@ -268,7 +286,9 @@ class (see instructions on how to appropriately add new keys there).


def __mappingVersion__(self, fname, version):
"""Track the mapping of ARIA standard product versions.
"""
Track the mapping of ARIA standard product versions.
The order of the keys needs to be consistent with the keys in the
mappingData function.
Expand All @@ -277,6 +297,7 @@ def __mappingVersion__(self, fname, version):
"radarkeys" inside the mappingData function. Same protocol for new
expected layer keys in the list "sdskeys" below, and correspondingly in
"layerkeys" inside the mappingData function.
"""
# ARIA standard product version 1a and 1b have same mapping
# ARIA standard product version 1c differs with inclusion of ionosphere layer
Expand Down Expand Up @@ -345,14 +366,17 @@ def __mappingVersion__(self, fname, version):


def __mappingData__(self, fname, rdrmetadata_dict, sdskeys, version):
"""Pass product record of metadata and layers
"""
Pass product record of metadata and layers
Output and group together 2 dictionaries containing the
“radarmetadata info” and “data layer keys+paths”, respectively
The order of the dictionary keys below needs to be consistent with the
keys in the __mappingVersion__ function of the ARIA_standardproduct
class (see instructions on how to appropriately add new
class (see instructions on how to appropriately add new
keys there).
"""
# Expected layers
layerkeys=['productBoundingBox','unwrappedPhase',
Expand All @@ -378,7 +402,9 @@ class (see instructions on how to appropriately add new


def __continuous_time__(self):
"""Split the products into spatiotemporally continuous groups
"""
Split the products into spatiotemporally continuous groups.
Split products by individual, continuous interferograms.
Input must be already sorted by pair and start-time to fit
Expand All @@ -389,6 +415,7 @@ def __continuous_time__(self):
overlap in time and are therefore spatially contiguous,
and rejects/reports cases for which there is no temporal overlap
and therefore a spatial gap.
"""
# import dependencies
from datetime import datetime, timedelta
Expand Down

0 comments on commit 467d08c

Please sign in to comment.