Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

A Python tool for estimating velocity and time-series from Interferometric Synthetic Aperture Radar (InSAR) data.

Project Description
|Build Status| |Coverage Status| |Updates| |Python 3|

PyRate - a Python tool for RAte and Time-series Estimation

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 <>`__, a
MATLAB tool developed at the University of Leeds.


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


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`` <>`__.

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


pip install python-daemon==2.1.1

To install, simply run ````:


python install

or install with ``pip``:


pip install git+

The python requirements should automatically be built and installed.

Anaconda setup for ``PyRate``

For anaconda installation and ``virtualenv`` instruction, `see this
guide <>`__.


Tests use `pytest <>`__ and can be found
in *tests*.

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


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

Config file:


PyRate workflow:

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

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


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

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


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

--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

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;

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

-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``


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

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

-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


Useful Links

Home Page


Issue tracking

Bugs & Feedback

For bugs, questions and discussions, please use `Github
Issues <>`__.

.. |Build Status| image::
.. |Coverage Status| image::
.. |Updates| image::
.. |Python 3| image::


The full documentation is at


0.1.0 (2017-01-31)

* First release on PyPI.
Release History

Release History

This version
History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
PyRate-0.1.2.tar.gz (2.2 MB) Copy SHA256 Checksum SHA256 Source Mar 9, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting