skycoord_to_pixel

astropy.wcs.utils.skycoord_to_pixel(coords, wcs, origin=0, mode='all')[source]

Convert a set of SkyCoord coordinates into pixels.

Parameters:
coordsSkyCoord

The coordinates to convert.

wcsWCS

The WCS transformation to use.

originpython:int

Whether to return 0 or 1-based pixel coordinates.

mode‘all’ or ‘wcs’

Whether to do the transformation including distortions ('all') or only including only the core WCS transformation ('wcs').

Returns:
xp, ypnumpy.ndarray

The pixel coordinates