From b062a6a150d7a9102fc62a9b8c384dedb9131c5c Mon Sep 17 00:00:00 2001 From: Zhang Yunjun Date: Mon, 18 Mar 2019 18:50:33 -0400 Subject: [PATCH] stripmapStack: expose --filter_strength option in stackStripMap expose the -f / --filter_strength option in the parser to user so that one is able to change the filtering strength. Default is setted as the hardwired value - 0.8, so previous setting won't be affected. --- contrib/stack/stripmapStack/Stack.py | 4 ++-- contrib/stack/stripmapStack/stackStripMap.py | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/contrib/stack/stripmapStack/Stack.py b/contrib/stack/stripmapStack/Stack.py index 6e232e2..74d0df4 100755 --- a/contrib/stack/stripmapStack/Stack.py +++ b/contrib/stack/stripmapStack/Stack.py @@ -5,7 +5,7 @@ import os, imp, sys, glob import argparse import configparser -import datetime +import datetime import numpy as np import shelve import isce @@ -575,7 +575,7 @@ class run(object): configObj.igram = configObj.outDir+'.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.filtStrength = filtStrength + #configObj.filtStrength = filtStrength configObj.filterCoherence('[Function-2]') configObj.igram = configObj.filtIgram diff --git a/contrib/stack/stripmapStack/stackStripMap.py b/contrib/stack/stripmapStack/stackStripMap.py index 77dafbd..788e888 100755 --- a/contrib/stack/stripmapStack/stackStripMap.py +++ b/contrib/stack/stripmapStack/stackStripMap.py @@ -56,6 +56,11 @@ def createParser(): help='sub-band band width') parser.add_argument('-u', '--unw_method', dest='unwMethod', type=str, default='snaphu' , 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' , help='filter sigma for gaussian filtering the dispersive and nonDispersive phase')