Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: coordsys.referencepixel - Function Up: coordsys - Tool Previous: coordsys.projection - Function


coordsys.referencecode - Function



Package general
Module images
Tool coordsys


Return specified reference code


Synopsis
referencecode(type, list)


Arguments

type in Which coordinate type ?
    Allowed: String from "direction", "stokes", "spectral", "linear", "tabular" or unset
    Default: All
list in List all possibilities ?
    Allowed: Bool
    Default: F


Returns
Vector of strings, string or fail



Description

This function (short-hand name rp) returns the reference code for all, or the specified coordinate type. Examples of the reference code are B1950 and J2000 for direction coordinates, or LSRK and BARY for spectral coordinates.

If type is left unset, then a vector of strings is returned, one code for each coordinate type in the Coordinate System.

If you specify type then select from 'direction', 'spectral', 'stokes', and 'linear' (the first two letters will do). However, only the first two coordinate types will return a non-empty string. If the Coordinate System does not contain a coordinate of the type you specify, an exception is generated.

The argument list is ignored unless you specify a specific type. If list=T, then this function returns the list of all possible reference codes for the specified coordinate type. Otherwise, it just returns the actual code current set in the Coordinate System.

The list of all possible types is returned as a Glish record (it is actually generated by the listcodes function in the measures system). This record has two fields. These are called 'normal' (containing all normal codes) and 'extra' (maybe empty, with all extra codes like planets).

You can set the reference code with setreferencecode.



Example
- cs := coordsys(direction=T)
- list := cs.referencecode('dir', T)
- list.normal[1:10]
J2000 JMEAN JTRUE APP B1950 BMEAN BTRUE GALACTIC HADEC AZEL 
-
- cs.referencecode('dir')
J2000

In this example we first get the list of all possible reference codes for a direction coordinate (and print some of the normal ones). Then we get the actual reference code for the direction coordinate in our Coordinate System.





next up previous contents index
Next: coordsys.referencepixel - Function Up: coordsys - Tool Previous: coordsys.projection - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-08-01