Preparing ISOFIT

  1. Download docker and install it: https://docs.docker.com/get-docker/


  1. Download isofit and unzip it: https://github.com/isofit/isofit


  1. In a terminal, navigate to the directory within which the unzipped folder resides and run:

docker build -t isofit isofit-master/

docker run --shm-size=2.33gb --name isofit_test -it isofit


  1. You are now in your Docker shell. Now run:

cd home/

git clone https://github.com/isofit/isofit.git

cd isofit/

pip install --editable .


  1. You have now installed isofit. Now run:

pip uninstall ray

pip install ray==1.11.0

(or try version 1.8.5 -- suggestion of P. Brodrick)


pip uninstall tensorflow

pip install tensorflow==2.5


  1. You have now fixed the version issues w/ ray and tensorflow. Now run:

cd /home/

mkdir 6S

cd 6S/

wget https://salsa.umd.edu/files/6S/6sV2.1.tar

tar -xvf 6sV2.1.tar

sed -i Makefile -e 's/FFLAGS.*/& -std=legacy/'

make

export SIXS_DIR=/home/6S/


  1. You have now compiled 6S. Now run:

cd ../

mkdir sRTMnet

cd sRTMnet/

wget -nv https://zenodo.org/record/4096627/files/sRTMnet_v100.zip

unzip sRTMnet_v100.zip && rm sRTMnet_v100.zip

export EMULATOR_PATH=/home/sRTMnet/sRTMnet_v100


  1. You have now set up the sRTMnet emulator. Now run:

cd /home/isofit/examples/image_cube/

sh ./run_example_cube.sh


  1. This code should download & unzip 2 test datasets, and then run ISOFIT on each. If these are working, ISOFIT should be setup successfully.


  1. Additional Notes

    1. If you have been debugging and have had a failed attempt at running ISOFIT, delete the entire output directory to which the code is pointing before trying a new run.

    2. Help installing GDAL: https://mothergeo-py.readthedocs.io/en/latest/development/how-to/gdal-ubuntu-pkg.html