Commit 8b580e3a authored by Martinez-Carvajal German's avatar Martinez-Carvajal German
Browse files

rerfining prints and comments

parent 1605e894
......@@ -116,7 +116,7 @@ def connect_CR(path_read, file_top, file_bot, path_save, sample_name):
len_x = x1
len_y = y1
print("getting all possible couples")
print("getting all possible couples ...")
couples = set()
for x in range(len_x):
for y in range(len_y):
......@@ -126,6 +126,7 @@ def connect_CR(path_read, file_top, file_bot, path_save, sample_name):
assert ~((couple[0] != 0) and couple[1] == 0)
print('reducing couples by analyzing connections')
# couples reduced
couples_r = list()
flag_skip_label_top = False
......@@ -135,13 +136,14 @@ def connect_CR(path_read, file_top, file_bot, path_save, sample_name):
if label_top == 0:
continue
# skipping the step if label_top has already been connected
if len(couples_r)!= 0:
# changing skip flag if label_top has already been connected
if len(couples_r)!= 0: # you can't skip the first step
for i in range(len(couples_r)):
if label_top in couples_r[i][0]:
#print("skipping Label Top:", label_top )
flag_skip_label_top = True
# skipping ...
if flag_skip_label_top == True:
flag_skip_label_top = False
continue
......@@ -213,7 +215,7 @@ def connect_CR(path_read, file_top, file_bot, path_save, sample_name):
list_pores_bot = np.unique(cs_bot)
assert(len(list_pores_top)==len(list_pores_bot))
print("getting all possible couples")
print("getting all possible couples...")
couples = set()
for x in range(len_x):
for y in range(len_y):
......@@ -227,7 +229,7 @@ def connect_CR(path_read, file_top, file_bot, path_save, sample_name):
print("couples = \n", sorted(couples))
print("Assiging the same label from top to bottom where there are connections...")
print("Assigning the same label from top to bottom where there are connections...")
for couple in couples:
if couple == (0,0):
continue
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment