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

snapshot...

parent b1a89af6
No related branches found
No related tags found
No related merge requests found
...@@ -2571,14 +2571,16 @@ def tiles_info(filename): ...@@ -2571,14 +2571,16 @@ def tiles_info(filename):
def analyze(preds_file, labels, prob_avg, test_file): def analyze(preds_file, labels, prob_avg, test_file):
if preds_file is not None: if preds_file is not None:
labels, prob_avg, cm_avg = np.load(preds_file, allow_pickle=True) labels, prob_avg = np.load(preds_file, allow_pickle=True)
h5f = h5py.File(test_file, 'r') h5f = h5py.File(test_file, 'r')
nda = h5f['flight_altitude'][:] nda = h5f['flight_altitude'][:]
num_obs = nda.shape[0]
iint = h5f['icing_intensity'][:] iint = h5f['icing_intensity'][:]
cld_hgt = h5f['cld_height_acha'][:] cld_hgt = h5f['cld_height_acha'][:]
cld_dz = h5f['cld_geo_thick'][:] cld_dz = h5f['cld_geo_thick'][:]
cld_tmp = h5f['cld_temp_acha'][:] cld_tmp = h5f['cld_temp_acha'][:]
# cld_top_hgt = cld_hgt.reshape((num_obs, -1))
print('report altitude (m): ', np.histogram(nda, bins=12)) print('report altitude (m): ', np.histogram(nda, bins=12))
...@@ -2587,9 +2589,9 @@ def analyze(preds_file, labels, prob_avg, test_file): ...@@ -2587,9 +2589,9 @@ def analyze(preds_file, labels, prob_avg, test_file):
iint = np.where(iint == -1, 0, iint) iint = np.where(iint == -1, 0, iint)
iint = np.where(iint != 0, 1, iint) iint = np.where(iint != 0, 1, iint)
nda[np.logical_and(nda >= 300, nda < 4000)] = 0 nda[np.logical_and(nda >= 100, nda < 5000)] = 0
nda[np.logical_and(nda >= 4000, nda < 7000)] = 1 nda[np.logical_and(nda >= 5000, nda < 15000)] = 1
nda[np.logical_and(nda >= 7000, nda < 15000)] = 2 nda[np.logical_and(nda >= 15000, nda < 20000)] = 2
# nda[np.logical_and(nda >= 6000, nda < 8000)] = 3 # nda[np.logical_and(nda >= 6000, nda < 8000)] = 3
# nda[np.logical_and(nda >= 8000, nda < 15000)] = 4 # nda[np.logical_and(nda >= 8000, nda < 15000)] = 4
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment