diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index 26fd934172cc4ee0a6e6bb7ae4ce4f10312cda2d..c104126497e6862edce0539f1a3c43f1fa1fcd21 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -861,49 +861,6 @@ def process(ice_dct, no_ice_dct, neg_ice_dct): return new_ice_dct, new_no_ice_dct, new_neg_ice_dct -def process_boeing(ice_dct, no_ice_dct): - new_no_ice_dct = {} - - print('num keys ice, no_ice: ', len(ice_dct), len(no_ice_dct)) - - no_ice_keys = [] - no_ice_tidx = [] - for ts in list(no_ice_dct.keys()): - rpts = no_ice_dct[ts] - for idx, tup in enumerate(rpts): - no_ice_keys.append(ts) - no_ice_tidx.append(idx) - - # ----------------------------------------------------- - no_ice_keys = np.array(no_ice_keys) - no_ice_tidx = np.array(no_ice_tidx) - print('no ice total: ', no_ice_keys.shape[0]) - np.random.seed(42) - ridxs = np.random.permutation(np.arange(no_ice_keys.shape[0])) - no_ice_keys = no_ice_keys[ridxs] - no_ice_tidx = no_ice_tidx[ridxs] - no_ice_keys = no_ice_keys[::10] - no_ice_tidx = no_ice_tidx[::10] - print('no ice reduced: ', no_ice_keys.shape[0]) - - sidxs = np.argsort(no_ice_keys) - no_ice_keys = no_ice_keys[sidxs] - no_ice_tidx = no_ice_tidx[sidxs] - - for idx, key in enumerate(no_ice_keys): - rpts = no_ice_dct[key] - tup = rpts[no_ice_tidx[idx]] - - n_rpts = new_no_ice_dct.get(key) - if n_rpts is None: - n_rpts = [] - new_no_ice_dct[key] = n_rpts - n_rpts.append(tup) - # ------------------------------------------------- - - return ice_dct, new_no_ice_dct - - def analyze2(filename, filename_l1b): f = h5py.File(filename, 'r') iint = f['icing_intensity'][:]