stripmapStack/unwrap: adjust indentation

LT1AB
Zhang Yunjun 2019-11-21 13:29:34 -08:00
parent 6e36a73fb0
commit 43aee1dcb3
1 changed files with 47 additions and 43 deletions

View File

@ -258,7 +258,8 @@ def runUnwrapIcu(infile, outfile):
unwImage.finalizeImage() unwImage.finalizeImage()
unwImage.renderHdr() unwImage.renderHdr()
def runUnwrap2Stage(unwrappedIntFilename,connectedComponentsFilename,unwrapped2StageFilename, unwrapper_2stage_name=None, solver_2stage=None): def runUnwrap2Stage(unwrappedIntFilename,connectedComponentsFilename,unwrapped2StageFilename,
unwrapper_2stage_name=None, solver_2stage=None):
if unwrapper_2stage_name is None: if unwrapper_2stage_name is None:
unwrapper_2stage_name = 'REDARC0' unwrapper_2stage_name = 'REDARC0'
@ -313,6 +314,7 @@ def main(iargs=None):
pckfile = os.path.join(masterShelveDir,'data') pckfile = os.path.join(masterShelveDir,'data')
print(pckfile) print(pckfile)
metadata = extractInfoFromPickle(pckfile, inps) metadata = extractInfoFromPickle(pckfile, inps)
######## ########
print ('unwrapping method : ' , inps.method) print ('unwrapping method : ' , inps.method)
if inps.method == 'snaphu': if inps.method == 'snaphu':
@ -321,6 +323,7 @@ def main(iargs=None):
else: else:
fncall = runUnwrapMcf fncall = runUnwrapMcf
fncall(inps.intfile, inps.unwprefix + '_snaphu.unw', inps.cohfile, metadata, defomax=inps.defomax) fncall(inps.intfile, inps.unwprefix + '_snaphu.unw', inps.cohfile, metadata, defomax=inps.defomax)
elif inps.method == 'snaphu2stage': elif inps.method == 'snaphu2stage':
if inps.nomcf: if inps.nomcf:
fncall = runUnwrap fncall = runUnwrap
@ -329,8 +332,9 @@ def main(iargs=None):
fncall(inps.intfile, inps.unwprefix + '_snaphu.unw', inps.cohfile, metadata, defomax=inps.defomax) fncall(inps.intfile, inps.unwprefix + '_snaphu.unw', inps.cohfile, metadata, defomax=inps.defomax)
# adding in the two-stage # adding in the two-stage
runUnwrap2Stage(inps.unwprefix + '_snaphu.unw', inps.unwprefix + '_snaphu.unw.conncomp',inps.unwprefix + '_snaphu2stage.unw') runUnwrap2Stage(inps.unwprefix + '_snaphu.unw',
inps.unwprefix + '_snaphu.unw.conncomp',
inps.unwprefix + '_snaphu2stage.unw')
elif inps.method == 'icu': elif inps.method == 'icu':
runUnwrapIcu(inps.intfile, inps.unwprefix + '_icu.unw') runUnwrapIcu(inps.intfile, inps.unwprefix + '_icu.unw')