ISCE2
This is the Interferometric synthetic aperture radar Scientific Computing
Environment (ISCE). Its initial development was funded by NASA's Earth Science
Technology Office (ESTO) under the Advanced Information Systems Technology
(AIST) 2008 and is currently being funded under the NASA-ISRO SAR (NISAR)
project.
THIS IS RESEARCH CODE PROVIDED TO YOU "AS IS" WITH NO WARRANTIES OF CORRECTNESS.
USE AT YOUR OWN RISK.
This software is open source under the terms of the the Apache License. Its export
classification is 'EAR99 NLR', which entails some restrictions and responsibilities.
Please read the accompanying LICENSE.txt and LICENSE-2.0 files.
ISCE is a framework designed for the purpose of processing Interferometric
Synthetic Aperture Radar (InSAR) data. The framework aspects of it have been
designed as a general software development framework. It may have additional
utility in a general sense for building other types of software packages. In
its InSAR aspect ISCE supports data from many space-borne satellites and one
air-borne platform. We continue to increase the number of sensors supported.
At this time the sensors that are supported are the following: ALOS, ALOS2,
COSMO_SKYMED, ENVISAT, ERS, KOMPSAT5, LUTAN1, RADARSAT1, RADARSAT2, RISAT1, Sentinel1,
TERRASARX, UAVSAR and SAOCOM1A.
Contents
- Software Dependencies
- Building ISCE
- Running ISCE
- Input Files
- Component Configurability
- User community Forums
1. Software Dependencies
Basic:
- gcc >= 4.8+ (with C++11 support)
- fftw >= 3.2.2 (with single precision support)
- Python >= 3.5 (3.6 preferred)
- scons >= 2.0.1
- curl - for automatic DEM downloads
- GDAL and its Python bindings >= 2.2
Optional:
For a few sensor types:
- hdf5 >= 1.8.5 and h5py >= 1.3.1 - for COSMO-SkyMed, Kompsat5, and 'Generic' sensor
For mdx (image visualization tool) options:
- Motif libraries and include files
- ImageMagick - for mdx production of kml file (advanced feature)
- grace - for mdx production of color table and line plots (advanced feature)
For the "unwrap 2 stage" option:
RelaxIV and Pulp are required. Information on getting these packages if
you want to try the unwrap 2 stage option:
-
RelaxIV (a minimum cost flow relaxation algorithm coded in C++ by
Antonio Frangioni and Claudio Gentile at the University of Pisa,
based on the Fortran code developed by Dimitri Bertsekas while
at MIT) is available at https://github.com/frangio68/Min-Cost-Flow-Class.
The RelaxIV files should be placed in the directory: 'contrib/UnwrapComp/src/RelaxIV' so that ISCE will compile it properly.
-
PULP: Use easy_install or pip to install it or else clone it from,
https://github.com/coin-or/pulp. Make sure the path to the installed
pulp.py is on your PYTHONPATH environment variable (it should be the case
if you use easy_install or pip).
For splitSpectrum and GPU modules:
- cython3 - must have an executable named cython3 (use a symbolic link)
- cuda - for GPUtopozero and GPUgeo2rdr
- opencv - for split spectrum
With Anaconda
The conda requirements file is shown below:
cython
gdal
git
h5py
libgdal
pytest
numpy
fftw
scipy
basemap
scons
opencv
With the above contents in a textfile named "requirements.txt"
> conda install --yes --file requirements.txt
Ensure that you create a link in the anaconda bin directory for cython3.
With Macports
The following ports (assuming gcc7 and python36) are needed on OSX
gcc7
openmotif
python36
fftw-3 +gcc7
fftw-3-single +gcc7
xorg-libXt +flat_namespace
git
hdf5 +gcc7
h5utils
netcdf +gcc7
netcdf-cxx
netcdf-fortran
postgresql95
postgresql95-server
proj
cairo
scons
opencv +python36
ImageMagick
gdal +expat +geos +hdf5 +netcdf +postgresql95 +sqlite3
py36-numpy +gcc7 +openblas
py36-scipy +gcc7 +openblas
py36-matplotlib +cairo +tkinter
py36-matplotlib-basemap
py36-h5py
py36-gdal
Python3 Convention
We follow the convention of most package managers in using the executable
'python3' for Python3.x and 'python' for Python2.x. This makes it easy to turn
Python code into executable commands that know which version of Python they
should invoke by naming the appropriate version at the top of the executable
file (as in #!/usr/bin/env python3 or #!/usr/bin/env python). Unfortunately,
not all package managers (such as macports) follow this convention. Therefore,
if you use one of a package manager that does not create the 'python3'
executable automatically, then you should place a soft link on your path to
have the command 'python3' on your path. Then you will be able to execute an
ISCE application such as 'stripmapApp.py as "> stripmapApp.py" rather than as
"> /path-to-Python3/python stripmapApp.py".
Building ISCE
SCons (recommended)
Configuration control
Scons requires that configuration information be present in a directory
specified by the environment variable SCONS_CONFIG_DIR. First, create a
build configuration file, called SConfigISCE and place it in your chosen
SCONS_CONFIG_DIR. The SConfigISCE file should contain the following
information, note that the #-symbol denotes a comment and does not need
to be present in the SConfigISCE file:
NOTE: Locations vary from system to system, so make sure to use the appropriate location.
The one listed here are just for illustrative purpose.
# The directory in which ISCE will be built
PRJ_SCONS_BUILD = $ISCE_BUILD_ROOT/isce
# The directory into which ISCE will be installed
PRJ_SCONS_INSTALL = $ISCE_INSTALL_ROOT/isce
# The location of libraries, such as libstdc++, libfftw3 (for most system
# it's /usr/lib and/or /usr/local/lib/ and/or /opt/local/lib)
LIBPATH = $YOUR_LIB_LOCATION_HOME/lib64 $YOUR_LIB_LOCATION_HOME/lib
# The location of Python.h. If you have multiple installations of python
# make sure that it points to the right one
CPPPATH = $YOUR_PYTHON_INSTALLATION_LOCATION/include/python3.xm $YOUR_PYTHON_INSTALLATION_LOCATION/lib/python3.x/site-packages/numpy/core/include
# The location of the fftw3.h (most likely something like /usr/include or
# /usr/local/include /opt/local/include
FORTRANPATH = $YOUR_FFTW3_INSTALLATION_LOCATION/include
# The location of your Fortran compiler. If not specified it will use the system one
FORTRAN = $YOUR_COMPILER_LOCATION/bin/gfortran
# The location of your C compiler. If not specified it will use the system one
CC = $YOUR_COMPILER_LOCATION/bin/gcc
# The location of your C++ compiler. If not specified it will use the system one
CXX = $YOUR_COMPILER_LOCATION/bin/g++
#libraries needed for mdx display utility
MOTIFLIBPATH = /opt/local/lib # path to libXm.dylib
X11LIBPATH = /opt/local/lib # path to libXt.dylib
MOTIFINCPATH = /opt/local/include # path to location of the Xm
# directory with various include files (.h)
X11INCPATH = /opt/local/include # path to location of the X11 directory
# with various include files
#Explicitly enable cuda if needed
ENABLE_CUDA = True
CUDA_TOOLKIT_PATH = $YOUR_CUDA_INSTALLATION #/usr/local/cuda
In the above listing of the SConfigISCE file, ISCE_BUILD_ROOT and
ISCE_INSTALL_ROOT may be actual environment variables that you create or else
you can replace them with the actual paths you choose to use for the build files
and the install files. Also, in the following the capitalization of 'isce' as
lower case does matter. This is the case-sensitive package name that Python
code uses for importing isce.
Install ISCE
For a verbose install run:
The scons command also allows you to explicitly specify the name of the
SConfigISCE file, which could be used to specify an alternative file for
(say SConfigISCE_NEW) which must still be located in the same
SCONS_CONFIG_DIR, run
scons install --setupfile=SConfigISCE_NEW
This will build the necessary components and install them into the location
specified in the configuration file as PRJ_SCONS_INSTALL.
Note about compiling ISCE after an unsuccessful build.
When building ISCE, scons will check the list of header files and libraries that
ISCE requires. Scons will cache the results of this dependency checking. So,
if you try to build ISCE and scons tells you that you are missing headers or
libraries, then you should remove the cached files before trying to build ISCE
again after installing the missing headers and libraries. The cached files are
config.log, .sconfig.dblite, and the files in directory .sconf_temp. You should
run the following command while in the top directory of the ISCE source (the
directory containing the SConstruct file):
> rm -rf config.log .sconfig.dblite .sconf_temp .sconsign.dblite
and then try "scons install" again.
The same also applies for rebuilding with SCons after updating the code, e.g.
via a git pull. If you encounter issues after such a change, it's recommended
to remove the cache files and build directory and do a fresh rebuild.
CMake (experimental)
Make sure you have the following prerequisites:
- CMake ≥ 3.13
- GCC ≥ 4.8 (with C++11 support)
- Python ≥ 3.5
- Cython
- FFTW 3
- GDAL
git clone https://github.com/isce-framework/isce2
cd isce2
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/my/isce/install/location
make install
Additional cmake configuration options
CMake uses CMAKE_PREFIX_PATH as a global prefix for finding packages,
which can come in handy when using e.g. Anaconda:
cmake [...] -DCMAKE_PREFIX_PATH=$CONDA_PREFIX
On macOS, cmake will also look for systemwide "frameworks",
which is usually not what you want when using Conda or Macports.
cmake [...] -DCMAKE_FIND_FRAMEWORK=NEVER
For packagers, the PYTHON_MODULE_DIR can be used to specify ISCE2's
package installation location relative to the installation prefix
cmake [...] -DPYTHON_MODULE_DIR=lib/python3.8m/site-packages
Setup Your Environment
Once everything is installed, you will need to set the following environment
variables to run the programs included in ISCE ($ISCE_INSTALL_ROOT may be an
environment variable you created above or else replace it with the actual
path to where you installed ISCE):
export PYTHONPATH=$ISCE\_INSTALL\_ROOT:$PYTHONPATH
and to put the executable commands in the ISCE applications directory on your
PATH for convenience,
export ISCE_HOME=$ISCE_INSTALL_ROOT/isce
export PATH=$ISCE_HOME/applications:$PATH
An optional environment variable is $ISCEDB. This variable points to a
directory in which you may place xml files containing global preferences. More
information on this directory and the files that you might place there is
given below in Section on Input Files. For now you can ignore this environment variable.
To test your installation and your environment, do the following:
> python3
>>> import isce
>>> isce.version.release_version
Running ISCE
Running ISCE from the command line
Copy the example xml files located in the example directory in the ISCE source
tree to a working directory and modify them to point to your own data. Run
them using the command:
> $ISCE_HOME/applications/stripmapApp.py isceInputFile.xml
or (with $ISCE_HOME/applications on your PATH) simply,
> stripmapApp.py isceInputFile.xml
The name of the input file on the command line is arbitrary. ISCE also looks
for appropriately named input files in the local directory
You can also ask ISCE for help from the command line:
This will tell you the basic command and the options for the input file.
Example input files are also given in the 'examples/input_files' directory.
As explained in the Component Configurability