Skip to content

Commit d378a5f

Browse files
author
Matt Garthwaite
authored
Merge pull request #295 from GeoscienceAustralia/develop
Release 0.5.0
2 parents f77ad6e + df7cb1e commit d378a5f

File tree

90 files changed

+3095
-1650
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+3095
-1650
lines changed

README.rst

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.. image:: docs/PyRate_logo_50.png
2+
:alt: PyRate logo
23

34
Python tool for InSAR Rate and Time-series Estimation
45
=====================================================
@@ -21,21 +22,16 @@ The full PyRate documentation is available at http://geoscienceaustralia.github.
2122
Dependencies
2223
------------
2324

24-
The following dependencies need to be on your system prior to PyRate installation:
25+
The following system dependencies are required by PyRate:
2526

2627
- `Python <https://www.python.org/downloads/>`_, versions 3.6, 3.7 or 3.8.
2728
- `GDAL <https://gdal.org/download.html>`_, versions 3.0.2 or 3.0.4
2829
- `Open MPI <https://www.open-mpi.org/software/ompi/v4.0/>`_, versions 2.1.6, 3.0.4, 3.1.4 or 4.0.2
2930

3031
The versions of each package stated above have been tested to work.
3132

32-
Python dependencies are:
33+
Python dependencies for PyRate are::
3334

34-
::
35-
36-
Cython==0.29.16
37-
Pillow==7.1.1
38-
glob2==0.7
3935
joblib==0.14.1
4036
mpi4py==3.0.3
4137
networkx==2.4
@@ -49,15 +45,11 @@ Install
4945

5046
Details of all install options are given in the `PyRate documentation <http://geoscienceaustralia.github.io/PyRate>`_.
5147

52-
`PyRate` and its Python dependencies can be installed directly from the `Python Package Index (PyPI) <https://pypi.org/project/Py-Rate/>`_:
53-
54-
::
48+
PyRate and its Python dependencies can be installed directly from the `Python Package Index (PyPI) <https://pypi.org/project/Py-Rate/>`_::
5549

5650
pip install Py-Rate
5751

58-
To install from source in Linux, enter these commands in a terminal:
59-
60-
::
52+
Alternatively, to install from source and create an executable program in Linux, enter these commands in a terminal::
6153

6254
cd ~
6355
git clone https://github.com/GeoscienceAustralia/PyRate.git
@@ -66,34 +58,49 @@ To install from source in Linux, enter these commands in a terminal:
6658
cd ~/PyRate
6759
python3 setup.py install
6860

69-
This will install the above-listed Python dependencies and compile the executable program ``pyrate``:
70-
71-
::
61+
This will install the above-listed Python dependencies and compile the executable program ``pyrate``.
62+
To learn more about using PyRate, type ``pyrate`` command in the terminal::
7263

7364
>> pyrate --help
7465
usage: pyrate [-h] [-v {DEBUG,INFO,WARNING,ERROR}]
75-
{conv2tif,prepifg,process,merge,workflow} ...
66+
{conv2tif,prepifg,correct,timeseries,stack,merge,workflow} ...
7667

7768
PyRate workflow:
7869

7970
Step 1: conv2tif
8071
Step 2: prepifg
81-
Step 3: process
82-
Step 4: merge
72+
Step 3: correct
73+
Step 4: timeseries
74+
Step 5: stack
75+
Step 6: merge
8376

8477
Refer to https://geoscienceaustralia.github.io/PyRate/usage.html for
8578
more details.
8679

8780
positional arguments:
88-
{conv2tif,prepifg,process,merge,workflow}
81+
{conv2tif,prepifg,correct,timeseries,stack,merge,workflow}
8982
conv2tif Convert interferograms to geotiff.
90-
prepifg Perform multilooking and cropping on geotiffs.
91-
process Main processing workflow including corrections, time series and stacking computation.
83+
prepifg Perform multilooking, cropping and coherence masking to interferogram geotiffs.
84+
correct Calculate and apply corrections to interferogram phase data.
85+
timeseries Timeseries inversion of interferogram phase data.
86+
stack Stacking of interferogram phase data.
9287
merge Reassemble computed tiles and save as geotiffs.
93-
workflow Run all the PyRate processes
88+
workflow Sequentially run all the PyRate processing steps.
9489

