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

snapshot...

parent 80f92ae9
No related branches found
No related tags found
No related merge requests found
...@@ -687,6 +687,7 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): ...@@ -687,6 +687,7 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
ylen, xlen = refl.shape ylen, xlen = refl.shape
# refl = refl[int(ylen/2):ylen, :] # refl = refl[int(ylen/2):ylen, :]
LEN_Y, LEN_X = refl.shape LEN_Y, LEN_X = refl.shape
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
...@@ -704,12 +705,14 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): ...@@ -704,12 +705,14 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
refl = np.expand_dims(refl, axis=0) refl = np.expand_dims(refl, axis=0)
refl = nn.upsample(refl) refl = nn.upsample(refl)
refl = normalize(refl, 'refl_0_65um_nom', mean_std_dct) refl = normalize(refl, 'refl_0_65um_nom', mean_std_dct)
print('REFL done')
bt = np.where(np.isnan(bt), 0, bt) bt = np.where(np.isnan(bt), 0, bt)
bt = bt[nn.slc_y_m, nn.slc_x_m] bt = bt[nn.slc_y_m, nn.slc_x_m]
bt = np.expand_dims(bt, axis=0) bt = np.expand_dims(bt, axis=0)
bt = nn.upsample(bt) bt = nn.upsample(bt)
bt = normalize(bt, 'temp_11_0um_nom', mean_std_dct) bt = normalize(bt, 'temp_11_0um_nom', mean_std_dct)
print('BT done')
# refl = get_grid_values_all(h5f, 'super/refl_0_65um') # refl = get_grid_values_all(h5f, 'super/refl_0_65um')
# refl = np.where(np.isnan(refl), 0, refl) # refl = np.where(np.isnan(refl), 0, refl)
...@@ -727,6 +730,7 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): ...@@ -727,6 +730,7 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
cld_opd = np.expand_dims(cld_opd, axis=0) cld_opd = np.expand_dims(cld_opd, axis=0)
cld_opd = nn.upsample(cld_opd) cld_opd = nn.upsample(cld_opd)
cld_opd = normalize(cld_opd, label_param, mean_std_dct) cld_opd = normalize(cld_opd, label_param, mean_std_dct)
print('OPD done')
data = np.stack([bt, refl, cld_opd], axis=3) data = np.stack([bt, refl, cld_opd], axis=3)
...@@ -735,6 +739,7 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): ...@@ -735,6 +739,7 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
cld_opd_sres = nn.run_evaluate(data, ckpt_dir) cld_opd_sres = nn.run_evaluate(data, ckpt_dir)
cld_opd_sres = denormalize(cld_opd_sres, label_param, mean_std_dct) cld_opd_sres = denormalize(cld_opd_sres, label_param, mean_std_dct)
_, ylen, xlen, _ = cld_opd_sres.shape _, ylen, xlen, _ = cld_opd_sres.shape
print('OUT: ', ylen, xlen)
cld_opd_sres_out = np.zeros((LEN_Y, LEN_X), dtype=np.float32) cld_opd_sres_out = np.zeros((LEN_Y, LEN_X), dtype=np.float32)
refl_out = np.zeros((LEN_Y, LEN_X), dtype=np.float32) refl_out = np.zeros((LEN_Y, LEN_X), dtype=np.float32)
......
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