From 881df6a9298c86a8b9b9ebdd36fc64bcaea47f4e Mon Sep 17 00:00:00 2001 From: tkiyan <48825861+tkiyan@users.noreply.github.com> Date: Fri, 22 Mar 2019 12:48:10 +0100 Subject: [PATCH 1/7] Parallelization bug removed When running more than 1 swath, the tmp-files of "align_cut_tops.csh" were mixed up, since up to 3 Jobs (in case of 3 activated swaths) were manipulating tmp-files. swaths are now calculated in separately directories and results for "p2p_OSARIS_no_unwrap.csh" are read out from new directories properly --- lib/PP-pairs.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) 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/ From 94f36c005fa6eeb046cbacdbcc67254b370bf0f7 Mon Sep 17 00:00:00 2001 From: tkiyan <48825861+tkiyan@users.noreply.github.com> Date: Fri, 22 Mar 2019 13:03:18 +0100 Subject: [PATCH 2/7] fixed unnecessary cutting it cutted although the aoi-flag set to 0 in the xyz.config-file. just putting a checkup with on the parameter before assample_tops might solve the Problem, but one has to think about to set it way before to speed up calculation and get rid of excessive files for this case --- lib/prepare-data.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/prepare-data.sh b/lib/prepare-data.sh index dc6db9f..6ac7870 100755 --- a/lib/prepare-data.sh +++ b/lib/prepare-data.sh @@ -242,13 +242,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 From 756cf627cd5d7fea8bfbdedde028ebdee688ded0 Mon Sep 17 00:00:00 2001 From: tkiyan <48825861+tkiyan@users.noreply.github.com> Date: Fri, 22 Mar 2019 14:56:50 +0100 Subject: [PATCH 3/7] link files in case you do not want do cut --- lib/prepare-data.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/prepare-data.sh b/lib/prepare-data.sh index 6ac7870..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) From 46d4dbf3715b79f127f990e41728fc85e6d43ea7 Mon Sep 17 00:00:00 2001 From: tkiyan <48825861+tkiyan@users.noreply.github.com> Date: Fri, 22 Mar 2019 16:52:11 +0100 Subject: [PATCH 4/7] Update displacement.sh --- modules/displacement/displacement.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/displacement/displacement.sh b/modules/displacement/displacement.sh index e2813ba..66d87ac 100644 --- a/modules/displacement/displacement.sh +++ b/modules/displacement/displacement.sh @@ -46,8 +46,8 @@ else if [ -z "$unwrapped_intf_PATH" ]; then echo "No path to unwrapped interferograms specified in ${module_name}.config" - echo "Trying default path $output_PATH/Pairs-forward/Interferograms-unwrapped ..." - unwrapped_intf_PATH="$output_PATH/Pairs-forward/Interferograms-unwrapped" + echo "Trying default path $output_PATH/Interf-unwrpd ..." + unwrapped_intf_PATH="$output_PATH/Interf-unwrpd" fi if [ ! -d "$unwrapped_intf_PATH" ]; then From 61d61719f5f0e9647904bf5bb14584abebffdad5 Mon Sep 17 00:00:00 2001 From: tkiyan <48825861+tkiyan@users.noreply.github.com> Date: Fri, 22 Mar 2019 16:53:24 +0100 Subject: [PATCH 5/7] Update align_cut_tops.csh --- lib/GMTSAR-mods/align_cut_tops.csh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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" From 346579e492ec03f23171e9d7cfdae82edf48fec4 Mon Sep 17 00:00:00 2001 From: tkiyan <48825861+tkiyan@users.noreply.github.com> Date: Fri, 22 Mar 2019 16:55:52 +0100 Subject: [PATCH 6/7] Update p2p_OSARIS_no_unwrap.csh --- lib/GMTSAR-mods/p2p_OSARIS_no_unwrap.csh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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" From 02b313f958a0718061a05c1f7a27e09f0318d7a9 Mon Sep 17 00:00:00 2001 From: tkiyan <48825861+tkiyan@users.noreply.github.com> Date: Fri, 22 Mar 2019 20:36:29 +0100 Subject: [PATCH 7/7] Update displacement.sh --- modules/displacement/displacement.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/displacement/displacement.sh b/modules/displacement/displacement.sh index 66d87ac..e2813ba 100644 --- a/modules/displacement/displacement.sh +++ b/modules/displacement/displacement.sh @@ -46,8 +46,8 @@ else if [ -z "$unwrapped_intf_PATH" ]; then echo "No path to unwrapped interferograms specified in ${module_name}.config" - echo "Trying default path $output_PATH/Interf-unwrpd ..." - unwrapped_intf_PATH="$output_PATH/Interf-unwrpd" + echo "Trying default path $output_PATH/Pairs-forward/Interferograms-unwrapped ..." + unwrapped_intf_PATH="$output_PATH/Pairs-forward/Interferograms-unwrapped" fi if [ ! -d "$unwrapped_intf_PATH" ]; then