unrotate90¶
- sofia_redux.toolkit.image.adjust.unrotate90(image, direction)[source]¶
Un-rotates an image using IDL style rotation types
The table below lists the different IDL rotation directions (The rotation applied to the image that you now wish to remove). (X0, Y0) indicates the original subscripts, and (X1, Y1) are the subscripts of the resulting array. The notation Y0 indicates a reversal of the Y axis, Y1 = Ny - Y0 - 1.
Direction
Transpose?
AntiClockwise
X1
Y1
0
N
0
X0
Y0
1
N
90
-Y0
X0
2
N
180
-X0
-Y0
3
N
270
Y0
-X0
4
Y
0
Y0
X0
5
Y
90
-X0
Y0
6
Y
180
-Y0
-X0
7
Y
270
X0
-Y0
This function applies the opposite rotation to the input image.
- Parameters:
- imagearray_like of float
(nrow, ncol) array to rotate.
- directionint
The IDL rotation type to “unrotate” the image by.
- Returns:
- numpy.ndarray
(nrow, ncol) or (ncol, nrow) depending on rotation type.