From 323a9b6c2a9687d4f74b20624a7da79d83fa2fdb Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Mon, 17 Oct 2022 11:58:22 -0500
Subject: [PATCH] snapshot...

---
 modules/deeplearning/srcnn_l1b_l2.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/deeplearning/srcnn_l1b_l2.py b/modules/deeplearning/srcnn_l1b_l2.py
index c57355bc..1d9fe809 100644
--- a/modules/deeplearning/srcnn_l1b_l2.py
+++ b/modules/deeplearning/srcnn_l1b_l2.py
@@ -732,8 +732,9 @@ def analyze(fpath='/Users/tomrink/clavrx_snpp_viirs.A2019080.0100.001.2019080064
     leny, lenx = grd_lr.shape
     rnd = np.random.normal(loc=0, scale=0.001, size=grd_lr.size)
     grd_lr += rnd.reshape(grd_lr.shape)
-    grd_lr = np.where(grd_lr < 0, 0, grd_lr)
-    grd_lr = np.where(grd_lr > 1, 1, grd_lr)
+    if param == 'cloud_fraction':
+        grd_lr = np.where(grd_lr < 0, 0, grd_lr)
+        grd_lr = np.where(grd_lr > 1, 1, grd_lr)
 
     x = np.arange(lenx)
     y = np.arange(leny)
-- 
GitLab