-
Notifications
You must be signed in to change notification settings - Fork 1
/
HiRISE_processing.sh
40 lines (23 loc) · 1.04 KB
/
HiRISE_processing.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
#!/bin/bash
set -ue
# set -xv
# ---------------------------------------------------------------------------------------------------------------------------------------------------------
# Every HiRISE image is composed by 20 raw edr (.IMG) files. This script will mosaic the 20 raw edr files into 1 processed image. Repeated for every image.
# The data_list.txt file must contain the list of the HiRISE names until RED --> e.g: ESP_016963_1680_RED
# ESP_018598_1680_RED
# ---------------------------------------------------------------------------------------------------------------------------------------------------------
INPUT_FILE="$1"
declare -a FILES=()
# declare -a NAMES=()
OLDIFS="$IFS"
IFS=$'\n' FILES=($(cat $INPUT_FILE))
IFS="$OLDIFS"
NUMLINES=${#FILES[@]}
for ((i=0;i<$NUMLINES;i++)); do
FILE=${FILES[$i]}
NAME=${FILE:0:19}
#NAME=${LINE%.IMG}
#NAME=${NAME%.img}
# NAMES[$i]=${NAME}
hiedr2mosaic.py ${NAME}*.IMG
done