Skip to content

Commit

Permalink
Add safety check print for 1_2
Browse files Browse the repository at this point in the history
  • Loading branch information
Chenggong committed May 31, 2023
1 parent a05471a commit 0e44696
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions script/count_cylinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,12 @@ def write_result(self, file, charge, voltage, time_step):
min_time = time_step * min(x[2] for x in self.down_3_count)
lines.append(f"Minimum down crossing resident time : {min_time}\n")
for name, i in (("1_2, SF inside out ", self.safe_1_2_count),
("2_1, SF outside in ", self.safe_2_1_count),
("3_2, upper to membrane", self.safe_3_2_count),
("2_1, SF outside in ", self.safe_2_1_count)):
lines.append(f"Number of {name} event : {len(i)}\n")
for index, frame, res_time in i:
lines.append(f"{index} , frame {frame}, resident time : {res_time[0]}, {res_time[1]}\n")

for name, i in (("3_2, upper to membrane", self.safe_3_2_count),
("2_3, membrane to upper", self.safe_2_3_count),
("4_2, lower to membrane", self.safe_4_2_count),
("2_4, membrane to lower", self.safe_2_4_count)):
Expand Down

0 comments on commit 0e44696

Please sign in to comment.