Skip to content
Snippets Groups Projects
Commit dbe1cf8a authored by tomrink's avatar tomrink
Browse files

snapshot...

parent dd9ee35b
No related branches found
No related tags found
No related merge requests found
......@@ -407,7 +407,7 @@ def process_2(ice_dct, no_ice_dct, neg_ice_dct):
ice_keys = np.concatenate([ice_keys_5_6, ice_keys_1, ice_keys_2, ice_keys_3, ice_keys_4])
uniq_sorted_keys = np.unique(ice_keys)
print(ice_keys.shape, uniq_sorted_keys.shape)
print('ice: ', ice_keys.shape, uniq_sorted_keys.shape)
uniq_sorted_keys = uniq_sorted_keys.tolist()
for key in uniq_sorted_keys:
......@@ -418,7 +418,7 @@ def process_2(ice_dct, no_ice_dct, neg_ice_dct):
np.random.shuffle(no_ice_keys)
no_ice_keys = no_ice_keys[0:50000]
uniq_sorted_no_ice = np.unique(no_ice_keys)
print(no_ice_keys.shape, uniq_sorted_no_ice.shape)
print('no ice: ', no_ice_keys.shape, uniq_sorted_no_ice.shape)
uniq_sorted_no_ice = uniq_sorted_no_ice.tolist()
for key in uniq_sorted_no_ice:
......@@ -429,7 +429,7 @@ def process_2(ice_dct, no_ice_dct, neg_ice_dct):
np.random.shuffle(neg_ice_keys)
neg_ice_keys = neg_ice_keys[0:5000]
uniq_sorted_neg_ice = np.unique(neg_ice_keys)
print(neg_ice_keys.shape, uniq_sorted_neg_ice.shape)
print('neg ice: ', neg_ice_keys.shape, uniq_sorted_neg_ice.shape)
for key in uniq_sorted_neg_ice:
new_neg_ice_dct[key] = neg_ice_dct[key]
......@@ -460,13 +460,10 @@ def process_1(ice_dct, no_ice_dct, neg_ice_dct):
ice_keys_2 = []
print('num keys ice, no_ice, neg_ice: ', len(ice_dct), len(no_ice_dct), len(neg_ice_dct))
nfound = 0
for ts in list(ice_dct.keys()):
try:
ds = get_goes_datasource(ts)
goes_file, t_0, _ = ds.get_file(ts)
if goes_file is not None:
nfound += 1
if goes_file is not None and goes_file != last_file:
rpts = ice_dct[ts]
for tup in rpts:
......@@ -493,19 +490,15 @@ def process_1(ice_dct, no_ice_dct, neg_ice_dct):
last_file = goes_file
except Exception:
continue
print('num ice files: ', nfound)
last_file = None
no_ice_files = []
no_ice_times = []
no_ice_keys = []
nfound = 0
for ts in list(no_ice_dct.keys()):
try:
ds = get_goes_datasource(ts)
goes_file, t_0, _ = ds.get_file(ts)
if goes_file is not None:
nfound += 1
if goes_file is not None and goes_file != last_file:
rpts = no_ice_dct[ts]
for tup in rpts:
......@@ -516,19 +509,14 @@ def process_1(ice_dct, no_ice_dct, neg_ice_dct):
except Exception:
continue
print('num no ice files found: ', nfound)
last_file = None
neg_ice_files = []
neg_ice_times = []
neg_ice_keys = []
nfound = 0
for ts in list(neg_ice_dct.keys()):
try:
ds = get_goes_datasource(ts)
goes_file, t_0, _ = ds.get_file(ts)
if goes_file is not None:
nfound += 1
if goes_file is not None and goes_file != last_file:
rpts = neg_ice_dct[ts]
for tup in rpts:
......@@ -539,8 +527,6 @@ def process_1(ice_dct, no_ice_dct, neg_ice_dct):
except Exception:
continue
print('num neg ice files found: ', nfound)
ice_times_5_6 = np.array(ice_times_5_6)
ice_keys_5_6 = np.array(ice_keys_5_6)
print('5_6: ', ice_times_5_6.shape)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment