| Conditions | 4 |
| Total Lines | 16 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # Licensed under a 3-clause BSD style license - see LICENSE |
||
| 12 | def pol_angle_reshape(s): |
||
| 13 | s = np.array(s) |
||
| 14 | s = np.mod(s,180) # s % 180 |
||
| 15 | print(np.amax(s)) |
||
| 16 | sn = np.empty(s.shape) |
||
| 17 | for i in range(1,len(s)): |
||
| 18 | #if t[i]-t[i-1] < 35: |
||
| 19 | d = 181 |
||
| 20 | n = 0 |
||
| 21 | for m in range(0,100): |
||
| 22 | m2 = (-1)**(m+1)*np.floor((m+1)/2) |
||
| 23 | if np.abs(s[i]+180*m2-sn[i-1]) < d: |
||
| 24 | d = np.abs(s[i]+180*m2-sn[i-1]) |
||
| 25 | n = m2 |
||
| 26 | sn[i] = s[i]+180*n |
||
| 27 | return sn |
||