astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v1.1.1 »
- World Coordinate System (`astropy.wcs`) »
- pixel_to_skycoord

# pixel_to_skycoord

`astropy.wcs.utils.``pixel_to_skycoord`(xp, yp, wcs, origin=0, mode=u'all', cls=None)

  Convert a set of pixel coordinates into a `SkyCoord` coordinate.

  Parameters:

  xp, yp : float or `numpy.ndarray`

  > The coordinates to convert.

  wcs : `WCS`

  > The WCS transformation to use.

  origin : 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'`).

  cls : class or None

  > The class of object to create. Should be a `SkyCoord` subclass. If None, defaults to `SkyCoord`.

  Returns:

  coords : Whatever `cls` is (a subclass of `SkyCoord`)

  > The celestial coordinates

  See also

  `astropy.coordinates.SkyCoord.from_pixel`