stemflow.utils.jitterrotation.jitterrotator
JitterRotator
2D jitter rotator.
Source code in stemflow/utils/jitterrotation/jitterrotator.py
inverse_jitter_rotate(x_array_rotated, y_array_rotated, rotation_angle, calibration_point_x_jitter, calibration_point_y_jitter)
classmethod
reverse jitter and rotation
Parameters:
-
x_array_rotated
(ndarray
) –input lng/x
-
y_array_rotated
(ndarray
) –input lng/x
-
rotation_angle
(Union[int, float]
) –rotation angle
-
calibration_point_x_jitter
(Union[int, float]
) –calibration_point_x_jitter
-
calibration_point_y_jitter
(Union[int, float]
) –calibration_point_y_jitter
Returns:
-
Tuple[ndarray, ndarray]
–Tuple[np.ndarray, np.ndarray]: newx, newy
Source code in stemflow/utils/jitterrotation/jitterrotator.py
rotate_jitter(x_array, y_array, rotation_angle, calibration_point_x_jitter, calibration_point_y_jitter)
classmethod
Rotate Normal lng, lat to jittered, rotated space
Parameters:
-
x_array
(ndarray
) –input lng/x
-
y_array
(ndarray
) –input lat/y
-
rotation_angle
(Union[int, float]
) –rotation angle
-
calibration_point_x_jitter
(Union[int, float]
) –calibration_point_x_jitter
-
calibration_point_y_jitter
(Union[int, float]
) –calibration_point_y_jitter
Returns:
-
Tuple[ndarray, ndarray]
–Tuple[np.ndarray, np.ndarray]: newx, newy
Source code in stemflow/utils/jitterrotation/jitterrotator.py
Sphere_Jitterrotator
3D jitter rotator
Source code in stemflow/utils/jitterrotation/jitterrotator.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
|
inverse_rotate_jitter(point, axis, angle)
inverse rotate_jitter 3d points
Parameters:
-
point
(ndarray
) –shape of (X, 3)
-
axis
(ndarray
) –shape of (3,)
-
angle
(Union[float, int]
) –angle in degree
Returns:
-
ndarray
–np.ndarray: inverse rotated point
Source code in stemflow/utils/jitterrotation/jitterrotator.py
rotate_jitter(point, axis, angle)
rotate_jitter 3d points
Parameters:
-
point
(ndarray
) –shape of (X, 3)
-
axis
(ndarray
) –shape of (3,)
-
angle
(Union[float, int]
) –angle in degree
Returns:
-
ndarray
–np.ndarray: rotated_point