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

snapshot...

parent 68786bf0
No related branches found
No related tags found
No related merge requests found
...@@ -727,7 +727,7 @@ class SRCNN: ...@@ -727,7 +727,7 @@ class SRCNN:
t1 = time.time() t1 = time.time()
print('read data time: ', (t1 - t0)) print('read data time: ', (t1 - t0))
cld_opd_sres = self.run_inference_(bt, refl_sub_lo, refl_sub_hi, refl_sub_std, cld_opd, 2*LEN_Y, 2*LEN_X) cld_opd_sres = self.run_inference_(bt, refl, refl_sub_lo, refl_sub_hi, refl_sub_std, cld_opd, 2*LEN_Y, 2*LEN_X)
cld_opd_sres_out = np.zeros((LEN_Y, LEN_X), dtype=np.int8) cld_opd_sres_out = np.zeros((LEN_Y, LEN_X), dtype=np.int8)
border = int((KERNEL_SIZE - 1) / 2) border = int((KERNEL_SIZE - 1) / 2)
...@@ -740,7 +740,7 @@ class SRCNN: ...@@ -740,7 +740,7 @@ class SRCNN:
else: else:
return cld_opd_sres return cld_opd_sres
def run_inference_(self, bt, refl_sub_lo, refl_sub_hi, refl_sub_std, cld_opd, LEN_Y, LEN_X): def run_inference_(self, bt, refl, refl_sub_lo, refl_sub_hi, refl_sub_std, cld_opd, LEN_Y, LEN_X):
self.slc_x_m = slice(1, int(LEN_X / 2) + 4) self.slc_x_m = slice(1, int(LEN_X / 2) + 4)
self.slc_y_m = slice(1, int(LEN_Y / 2) + 4) self.slc_y_m = slice(1, int(LEN_Y / 2) + 4)
...@@ -772,6 +772,14 @@ class SRCNN: ...@@ -772,6 +772,14 @@ class SRCNN:
bt_us = smooth_2d(bt_us) bt_us = smooth_2d(bt_us)
bt_us = normalize(bt_us, 'temp_11_0um_nom', mean_std_dct) bt_us = normalize(bt_us, 'temp_11_0um_nom', mean_std_dct)
refl = np.where(np.isnan(refl), 0, refl)
refl = refl[self.slc_y_m, self.slc_x_m]
bt = np.expand_dims(refl, axis=0)
# bt_us = upsample_static(bt, x_2, y_2, t, s, None, None)
refl_us = self.upsample(refl)
refl_us = smooth_2d(refl_us)
refl_us = normalize(refl_us, 'refl_0_65um_nom', mean_std_dct)
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[self.slc_y_m, self.slc_x_m] cld_opd = cld_opd[self.slc_y_m, self.slc_x_m]
cld_opd = np.expand_dims(cld_opd, axis=0) cld_opd = np.expand_dims(cld_opd, axis=0)
...@@ -797,7 +805,7 @@ class SRCNN: ...@@ -797,7 +805,7 @@ class SRCNN:
t1 = time.time() t1 = time.time()
print('upsample/normalize time: ', (t1 - t0)) print('upsample/normalize time: ', (t1 - t0))
data = np.stack([bt_us, refl_sub_lo, refl_sub_hi, refl_sub_std, 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 = self.do_inference(data) cld_opd_sres = self.do_inference(data)
cld_opd_sres = denormalize(cld_opd_sres, label_param, mean_std_dct) cld_opd_sres = denormalize(cld_opd_sres, label_param, mean_std_dct)
......
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