From 350b99ac547e964945efca1073ccba538624bc05 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Sun, 18 Dec 2022 16:45:09 -0600 Subject: [PATCH] snapshot... --- modules/icing/pirep_goes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index a5815705..4331bd96 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -2570,7 +2570,7 @@ def tiles_info(filename): def analyze(preds_file, labels, prob_avg, test_file): if preds_file is not None: - labels, prob_avg, cm_avg = pickle.load(open(preds_file, 'rb')) + labels, prob_avg, cm_avg = np.load(preds_file, allow_pickle=True) h5f = h5py.File(test_file, 'r') nda = h5f['flight_altitude'][:] @@ -2586,8 +2586,8 @@ def analyze(preds_file, labels, prob_avg, test_file): iint = np.where(iint == -1, 0, iint) iint = np.where(iint != 0, 1, iint) - nda[np.logical_and(nda >= 0, nda < 2500)] = 0 - nda[np.logical_and(nda >= 2500, nda < 4000)] = 1 + nda[np.logical_and(nda >= 0, nda < 4000)] = 0 + nda[np.logical_and(nda >= 4000, nda < 15000)] = 1 # nda[np.logical_and(nda >= 8000, nda < 15000)] = 2 #print(np.sum(nda == 0), np.sum(nda == 1), np.sum(nda == 2)) -- GitLab