Skip to content
Snippets Groups Projects
Commit 2135ff25 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 92f520a8
No related branches found
No related tags found
No related merge requests found
......@@ -261,7 +261,7 @@ class SRCNN:
for param in data_params_half:
idx = params.index(param)
tmp = input_data[:, idx, :, :]
tmp = np.where(np.isnan(tmp), 0, tmp)
tmp = np.where(np.isnan(tmp), 0.0, tmp)
tmp = tmp[:, self.slc_y_m, self.slc_x_m]
tmp = self.upsample(tmp)
tmp = normalize(tmp, param, mean_std_dct)
......@@ -270,13 +270,13 @@ class SRCNN:
for param in sub_fields:
idx = params.index(param)
tmp = input_data[:, idx, :, :]
tmp = np.where(np.isnan(tmp), 0, tmp)
tmp = np.where(np.isnan(tmp), 0.0, tmp)
tmp = tmp[:, self.slc_y_m, self.slc_x_m]
tmp = self.upsample(tmp)
if param != 'refl_substddev_ch01':
tmp = normalize(tmp, 'refl_0_65um_nom', mean_std_dct)
else:
tmp = np.where(np.isnan(tmp), 0, tmp)
tmp = np.where(np.isnan(tmp), 0.0, tmp)
data_norm.append(tmp)
# for param in sub_fields:
......@@ -292,7 +292,7 @@ class SRCNN:
# ---------------------------------------------------
tmp = input_label[:, label_idx_i, ::2, ::2]
tmp = tmp.copy()
tmp = np.where(np.isnan(tmp), 0, tmp)
tmp = np.where(np.isnan(tmp), 0.0, tmp)
tmp = tmp[:, self.slc_y_2, self.slc_x_2]
tmp = self.upsample(tmp)
tmp = normalize(tmp, label_param, mean_std_dct)
......@@ -300,7 +300,6 @@ class SRCNN:
# ---------
data = np.stack(data_norm, axis=3)
data = data.astype(np.float32)
print(data.shape)
# -----------------------------------------------------
# -----------------------------------------------------
......@@ -310,7 +309,7 @@ class SRCNN:
label = scale(label, label_param, mean_std_dct)
label = label[:, self.y_128, self.x_128]
label = np.where(np.isnan(label), 0, label)
label = np.where(np.isnan(label), 0.0, label)
label = np.expand_dims(label, axis=3)
data = data.astype(np.float32)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment