This section describes the setting up of the SICD-related software on El Capitan.
Lookup table for mapping variables to locations on disk. The variables are not environment variables. We just use these to simplify instructions.
| VARIABLE | MY VALUE | Comment |
|---|---|---|
| HOME | /Users/agram | Default home directory on El Capitan |
| ROOT | /Users/agram/tools/sicd | ROOT folder for SICD installation |
| MODDIR | /Users/agram/privatemodules/sicd | Module files for SICD |
- Create the directory ROOT . This directory will contain all future SICD-related installations.
> mkdir /Users/agram/tools/sicd- Create the following subdirectories under ROOT.
ROOT
|
|--src
|--installThe commands for creating this directory structure
> ROOT
> mkdir src install- Checkout six-library under src folder
> cd ROOT/src
> git checkout https://github.com/ngageoint/six-library.git- Checkout sarpy under src folder
> cd ROOT/src
> git checkout https://github.com/ngageoint/sarpy.git- Install xerces if you haven't already with macports
> sudo port install xercesc3Shown below is the template for sicd module file located at /Users/agram/privatemodules/sicd
#%Module1.0#####################################################################
##
## sicd modulefile
##
## privatemodules/sicd. Generated from dot.in by configure.
##
proc ModulesHelp { } {
global version
puts stderr "\tAdds SICD environment for build and use"
puts stderr "\n\tVersion $version\n"
}
module-whatis "adds SICD stuff to your environment"
# for Tcl script use only
set version 3.2.10
set tooldir /Users/agram/tools/sicd/install
set sitedir $tooldir/lib/python3.6/site-packages
append-path PATH $tooldir/bin
append-path LD_LIBRARY_PATH $tooldir/lib:$sitedir
append-path DYLD_LIBRARY_PATH $sitedir/coda:$sitedir/pysix
append-path PYTHONPATH $sitedir
append-path PYTHONPATH /Users/agram/tools/sicd/src
setenv SIX_SCHEMA_PATH $tooldir/conf/schema/six
set-alias "wafconfigure" "PYTHON=python3 python3 waf configure --prefix=/Users/agram/tools/sicd/install --enable-cpp11 --with-cflags=\"-I/opt/local/include\" --with-cxxflags=\"-I/opt/local/include\" --with-linkflags=\"-L/opt/local/lib -L/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib\" --nobuild-xml --alltests"Once you have set this up, you should be able to see this module listed amongst the available modules:
> module list
1) use.own 3) gee 5) sicd
2) basic 4) isce/latestIf you don't see the sicd module file listed, make sure you have loaded the "use.own" module
> module load use.ownThis instructs modules to look for module files in your HOME/privatemodules folder.
The first thing to do to use or install six-library is to load the corresponding module. To load the module, I execute
module load sicdChange to the six-library folder
> cd /Users/agram/tools/sicd/src/six-library
> wafconfigure
> python3 waf build
> python3 waf installTo test the installation, in a python shell try the following import statement:
> from pysix.six_sicd import *
> import sarpyYou are now ready to use SICD. Load the modulefile for the version you want to use and when you want to restore the environment, unload the module
> module load sicd
> .... Your work ....
> module unload sicd