Set the direction in which theta increases. clockwise, -1: Theta increases in the clockwise direction counterclockwise, anticlockwise, 1: Theta increases in the counterclockwise direction
(self, direction)
| 1110 | return self.set_theta_offset(mapping[loc] + np.deg2rad(offset)) |
| 1111 | |
| 1112 | def set_theta_direction(self, direction): |
| 1113 | """ |
| 1114 | Set the direction in which theta increases. |
| 1115 | |
| 1116 | clockwise, -1: |
| 1117 | Theta increases in the clockwise direction |
| 1118 | |
| 1119 | counterclockwise, anticlockwise, 1: |
| 1120 | Theta increases in the counterclockwise direction |
| 1121 | """ |
| 1122 | mtx = self._direction.get_matrix() |
| 1123 | if direction in ('clockwise', -1): |
| 1124 | mtx[0, 0] = -1 |
| 1125 | elif direction in ('counterclockwise', 'anticlockwise', 1): |
| 1126 | mtx[0, 0] = 1 |
| 1127 | else: |
| 1128 | _api.check_in_list( |
| 1129 | [-1, 1, 'clockwise', 'counterclockwise', 'anticlockwise'], |
| 1130 | direction=direction) |
| 1131 | self._direction.invalidate() |
| 1132 | |
| 1133 | def get_theta_direction(self): |
| 1134 | """ |