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.setreferencecode - Function Up: coordsys - Tool Previous: coordsys.setobserver - Function


coordsys.setprojection - Function



Package general
Module images
Tool coordsys


Set the direction coordinate projection


Synopsis
setprojection(type, parameters)


Arguments

type in Type of projection
    Allowed: String
parameters in Projection parameters
    Allowed: Vector of double
    Default: []


Returns
T or fail



Description

If the Coordinate System contains a direction coordinate, this function (short-hand name sp) can be used to set 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++) can be found here.

You can use the function projection to find out all the possible types of projection. You can also use it to find out how many parameters you need to describe a particular projection. See Calabretta and Greisen for details about those parameters (see section 4 of their paper); in FITS terms these parameters are what are labelled as PROJP.

Some brief help here on the more common projections in astronomy.

  • SIN has either 0 parameters or 2. For coplanar arrays like East-West arrays, one can use what is widely termed the NCP projection. This is actually a SIN projection where the parameters are 0 and 1/tan($ \delta_{0}^{}$) where $ \delta_{0}^{}$ is the reference declination. Images made from the ATNF's Compact Array with AIPS++ will have such a projection. Otherwise, the SIN projection requires no parameters (but you can give it two each of which is zero if you wish).

  • TAN is used widely in optical astronomy. It requires 0 parameters.

  • ZEA (zenithal equal area) is used widely in survey work. It requires 0 parameters.

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



Example
- im := image('cena')
- cs := im.coordsys()
- cs.projection()
[type=SIN, parameters=[0 0] ] 
-
- cs.projection('ZEA')
0
- cs.setprojection('ZEA')
- im2 := im.regrid('cena.zea', csys=cs)
We change the projection of an image from SIN to ZEA (which requires no parameters).





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