WCSCoordinates¶
-
class
glue.core.coordinates.WCSCoordinates(header=None, wcs=None)[source]¶ Bases:
glue.core.coordinates.CoordinatesClass for coordinate transformation based on the WCS FITS standard. This class does not take into account distortions.
- Parameters
- header
astropy.io.fits.Header FITS header (derived from WCS if not given)
- wcs
astropy.wcs.WCS WCS object to use, if different from header
- header
References
Greisen & Calabretta (2002), Astronomy and Astrophysics, 395, 1061
Calabretta & Greisen (2002), Astronomy and Astrophysics, 395, 1077
Greisen, Calabretta, Valdes & Allen (2006), Astronomy and Astrophysics, 446, 747
Attributes Summary
Methods Summary
axis_label(self, axis)default_world_coords(self, ndim)dependent_axes(self, axis)Return a tuple of which world-axes are non-independent from a given pixel axis
pixel2world(self, \*pixel)Convert pixel to world coordinates, preserving input type/shape.
world2pixel(self, \*world)Convert world to pixel coordinates, preserving input type/shape.
world_axis_unit(self, axis)Return the unit of the world coordinate given by
axis(assuming the Numpy axis order)Attributes Documentation
Methods Documentation
-
dependent_axes(self, axis)[source]¶ Return a tuple of which world-axes are non-independent from a given pixel axis
The axis index is given in numpy ordering convention (note that opposite the fits convention)
-
pixel2world(self, *pixel)[source]¶ Convert pixel to world coordinates, preserving input type/shape.
- Parameters
- *pixelscalars lists, or Numpy arrays
The pixel coordinates (0-based) to convert
- Returns
- *worldNumpy arrays
The corresponding world coordinates