|
|||
NRAO Home > CASA > CASA Toolkit Reference Manual |
|
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.
- 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(δ0) where δ0 is the reference declination. Images made from the ATNF’s Compact Array with CASA 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.
Arguments
Inputs |
| ||
type |
| Type of projection
| |
| allowed: | string |
|
| Default: |
|
|
parameters |
| Projection parameters
| |
| allowed: | doubleArray |
|
| Default: | -1 |
|
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).
__________________________________________________________________
More information about CASA may be found at the
CASA web page
Copyright © 2016 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