Bootstrap the working environment

LMOD

To simplify the maintenance and installation of multiple versions of S1Tiling, using different versions of OTB and so on, I use LMOD to organize the various installations as various modules.

The following procedure is written with this consideration in mind: the scripts I document below produce and use LMOD modules.

S1Tiling

# 1. Use where you will work from
cd /some/where

# 2. Clone S1Tiling project
git clone git@gitlab.orfeo-toolbox.org:s1-tiling/s1tiling.git

# 3. Install git hooks
# - either install default version -> copy git hooks
s1tiling/resources/install/install-githook.sh
# - or install with a symlink
s1tiling/resources/install/install-githook.sh symlink
# - or install with a hard-link
s1tiling/resources/install/install-githook.sh hardlink

# 4. Install the project
#    Parameters are:
#    * -p <python-version>
#    * <path/to/OTB tarball>
#    * <path/to/s1tiling/install/dir>
#    It will:
#    * create a conda virtual environment,
#    * extract OTB binaries in "current_directory/OTB-9.1.1-Linux-py313"
#    * and install S1Tiling as if done with: `pip install -e .[dev,doc]`
#    If LMOD is detected a s1tiling module will be created
s1tiling/resources/install/install-rcbin.sh -p 3.13 path/to/OTB-9.1.1-Linux.tar.gz some/where/s1tiling

The 4th step is one integrated way to install S1Tiling, many other approaches are possible. See Installation chapter.

Support projects

normlim_sigma0

Expecting the project is organized as:

normlim_sigma0/
+-> src/
+-> build/
+-> install/
+-> compile-and-install.sh

thanks to:

cd /some/where
mkdir -p normlim_sigma0/{build,install}
cd normlim_sigma0
git clone git@gitlab.orfeo-toolbox.org:s1-tiling/normlim_sigma0.git src
ln -s src/scripts/compile-and-install.sh

If you have LMOD installed, and if you have used the previous procedure to install S1Tiling and its LMOD module (named s1tiling/otb911-py313), the project can be compiled and installed with:

./compile-and-install.sh s1tiling/otb911-py313 RelWithDebInfo

The result will be installed in install/s1tiling-otb911-py313/, and a new module named SARCalibrationExtended/otb911-py313 will be generated.

rtc_gamma0

This project currently depends on the previous one, normlim_sigma0, and its module.

Using the same organization the procedure becomes now:

cd /some/where
mkdir -p rtc_gamma0/{build,install}
cd rtc_gamma0
git clone git@gitlab.orfeo-toolbox.org:s1-tiling/rtc_gamma0.git src
ln -s src/scripts./compile-and-install.sh

./compile-and-install.sh SARCalibrationExtended/otb911-py313 RelWithDebInfo

Eventually: Running S1Tiling or debugging OTB applications

To use S1Tiling, you can load all the modules with:

ml rtc_gamma0/otb911-py313

In case you need to debug the support applications, and not run S1Tiling, $USE_GDB can be set to disable activating conda environment. This is required because gdb will use the version of Python installed on the system, version that will be incompatible with the one in the virtual environment.

USE_GDB=YES ml rtc_gamma0/otb911-py313

GDAL_NUM_THREADS=12 ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=10                    \
gdb --args path/to/OTB-9.1.1-Linux-py313/bin/otbApplicationLauncherCommandLine \
SARComputeGroundAndSatPositionsOnEllipsoid                                     \
application parameters...