NRAO Home > CASA > CASA Toolkit Reference Manual
image.setcoordsys - Function

1.1.1 Set new Coordinate System


Description

This function replaces the coordinate system in the image. It is supported for both float and complex valued images. Coordinate systems are manipulated with the cs tool. The coordinate system can be recovered from an image via the coordsys function.

Note that changing the cs tool has no effect on the original image, until it is replaced with this function; the value returned by coordsys() is a copy of, not a reference to, the image’s coordinate system.

Arguments





Inputs

csys

Record describing new Coordinate System

allowed:

record

Default:

Returns
bool

Example

 
 
"""  
#  
print "\t----\t setcoordsys Ex 1 \t----"  
ia.fromshape(shape=[10,20])          # Make image  
mycs = ia.coordsys();                # Recover Coordinate System  
incr = mycs.increment(’n’);          # Get increment as numeric vector  
incrn = incr[’numeric’]  
for i in range(len(incrn)):  
  incrn[i] = 2*incrn[i]  
incr[’numeric’]=incrn  
mycs.setincrement(value=incr);       # Set new increment in Coordinate System  
ia.setcoordsys(mycs.torecord());     # Set new Coordinate System in image  
mycs.done()  
ia.close()  
#  
"""  
 

__________________________________________________________________


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