diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index d535628048211990b510a949e2bf964b189da017..f8bd1e088fb14d49f53ba43ed6721508205e35af 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))