diff --git a/src/mintpy/modify_network.py b/src/mintpy/modify_network.py index 7e603c2b9..e9da5aebe 100644 --- a/src/mintpy/modify_network.py +++ b/src/mintpy/modify_network.py @@ -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 diff --git a/src/mintpy/smallbaselineApp.py b/src/mintpy/smallbaselineApp.py index 9e607093a..049195c54 100644 --- a/src/mintpy/smallbaselineApp.py +++ b/src/mintpy/smallbaselineApp.py @@ -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) @@ -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. @@ -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'],