pixel_to_pixel

astropy.wcs.utils.pixel_to_pixel(wcs_in, wcs_out, *inputs)[source]

Transform pixel coordinates in a dataset with a WCS to pixel coordinates in another dataset with a different WCS.

This function is designed to efficiently deal with input pixel arrays that are broadcasted views of smaller arrays, and is compatible with any APE14-compliant WCS.

Parameters:
wcs_inBaseHighLevelWCS

A WCS object for the original dataset which complies with the high-level shared APE 14 WCS API.

wcs_outBaseHighLevelWCS

A WCS object for the target dataset which complies with the high-level shared APE 14 WCS API.

*inputs

Scalars or arrays giving the pixel coordinates to transform.