diff --git a/lib/GMTSAR-mods/align_cut_tops.csh b/lib/GMTSAR-mods/align_cut_tops.csh index 36f0ec1..7208f52 100755 --- a/lib/GMTSAR-mods/align_cut_tops.csh +++ b/lib/GMTSAR-mods/align_cut_tops.csh @@ -73,10 +73,10 @@ echo $spre # Copy LED and PRM file created at preprocessing stage pwd -cp ../../preprocessing/$mpre".PRM" . -cp ../../preprocessing/$mpre".LED" . -cp ../../preprocessing/$spre".PRM" . -cp ../../preprocessing/$spre".LED" . +cp ../../../preprocessing/$mpre".PRM" . +cp ../../../preprocessing/$mpre".LED" . +cp ../../../preprocessing/$spre".PRM" . +cp ../../../preprocessing/$spre".LED" . # cp $mpre".LED" $1".LED" # cp $spre".LED" $3".LED" diff --git a/lib/GMTSAR-mods/p2p_OSARIS_no_unwrap.csh b/lib/GMTSAR-mods/p2p_OSARIS_no_unwrap.csh index 105edad..8b667d1 100755 --- a/lib/GMTSAR-mods/p2p_OSARIS_no_unwrap.csh +++ b/lib/GMTSAR-mods/p2p_OSARIS_no_unwrap.csh @@ -278,15 +278,18 @@ set OSARIS_PATH = $4 if ($shift_topo == 1) then ln -s ../../topo/topo_shift.grd . intf.csh $ref.PRM $rep.PRM -topo topo_shift.grd - filter.csh $ref.PRM $rep.PRM $filter $dec + filter.csh $ref.PRM $rep.PRM $filter $dec + cp -u *gauss* ../../../ else ln -s ../../topo/topo_ra.grd . intf.csh $ref.PRM $rep.PRM -topo topo_ra.grd - filter.csh $ref.PRM $rep.PRM $filter $dec + filter.csh $ref.PRM $rep.PRM $filter $dec + cp -u *gauss* ../../../ endif else intf.csh $ref.PRM $rep.PRM - filter.csh $ref.PRM $rep.PRM $filter $dec + filter.csh $ref.PRM $rep.PRM $filter $dec + cp -u *gauss* ../../../ endif cd ../.. echo "INTF.CSH, FILTER.CSH - END" diff --git a/lib/PP-pairs.sh b/lib/PP-pairs.sh index acd1433..916ceca 100644 --- a/lib/PP-pairs.sh +++ b/lib/PP-pairs.sh @@ -39,10 +39,18 @@ job_ID=${previous_scene:15:8}--${current_scene:15:8} mkdir -pv $work_PATH/$job_ID/F$swath/raw mkdir -pv $work_PATH/$job_ID/F$swath/topo +mkdir -pv $work_PATH/raw/$job_ID-aligned/F$swath/ cd $work_PATH/$job_ID/F$swath/topo; ln -sf $topo_PATH/dem.grd .; - -cd $work_PATH/raw/$job_ID-aligned/ - +cd $work_PATH/raw/$job_ID-aligned/F$swath/ +ln -sf $topo_PATH/dem.grd . +ln -sf $work_PATH/raw/${previous_scene:15:8}_manifest.safe . +ln -sf $work_PATH/raw/${current_scene:15:8}_manifest.safe . +ln -sf $work_PATH/raw/$previous_scene.tiff . +ln -sf $work_PATH/raw/$current_scene.tiff . +cp -P $work_PATH/raw/$previous_scene.xml . +cp -P $work_PATH/raw/$current_scene.xml . +cp -P $work_PATH/raw/$previous_orbit . +cp -P $work_PATH/raw/$current_orbit . # ALIGN SCENE PAIRS @@ -74,12 +82,12 @@ $OSARIS_PATH/lib/GMTSAR-mods/align_cut_tops.csh $previous_scene $previous_orbit # INTERFEROMETRIC PROCESSING -if [ ! -f $work_PATH/raw/$job_ID-aligned/a.grd ] || [ ! -f $work_PATH/raw/$job_ID-aligned/r.grd ]; then +if [ ! -f $work_PATH/raw/$job_ID-aligned/F$swath/a.grd ] || [ ! -f $work_PATH/raw/$job_ID-aligned/F$swath/r.grd ]; then echo; echo "ERROR: Scene alignment failed. Aborting interferometric processing ..."; echo else - + cd $work_PATH/$job_ID/F$swath/raw/ - ln -sf $work_PATH/raw/$job_ID-aligned/*F$swath* . + ln -sf $work_PATH/raw/$job_ID-aligned/F$swath/*F$swath* . cd $work_PATH/$job_ID/F$swath/ diff --git a/lib/prepare-data.sh b/lib/prepare-data.sh index dc6db9f..add2529 100755 --- a/lib/prepare-data.sh +++ b/lib/prepare-data.sh @@ -195,6 +195,10 @@ else ln -sf $work_PATH/orig/${files_chrono[$i]}/measurement/${stem}.tiff . ln -sf $work_PATH/orig/${files_chrono[$i]}/annotation/${stem}.xml . + cd $work_PATH/preprocessing/ + ln -sf $work_PATH/orig/${files_chrono[$i]}/measurement/${stem}.tiff . + ln -sf $work_PATH/orig/${files_chrono[$i]}/annotation/${stem}.xml . + cd $work_PATH/preprocessing/raw make_s1a_tops ${stem}.xml ${stem}.tiff ${stem} 0 scene_prefix="${stem:15:8}_${stem:24:6}_F${swath}" prefixes+=($scene_prefix) @@ -242,13 +246,13 @@ else for((i=0;i<$stem_count;++i)); do stem_string="$stem_string ${stems_chrono[$i]}" done - - if [ $debug -ge 1 ]; then - echo; echo "Executing assemble_tops with parameters:" - echo "$azimuth_min $azimuth_max $stem_string $work_PATH/preprocessing/$stem" - fi - assemble_tops $azimuth_min $azimuth_max $stem_string $work_PATH/preprocessing/$stem - + if [ $cut_to_aoi -eq 1 ]; then + if [ $debug -ge 1 ]; then + echo; echo "Executing assemble_tops with parameters:" + echo "$azimuth_min $azimuth_max $stem_string $work_PATH/preprocessing/$stem" + fi + assemble_tops $azimuth_min $azimuth_max $stem_string $work_PATH/preprocessing/$stem + fi cd $work_PATH/preprocessing/ # Generate new PRM files for assembled tops