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

snapshot...

parent f4b1fb45
No related branches found
No related tags found
No related merge requests found
......@@ -79,14 +79,21 @@ def keep_tile(param_s, tile):
def process_cld_prob(param_s, tile):
k = param_s.index('cloud_probability')
grd_k = tile[k, ].copy()
grd_k = process_cld_prob_(grd_k)
if grd_k is not None:
tile[k, ] = process_cld_prob(grd_k)
return tile
else:
return None
def process_cld_prob_(grd_k):
keep = np.invert(np.isnan(grd_k))
if keep / grd_k.size < 0.95:
if np.sum(keep) / grd_k.size < 0.95:
return None
grd_k = np.where(np.invert(keep), 0, grd_k)
grd_k = np.where(grd_k < 0.5, 0.0, 1.0)
tile[k,] = grd_k
return tile
return grd_k
def run_all(directory, out_directory, day_night='ANY'):
......
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