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

snapshot...

parent f1c2ffb7
No related branches found
No related tags found
No related merge requests found
......@@ -1011,6 +1011,44 @@ def analyze(file='/Users/tomrink/cld_opd_out.npy'):
return np.array(values), bin_edges
def analyze2(nda_m, nda_i):
nda_m = np.where(nda_m < 0.5, 0, 1)
nda_i = np.where(nda_i < 0.5, 0, 1)
cf_m = np.zeros((64, 64))
cf_i = np.zeros((64, 64))
for j in range(1, 65):
for i in range(1, 65):
sum = nda_m[j-1:j+2, i-1:i+2]
cf_m[j-1, i-1] = sum/9
sum = nda_i[j*2-1:j*2+3, i*2-1:i*2+3]
cf_i[j-1, i-1] = sum/16
cat_0 = cf_m == 0
cat_1 = (cf_m >= 0.1) & (cf_m < 0.13)
cat_2 = (cf_m >= 0.2) & (cf_m < 0.23)
cat_3 = (cf_m >= 0.3) & (cf_m < 0.34)
cat_4 = (cf_m >= 0.4) & (cf_m < 0.45)
cat_5 = (cf_m >= 0.5) & (cf_m < 0.56)
cat_6 = (cf_m >= 0.6) & (cf_m < 0.67)
cat_7 = (cf_m >= 0.7) & (cf_m < 0.78)
cat_8 = (cf_m >= 0.8) & (cf_m < 0.89)
cat_9 = cf_m == 1.0
cf_m[cat_0] = 0
cf_m[cat_1] = 1
cf_m[cat_2] = 2
cf_m[cat_3] = 3
cf_m[cat_4] = 4
cf_m[cat_5] = 5
cf_m[cat_6] = 6
cf_m[cat_7] = 7
cf_m[cat_8] = 8
cf_m[cat_9] = 9
if __name__ == "__main__":
nn = SRCNN()
nn.run('matchup_filename')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment