From d630c7c58c4bfb90a58fa308fbda5f3994fc586c Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Tue, 8 Nov 2022 16:12:36 -0600 Subject: [PATCH] snapshot... --- modules/util/viirs_l1b_l2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/util/viirs_l1b_l2.py b/modules/util/viirs_l1b_l2.py index 86c5191a..40c380df 100644 --- a/modules/util/viirs_l1b_l2.py +++ b/modules/util/viirs_l1b_l2.py @@ -89,11 +89,11 @@ def process_cld_prob(param_s, tile): def process_cld_prob_(grd_k): keep = np.invert(np.isnan(grd_k)) - if np.sum(keep) / grd_k.size < 0.95: + num_keep = np.sum(keep) + if num_keep / grd_k.size < 0.95: return None - total = np.sum(keep) keep = np.where(keep, np.logical_and(0.05 < grd_k, grd_k < 0.95), False) - if np.sum(keep)/total < 0.20: + if np.sum(keep)/num_keep < 0.40: return None grd_k = np.where(np.invert(keep), 0, grd_k) # grd_k = np.where(grd_k < 0.5, 0.0, 1.0) -- GitLab