diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index 3fa36b2041fa4cd54dcc649b756b3224dbe6358d..680e20ff71646fe73b1373b077a408ef66f16ae4 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -168,18 +168,33 @@ def analyze(ice_dct, no_ice_dct): print(np.sum(np.logical_and(hist_a > 0, hist_b > 0))) last_file = None - cnt = 0 + ice_files = [] + ice_times = [] + for ts in list(ice_dct.keys()): + try: + ds = get_goes_datasource(ts) + goes_file, t_0, _ = ds.get_file(ts) + if goes_file != last_file: + ice_files.append(goes_file) + ice_times.append(t_0) + last_file = goes_file + except Exception: + continue + + last_file = None + no_ice_files = [] + no_ice_times = [] for ts in list(no_ice_dct.keys()): try: ds = get_goes_datasource(ts) - goes_file = ds.get_file(ts)[0] + goes_file, t_0, _ = ds.get_file(ts) if goes_file != last_file: - print(goes_file) + no_ice_files.append(goes_file) + no_ice_times.append(t_0) last_file = goes_file - cnt += 1 except Exception: continue - print(cnt) + def create_file(filename, ds_list, ds_types): pass \ No newline at end of file