Skip to content
Snippets Groups Projects
Commit 811850f0 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 78733d7d
Branches
No related tags found
No related merge requests found
......@@ -67,11 +67,19 @@ x_64 = np.arange(64)
y_64 = np.arange(64)
x_134_2 = x_134[3:131:2]
y_134_2 = y_134[3:131:2]
# x_134_2 = x_134[2:133:2]
# y_134_2 = y_134[2:133:2]
t = np.arange(0, 64, 0.5)
s = np.arange(0, 64, 0.5)
x_128_2 = x_134[3:131:2]
y_128_2 = y_134[3:131:2]
x_128 = x_134[3:131]
y_128 = y_134[3:131]
#----------- New
# x_134_2 = x_134[1:134:2]
# t = np.arange(1, 66, 0.5)
#--------------------------
def build_residual_conv2d_block(conv, num_filters, block_name, activation=tf.nn.relu, padding='SAME',
kernel_initializer='he_uniform', scale=None,
......@@ -225,20 +233,19 @@ class SRCNN:
data_norm = []
for param in data_params:
idx = params.index(param)
tmp = input_data[:, idx, 3:131:2, 3:131:2]
tmp = input_data[:, idx, y_128_2, x_128_2]
tmp = normalize(tmp, param, mean_std_dct, add_noise=add_noise, noise_scale=noise_scale)
tmp = resample_2d_linear(x_64, y_64, tmp, t, s)
data_norm.append(tmp)
# --------
# --------------------------
param = 'refl_0_65um_nom'
idx = params.index(param)
tmp = input_data[:, idx, 3:131:2, 3:131:2]
# tmp = input_data[:, idx, 3:131, 3:131]
tmp = input_data[:, idx, y_128_2, x_128_2]
tmp = normalize(tmp, param, mean_std_dct, add_noise=add_noise, noise_scale=noise_scale)
tmp = resample_2d_linear(x_64, y_64, tmp, t, s)
data_norm.append(tmp)
# --------
tmp = input_data[:, label_idx, 3:131:2, 3:131:2]
tmp = input_data[:, label_idx, y_128_2, x_128_2]
if label_param != 'cloud_fraction':
tmp = normalize(tmp, label_param, mean_std_dct, add_noise=add_noise, noise_scale=noise_scale)
else:
......@@ -249,8 +256,8 @@ class SRCNN:
data = np.stack(data_norm, axis=3)
data = data.astype(np.float32)
# -----------------------------------------------------
# label = input_data[:, label_idx, 3:131:2, 3:131:2]
label = input_data[:, label_idx, 3:131, 3:131]
# -----------------------------------------------------
label = input_data[:, label_idx, y_128, x_128]
if label_param != 'cloud_fraction':
label = normalize(label, label_param, mean_std_dct)
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment