rotate_point¶
- sofia_redux.instruments.forcast.rotate.rotate_point(y, x, center, angle, shift=None, for_header=False, inverse=False)[source]¶
Rotate a single (y, x) point about a given center.
- Parameters:
- yint or float
The y-coordinate.
- xint or float
The x-coordinate.
- centernumpy.ndarray
The center of rotation of shape (2,) in (y, x) numpy ordering.
- angleint or float
The rotation angle in degrees.
- shiftnumpy.ndarray, optional
An optional shift to apply to the rotation prior to the rotation operation. Should be of shape (2,) using the (y, x) numpy convention.
- for_headerbool, optional
If
True
, indicates that (x, y) are taken from a FITS header (ordered from 1 rather than zero).- inversebool, optional
If
True
, perform the inverse rotation (rotate by-angle
).
- Returns:
- ry, rxfloat, float
The rotated x and y coordinates.