def __merge_setup(params): """ Convenience function for Merge set up steps """ # load previously saved preread_ifgs dict preread_ifgs_file = Configuration.preread_ifgs(params) ifgs_dict = pickle.load(open(preread_ifgs_file, 'rb')) ifgs = [v for v in ifgs_dict.values() if isinstance(v, shared.PrereadIfg)] shape = ifgs[0].shape tiles = Configuration.get_tiles(params) return shape, tiles, ifgs_dict
def stack_calc_wrapper(params): """ Wrapper for stacking on a set of tiles. """ log.info('Calculating rate map via stacking') if not Configuration.vcmt_path(params).exists(): raise FileNotFoundError( "VCMT is not found on disc. Have you run the 'correct' step?") params[C.PREREAD_IFGS] = cp.load( open(Configuration.preread_ifgs(params), 'rb')) params[C.VCMT] = np.load(Configuration.vcmt_path(params)) params[C.TILES] = Configuration.get_tiles(params) tiles_split(_stacking_for_tile, params) log.debug("Finished stacking calc!")
def timeseries_calc_wrapper(params): """ Wrapper for time series calculation on a set of tiles. """ if params[C.TIME_SERIES_METHOD] == 1: log.info('Calculating time series using Laplacian Smoothing method') elif params[C.TIME_SERIES_METHOD] == 2: log.info('Calculating time series using SVD method') if not Configuration.vcmt_path(params).exists(): raise FileNotFoundError("VCMT is not found on disc. Have you run the 'correct' step?") params[C.PREREAD_IFGS] = cp.load(open(Configuration.preread_ifgs(params), 'rb')) params[C.VCMT] = np.load(Configuration.vcmt_path(params)) params[C.TILES] = Configuration.get_tiles(params) tiles_split(__calc_time_series_for_tile, params) log.debug("Finished timeseries calc!")