Skip to main content
PyRate - a Python tool for RAte and Time-series Estimation
==========================================================

.. image:: https://travis-ci.org/GeoscienceAustralia/PyRate.svg?branch=master
:target: https://travis-ci.org/GeoscienceAustralia/PyRate
.. image:: https://coveralls.io/repos/github/GeoscienceAustralia/PyRate/badge.svg?branch=master
:target: https://coveralls.io/github/GeoscienceAustralia/PyRate?branch=master
.. image:: https://pyup.io/repos/github/geoscienceaustralia/pyrate/shield.svg
:target: https://pyup.io/repos/github/geoscienceaustralia/pyrate/
.. image:: https://pyup.io/repos/github/geoscienceaustralia/pyrate/python-3-shield.svg
:target: https://pyup.io/repos/github/geoscienceaustralia/pyrate/

PyRate is a Python tool for estimating the average rate (velocity) and
incremental time-series of surface movement for every pixel in a stack
of images generated by interferometric processing of Synthetic Aperture
Radar (InSAR) data. PyRate is a partial Python translation of
`Pirate <http://homepages.see.leeds.ac.uk/~earhw/software/pirate/>`__, a
MATLAB tool developed at the University of Leeds.

Quickstart
==========

Before you start, make sure your system has the following packages
installed:

::

sudo apt-get install gdal-bin libgdal-dev libpng12-dev libblas-dev liblapack-dev libatlas-dev libatlas-base-dev gfortran libproj-dev openmpi-bin libopenmpi-dev netcdf-bin libnetcdf11 libnetcdf-dev

We strongly recommend using a
```virtualenv`` <https://gist.github.com/basaks/b33ea9106c7d1d72ac3a79fdcea430eb>`__.

One might need to install a slightly older ``python-daemon`` to install
``PyRate``:

::

pip install python-daemon==2.1.1

To install, simply run ``setup.py``:

::

python setup.py install

or install with ``pip``:

::

pip install git+https://github.com/GeoscienceAustralia/PyRate

The python requirements should automatically be built and installed.

Anaconda setup for ``PyRate``
-----------------------------

For anaconda installation and ``virtualenv`` instruction, `see this
guide <https://github.com/GeoscienceAustralia/PyRate/blob/master/conda.md>`__.

Tests
-----

Tests use `pytest <http://doc.pytest.org/en/latest/>`__ and can be found
in *tests*.

To run the tests, use the following command inside the ``PyRate``
directory:

::

pip install pytest
cd PyRate
export PYRATEPATH=/path/to/PyRate
pytest tests/

Config file:
------------

TODO

PyRate workflow:
----------------

``PyRate`` installs an executable ``pyrate``.

Use ``help`` for the different command line options:

::

>> pyrate --help
Usage: pyrate [OPTIONS] COMMAND [ARGS]...

Options:
-v, --verbosity [DEBUG|INFO|WARNING|ERROR]
Level of logging
--help Show this message and exit.

Commands:
linrate
postprocess
prepifg

As you can see ``pyrate`` has three command line options.

1. prepifg
2. linrate
3. postprocess

Below we discuss these options.

Preparing interferrograms: prepifg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The first step of PyRate is to convert the unwrapped interforrograms
into geotiffs, followed by multilooking and cropping. Both of these
operations are performed by ``pyrate prepifg`` command:

::

>> pyrate prepifg --help
Usage: pyrate prepifg [OPTIONS] CONFIG_FILE

Options:
--help Show this message and exit.

So one can use the ``prepfig`` command as the following:

::

pyrate prepifg /path/to/config_file

The two major steps during the ``prepifg`` operation are described
below.

Data formatting: convert to geotiff
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The ``prepifg`` command will determine the input format from the value
specified at the *processor:* keyword in the config file (0: ROI\_PAC;
1: GAMMA)

A GAMMA translation requires a geographic DEM header file (\*.dem.par)
and SLC parameter files (\*.slc.par) for both master and slave images to
extract metadata required for the formatting. Therefore three header
files are needed to format each geocoded unwrapped GAMMA interferogram .
The path and name of the DEM header file are specified in the config
file under the *demHeaderFile:* keyword. The SLC parameter files should
be in the same location as the interferogram file and are found
automatically by date string pattern matching.

