|
|||
NRAO Home > CASA > CASA Toolkit Reference Manual |
|
coordsys.setdirection - Function
1.1.3 Set direction coordinate values
Description
When you construct a Coordsys tool, if you include a Direction Coordinate, it
will have some default parameters. This function simply allows you to replace
the values of the Direction Coordinate.
You can also change almost all of those parameters (such as projection, reference value etc.) via the individual functions setreferencecode, setprojection, setreferencepixel, setreferencevalue, setincrement, and setlineartransform provided by the Coordsys tool. See those functions for more details about the formatting of the above function arguments.
Bear in mind, that if your Coordinate System came from a real image, then the reference pixel is special and you should not change it.
Arguments
Inputs |
| ||
refcode |
| Reference code. Default is no change.
| |
| allowed: | string |
|
| Default: |
| |
proj |
| Projection type. Default is no change.
| |
| allowed: | string |
|
| Default: |
| |
projpar |
| Projection parameters. Default is no change.
| |
| allowed: | doubleArray |
|
| Default: | -1 | |
refpix |
| Reference pixel. Default is no change.
| |
| allowed: | doubleArray |
|
| Default: | -1 |
|
refval |
| Reference value. Default is no change.
| |
| allowed: | variant |
|
| Default: |
|
|
incr |
| Increment. Default is no change.
| |
| allowed: | variant |
|
| Default: |
|
|
xform |
| Linear transform. Default is no change.
| |
| allowed: | variant |
|
| Default: |
|
|
poles |
| Native poles. Default is no change.
| |
| allowed: | variant |
|
| Default: |
|
|
bool
Example
"""
#
print "\t----\t setdirection Ex 1 \t----"
csys = cs.newcoordsys(direction=T);
csys.setdirection (refcode=’GALACTIC’, proj=’SIN’, projpar=[0,0],
refpix=[-10,20], refval="10deg -20deg");
print csys.projection()
#{’type’: ’SIN’, ’parameters’: array([ 0., 0.])}
print csys.referencepixel()
#{’ar_type’: ’absolute’, ’pw_type’: ’pixel’, ’numeric’: array([-10., 20.])}
print csys.referencevalue(format=’s’)
#{’ar_type’: ’absolute’, ’pw_type’: ’world’,
# ’string’: array([’10.00000000 deg’, ’-20.00000000 deg’], dtype=’|S17’)}
#
"""
__________________________________________________________________
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