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

use meshgrid

parent 1ad24bad
No related branches found
No related tags found
No related merge requests found
......@@ -988,12 +988,13 @@ def run_evaluate_static(h5f, ckpt_dir_s_path, prob_thresh=0.5, satellite='GOES16
if not os.path.isdir(ckpt_dir):
continue
nn = IcingIntensityNN()
nn.setup_eval_pipeline(data_dct, len(ll))
nn.setup_eval_pipeline(data_dct, len(ll) * len(cc))
nn.build_model()
nn.build_training()
nn.build_evaluation()
nn.do_evaluate(ckpt_dir)
prob_s.append(nn.test_probs)
num = len(prob_s)
prob_avg = prob_s[0]
for k in range(num-1):
......@@ -1006,12 +1007,12 @@ def run_evaluate_static(h5f, ckpt_dir_s_path, prob_thresh=0.5, satellite='GOES16
else:
preds = np.argmax(probs, axis=1)
ll_grd, cc_grd = np.meshgrid(ll, cc, indexing='ij')
cc_grd = cc_grd.flatten()
ll_grd = ll_grd.flatten()
ll, cc = np.meshgrid(ll, cc, indexing='ij')
cc = cc.flatten()
ll = ll.flatten()
ice_mask = preds == 1
ice_cc = cc_grd[ice_mask]
ice_ll = ll_grd[ice_mask]
ice_cc = cc[ice_mask]
ice_ll = ll[ice_mask]
nav = get_navigation(satellite, domain)
ice_lons = []
......
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