4.23. fits_rotate¶
Rotates the data of the Fits object.
- Fits.rotate(angle: float | int, output: str | None = None, override: bool = False) Self¶
Rotates the data of the
Fitsobject.Parameters
- angle (
Union[float, int]): The rotation angle in radians.
- angle (
- output (
str, optional): Path of the new fits file where the rotated data will be saved.
- output (
- override (
bool, default=False): If
True, will overwrite the output if a file with the same name already exists.
- override (
Returns
FitsA rotated
Fitsobject.
4.23.1. Example:¶
from myraflib import Fits
import math
fits = Fits.sample()
rotated_fits = fits.rotate(math.radians(45))