5.23. shift

Shifts the data of the FitsArray object.


FitsArray.shift(self, xs: List[int] | int, ys: List[int] | int, output: str | None = None) Self

Shifts the data of the FitsArray object.

Parameters

xsUnion[List[int], int]

x coordinate(s) for shifting.

ysUnion[List[int], int]

y coordinate(s) for shifting.

outputOptional[str]

New path to save the files.

Returns

FitsArray

A shifted FitsArray object.


5.23.1. Example:

from myraflib import FitsArray

fa = FitsArray.sample()

shifted_fa_1 = fa.shift(10, 10)
shifted_fa_2 = fa.shift([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9 , 8, 7, 6, 5, 4, 3, 2, 1])