Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/mintpy/modify_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ def get_date12_to_drop(inps):
date_to_drop = sorted(list(set(dateList) - set(date_to_keep)))
if len(date_to_drop) > 0:
print(f'number of acquisitions to remove: {len(date_to_drop)}\n{date_to_drop}')
print(f'number of acquisitions to keep : {len(date_to_keep)}\n{date_to_keep}')

# checking:
# 1) no new date12 to drop against existing file
Expand Down
20 changes: 17 additions & 3 deletions src/mintpy/smallbaselineApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,16 @@ def run_network_modification(self, step_name):

def generate_ifgram_aux_file(self):
"""Generate auxiliary files from ifgramStack file"""
stack_file = ut.check_loaded_dataset(self.workDir, print_msg=False)[0]
stack_file, geom_file = ut.check_loaded_dataset(self.workDir, print_msg=False)[:2]
dsNames = readfile.get_dataset_list(stack_file)
mask_file = os.path.join(self.workDir, 'maskConnComp.h5')
mask_cc_file = os.path.join(self.workDir, 'maskConnComp.h5')
mask_obs_file = os.path.join(self.workDir, 'maskObs.h5')
coh_file = os.path.join(self.workDir, 'avgSpatialCoh.h5')
snr_file = os.path.join(self.workDir, 'avgSpatialSNR.h5')

# 1) generate mask file from the common connected components
if any('phase' in i.lower() for i in dsNames):
iargs = [stack_file, '--nonzero', '-o', mask_file, '--update']
iargs = [stack_file, '--nonzero', '-o', mask_cc_file, '--update']
print('\ngenerate_mask.py', ' '.join(iargs))
import mintpy.cli.generate_mask
mintpy.cli.generate_mask.main(iargs)
Expand All @@ -284,6 +285,14 @@ def generate_ifgram_aux_file(self):
import mintpy.cli.temporal_average
mintpy.cli.temporal_average.main(iargs)

# 3) generate mask of observations from incidence angle
# to better plot files such as geometry
if geom_file is not None:
iargs = [geom_file, 'incidenceAngle', '--nonzero', '-o', mask_obs_file, '--update']
print('\ngenerate_mask.py', ' '.join(iargs))
import mintpy.cli.generate_mask
mintpy.cli.generate_mask.main(iargs)


def run_reference_point(self, step_name):
"""Select reference point.
Expand Down Expand Up @@ -1031,6 +1040,11 @@ def plot_result(self, print_aux=True):
['numInvIfgram.h5', '--mask', 'no'],
]

# mask geometry without observations
mask_obs_file = os.path.join(self.workDir, 'maskObs.h5')
if os.path.isfile(mask_obs_file):
iargs_list0[4] += ['-m', mask_obs_file]

if ion_file:
iargs_list0 += [
[ion_file, 'unwrapPhase-', '--zero-mask', '--wrap', '-c', 'cmy'],
Expand Down