Merge pull request #25 from yunjunz/stripmapStack
stripmapStack: expose --filter_strength and --dual2single optionsLT1AB
commit
b18e6ad763
|
@ -5,7 +5,7 @@
|
||||||
import os, imp, sys, glob
|
import os, imp, sys, glob
|
||||||
import argparse
|
import argparse
|
||||||
import configparser
|
import configparser
|
||||||
import datetime
|
import datetime
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import shelve
|
import shelve
|
||||||
import isce
|
import isce
|
||||||
|
@ -575,7 +575,7 @@ class run(object):
|
||||||
configObj.igram = configObj.outDir+'.int'
|
configObj.igram = configObj.outDir+'.int'
|
||||||
configObj.filtIgram = os.path.dirname(configObj.outDir) + '/filt_' + pair[0] + '_' + pair[1] + '.int'
|
configObj.filtIgram = os.path.dirname(configObj.outDir) + '/filt_' + pair[0] + '_' + pair[1] + '.int'
|
||||||
configObj.coherence = os.path.dirname(configObj.outDir) + '/filt_' + pair[0] + '_' + pair[1] + '.cor'
|
configObj.coherence = os.path.dirname(configObj.outDir) + '/filt_' + pair[0] + '_' + pair[1] + '.cor'
|
||||||
configObj.filtStrength = filtStrength
|
#configObj.filtStrength = filtStrength
|
||||||
configObj.filterCoherence('[Function-2]')
|
configObj.filterCoherence('[Function-2]')
|
||||||
|
|
||||||
configObj.igram = configObj.filtIgram
|
configObj.igram = configObj.filtIgram
|
||||||
|
|
|
@ -27,6 +27,8 @@ def createParser():
|
||||||
help='output directory where data needs to be unpacked into isce format (for script generation).')
|
help='output directory where data needs to be unpacked into isce format (for script generation).')
|
||||||
parser.add_argument('-t', '--text_cmd', dest='text_cmd', type=str, default='source ~/.bash_profile;',
|
parser.add_argument('-t', '--text_cmd', dest='text_cmd', type=str, default='source ~/.bash_profile;',
|
||||||
help='text command to be added to the beginning of each line of the run files. Default: source ~/.bash_profile;')
|
help='text command to be added to the beginning of each line of the run files. Default: source ~/.bash_profile;')
|
||||||
|
parser.add_argument('--dual2single','--fbd2fbs', dest='fbd2fbs', action='store_true',
|
||||||
|
help='resample the FBD acquisitions to FBS. Recommended for "interferogram" workflow without ionosphere.')
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
|
||||||
|
@ -190,7 +192,7 @@ def main(iargs=None):
|
||||||
|
|
||||||
|
|
||||||
# now generate the unpacking script for all the date dirs
|
# 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:
|
if inps.outputDir is not None:
|
||||||
f = open(run_unPack,'w')
|
f = open(run_unPack,'w')
|
||||||
for dataDir in dateDirs:
|
for dataDir in dateDirs:
|
||||||
|
@ -202,8 +204,14 @@ def main(iargs=None):
|
||||||
os.makedirs(slcDir)
|
os.makedirs(slcDir)
|
||||||
cmd = 'unpackFrame_ALOS_raw.py -i ' + os.path.abspath(dataDir) + ' -o ' + slcDir
|
cmd = 'unpackFrame_ALOS_raw.py -i ' + os.path.abspath(dataDir) + ' -o ' + slcDir
|
||||||
IMG_files = glob.glob(os.path.join(AlosFiles[0],'IMG*'))
|
IMG_files = glob.glob(os.path.join(AlosFiles[0],'IMG*'))
|
||||||
if len(IMG_files)==1:
|
if inps.fbd2fbs:
|
||||||
cmd = cmd + ' -f fbs2fbd '
|
#recommended for regular interferometry to use all FBS bandwidth
|
||||||
|
if len(IMG_files) == 2:
|
||||||
|
cmd += ' -f fbd2fbs '
|
||||||
|
else:
|
||||||
|
#used for ionosphere workflow for simplicity
|
||||||
|
if len(IMG_files) == 1:
|
||||||
|
cmd = cmd + ' -f fbs2fbd '
|
||||||
if len(AlosFiles) > 1:
|
if len(AlosFiles) > 1:
|
||||||
cmd = cmd + ' -m'
|
cmd = cmd + ' -m'
|
||||||
print (cmd)
|
print (cmd)
|
||||||
|
|
|
@ -56,6 +56,11 @@ def createParser():
|
||||||
help='sub-band band width')
|
help='sub-band band width')
|
||||||
parser.add_argument('-u', '--unw_method', dest='unwMethod', type=str, default='snaphu'
|
parser.add_argument('-u', '--unw_method', dest='unwMethod', type=str, default='snaphu'
|
||||||
, help='unwrapping method (icu, snaphu, or snaphu2stage)')
|
, help='unwrapping method (icu, snaphu, or snaphu2stage)')
|
||||||
|
|
||||||
|
parser.add_argument('-f','--filter_strength', dest='filtStrength', type=str, default=filtStrength,
|
||||||
|
help='strength of Goldstein filter applied to the wrapped phase before spatial coherence estimation.'
|
||||||
|
' Default: {}'.format(filtStrength))
|
||||||
|
|
||||||
parser.add_argument('--filter_sigma_x', dest='filterSigmaX', type=str, default='100'
|
parser.add_argument('--filter_sigma_x', dest='filterSigmaX', type=str, default='100'
|
||||||
, help='filter sigma for gaussian filtering the dispersive and nonDispersive phase')
|
, help='filter sigma for gaussian filtering the dispersive and nonDispersive phase')
|
||||||
|
|
||||||
|
@ -233,6 +238,16 @@ def interferogramStack(inps, acquisitionDates, stackMasterDate, slaveDates, pair
|
||||||
|
|
||||||
def interferogramIonoStack(inps, acquisitionDates, stackMasterDate, slaveDates, pairs):
|
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.
|
# an interferogram stack with ionosphere correction.
|
||||||
# coregistration is with geometry + const offset + rubbersheeting
|
# coregistration is with geometry + const offset + rubbersheeting
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue