📄 mt_prep
字号:
#!/bin/csh -f# Interface between Doris and MAINSAR## Andy Hooper, January 2007### Initial welcomeset PRG = `basename "$0"`set AUT = "Andy Hooper, January 2007"echo "$PRG $AUT"echo " "if ($#argv == 0) then echo "usage: mt_prep da_thresh [rg_patches az_patches rg_overlap az_overlap]" echo " da_thresh = (delta) amplitude dispersion" echo " typical values: 0.4 for PS, 0.6 for SB" echo " rg_patches (default 1) = number of patches in range" echo " az_patches (default 1) = number of patches in azimuth" echo " rg_overlap (default 50) = overlapping pixels between patches in range" echo " az_overlap (default 200) = overlapping pixels between patches in azimuth" echo "" exit(4)endifif ($#argv > 0) then set da_thresh = $argv[1]else set da_thresh = 0.4endifif ($#argv > 1) then set prg = $argv[2]else set prg = 1endifif ($#argv > 2) then set paz = $argv[3]else set paz = 1endifif ($#argv > 3) then set overlap_rg = $argv[4]else set overlap_rg = 50endifif ($#argv > 4) then set overlap_az = $argv[5]else set overlap_az = 200endifecho "Amplitude Dispersion Threshold:" $da_threshecho "Processing" $prg "patch(es) in range and" $paz "in azimuth"echo " "set WORKDIR = $cwdset dirname = `echo $WORKDIR | gawk 'BEGIN {FS = "/"}{print $(NF)}'`if ($dirname == "SMALL_BASELINES") then set INSARDIR = `echo $WORKDIR | gawk 'BEGIN {FS = "/SMALL_BASELINES"}{print $1}'` echo "Small Baseline Processing" echo " "else set INSARDIR = $WORKDIRendifset first = `grep 'First_pixel ' $INSARDIR/master.res | gawk '{print $4}'` set last = `grep 'Last_pixel ' $INSARDIR/master.res | gawk '{print $4}'` @ width = ($last - $first) + 1echo $width > $WORKDIR/width.txtset firstl = `grep 'First_line ' $INSARDIR/master.res | gawk '{print $4}'` set lastl = `grep 'Last_line ' $INSARDIR/master.res | gawk '{print $4}'` @ length = ($lastl - $firstl) + 1echo $length > $WORKDIR/len.txtmt_extract_info# Calibrate amplitudesif ($dirname == "SMALL_BASELINES") then \ls $WORKDIR/*/*filtrg.slc > $WORKDIR/calamp.in set selfile = $WORKDIR/selsbc.inelse set master_slc = `\ls $INSARDIR/[1,2]*_crop.slc` if (`grep complex_short $INSARDIR/master.res | gawk '{print $1}'` != "") then cpxfiddle -w $width -fci2 -ofloat -qnormal $master_slc > $master_slc.cr4 echo $master_slc.cr4 > $WORKDIR/calamp.in else echo $master_slc > $WORKDIR/calamp.in endif \ls $INSARDIR/*/slave_res.slc > $WORKDIR/calamp.in set selfile = $WORKDIR/selpsc.inendifcalamp calamp.in $width $WORKDIR/calamp.out# Set up patchesecho $da_thresh > $selfileecho $width >> $selfile###cat calamp.out | gawk '{print "../"$0}' >> selpsc.incat $WORKDIR/calamp.out >> $selfile@ width_p = $width / $prgecho $width_p@ length_p = $length / $pazecho $length_pset irg = 0set iaz = 0set ip = 0while ($irg < $prg) @ irg = $irg + 1 while ($iaz < $paz) @ iaz = $iaz + 1 @ ip = $ip + 1 @ start_rg1 = $width_p * ($irg - 1) + 1 @ start_rg = $start_rg1 - $overlap_rg if ($start_rg < 1) then set start_rg = 1 endif @ end_rg1 = $width_p * $irg @ end_rg = $end_rg1 + $overlap_rg if ($end_rg > $width) then @ end_rg = $width endif @ start_az1 = $length_p * ($iaz - 1) + 1 @ start_az = $start_az1 - $overlap_az if ($start_az < 1) then set start_az = 1 endif @ end_az1 = $length_p * $iaz @ end_az = $end_az1 + $overlap_az if ($end_az > $length) then @ end_az = $length endif if (! -e PATCH_$ip) then mkdir PATCH_$ip endif cd PATCH_$ip echo $start_rg > patch.in echo $end_rg >> patch.in echo $start_az >> patch.in echo $end_az >> patch.in echo $start_rg1 > patch_noover.in echo $end_rg1 >> patch_noover.in echo $start_az1 >> patch_noover.in echo $end_az1 >> patch_noover.in cd .. end set iaz = 0endecho $width > pscphase.in\ls $WORKDIR/*/cint.minrefdem.raw >> pscphase.in#cat tmp.$$ | gawk '{print "../"$0}' >> pscphase.in#rm -rf tmp.$$echo $width > psclonlat.inecho $INSARDIR'/lon.raw' >> psclonlat.inecho $INSARDIR'/lat.raw' >> psclonlat.inecho $width > pscdem.inecho $INSARDIR'/dem_radar_i.raw' >> pscdem.in\ls -d PATCH_* > patch.listmt_extract_cands
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -