From e852fdd940dcfea7ce62c3af97bea00da5e996c8 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Wed, 12 Apr 2023 12:39:55 -0500 Subject: [PATCH] snapshot... --- modules/deeplearning/cloud_opd_srcnn_viirs.py | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/deeplearning/cloud_opd_srcnn_viirs.py b/modules/deeplearning/cloud_opd_srcnn_viirs.py index 1eebf7d6..5c85fb49 100644 --- a/modules/deeplearning/cloud_opd_srcnn_viirs.py +++ b/modules/deeplearning/cloud_opd_srcnn_viirs.py @@ -67,21 +67,21 @@ print('label_param: ', label_param) KERNEL_SIZE = 3 # target size: (128, 128) N_X = N_Y = 1 -LEX_X = LEN_Y = 128 +LEN_X = LEN_Y = 128 if KERNEL_SIZE == 3: - slc_x = slice(3, N_X*128 + 5) - slc_y = slice(3, N_Y*128 + 5) - slc_x_2 = slice(1, int((N_X*128)/2) + 4) - slc_y_2 = slice(1, int((N_Y*128)/2) + 4) - x_2 = np.arange(int((N_X*128)/2) + 3) - y_2 = np.arange(int((N_Y*128)/2) + 3) - t = np.arange(0, int((N_X*128)/2) + 3, 0.5) - s = np.arange(0, int((N_Y*128)/2) + 3, 0.5) - x_k = slice(1, N_X*128 + 3) - y_k = slice(1, N_Y*128 + 3) - x_128 = slice(4, N_X*128 + 4) - y_128 = slice(4, N_Y*128 + 4) + slc_x = slice(2, N_X*LEN_X + 4) + slc_y = slice(2, N_Y*LEN_Y + 4) + slc_x_2 = slice(1, N_X*LEN_X + 6, 2) + slc_y_2 = slice(1, N_Y*LEN_Y + 6, 2) + x_2 = np.arange(int((N_X*LEN_X)/2) + 3) + y_2 = np.arange(int((N_Y*LEN_Y)/2) + 3) + t = np.arange(0, int((N_X*LEN_X)/2) + 3, 0.5) + s = np.arange(0, int((N_Y*LEN_Y)/2) + 3, 0.5) + x_k = slice(1, N_X*LEN_X + 3) + y_k = slice(1, N_Y*LEN_Y + 3) + x_128 = slice(3, N_X*LEN_X + 3) + y_128 = slice(3, N_Y*LEN_Y + 3) elif KERNEL_SIZE == 5: slc_x = slice(3, 135) slc_y = slice(3, 135) @@ -317,7 +317,7 @@ class SRCNN: tmp = normalize(tmp, param, mean_std_dct) data_norm.append(tmp[:, slc_y, slc_x]) # --------------------------------------------------- - tmp = input_data[:, label_idx, :, :] + tmp = input_label[:, label_idx_i, :, :] tmp = np.where(np.isnan(tmp), 0, tmp) tmp = upsample(tmp) data_norm.append(tmp) -- GitLab