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

snapshot...

parent e89586d4
No related branches found
No related tags found
No related merge requests found
...@@ -693,19 +693,21 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): ...@@ -693,19 +693,21 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
refl = get_grid_values_all(h5f, 'refl_0_65um_nom') refl = get_grid_values_all(h5f, 'refl_0_65um_nom')
ylen, xlen = refl.shape ylen, xlen = refl.shape
refl = refl[int(ylen/2):ylen, :]
LEN_Y, LEN_X = refl.shape LEN_Y, LEN_X = refl.shape
print(LEN_Y, LEN_X) print(LEN_Y, LEN_X)
bt = get_grid_values_all(h5f, 'temp_11_0um_nom') bt = get_grid_values_all(h5f, 'temp_11_0um_nom')
ylen, xlen = bt.shape ylen, xlen = bt.shape
bt = bt[int(ylen/2):ylen, :]
cld_opd = get_grid_values_all(h5f, 'cld_opd_dcomp_1') cld_opd = get_grid_values_all(h5f, 'cld_opd_dcomp_1')
ylen, xlen = cld_opd.shape ylen, xlen = cld_opd.shape
cld_opd = cld_opd[int(ylen/2):ylen, :] cld_opd = cld_opd[::2, ::2]
cld_opd_hres = cld_opd.copy() cld_opd_hres = cld_opd.copy()
refl_sub_lo = get_grid_values_all(h5f, 'refl_submin_ch01')
refl_sub_hi = get_grid_values_all(h5f, 'refl_submax_ch01')
refl_sub_std = get_grid_values_all(h5f, 'refl_substddev_ch01')
nn = SRCNN() nn = SRCNN()
slc_x = slice(0, (LEN_X - 16) + 4) slc_x = slice(0, (LEN_X - 16) + 4)
...@@ -730,16 +732,19 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): ...@@ -730,16 +732,19 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
bt_us = normalize(bt_us, 'temp_11_0um_nom', mean_std_dct) bt_us = normalize(bt_us, 'temp_11_0um_nom', mean_std_dct)
print('BT done') print('BT done')
# refl = get_grid_values_all(h5f, 'super/refl_0_65um') refl_sub_lo = np.expand_dims(refl_sub_lo, axis=0)
# refl = np.where(np.isnan(refl), 0, refl) refl_sub_lo = upsample_nearest(refl_sub_lo)
# refl = np.expand_dims(refl, axis=0) refl_sub_lo = refl_sub_lo[:, slc_y, slc_x]
# refl_lo, refl_hi, refl_std, refl_avg = get_min_max_std(refl) refl_sub_lo = normalize(refl_sub_lo, 'refl_0_65um_nom', mean_std_dct)
# refl_lo = normalize(refl_lo, 'refl_0_65um_nom', mean_std_dct)
# refl_hi = normalize(refl_hi, 'refl_0_65um_nom', mean_std_dct) refl_sub_hi = np.expand_dims(refl_sub_hi, axis=0)
# refl_avg = normalize(refl_avg, 'refl_0_65um_nom', mean_std_dct) refl_sub_hi = upsample_nearest(refl_sub_hi)
# refl_lo = np.squeeze(refl_lo) refl_sub_hi = refl_sub_hi[:, slc_y, slc_x]
# refl_hi = np.squeeze(refl_hi) refl_sub_hi = normalize(refl_sub_hi, 'refl_0_65um_nom', mean_std_dct)
# refl_avg = np.squeeze(refl_avg)
refl_sub_std = np.expand_dims(refl_sub_std, axis=0)
refl_sub_std = upsample_nearest(refl_sub_std)
refl_sub_std = refl_sub_std[:, slc_y, slc_x]
cld_opd = np.where(np.isnan(cld_opd), 0, cld_opd) cld_opd = np.where(np.isnan(cld_opd), 0, cld_opd)
cld_opd = cld_opd[slc_y, slc_x] cld_opd = cld_opd[slc_y, slc_x]
...@@ -748,7 +753,7 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): ...@@ -748,7 +753,7 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
cld_opd_us = normalize(cld_opd_us, label_param, mean_std_dct) cld_opd_us = normalize(cld_opd_us, label_param, mean_std_dct)
print('OPD done') print('OPD done')
data = np.stack([bt_us, refl_us, cld_opd_us], axis=3) data = np.stack([bt_us, refl_us, refl_sub_lo, refl_sub_hi, refl_sub_std, cld_opd_us], axis=3)
cld_opd_sres = nn.run_evaluate(data, ckpt_dir) cld_opd_sres = nn.run_evaluate(data, ckpt_dir)
cld_opd_sres = descale(cld_opd_sres, label_param, mean_std_dct) cld_opd_sres = descale(cld_opd_sres, label_param, mean_std_dct)
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment