(points)
| 87 | |
| 88 | |
| 89 | def get_strands(points): |
| 90 | strands = [] |
| 91 | count = 0 |
| 92 | total = points.shape[0] |
| 93 | oris = [] |
| 94 | while True: |
| 95 | strand = [] |
| 96 | base_dist = points[count+1] - points[count] |
| 97 | base_dist = np.linalg.norm(base_dist,2) |
| 98 | if base_dist==0: |
| 99 | print('base:0') |
| 100 | base_dist=0.0025 |
| 101 | for i in range(256): |
| 102 | strand.append(points[count:count+1]) |
| 103 | if count== total-1: |
| 104 | count+=1 |
| 105 | break |
| 106 | dist = points[count+1] - points[count] |
| 107 | count += 1 |
| 108 | if np.linalg.norm(dist,2)> base_dist*6: |
| 109 | break |
| 110 | strand = np.concatenate(strand,0) |
| 111 | ori = np.concatenate([strand[1:]-strand[:-1],strand[-1:]-strand[-2:-1]],0) |
| 112 | strands.append(strand) |
| 113 | oris.append(ori) |
| 114 | if count==total: |
| 115 | break |
| 116 | oris = np.concatenate(oris,0) |
| 117 | return strands,oris |
| 118 | |
| 119 | |
| 120 |
no outgoing calls
no test coverage detected