|
|||
NRAO Home > CASA > CASA Toolkit Reference Manual |
|
coordsys.projection - Function
1.1.3 Recover the direction coordinate projection
Description
If the Coordinate System contains a direction coordinate, this function 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
CASA. 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 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.
Arguments
Inputs |
| ||
type |
| Type of projection. Defaults to current projection.
| |
| allowed: | string |
|
| Default: |
|
|
record
Example
"""
#
print "\t----\t projection Ex 1 \t----"
csys = cs.newcoordsys(direction=T)
print csys.projection()
#{’type’: ’SIN’, ’parameters’: [0.0, 0.0]}
print csys.projection(’all’)
#{’all’: True, ’types’: [’AZP’, ’TAN’, ’SIN’, ’STG’, ’ARC’, ’ZPN’, ’ZEA’,
# ’AIR’, ’CYP’, ’CAR’, ’MER’, ’CEA’, ’COP’, ’COD’, ’COE’, ’COO’, ’BON’,
# ’PCO’, ’SFL’, ’PAR’, ’AIT’, ’MOL’, ’CSC’, ’QSC’, ’TSC’]}
print csys.projection(’ZPN’)
#{’nparameters’: 100}
#
"""
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.
__________________________________________________________________
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