def apply_preprocessing_bcb(X, real_dim): X[0] = X[0][..., 0:12] # CO X[1] = X[1][..., 4:16] # Xe X = pp.interpolate_and_crop(X, real_dim) X_ = [] for z in range(X[0].shape[-1] - 10 + 1): X_.append([x[..., z:z + 10] for x in X]) X = [np.concatenate([x[i] for x in X_], axis=0) for i in range(len(X))] pp.add_norm(X) return X
def apply_preprocessing_exp(X, real_dim): # Pick slices X[0] = X[0][..., 0:10] # CO X[1] = X[1][..., 4:14] # Xe X = pp.interpolate_and_crop(X, real_dim) pp.add_norm(X) return X
def apply_preprocessing_exp(X, real_dim): # Pick slices X[0] = X[0][..., :10] # CO X[1] = X[1][..., :10] # Xe X = pp.interpolate_and_crop(X, real_dim) pp.add_norm(X) X = [x[:, :80, 8:80] for x in X] return X
def apply_preprocessing_exp(X, real_dim): # Pick slices X[0] = X[0][..., 0:10] # CO X[1] = X[1][..., 4:14] # Xe X = pp.interpolate_and_crop(X, real_dim) pp.add_norm(X) # Flip, rotate and shift Xe data X[1] = X[1][:, ::-1] X[1] = rotate(X[1], angle=-12, axes=(2, 1), reshape=False, mode='reflect') X[1] = shift(X[1], shift=(0, -5, 1, 0), mode='reflect') X = [x[:, 2:90] for x in X] return X
def apply_preprocessing_bcb(X, real_dim): X[0] = X[0][..., :10] # Pick slices X = pp.interpolate_and_crop(X, real_dim) pp.add_norm(X) return X