# ['J2000', 'JMEAN', 'JTRUE', 'APP', 'B1950', 'B1950_VLA', 'BMEAN', 'BTRUE', 'GALACTIC', 'HADEC', 'AZEL', 'AZELSW', 'AZELNE', 'AZELGEO', 'AZELSWGEO', 'AZELNEGEO', 'JNAT', 'ECLIPTIC', 'MECLIPTIC', 'TECLIPTIC', 'SUPERGAL', 'ITRF', 'TOPO', 'ICRS', 'MERCURY', 'VENUS', 'MARS', 'JUPITER', 'SATURN', 'URANUS', 'NEPTUNE', 'PLUTO', 'SUN', 'MOON', 'COMET']
<casaxml xsi:schemaLocation="http://casa.nrao.edu/schema/casa.xsd file:///opt/casa/code/tools/xml/casa.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://casa.nrao.edu/schema/psetTypes.html">
<tool module="images" name="coordsys">
<shortdescription>Operations on CoordinateSystems</shortdescription>
<keyword>coordinates</keyword>
<keyword>measures</keyword>
<keyword>quanta</keyword>
<include>coordsys_forward.h</include>
<include>coordsys_private.h</include>
A Coordsys \tool\ is used to store and manipulate a Coordinate System
(we will use the term `Coordinate System' interchangeably with `Coordsys
\tool'). A Coordinate System is a collection of coordinates, such as a
direction coordinate (E.g. RA/DEC), or a spectral coordinate (e.g. an
The main job of the Coordsys \tool\ is to convert between absolute pixel and world
(physical) coordinates. It also supports relative pixel and world coordinates
(relative to reference location).
A Coordinate System is generally associated with an image (manipulated
via an <link anchor="images:image">Image</link> \tool) but can also exist in its own
right. An image is basically just a regular lattice of pixels plus a
Coordinate System describing the mapping from pixel coordinate to world
(or physical) coordinate.
Each coordinate is associated with a number of axes. For example, a
direction coordinate has two coupled axes; a longitude and a latitude.
A spectral coordinate has one axis. A linear coordinate can have an
arbitrary number of axes, but they are all uncoupled. The Coordinate
System actually maintains two kinds of axes; pixel axes and world
As well as the coordinates, there is some extra information stored in
the Coordinate System. This consists of the telescope, the epoch (date
of observation), and the highly influential observer's name. The
telescope (i.e. position on earth) and epoch are important if you want
to, say, change a spectral coordinate from LSRK to TOPO.
For general discussion about celestial coordinate systems, see the
papers by Mark Calabretta and Eric Greisen.
Background on the WCS system and relevant papers (including the
A&A 2002, 1061-1075 and 1077-1122
\htmladdnormallink{here}{http://www.atnf.csiro.au/people/mark.calabretta/WCS}.
Note that the actual system implemented originally in \casa\ was
based on a 1996 draft of these papers. The final papers are being
implemented while new version of the defining library become
\noindent {\label{COORDSYS:FORMATTING} \bf Coordinate formatting}
Many of the Coordsys \tool\ functions use a world coordinate value
as an argument. This world value can be formatted in many ways.
Some functions (e.g. <link anchor="images:coordsys.toworld.function">toworld</link>) have a function
argument called {\stfaf format} which takes a string. This controls
the format in which the coordinate is output and hence possibly input
into some other function.
Possibilities for {\stfaf format} are :
\item 'n' - means the world coordinate is given as a numeric vector (actually doubles).
The units are implicitly those returned by function <link anchor="images:coordsys.units.function">units</link>.
\item 'q' - means the world coordinate is given as a vector of quantities
(value and unit) - see the <link anchor="quanta">quanta</link> module. If there
is only one axis (e.g. spectral coordinate), you will get