From c21c8a67f03a3747f869d50129957b6e195fe134 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Tue, 9 Mar 2021 15:18:20 -0600 Subject: [PATCH] snapshot... --- modules/icing/pirep_goes.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index f5e3c21b..6cdd8599 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -148,5 +148,31 @@ def run(pirep_dct, outfile=None): print('num images: ', cnt, len(time_keys), miss_a, miss_b) +def analyze(ice_dct, no_ice_dct): + ice_times = np.array(list(ice_dct.keys())) + no_ice_times = np.array(list(no_ice_dct.keys())) + + dt_str = '201601010000' + dto = datetime.datetime.strptime(dt_str, '%Y%m%d%H%M').replace(tzinfo=timezone.utc) + t0 = dto.timestamp() + + dt_str = '201906300000' + dto = datetime.datetime.strptime(dt_str, '%Y%m%d%H%M').replace(tzinfo=timezone.utc) + t1 = dto.timestamp() + + tline = np.arange(t0, t1, 600) + hist_a, edges = np.histogram(no_ice_times, bins=tline) + print(len(np.nonzero(hist_a)[0])) + + hist_b, edges = np.histogram(ice_times, bins=tline) + print(len(np.nonzero(hist_b)[0])) + + print(np.sum(np.logical_and(hist_a > 0, hist_b > 0))) + + for ts in list(no_ice_dct.keys()): + ds = get_goes_datasource(ts) + goes_file = ds.get_file(ts)[0] + print(goes_file) + def create_file(filename, ds_list, ds_types): pass \ No newline at end of file -- GitLab