make_coreg_sub
来自「StaMps最新测试版」· 代码 · 共 104 行
TXT
104 行
#!/bin/tcsh -f## Called from make_coreg ## Andy Hooper, Jul 2006#set WORKDIR = $argv[1]set bperp_max = $argv[3]set count_max = $argv[4]cp $WORKDIR/master.res .set first = `grep 'First_pixel ' master.res | gawk 'END {print $4}'`set last = `grep 'Last_pixel ' master.res | gawk 'END {print $4}'`set first_l = `grep 'First_line ' master.res | gawk 'END {print $4}'`set last_l = `grep 'Last_line ' master.res | gawk 'END {print $4}'`echo "coreg_pos $first_l $last_l $first $last 0 0" >matbgparms.txtmatlab -nojvm -nosplash -nodisplay < $STAMPS/matlab/batchjob.m >> make_coreg.logset count = 0foreach dir(`cat $argv[2] | gawk '{print $2}'`) set bperp = `grep $dir $argv[2] | gawk '{print $1}'` set ifg_num = `grep $dir $argv[2] | gawk '{print $3}'` @ count = $count + 1 if ($count <= $count_max || $bperp <= $bperp_max) then sed -n '1,/* End_coarse_correl:/p' $dir/coreg.out > coreg.out cp $dir/slave.res . echo "MASTER: $WORKDIR" echo "SLAVE: $dir\n" set dirnum = `echo $dir | gawk 'BEGIN {FS="/"} {print $NF}'` set last_count = $count if (! -f CPM_Data.0.$ifg_num) then doris $WORKDIR/coreg.dorisin >> make_coreg.log if (-f CPM_Data) then tail -n+11 CPM_Data > CPM_Data.0.$ifg_num# tail --lines=+11 CPM_Data > CPM_Data.0.$ifg_num rm -f CPM_Data mv coreg.out coreg.out.0.$ifg_num endif endif endifend#echo $dirnum >> coreg_parms@ last_count = $last_count - 2tail -n+$last_count $argv[2] > tmp_todo.$$#tail --lines=+$last_count $argv[2] > tmp_todo.$$foreach dir(`cat tmp_todo.$$ | gawk '{print $2}'`) tail -n+2 tmp_todo.$$ > tmp_tmp# tail --lines=+2 tmp_todo.$$ > tmp_tmp mv tmp_tmp tmp_todo.$$ set Tline1 = `grep 'correlation_translation_lines' $dir/coreg.out | gawk '{print $2}'` set Tpix1 = `grep 'correlation_translation_pixels' $dir/coreg.out | gawk '{print $2}'` #sed -n '1,/*_Start_crop:/p' master.res > tmp_master.$$ #echo "Data_output_file: $dir" >> tmp_master.$$ #sed -e '1,/Data_output_file:/d' $dir/slave.res >> tmp_master.$$ #mv tmp_master.$$ master.res cp $dir/slave.res master.res echo "coreg_pos $first_l $last_l $first $last $Tline1 $Tpix1" >matbgparms.txt echo "coreg_pos $first_l $last_l $first $last $Tline1 $Tpix1" >> make_coreg.log matlab -nojvm -nosplash -nodisplay < $STAMPS/matlab/batchjob.m >> make_coreg.log head -n$count_max tmp_todo.$$ > tmp_todo2.$$# head --lines=$count_max tmp_todo.$$ > tmp_todo2.$$ set ifg_num = `grep $dir $argv[2] | gawk '{print $3}'` #set dirnum = `echo $dir | gawk 'BEGIN {FS="/"} {print $NF}'` foreach dir2(`cat tmp_todo2.$$ | gawk '{print $2}'`) echo "MASTER: $dir" echo "SLAVE: $dir2\n" set ifg2_num = `grep $dir2 $argv[2] | gawk '{print $3}'` #set dir2num = `echo $dir2 | gawk 'BEGIN {FS="/"} {print $NF}'` if ( ! (-f CPM_Data.$ifg_num.$ifg2_num || -f CPM_data.0.$ifg2_num) ) then set Tline2 = `grep 'correlation_translation_lines' $dir2/coreg.out | gawk '{print $2}'` set Tpix2 = `grep 'correlation_translation_pixels' $dir2/coreg.out | gawk '{print $2}'` @ Tline = $Tline2 - $Tline1 @ Tpix = $Tpix2 - $Tpix1 sed -n '1,/*_Start_coarse_correl:/p' $dir2/coreg.out > coreg.out echo "*******************************************************************" >> coreg.out echo "Estimated translation slave w.r.t. master:" >> coreg.out echo "Coarse_correlation_translation_lines: $Tline" >> coreg.out echo "Coarse_correlation_translation_pixels: $Tpix" >> coreg.out echo "*******************************************************************" >> coreg.out echo "* End_coarse_correl:_NORMAL" >> coreg.out echo "*******************************************************************" >> coreg.out cp $dir2/slave.res . doris $WORKDIR/coreg.dorisin >> make_coreg.log if (-f CPM_Data) then tail -n+11 CPM_Data > CPM_Data.$ifg_num.$ifg2_num# tail --lines=+11 CPM_Data > CPM_Data.$ifg_num.$ifg2_num rm -f CPM_Data mv coreg.out coreg.out.$ifg_num.$ifg2_num endif endif endend
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?