Skip to content
Snippets Groups Projects
Commit 9bf1ddcd authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 46246e2c
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,7 @@ NOISE_TRAINING = False ...@@ -36,6 +36,7 @@ NOISE_TRAINING = False
NOISE_STDDEV = 0.01 NOISE_STDDEV = 0.01
DO_AUGMENT = True DO_AUGMENT = True
DO_SMOOTH = False
DO_ZERO_OUT = False DO_ZERO_OUT = False
DO_ESPCN = False # Note: If True, cannot do mixed resolution input fields (Adjust accordingly below) DO_ESPCN = False # Note: If True, cannot do mixed resolution input fields (Adjust accordingly below)
...@@ -267,7 +268,6 @@ class SRCNN: ...@@ -267,7 +268,6 @@ class SRCNN:
tmp = input_data[:, idx, :, :] tmp = input_data[:, idx, :, :]
tmp = tmp.copy() tmp = tmp.copy()
tmp = np.where(np.isnan(tmp), 0, tmp) tmp = np.where(np.isnan(tmp), 0, tmp)
# tmp = smooth_2d(tmp, sigma=1.0)
if DO_ESPCN: if DO_ESPCN:
tmp = tmp[:, slc_y_2, slc_x_2] tmp = tmp[:, slc_y_2, slc_x_2]
else: # Half res upsampled to full res: else: # Half res upsampled to full res:
...@@ -282,7 +282,6 @@ class SRCNN: ...@@ -282,7 +282,6 @@ class SRCNN:
tmp = input_data[:, idx, :, :] tmp = input_data[:, idx, :, :]
tmp = tmp.copy() tmp = tmp.copy()
tmp = np.where(np.isnan(tmp), 0, tmp) tmp = np.where(np.isnan(tmp), 0, tmp)
# tmp = smooth_2d(tmp, sigma=1.0)
# Full res: # Full res:
tmp = tmp[:, slc_y, slc_x] tmp = tmp[:, slc_y, slc_x]
tmp = normalize(tmp, param, mean_std_dct) tmp = normalize(tmp, param, mean_std_dct)
...@@ -293,7 +292,8 @@ class SRCNN: ...@@ -293,7 +292,8 @@ class SRCNN:
tmp = input_data[:, label_idx, :, :] tmp = input_data[:, label_idx, :, :]
tmp = tmp.copy() tmp = tmp.copy()
tmp = np.where(np.isnan(tmp), 0, tmp) tmp = np.where(np.isnan(tmp), 0, tmp)
# tmp = smooth_2d(tmp, sigma=1.0) if DO_SMOOTH:
tmp = smooth_2d(tmp, sigma=0.5)
if DO_ESPCN: if DO_ESPCN:
tmp = tmp[:, slc_y_2, slc_x_2] tmp = tmp[:, slc_y_2, slc_x_2]
else: # Half res upsampled to full res: else: # Half res upsampled to full res:
...@@ -315,8 +315,9 @@ class SRCNN: ...@@ -315,8 +315,9 @@ class SRCNN:
# ----------------------------------------------------- # -----------------------------------------------------
label = input_data[:, label_idx, :, :] label = input_data[:, label_idx, :, :]
label = label.copy() label = label.copy()
# label = np.where(np.isnan(label), 0, label) if DO_SMOOTH:
# label = smooth_2d(label, sigma=1.0) label = np.where(np.isnan(label), 0, label)
label = smooth_2d(label, sigma=0.5)
label = label[:, y_128, x_128] label = label[:, y_128, x_128]
if label_param != 'cloud_probability': if label_param != 'cloud_probability':
......
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