A ROI\_PAC translation requires a header/resource file (*.rsc*
extension) for the geocoded unwrapped ROI\_PAC interferogram (in the
same directory) and either the geographic projection (e.g. 'WGS84')
specified as an option or a header/resource file for the geographic DEM
containing the geographic projection in the parameter DATUM:

Image transformations: multilooking and cropping
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This ``prepifg`` command will also perform multi-looking (resampling)
and cropping the images.

Two examples of the config files are provided in ``configs`` directory,
with examples of the ``roipac`` and ``gamma`` prepifg configuration.
Both config files can be used with ``prepifg``.

Linear rate and time series analysis: linrate
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

::

>> pyrate linrate --help
Usage: pyrate linrate [OPTIONS] CONFIG_FILE

Options:
-r, --rows INTEGER divide ifgs into this many rows
-c, --cols INTEGER divide ifgs into this many columns
--help Show this message and exit

This is the core of the processing tools, handled by the ``linrate``
command:

::

pyrate linrate path/to/config_file -c 3 -r 4

This command will does the time series and linear rate analysis, but has
the options to break the interferrograms into tiles of ``r`` rows and
``c`` columns. So this above command will break the interferrograms into
12 tiles and will produce 12 linear rate and time series predictions
corresponding to each tile.

The optional rows and columns help us create smaller ``tiles`` of the
interferrograms that can be accommodated in the memory. The number of
tiles chosen should be as small as possible that fits in the system
memory.

Putting it back together: postprocess
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The last step in ``pyrate`` is to put all the tiles back together from
the ``linrate`` part.

::

>> pyrate postprocess --help
Usage: pyrate postprocess [OPTIONS] CONFIG_FILE

Options:
-r, --rows INTEGER divide ifgs into this many rows
-c, --cols INTEGER divide ifgs into this many columns
--help Show this message and exit.

Make sure to use the same number of rows and columns with
``postprocess`` as with ``linrate``:

::

pyrate postprocess path/to/config_file -c 3 -r 4

MPI Support
-----------

``PyRate`` has been designed for supercomputers and instructions to use
an HPC cluster can be found in the `pbs directory <pbs>`__.

Python multiprocessing support
------------------------------

In addition to the MPI support for HPC, ``PyRate`` can be use standard
multiprocessing simply by turning ``parallel: 1`` in the config file to
take advantage of multiple cores on a single PC.

Integrating PyAPS with PyRate
-----------------------------

TODO

Useful Links
============

Home Page https://github.com/GeoscienceAustralia/PyRate

Documentation http://geoscienceaustralia.github.io/PyRate

Issue tracking https://github.com/GeoscienceAustralia/PyRate/issues

Bugs & Feedback
===============

For bugs, questions and discussions, please use `Github
Issues <https://github.com/GeoscienceAustralia/PyRate/issues>`__.


Documentation
-------------

The full documentation is at http://geoscienceaustralia.github.io/PyRate/.



History
-------

0.1.0 (2017-01-31)
++++++++++++++++++

* First release on PyPI.

Metadata

Release files for Py-Rate 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Py-Rate 0.1.2
File Size Uploaded Provenance Actions
Py-Rate-0.1.2.tar.gz 2.2 MB Without provenance Details for Py-Rate-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Py-Rate 0.1.2
File Interpreter ABI Platform Actions
Py_Rate-0.1.2-py2.py3-none-any.whl Python 2, Python 3 none any Details for Py_Rate-0.1.2-py2.py3-none-any.whl

Total release size: 2.3 MB

Release files / Py-Rate-0.1.2.tar.gz

Download URL Py-Rate-0.1.2.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
c3c7cd3fb3ebfb81b2418c29447948480d01c459d86e78eae82a7ac6bb80b0e2
BLAKE2b-256 checksum
How to use checksums
af08d874260b80d4edecf2bd5c0438c16c3badab75457dd94aa05009a1197971
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Py_Rate-0.1.2-py2.py3-none-any.whl

Download URL Py_Rate-0.1.2-py2.py3-none-any.whl
Size 104.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0b7de8b310e691a84f7783706dc11ae2f7ed86541a282385ab607fa5d9c621a1
BLAKE2b-256 checksum
How to use checksums
e0bb9b478f18565bac647d2b8158541e1644c9a988c2594f1519931b589e54ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for Py-Rate 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page