def get_neigh(date, path, orbit, block, i, j, num_reg_used): dict_neigh = [] ps = xrange(num_reg_used) keys = [fN.get_key(date, path, orbit, block, p) for p in ps] for p in ps: idx = np.equal(j, p) if any(idx): dict_neigh.append((keys[p], i[idx])) else: dict_neigh.append((keys[p], None)) return dict_neigh
def get_data_param(date, path, orbit, block, x, y, num_reg_used, tau, theta, channel_is_used, min_equ_ref, mean_equ_ref, eof, max_usable_eof, ss, ms, optical_properties, r): ps = xrange(num_reg_used) keys = [fN.get_key(date, path, orbit, block, p) for p in ps] dict_data = [] dict_param = [] for p in ps: tau_p = tau[p] theta_p = theta[:, p] reg_p, smart_p = extract.pixel(x[p], y[p], channel_is_used, min_equ_ref, mean_equ_ref, eof, max_usable_eof, ss, ms, r) _, _, resid_p = update.get_resid(tau_p, theta_p, reg_p, smart_p, optical_properties, r) dict_data.append((keys[p], PixelData(reg_p, smart_p))) dict_param.append((keys[p], update.PixelParam(tau_p, theta_p, resid_p))) return dict_data, dict_param