NRAO Home > CASA > CASA Toolkit Reference Manual
coordsys.setunits - Function

1.1.3 Set the axis units


Description

Each axis associated with the Coordinate System has a unit. This function allows you to set new axis units.

You can set the units either for all axes (type=unset) or for just the axes associated with a particular coordinate type.

In general, the units must be consistent with the old units. When you change the units, the increment and reference value will be adjusted appropriately. However, for a linear or tabular coordinate, and only when you specify type=’linear’ or type=’tabular’ (i.e. you supply units only for the specified linear of tabular coordinate), and if you set overwrite=T, you can just overwrite the units with no further adjustments. Otherwise, the overwrite argument will be silently ignored. Use argument which to specify which coordinate if you have more than one of the specified type.

You can recover the current axis units with function units.

Arguments





Inputs

value

Units

allowed:

stringArray

Default:

type

Coordinate type: ”direction”, ”stokes”, ”spectral”, ”linear”, ”tabules” or leave unset for all.

allowed:

string

Default:

overwrite

Overwrite linear or tabular coordinate units?

allowed:

bool

Default:

false

which

Which coordinate if more than one of same type. Default is first.

allowed:

int

Default:

-10

Returns
bool

Example

 
 
"""  
#  
print "\t----\t setunits Ex 1 \t----"  
csys = cs.newcoordsys(direction=True, spectral=True)  
csys.summary()  
csys.setunits(value="deg rad mHz");  
csys.summary()  
#  
"""  
 

__________________________________________________________________


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