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

1.1.3 Set tabular values for the tabular coordinate


Description

When you construct a Coordsys tool, if you include a Tabular Coordinate, it will be linear. This function allows you to replace the Tabular Coordinate by a finite table of values. Coordinate conversions between pixel and world are then done by interpolation (or extrapolation beyond the end). The table of values must be at least of length 2 or an exception will occur.

You may specify a vector of pixel and world values (in the current units of the Tabular Coordinate). These vectors must be the same length. If you leave one of them unset, then the old values are used, but again, ultimately, the pixel and world vectors must be the same length.

The new reference pixel will be the first pixel value. The new reference value will be the first world value.

Presently, there is no way for you to recover the lookup table once you have set it.

If you have more than one Tabular Coordinate, use argument which to specify which one you want to modify.

Arguments





Inputs

pixel

Vector of (0-rel) pixel values. Default is no change.

allowed:

doubleArray

Default:

-1

world

Vector of world values. Default is no change.

allowed:

doubleArray

Default:

-1

which

Which Tabular coordinate

allowed:

int

Default:

0

Returns
bool

Example

 
 
"""  
#  
print "\t----\t settabular Ex 1 \t----"  
csys = cs.newcoordsys(tabular=T);  
print csys.settabular (pixel=[1,10,15,20,100], world=[10,20,50,100,500])  
#True  
#  
"""  
 
We make a linear Tabular Coordinate.  Then overwrite it with  
a non-linear list of pixel and world values.  

__________________________________________________________________


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