5.24. rotate

Rotates the data of the FitsArray object.


FitsArray.rotate(self, angle: List[float | int] | float | int, output: str | None = None) Self

Rotates the data of the FitsArray object.

Parameters

angleUnion[List[Union[float, int]], float, int]

Rotation angle(s) in radians.

outputOptional[str]

New path to save the files.

Returns

FitsArray

A rotated FitsArray object.


5.24.1. Example:

from myraflib import FitsArray
import math

fa = FitsArray.sample()

rotated_fa_1 = fa.rotate(math.radians(45))
rotated_fa_2 = fa.rotate([math.radians(angle) for angle in range(45, 145, 10)])