diff --git a/README.md b/README.md index 20fba693..f528b26d 100644 --- a/README.md +++ b/README.md @@ -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)).

@@ -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 @@ -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 diff --git a/environment.yml b/environment.yml index 0e32c91e..ec2070a6 100644 --- a/environment.yml +++ b/environment.yml @@ -10,7 +10,7 @@ channels: dependencies: - python>=3.6 - cartopy - - gdal >=3.1.2 + - gdal>=3.2.1 - hdf5 - joblib - libgdal diff --git a/requirements.txt b/requirements.txt index 2071ab74..df1e51bb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,6 +5,6 @@ joblib scipy matplotlib pandas -gdal>=3 +gdal>=3.2.1 requests cartopy diff --git a/tools/ARIAtools/ARIAProduct.py b/tools/ARIAtools/ARIAProduct.py index e364a411..149d65dc 100644 --- a/tools/ARIAtools/ARIAProduct.py +++ b/tools/ARIAtools/ARIAProduct.py @@ -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) @@ -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: @@ -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. @@ -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 @@ -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 @@ -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. @@ -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 @@ -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', @@ -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 @@ -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