stackStripMap: indentation adjusts

following PEP008
LT1AB
Zhang Yunjun 2021-03-17 22:48:28 -07:00
parent def109815d
commit e712ca358c
1 changed files with 102 additions and 100 deletions

View File

@ -26,6 +26,7 @@ noMCF = 'False'
defoMax = '2'
maxNodes = 72
def createParser():
parser = argparse.ArgumentParser( description='Preparing the directory structure and config files for stack processing of StripMap data')
@ -102,6 +103,7 @@ def createParser():
parser.add_argument('--summary', dest='summary', action='store_true', default=False, help='Show summary only')
return parser
def cmdLineParse(iargs = None):
parser = createParser()
inps = parser.parse_args(args=iargs)
@ -136,11 +138,11 @@ def get_dates(inps):
secondaryDates.remove(inps.referenceDate)
return acuisitionDates, inps.referenceDate, secondaryDates
def slcStack(inps, acquisitionDates, stackReferenceDate, secondaryDates, pairs, splitFlag=False, rubberSheet=False):
# A coregistered stack of SLCs
i=0
if inps.bbox:
i+=1
runObj = run()
@ -149,7 +151,6 @@ def slcStack(inps, acquisitionDates, stackReferenceDate, secondaryDates, pairs,
runObj.crop(acquisitionDates, config_prefix, native=not inps.zerodop, israw=not inps.nofocus)
runObj.finalize()
i+=1
runObj = run()
runObj.configure(inps, 'run_{:02d}_reference'.format(i))
@ -235,11 +236,11 @@ def slcStack(inps, acquisitionDates, stackReferenceDate, secondaryDates, pairs,
return i
def interferogramStack(inps, acquisitionDates, stackReferenceDate, secondaryDates, pairs):
# an interferogram stack without ionosphere correction.
# coregistration is with geometry + const offset
i = slcStack(inps, acquisitionDates, stackReferenceDate, secondaryDates, pairs, splitFlag=False, rubberSheet=False)
i+=1
@ -249,6 +250,8 @@ def interferogramStack(inps, acquisitionDates, stackReferenceDate, secondaryDate
low_or_high = "/"
runObj.igrams_network(pairs, acquisitionDates, stackReferenceDate, low_or_high, config_prefix)
runObj.finalize()
return
def interferogramIonoStack(inps, acquisitionDates, stackReferenceDate, secondaryDates, pairs):
@ -297,9 +300,10 @@ def interferogramIonoStack(inps, acquisitionDates, stackReferenceDate, secondary
config_prefix = 'config_iono_'
lowBand = '/LowBand/'
highBand = '/HighBand/'
runObj.dispersive_nonDispersive(pairs, acquisitionDates, stackReferenceDate,
lowBand, highBand, config_prefix)
runObj.dispersive_nonDispersive(pairs, acquisitionDates, stackReferenceDate, lowBand, highBand, config_prefix)
runObj.finalize()
return
def main(iargs=None):
@ -355,11 +359,9 @@ def main(iargs=None):
elif inps.workflow == 'ionosphere':
interferogramIonoStack(inps, acquisitionDates, stackReferenceDate, secondaryDates, pairs)
return
if __name__ == "__main__":
# Main engine
main()
main(sys.argv[1:])