-
Notifications
You must be signed in to change notification settings - Fork 2
/
run_tetracorder.sh
57 lines (40 loc) · 1.29 KB
/
run_tetracorder.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
TETRA_OUT_DIR=${1}
AGGREGATED_OUT_FILE=${2}
REFL_FILE=${3}
REFL_UNCERT_FILE=${4}
EMIT_UTILS_PATH=${5}
EMIT_SDS_L2B_PATH=${6}
TETRACORDER_CMD_BASE=${7}
echo 'starting'
date
TETRA_OUT_DIR_ABS=`readlink -f ${TETRA_OUT_DIR}`
TETRA_SETUP=${TETRACORDER_CMD_BASE}/cmd-setup-tetrun
REFL_ABS_FILE=`readlink -f ${REFL_FILE}`
OUTPUT_ABS_DIR=`readlink -f ${TETRA_OUT_DIR}`
AGGREGATED_OUT_FILE_ABS=`readlink -f ${AGGREGATED_OUT_FILE}`
local_refl=`basename ${REFL_FILE}`
local_output=`basename ${TETRA_OUT_DIR}`
current_dir=${PWD}
cd /tmp
cp ${REFL_ABS_FILE} .
cp ${REFL_ABS_FILE}.hdr .
echo 'coppied'
date
${TETRA_SETUP} /tmp/${local_output} aviris_2018 cube /tmp/${local_refl} 1 -T -20 80 C -P .5 1.5 bar
cd ${local_output}
time ./cmd.runtet cube /tmp/${local_refl} >& cmd.runtet.out
echo 'tetracorder finished'
date
cp /tmp/${local_output} ${OUTPUT_ABS_DIR} -r
rm -rf /tmp/${local_output}
rm -rf /tmp/${local_refl}
cd ${current_dir}
echo 'cleanup finished'
date
export PYTHONPATH=$PYTHONPATH:${EMIT_SDS_L2B_PATH}
export PYTHONPATH=$PYTHONPATH:${EMIT_UTILS_PATH}
cd ${EMIT_SDS_L2B_PATH}
python aggregator.py ${TETRA_OUT_DIR_ABS} ${AGGREGATED_OUT_FILE_ABS} --calculate_uncertainty 0 --reflectance_file ${REFL_FILE} --reflectance_uncertainty_file ${REFL_UNCERT_FILE}
cd ${current_dir}
echo 'aggregation finished'
date