4.32. pixels_to_skys

Calculates the sky coordinates corresponding to the given pixel coordinates.


Fits.pixels_to_skys(xs: List[int | float] | int | float, ys: List[int | float] | int | float) pd.DataFrame

Calculates the sky coordinates corresponding to the given pixel coordinates.

Parameters

  • xs (Union[List[Union[int, float]], int, float]):

    The x coordinate(s) of the pixel(s).

  • ys (Union[List[Union[int, float]], int, float]):

    The y coordinate(s) of the pixel(s).

Returns

pd.DataFrame

A DataFrame containing the pixel and corresponding sky coordinates.

Raises

  • ValueError

    When the length of xs and ys is not equal.

  • Unsolvable

    When the header does not contain a valid WCS solution.


4.32.1. Example:

from myraflib import Fits

fits = Fits.sample()
skys = fits.pixels_to_skys(10, 10)