Getting ROI_PAC

ROI_pac is copyrighted software that requires a license. Licenses are available at no charge for non-commercial use from Open Channel Foundation

Installation

The new release (v. 3.0) has a very different installation system compared to earlier releases. The easiest way to build it is explained in the ROI_PAC_3_0/ROI_PAC/AAREADME_BUILD_ROIPAC file.

1. Expand Archive

Uncompress and untar the archived file.

% tar -xzf ROI_PAC_3_0.tgz

2. Read the documentation

Read through the text file ROI_PAC_3_0/AAREADME and the additional documentation found in ROI_PAC_3_0/ROI_PAC/DOC. The instructions for installing the software and running the scripts are described in ROI_PAC_3_0/ROI_PAC/DOC/Setup and ROI_PAC_3_0/ROI_PAC/AAREADME_BUILD_ROIPAC. The most important steps are summarized below.

% cd ROI_PAC_3_0
% less AAREADME

3. Compile Executables

Follow the instructions in the file ROI_PAC_3_0/ROI_PAC/AAREADME_BUILD_ROIPAC. Copy and paste each command individually into a shell. These commands will build and test the software package for multiple compilers. If problems are encountered, refer to the bottom of AAREADME_BUILD_ROIPAC for platform specific issues or look through prior posts on the forum at Open Channel Foundation. To see what shell you are using, type echo $SHELL on the command line.

% cd ROI_PAC_3_0/ROI_PAC
% less AAREADME_BUILD_ROIPAC
% which ifort g95 f90 pgf95 f95 xlf gfortran cc gcc icc
% touch aclocal.m4 Makefile.in configure
% ./contrib/install-fftw.sh CC=cc
% export FFTW_LIB_DIR=/software/ROI_PAC_3_0/ROI_PAC/NetInst/fftw-071005-1457/lib
% export FFTW_INC_DIR=/software/ROI_PAC_3_0/ROI_PAC/NetInst/fftw-071005-1457/include
% ./contrib/multibuild.sh
etc.

When testing the build, you will need to gunzip the provided test data set prior to running the script multitest.sh.

% ls
ROI_PAC_3_0             ROI_PAC_3_0.tgz         roi_pac_testdir.tar.gz
% gunzip roi_pac_testdir.tar.gz
% cd ROI_PAC_3_0/ROI_PAC/test-runs
% ../contrib/multitest.sh /full_path/roi_pac_testdir.tar  /full_path/ROI_PAC_3_0/ROI_PAC/multibuild-071005-1506/installs/share/roi_pac  /full_path/ROI_PAC_3_0/ROI_PAC/multibuild-071005-1506/installs/defaults/bin  /full_path/ROI_PAC_3_0/ROI_PAC/multibuild-071005-1506/installs/gfortran/bin

Each test run should take ~40 minutes depending on your computer. If the test fails while processing the DEM contained in roi_pac_testdir.tar, you may have to manually swap this DEM file with one that has the proper byte order for your machine (i.e., little-endian versus big-endian, see TEST_DIR/AAREADME). If the test is successful, the finished product is the file geo_930110-950523.unw which should be buried within the directory structure (check in test-runs/defaults/TEST_DIR/int_930110_950523). You can view the image file using the program mdx, if you already have it installed. Otherwise, you can try to view the file with a different program that can display binary image files (i.e., Matlab, ENVI, ERmapper). The file is composed of floating point values in a band-interleave format, i.e. alternating lines of magnitude and phase. The size of the file should be just under 10 MB. The meta-data for the file can be found in geo_930110-950523.unw.rsc. If you have progressed this far, congratulations! You have a working version of ROI_PAC.

4. Install Executables

Make a new directory called INT_BIN where you will deposit the final executables.

% mkdir ROI_PAC_3_0/ROI_PAC/INT_BIN

You can copy the set of executables from the multi-build operation. Choose one of the successful builds found in ROI_PAC_3_0/ROI_PAC/multibuild*/installs.

% cd ROI_PAC_3_0/ROI_PAC/multibuild*/installs/defaults/bin
% cp * ROI_PAC_3_0/ROI_PAC/INT_BIN/.

<!> If you plan to use ODR orbit files, then the getorb executable (installed separately) must be located in INT_BIN. You can copy the executable into this directory or make a symbolic link.

5. Configure SAR_CONFIG

Read the instructions in ROI_PAC_3_0/ROI_PAC/DOC/SAR_CONFIG. Copy this file into the directory ROI_PAC_3_0/ROI_PAC and edit the appropriate lines. You will have to source this file every time that you want to use ROI_PAC. It will set your path environment so that the necessary scripts will be available on the command line.

% cp ROI_PAC_3_0/ROI_PAC/DOC/SAR_CONFIG ROI_PAC_3_0/ROI_PAC/.
% vi ROI_PAC_3_0/ROI_PAC/SAR_CONFIG
(edit paths)
% source SAR_CONFIG

In addition to the paths to orbit files (SAR_PRC_DIR and SAR_ODR_DIR), you will also need to define the INT_BIN and INT_SCR directories. To do this, add the following lines to SAR_CONFIG.

export INT_BIN="/full_path/ROI_PAC_3_0/ROI_PAC/INT_BIN"
export INT_SCR="/full_path/ROI_PAC_3_0/ROI_PAC/INT_SCR"

Instead of using export for the bash shell, use the setenv syntax if you are using the csh or sh shell. You can also add the path to mdx, getorb, or other related software that you might install.

export MDX="/software/mdx/bin"
export FFTW_LIB="/software/ROI_PAC_3_0/NetInst/fftw-071005-1457/lib"
export PATH="$PATH:$INT_BIN:$INT_SCR:$MDX"

6. Update Path To Perl

The path to the perl executable may be different on your machine than is used in the ROI_PAC scripts. You can check if this step is necessary by comparing the paths in the following outputs:

% cd ROI_PAC_3_0/ROI_PAC/INT_SCR
% grep perl make_raw.pl
#!/usr/bin/perl
% which perl
/usr/bin/perl

The example shown above shows that no changes are necessary. If the paths are different, there is a simple script in ROI_PAC_3_0/ROI_PAC/INT_SCR that will edit this path for you in all of the perl scripts.

% cd ROI_PAC_3_0/ROI_PAC/INT_SCR
% chgperlpath.pl

7. Celebrate

You are now ready to process your own SAR data. Create a workspace where you will process future data. You may also want to create a new directory elsewhere on your system where you can archive your DEM and orbit files. Update SAR_CONFIG with the new location of the orbit files. Remember to source your SAR_CONFIG in each new shell before you start to process data. Alternatively, you can add a line to the file that initializes your shell environment upon startup (such as .cshrc or .bash_profile).

Installation (last edited 2007-10-16 17:32:44 by DavidSchmidt)