From ace60119f46255e5bb133eabfb3b01234ca0a431 Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Tue, 13 Dec 2022 10:44:16 -0600
Subject: [PATCH] snapshot..

---
 modules/deeplearning/srcnn_l1b_l2.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/modules/deeplearning/srcnn_l1b_l2.py b/modules/deeplearning/srcnn_l1b_l2.py
index 3fd0a7e5..1752ead3 100644
--- a/modules/deeplearning/srcnn_l1b_l2.py
+++ b/modules/deeplearning/srcnn_l1b_l2.py
@@ -69,12 +69,14 @@ if KERNEL_SIZE == 3:
     slc_y = slice(2, 132)
     slc_x_2 = slice(1, 134, 2)
     slc_y_2 = slice(1, 134, 2)
-    x_128 = slice(3, 131)
-    y_128 = slice(3, 131)
-    t = np.arange(1, 66, 0.5)
-    s = np.arange(1, 66, 0.5)
     x_2 = np.arange(67)
     y_2 = np.arange(67)
+    t = np.arange(0, 67, 0.5)
+    s = np.arange(0, 67, 0.5)
+    x_k = slice(1, 131)
+    y_k = slice(1, 131)
+    x_128 = slice(3, 131)
+    y_128 = slice(3, 131)
 elif KERNEL_SIZE == 5:
     slc_x = slice(3, 135)
     slc_y = slice(3, 135)
@@ -274,6 +276,7 @@ class SRCNN:
                 tmp = np.where(tmp > 1.0, 1.0, tmp)
             tmp = np.where(np.isnan(tmp), 0, tmp)
         tmp = resample_2d_linear(x_2, y_2, tmp, t, s)
+        tmp = tmp[y_k, x_k]
         data_norm.append(tmp)
         # ---------
         data = np.stack(data_norm, axis=3)
-- 
GitLab