From caa0fe10217cc42b63287b21522d313eabb3887d Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Thu, 15 Apr 2021 12:39:43 -0500 Subject: [PATCH] keep only < 273 for both icing and no-icing regions --- modules/icing/pirep_goes.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index d5356280..f8bd1e08 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -1241,3 +1241,14 @@ def split_data(num_obs, perc=0.2, skip=1): np.random.shuffle(train_idxs) return train_idxs[::skip], test_idxs[::skip] + + +def test(filename): + h5f = h5py.File(filename, 'r') + time = h5f['time'] + intsty = h5f['icing_intensity'] + + trn_idxs, tst_idxs = split_data(time.shape[0]) + + print(np.histogram(intsty[trn_idxs], bins=7)) + print(np.histogram(intsty[tst_idxs], bins=7)) -- GitLab