From 00279eaadbdcec0f6a2f14f47f4234177ee8f200 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Sat, 11 Dec 2021 13:35:55 -0600 Subject: [PATCH] remove some dead unused code --- modules/icing/pirep_goes.py | 39 +------------------------------------ 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index 42cf08af..976198a2 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -1102,41 +1102,8 @@ def fov_extract(trnfile='/home/rink/fovs_l1b_train.h5', tstfile='/home/rink/fovs h5f.close() -# --------- Throw away code -------------------------------------------------------------------- -jdays= [['070', '071', '072', '073', '074', '075'], ['078', '079', '080', '081', '082', '084', '085', '086', '087', '088'], - ['106', '107', '108', '109', '110', '111', '112', '113', '114'], ['116', '117', '118', '119'], - ['128', '129', '130', '131', '132', '133', '134', '135'], ['138', '139', '140'], ['149', '150', '151'], - ['163', '164', '165'], ['202', '203', '204', '205', '206'], ['231', '232', '233'], ['251', '252', '253', '254']] - - -def make_ts_bins(): - nbins = len(jdays) - edges = [] - for k in range(nbins): - num = len(jdays[k]) - jd_a = jdays[k][0] - ts_a = get_timestamp('2019-'+jd_a+'_00:00', format_code='%Y-%j_%H:%M') - jd_b = jdays[k][num-1] - ts_b = get_timestamp('2019-'+jd_b+'_23:59', format_code='%Y-%j_%H:%M') - edges.append(ts_a) - edges.append(ts_b) - - return edges - - -keep_out_edges = make_ts_bins() -keep_out_edges = np.array(keep_out_edges) - - -def check_times(ts): - bidx = (find_bin_index(keep_out_edges, np.array([ts])))[0] - if bidx != -1 and bidx % 2 == 0: - return True - return False - - def tile_extract(trnfile='/home/rink/tiles_l1b_train.h5', tstfile='/home/rink/tiles_l1b_test.h5', L1B_or_L2='L1B', - cld_mask_name='cloud_mask', augment=False, do_split=True, check_keep_out=False): + cld_mask_name='cloud_mask', augment=False, do_split=True): icing_int_s = [] ice_time_s = [] no_ice_time_s = [] @@ -1174,8 +1141,6 @@ def tile_extract(trnfile='/home/rink/tiles_l1b_train.h5', tstfile='/home/rink/ti flt_altitude = f['icing_altitude'][:] for i in range(num_obs): - if check_keep_out and check_times(times[i]): - continue cld_msk = f[cld_mask_name][i, 12:28, 12:28] for ds_name in params: dat = f[ds_name][i, 12:28, 12:28] @@ -1216,8 +1181,6 @@ def tile_extract(trnfile='/home/rink/tiles_l1b_train.h5', tstfile='/home/rink/ti flt_altitude = f['icing_altitude'][:] for i in range(num_obs): - if check_keep_out and not check_times(times[i]): - continue cld_msk = f[cld_mask_name][i, 12:28, 12:28] for ds_name in params: dat = f[ds_name][i, 12:28, 12:28] -- GitLab