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

snapshot...

parent d0b02bc5
Branches
No related tags found
No related merge requests found
......@@ -1014,6 +1014,8 @@ def run_evaluate_static(h5f, ckpt_dir_s_path, prob_thresh=0.5, satellite='GOES16
ckpt_dir_s = os.listdir(ckpt_dir_s_path)
nav = get_navigation(satellite, domain)
prob_s = []
for ckpt in ckpt_dir_s:
ckpt_dir = ckpt_dir_s_path + ckpt
......@@ -1038,21 +1040,28 @@ def run_evaluate_static(h5f, ckpt_dir_s_path, prob_thresh=0.5, satellite='GOES16
preds = np.where(probs > prob_thresh, 1, 0)
else:
preds = np.argmax(probs, axis=1)
preds_2d = preds.reshape((len(ll), len(cc)))
x_rad = cc * nav.CFAC + nav.COFF
y_rad = ll * nav.LFAC + nav.LOFF
ll, cc = np.meshgrid(ll, cc, indexing='ij')
cc = cc.flatten()
ll = ll.flatten()
lon_s, lat_s = nav.lc_to_earth(cc, ll)
lons_2d = lon_s.reshape((len(ll), len(cc)))
lats_2d = lat_s.reshape((len(ll), len(cc)))
ice_mask = preds == 1
ice_cc = cc[ice_mask]
ice_ll = ll[ice_mask]
nav = get_navigation(satellite, domain)
ice_lons = []
ice_lats = []
for k in range(ice_cc.shape[0]):
lon, lat = nav.lc_to_earth(ice_cc[k], ice_ll[k])
ice_lons.append(lon)
ice_lats.append(lat)
# ice_lons = []
# ice_lats = []
# for k in range(ice_cc.shape[0]):
# lon, lat = nav.lc_to_earth(ice_cc[k], ice_ll[k])
# ice_lons.append(lon)
# ice_lats.append(lat)
ice_lons, ice_lats = nav.lc_to_earth(ice_cc, ice_ll)
return ice_lons, ice_lats
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment