Example #1
0
    def run_unwrap_error_correction(self, step_name):
        """Correct phase-unwrapping errors"""
        method = self.template['mintpy.unwrapError.method']
        if not method:
            print('phase-unwrapping error correction is OFF.')
            return

        # check required input files
        stack_file = ut.check_loaded_dataset(self.workDir, print_msg=False)[1]
        mask_file = 'maskConnComp.h5'

        scp_args_bridge = '{} -t {} --update'.format(stack_file,
                                                     self.templateFile)
        scp_args_closure = '{} {} -t {} --update'.format(
            stack_file, mask_file, self.templateFile)

        from mintpy import unwrap_error_bridging, unwrap_error_phase_closure
        if method == 'bridging':
            unwrap_error_bridging.main(scp_args_bridge.split())
        elif method == 'phase_closure':
            unwrap_error_phase_closure.main(scp_args_closure.split())
        elif method == 'bridging+phase_closure':
            scp_args_bridge += ' -i unwrapPhase -o unwrapPhase_bridging'
            unwrap_error_bridging.main(scp_args_bridge.split())
            scp_args_closure += ' -i unwrapPhase_bridging -o unwrapPhase_bridging_phaseClosure'
            unwrap_error_phase_closure.main(scp_args_closure.split())
        else:
            raise ValueError('un-recognized method: {}'.format(method))
        return
Example #2
0
    def run_unwrap_error_correction(self, step_name):
        """Correct phase-unwrapping errors"""
        method = self.template['mintpy.unwrapError.method']
        if not method:
            print('phase-unwrapping error correction is OFF.')
            return

        # check required input files
        stack_file = ut.check_loaded_dataset(self.workDir, print_msg=False)[1]
        mask_file = 'maskConnComp.h5'

        scp_args_bridge = '{} -t {} --update'.format(stack_file, self.templateFile)
        scp_args_closure = '{} {} -t {} --update'.format(stack_file, mask_file, self.templateFile)

        from mintpy import unwrap_error_bridging, unwrap_error_phase_closure
        if method == 'bridging':
            unwrap_error_bridging.main(scp_args_bridge.split())
        elif method == 'phase_closure':
            unwrap_error_phase_closure.main(scp_args_closure.split())
        elif method == 'bridging+phase_closure':
            scp_args_bridge += ' -i unwrapPhase -o unwrapPhase_bridging'
            unwrap_error_bridging.main(scp_args_bridge.split())
            scp_args_closure += ' -i unwrapPhase_bridging -o unwrapPhase_bridging_phaseClosure'
            unwrap_error_phase_closure.main(scp_args_closure.split())
        else:
            raise ValueError('un-recognized method: {}'.format(method))
        return