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

1.1.3 Recover the increments


Description

Each axis associated with the Coordinate System has a reference value, reference pixel and an increment (per pixel). These are used in the mapping from pixel to world coordinate.

This function returns the increment (in world axis order). You can recover the increments either for all coordinates (leave type unset) or for a specific coordinate type (mimumum match of the allowed types will do). If you ask for a non-existent coordinate an exception is generated.

See the discussion regarding the formatting possibilities available via argument format.

You can set the increment with function setincrement.

Arguments





Inputs

format

Format string from combination of ”n”, ”q”, ”s”, ”m”

allowed:

string

Default:

n

type

Coordinate type: ”direction”, ”stokes”, ”spectral”, ”linear”, ”tabular”. Leave empty for all.

allowed:

string

Default:

Returns
record

Example

 
 
"""  
#  
print "\t----\t increment Ex 1 \t----"  
csys=cs.newcoordsys(direction=True,spectral=True)  
print csys.increment(format=’q’)  
#{’quantity’: {’*1’: {’unit’: "’", ’value’: -1.0},  
#              ’*2’: {’unit’: "’", ’value’: 1.0},  
#              ’*3’: {’unit’: ’Hz’, ’value’: 1000.0}}}  
print csys.increment(format=’n’)  
#{’numeric’: [-1.0, 1.0, 1000.0]}  
print csys.increment(format=’n’, type=’spectral’)  
#{’numeric’: [1000.0]}  
#  
"""  
 

__________________________________________________________________


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