make_wcs#
- photutils.datasets.make_wcs(shape, galactic=False)[source]#
Create a simple celestial
WCS
object in either the ICRS or Galactic coordinate frame.- Parameters:
- Returns:
- wcs
astropy.wcs.WCS
object The world coordinate system (WCS) transformation.
- wcs
See also
Notes
The
make_gwcs
function returns an equivalent WCS transformation to this one, but as agwcs.wcs.WCS
object.Examples
>>> from photutils.datasets import make_wcs >>> shape = (100, 100) >>> wcs = make_wcs(shape) >>> print(wcs.wcs.crpix) [50. 50.] >>> print(wcs.wcs.crval) [197.8925 -1.36555556] >>> skycoord = wcs.pixel_to_world(42, 57) >>> print(skycoord) <SkyCoord (ICRS): (ra, dec) in deg (197.89278975, -1.36561284)>