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

snapshot...

parent 5403a30a
Branches
No related tags found
No related merge requests found
......@@ -41,10 +41,11 @@ def process_cld_prob_(grd_k):
num_keep = np.sum(keep)
if num_keep / grd_k.size < 0.98:
return None
keep = np.where(keep, np.logical_and(0.1 < grd_k, grd_k < 0.90), False)
if np.sum(keep)/num_keep < 0.25:
keep_clr = np.where(keep, grd_k < 0.20, False)
frac_keep = np.sum(keep_clr)/num_keep
if not (0.40 < frac_keep < 0.60):
return None
grd_k = np.where(np.invert(keep), 0, grd_k)
grd_k = np.where(np.invert(keep), 0, grd_k) # Convert NaNs to 0
return grd_k
......@@ -103,7 +104,7 @@ def run_all(directory, out_directory, day_night='ANY', pattern='clavrx_*.nc', st
if len(data_train_tiles) == 0 and len(data_valid_tiles) == 0:
continue
if (f_cnt % 5) == 0:
if (f_cnt % 10) == 0:
num_valid_samples = 0
if len(data_valid_tiles) > 0:
label_valid = np.stack(label_valid_tiles)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment