5.43. skys_to_pixels

Calculate Pixel Coordinate of given Sky.


FitsArray.skys_to_pixels(skys: List[SkyCoord] | SkyCoord) pd.DataFrame

Calculate Pixel Coordinate of given Sky.

Parameters

skysUnion[List[SkyCoord], SkyCoord]

Sky coordinate(s).

Returns

pd.DataFrame

Data frame of pixel and sky coordinates.

Raises

Unsolvable

When the header does not contain WCS solution.


5.43.1. Example:

from myraflib import FitsArray
from astropy.coordinates import SkyCoord

fa = FitsArray.sample()
sky = SkyCoord(85.39691915, -2.58041503, unit='deg')
ccd = fa.skys_to_pixels(sky)