From b728e603e3791fced8ba63f29f1a8602cad99e09 Mon Sep 17 00:00:00 2001 From: Zhang Yunjun Date: Sun, 24 Mar 2019 12:57:26 -0400 Subject: [PATCH] stackStripMap: raise exception for ionosphere workflow if --fbd2fbs detected stackStripMap: check fbd2fbs setting for ALOS-1 data if ionosphere workflow is chosen, and raise Error. prepRawALOS: sort files in run_unPack script. --- contrib/stack/stripmapStack/prepRawALOS.py | 2 +- contrib/stack/stripmapStack/stackStripMap.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/contrib/stack/stripmapStack/prepRawALOS.py b/contrib/stack/stripmapStack/prepRawALOS.py index 5089a94..5e97177 100755 --- a/contrib/stack/stripmapStack/prepRawALOS.py +++ b/contrib/stack/stripmapStack/prepRawALOS.py @@ -192,7 +192,7 @@ def main(iargs=None): # now generate the unpacking script for all the date dirs - dateDirs = glob.glob(os.path.join(inps.inputDir,'2*')) + dateDirs = sorted(glob.glob(os.path.join(inps.inputDir,'2*'))) if inps.outputDir is not None: f = open(run_unPack,'w') for dataDir in dateDirs: diff --git a/contrib/stack/stripmapStack/stackStripMap.py b/contrib/stack/stripmapStack/stackStripMap.py index 788e888..07c1f68 100755 --- a/contrib/stack/stripmapStack/stackStripMap.py +++ b/contrib/stack/stripmapStack/stackStripMap.py @@ -238,6 +238,16 @@ def interferogramStack(inps, acquisitionDates, stackMasterDate, slaveDates, pair def interferogramIonoStack(inps, acquisitionDates, stackMasterDate, slaveDates, pairs): + # raise exception for ALOS-1 if --fbd2fbs was used + run_unpack_file = os.path.join(inps.workDir, 'run_unPackALOS') + if os.path.isfile(run_unpack_file): + with open(run_unpack_file, 'r') as f: + lines = f.readlines() + if any('fbd2fbs' in line for line in lines): + msg = 'ALOS-1 FBD mode data exists with fbd2fbs enabled, which is not applicable for ionosphere workflow' + msg += '\nsolution: restart from prepRawALOS.py WITHOUT --dual2single/--fbd2fbs option.' + raise ValueError(msg) + # an interferogram stack with ionosphere correction. # coregistration is with geometry + const offset + rubbersheeting