nraonrao
 
NRAO Home > CASA > CasaRef
coordsys.setprojection - Function

1.1.3 Set the direction coordinate projection
Description

If the Coordinate System contains a direction coordinate, this function 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 CASA) 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.

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

Arguments





Inputs

type

Type of projection

allowed:

string

Default:

parameters

Projection parameters

allowed:

doubleArray

Default:

-1

Returns
bool

Example

"""  
#  
print "\t----\t Ex setprojection 1 \t----"  
im = ia.maketestimage(’cena’,overwrite=true)  
csys = ia.coordsys()  
print csys.projection()  
#{’type’: ’SIN’, ’parameters’: array([ 0.,  0.])}  
print csys.projection(’ZEA’)  
#{’nparameters’: 0}  
csys.setprojection(’ZEA’)  
im2 = ia.regrid(’cena.zea’, csys=csys.torecord(), overwrite=true)  
#  
"""

We change the projection of an image from SIN to ZEA (which requires no parameters).

Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu

Copyright © 2008 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search

Updated daily during alpha development.