9590
optional arguments:
9691
-h, --help show this help message and exit
9792
-v {DEBUG,INFO,WARNING,ERROR}, --verbosity {DEBUG,INFO,WARNING,ERROR}
9893
Increase output verbosity
9994

95+
Test
96+
----
97+
98+
To run the test suite, enter these commands in the terminal::
99+
100+
pip install -r requirements-test.txt
101+
python3 -m pytest -m "not slow" tests/
102+
103+
To run the tests for a single module (e.g. test_timeseries.py), use this command::
104+
105+
python3 -m pytest tests/test_timeseries.py
106+

docs/PyRate_plot_screenshot.png

242 KB
Loading

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import sphinx_rtd_theme
66

77

8-
__version__ = "0.4.0"
8+
__version__ = "0.5.0"
99
# -- General configuration ------------------------------------------------
1010

1111
# If your documentation needs a minimal Sphinx version, state it here.

docs/dependencies.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
Dependencies
22
------------
33

4-
The following dependencies need to be on your system prior to `PyRate` installation:
4+
The following dependencies need to be on your system (or in your working
5+
environment) prior to `PyRate` installation:
56

67
- Python_, versions 3.6, 3.7 or 3.8.
78
- GDAL_, versions 3.0.2 or 3.0.4
89
- `Open MPI`_, versions 2.1.6, 3.0.4, 3.1.4 or 4.0.2
910

10-
The versions of each package stated above have been tested to work.
11+
The versions of each package stated above have been tested to work using
12+
`Travis CI`_ continuous integration testing.
1113

1214
.. _Python: https://www.python.org/downloads/
1315
.. _GDAL: https://gdal.org/download.html
1416
.. _`Open MPI`: https://www.open-mpi.org/software/ompi/v4.0/
17+
.. _`Travis CI`: https://travis-ci.org/github/GeoscienceAustralia/PyRate
1518

16-
Other Python dependencies that will be installed are listed in ``PyRate/requirements.txt``.
19+
Other Python dependencies that will be installed are listed in
20+
``PyRate/requirements.txt``.

docs/docker.rst

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,46 @@
11
Docker
22
^^^^^^
33

4-
Docker can be used to run `PyRate` on Linux, Windows and MacOS.
5-
Please follow the instructions at https://hub.docker.com/ to download
6-
and install Docker on your machine. Then run:
4+
Docker can be used to run `PyRate` on Linux, Windows and MacOS systems.
75

