forked from dedetmix/gmt5sar_process
-
Notifications
You must be signed in to change notification settings - Fork 1
/
prep.sh
executable file
·55 lines (47 loc) · 1.91 KB
/
prep.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
55
#!/bin/bash
######################################################################
# 03
# script to prepare product information (.xml) combined to auxilary calibration
# GMT5SAR processing for sentinel1A/B
# 2017.01.30 "Noorlaila Hayati"
# email: [email protected] or [email protected]
######################################################################
dir=$(pwd)
mkdir xml_origin
mv *.xml $dir/xml_origin/.
cp ../../date_asc.txt .
cp ../../data.in .
paste -d\ date_asc.txt data.in | sed -r 's/[:]+/ /g'> date_xml.in
shopt -s extglob
IFS=" "
while read tanggal xml orb
do
awk 'NR>1 {print $0}' < "$tanggal"_manifest.safe > tmp_file
#cat $xml.xml tmp_file > ./"$xml"_a.xml #if there is no file aux_cal during the SAR images, use this command
cat $xml.xml tmp_file s1a-aux-cal.xml > ./"$xml"_a.xml
rm tmp_file
rm $xml.xml
mv "$xml"_a.xml $xml.xml
done < "$1"
# make sure to have space " " between column instead of symbol ":" on file date_xml.in
# attention that aux file could be from sen 1a or sen 1b with IPFV difference
# input output name has to be different, change the output file name and replace the original
# remember also the aux callibration is not applied to all interferograms, just the one which has different IPF version, > read Elevation Antenna Pattern (EAP) Contribution
# run prep.sh to sentinel 1A aux_cal and sentinel 1B aux_cal (if exist)
# finally run (on raw_orig folder):
# --> preproc_batch_tops.csh data.in dem.grd 1 ,this step to prepare SBAS process (baseline_table.dat)
# --> preproc_batch_tops.csh data.in dem.grd 2
# then type on terminal
# $ cd ..
# $ rm -r -f raw
# $ mkdir raw
# $ cd raw
# $ ln -s ../raw_orig/*.PRM .
# $ ln -s ../raw_orig/*.PRM0 .
# $ ln -s ../raw_orig/*.LED .
# $ ln -s ../raw_orig/*.SLC .
# $ ln -s ../raw_orig/*.PRM .
# $ ln -s ../raw_orig/*.dat .
# $ ln -s ../raw_orig/*.grd .
# $ cd ..
# --> go to main directory, run: intf_tops.csh intf.in batch_tops.config