From 21eb96ee9e53733f607a771ef96997dc36a4a6cf Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Wed, 12 Apr 2023 13:16:03 -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 5c85fb49..4d37bcc2 100644
--- a/modules/deeplearning/cloud_opd_srcnn_viirs.py
+++ b/modules/deeplearning/cloud_opd_srcnn_viirs.py
@@ -259,7 +259,7 @@ class SRCNN:
         self.test_label_files = None
 
         # self.n_chans = len(data_params_half) + len(data_params_full) + 1
-        self.n_chans = 3
+        self.n_chans = 5
 
         self.X_img = tf.keras.Input(shape=(None, None, self.n_chans))
 
@@ -302,20 +302,20 @@ class SRCNN:
             tmp = input_label[:, idx, :, :]
             tmp = np.where(np.isnan(tmp), 0, tmp)
 
-            # lo, hi, std, avg = get_min_max_std(tmp)
-            # lo = upsample_nearest(lo)
-            # hi = upsample_nearest(hi)
-            # avg = upsample_nearest(avg)
-            # lo = normalize(lo, param, mean_std_dct)
-            # hi = normalize(hi, param, mean_std_dct)
-            # avg = normalize(avg, param, mean_std_dct)
-            #
-            # data_norm.append(lo[:, slc_y, slc_x])
-            # data_norm.append(hi[:, slc_y, slc_x])
-            # data_norm.append(avg[:, slc_y, slc_x])
+            lo, hi, std, avg = get_min_max_std(tmp)
+            lo = upsample_nearest(lo)
+            hi = upsample_nearest(hi)
+            avg = upsample_nearest(avg)
+            lo = normalize(lo, param, mean_std_dct)
+            hi = normalize(hi, param, mean_std_dct)
+            avg = normalize(avg, param, mean_std_dct)
 
-            tmp = normalize(tmp, param, mean_std_dct)
-            data_norm.append(tmp[:, slc_y, slc_x])
+            data_norm.append(lo[:, slc_y, slc_x])
+            data_norm.append(hi[:, slc_y, slc_x])
+            data_norm.append(avg[:, slc_y, slc_x])
+
+            # tmp = normalize(tmp, param, mean_std_dct)
+            # data_norm.append(tmp[:, slc_y, slc_x])
         # ---------------------------------------------------
         tmp = input_label[:, label_idx_i, :, :]
         tmp = np.where(np.isnan(tmp), 0, tmp)
-- 
GitLab