8-
::
6+
.. note::
7+
8+
- Docker is the recommended method to use `PyRate` under Windows.
9+
10+
The only system pre-requisites for using docker are Git and Docker Desktop
11+
(e.g. for Windows https://docs.docker.com/docker-for-windows/ ).
12+
The other system dependencies required by PyRate are installed in to the
13+
docker container itself during the build operation.
14+
Once Git and Docker Desktop are installed, and Docker Desktop is running,
15+
execute the following at a command line prompt (e.g. PowerShell in Windows 10)::
916

1017
git clone git@github.com:GeoscienceAustralia/PyRate.git
1118
cd PyRate
12-
docker build -t pyrate-image:1.0 .
13-
docker run -it --rm -v %cd%:/PyRate pyrate-image:1.0 /bin/bash
19+
docker build -t pyrate-image .
20+
docker run -it pyrate-image
21+
22+
.. note::
23+
24+
- The image name “pyrate-image” is not mandatory.
25+
You are free to name the docker image whatever you choose.
26+
27+
The ``docker build`` command builds the docker container described in the
28+
``Dockerfile`` in the `PyRate` repo. It first starts by setting up an Ubuntu linux
29+
system image, and then installs the required system and python dependencies.
30+
31+
Once the docker container is running (you will see a different-looking command
32+
prompt in the PowerShell), execute the following commands::
33+
34+
source /usr/local/bin/virtualenvwrapper.sh
35+
workon pyrate
36+
cd PyRate
37+
python3 setup.py install
38+
pyrate --help
39+
pyrate workflow -f input_parameters.conf
40+
41+
The ``pyrate`` executable program is built as part of the ``docker build`` step.
42+
If the ``pyrate`` executable is reported as "not found", re-run the compilation::
43+
44+
cd PyRate
45+
python3 setup.py install
46+

docs/history.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,48 @@
33
Release History
44
===============
55

6+
0.5.0 (2020-09-08)
7+
------------------
8+
Added
9+
+++++
10+
- New functionality "``linear_rate``" to calculate linear regression of
11+
cumulative displacement time series for every pixel as part of the ``timeseries`` step.
12+
- Script for plotting ``timeseries`` and ``linear_rate`` output geotiff products using Matplotlib.
13+
To use, additional dependencies listed in ``requirements-plot.txt`` are required.
14+
- Correction data (except ``maxvar`` and ``vcmt``) applied to the ifg data is saved to disk
15+
and re-used on subsequent repeat runs. Corrections are only re-calculated if config
16+
parameters change between runs.
17+
- MPI parallelisation of APS spatio-temporal filter correction.
18+
- Unit test coverage for refpixel lat/lon to x/y conversion and ``aps`` module.
19+
20+
Fixed
21+
+++++
22+
- Re-enable ``ifglksx`` and ``ifglksy`` to be different values, resulting in different
23+
resolutions in x and y dimensions in multi-looked interferograms.
24+
- Re-enable ``orbfitlksx`` and ``orbfitlksy`` to be different values, resulting in different
25+
resolutions in x and y dimensions during network orbit correction.
26+
- Screen messages from main process only during MPI runs.
27+
28+
Changed
29+
+++++++
30+
- ``process`` step has been renamed ``correct``. Stacking and timeseries have been removed from
31+
this step and are now invoked by separate ``timeseries`` and ``stack`` command line options.
32+
- Processing of coherence files by ``conv2tif`` and ``prepifg`` is now triggered by the presence
33+
of ``cohfilelist`` in the config file. If the list is present, multilooked/cropped coherence
34+
files are saved to disk, regardless of whether ``cohmask`` is 0 or 1.
35+
- Parallelisation capability is refactored - MPI and multiprocessing both now use a common
36+
tiling framework for ``stack``, ``timeseries`` and ``mst`` algorithms.
37+
- Introduced a simplified and standardised file naming format for files produced by the
38+
``prepifg`` step. Information previously saved in the filename (e.g. ``ifglksx``, ``ifglksy``,
39+
and ``ifgcropopt`` values) is now saved to the geotiff header instead.
40+
41+
Removed
42+
+++++++
43+
- Redundant ``tscal`` config parameter was deprecated - not needed now there is a ``timeseries``
44+
step invokable on the command line.
45+
- Unused ``Pillow``, ``cython`` and ``glob2`` dependencies.
46+
- Deprecated function ``pyrate.prepifg_helper.prepare_ifgs``, which is no longer needed.
47+
648
0.4.3 (2020-08-04)
749
------------------
850
Added

docs/hpc.rst

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,34 @@ HPC platforms may differ.
77

88
.. _`National Computational Infrastructure (NCI)`: https://nci.org.au/
99

10-
Login to Gadi and clone the `PyRate` repository:
11-
12-
::
10+
Login to Gadi and clone the `PyRate` repository::
1311

1412
ssh <user_name>@gadi.nci.org.au
1513
cd ~
1614
git clone https://github.com/GeoscienceAustralia/PyRate.git
1715

18-
Load the required Gadi modules (this will also remove the default NCI GDAL
19-
Python bindings so we can build and use our own):
20-
21-
::
22-
23-
source ~/PyRate/scripts/nci_load_modules.sh
24-
25-
Create a Python virtual environment:
26-
27-
::
16+
Create a Python virtual environment::
2817

2918
python3 -m venv ~/PyRateVenv
3019
source ~/PyRateVenv/bin/activate
3120

32-
Install `PyRate`:
21+
Load the required Gadi modules (this will also remove the default NCI GDAL
22+
Python bindings so we can build and use our own)::
23+
24+
source ~/PyRate/scripts/nci_load_modules.sh
3325

34-
::
26+
Install `PyRate`::
3527

3628
cd ~/PyRate
3729
python3 setup.py install
3830

39-
4031
Following this, `PyRate` will be available for PBS jobs. To verify the
41-
installation, first run an interactive session:
42-
43-
::
32+
installation, first run an interactive session::
4433

4534
qsub -I -q express -l walltime=01:00:00,mem=16Gb,ncpus=4,wd
4635

4736
Once the session has started, you will need to reactivate your virtual
48-
environment and reload the required modules:
49-
50-
::
37+
environment and reload the required modules::
5138

5239
source ~/PyRateVenv/bin/activate
5340
source ~/PyRate/scripts/nci_load_modules.sh

docs/installation.rst

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ Installation
22
============
33

44
This is an installation guide to get `PyRate` running on various platforms.
5-
Follow the instructions to install `PyRate` and run a small toy example.
5+
Follow the instructions to install `PyRate` and run a small toy example using
6+
the test dataset included in the repository.
67

78
.. include:: dependencies.rst
89

@@ -12,14 +13,13 @@ Platforms
1213
PyPI
1314
^^^^
1415

15-
`PyRate` and its Python dependencies can be installed directly from the Python Package Index (PyPI_):
16-
17-
.. _PyPI: https://pypi.org/project/Py-Rate/
18-
19-
::
16+
`PyRate` and its Python dependencies can be installed directly from the
17+
Python Package Index (PyPI_)::
2018

2119
pip install Py-Rate
2220

21+
.. _PyPI: https://pypi.org/project/Py-Rate/
22+
2323
.. include:: ubuntu.rst
2424
.. include:: docker.rst
2525
.. include:: hpc.rst
@@ -28,19 +28,17 @@ PyPI
2828
Verify Installation
2929
-------------------
3030

31-
To verify `PyRate` has been successfully installed, run the workflow with the
32-
example config file and the small dataset included in the repository:
31+
To verify `PyRate` has been successfully installed, run the full processing
32+
workflow with the example config file and the small dataset included
33+
in the repository. If you compiled the ``pyrate`` executable program::
34+
35+
pyrate workflow -f input_parameters.conf
3336

34-
::
37+
If you installed from the Python Package Index (PyPI_)::
3538

36-
pyrate conv2tif -f input_parameters.conf
37-
pyrate prepifg -f input_parameters.conf
38-
pyrate process -f input_parameters.conf
39-
pyrate merge -f input_parameters.conf
39+
python3 pyrate/main.py workflow -f input_parameters.conf
4040

4141
If the installation has been successful, this workflow will complete without
42-
errors and geotiff files will be available in:
42+
errors and geotiff files will be available in::
4343

44-
::
45-
4644
~/PyRate/out
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
PyRate Process Script
1+
PyRate Correct Script
22
========================
33

4-
.. automodule:: pyrate.process
4+
.. automodule:: pyrate.correct
55
:members:
66
:undoc-members:
77
:show-inheritance:
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
PyRate Main Script
22
==================
33

4-
.. automodule:: pyrate.__main__
4+
.. automodule:: pyrate.main
55

66
.. rubric:: Functions
77
.. autosummary::
88

99
conv2tif
1010
prepifg
11-
process
11+
correct
12+
timeseries
13+
stack
1214
merge

docs/scripts.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ PyRate Scripts
66

77
pyrate.conv2tif
88
pyrate.prepifg
9-
pyrate.process
9+
pyrate.correct
1010
pyrate.merge
11-
pyrate.__main__
11+
pyrate.main

0 commit comments

Comments
 (0)