From c90e95279e927f955366c0682bcf0bbd63063df8 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Tue, 15 Nov 2022 13:10:13 -0600 Subject: [PATCH] snapshot... --- modules/icing/util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/icing/util.py b/modules/icing/util.py index 6d007160..1a26241f 100644 --- a/modules/icing/util.py +++ b/modules/icing/util.py @@ -12,6 +12,7 @@ from util.setup import model_path_day, model_path_night from aeolus.datasource import CLAVRx, CLAVRx_VIIRS, GOESL1B, CLAVRx_H08 import h5py import datetime +from scipy.signal import medfilt2d def get_training_parameters(day_night='DAY', l1b_andor_l2='both', use_dnb=False): @@ -535,6 +536,7 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output prob_s.append(probs) prob_s = np.stack(prob_s, axis=-1) max_prob = np.max(prob_s, axis=2) + max_prob = medfilt2d(max_prob) max_prob = np.where(max_prob < prob_thresh, np.nan, max_prob) make_icing_image(h5f, max_prob, None, None, clvrx_str_time, satellite, domain, -- GitLab