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.referencecode - Function Up: coordsys - Tool Previous: coordsys.observer - Function


coordsys.projection - Function



Package general
Module images
Tool coordsys


Recover the direction coordinate projection


Synopsis
projection(type)


Arguments

type in Type of projection
    Allowed: String
    Default: Current



Returns
Record, Vector string, Int or fail



Description

If the Coordinate System contains a direction coordinate, this function (short-hand name p) can be used to recover information about the projection. For discussion about celestial coordinate systems, including projections, see the papers by Mark Calabretta and Eric Greisen. The initial draft from 1996 (implemented in AIPS++Background information can be found here.

What this function returns depends upon the value you assign to type.

  • type=unset. In this case (the default), the actual projection type and projection parameters are returned in a Glish record with fields type and parameters, respectively.

  • type='all'. In this case, a vector of strings containing all of the possible projection codes is returned.

  • type=code. If you specify a valid projection type code (see list by setting type='all') then what is returned is the number of parameters required to describe that projection (useful in function setprojection).

You can change the projection with setprojection.

If the Coordinate System does not contain a direction coordinate, an exception is generated.



Example
- cs := coordsys(direction=T)
- cs.projection()
[type=SIN, parameters=[0 0] ] 
-
- cs.projection('all')
AZP TAN SIN STG ARC ZPN ZEA AIR CYP CAR MER CEA COP 
COD COE COO BON PCO GLS PAR AIT MOL CSC QSC TSC 
-
- cs.projection('ZPN')
10
We first recover the projection type and parameters from the direction coordinate. Then we find the list of all possible projection types. FInally, we recover the number of parameters required to describe the 'ZPN' projection.





next up previous contents index
Next: coordsys.referencecode - Function Up: coordsys - Tool Previous: coordsys.observer - 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