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

1.1.3 Replace a coordinate


Description

This function replaces one coordinate in the current Coordinate System by one coordinate in the given Coordinate System. The specified coordinates must have the same number of axes.

Arguments





Inputs

csys

Coordinate System to replace from. Use coordsys’ torecord() to generate required record.

allowed:

record

Default:

whichin

Index of input coordinate (0-rel)

allowed:

int

Default:

whichout

Index of output coordinate

allowed:

int

Default:

Returns
bool

Example

 
 
"""  
#  
print "\t----\t replace Ex 1 \t----"  
cs1 = cs.newcoordsys(direction=T, linear=1)  
print cs1.coordinatetype()  
#[’Direction’, ’Linear’]  
cs2 = cs.newcoordsys(spectral=T)  
cs1.replace (cs2.torecord(),0,1)  
print cs1.coordinatetype()  
#[’Direction’, ’Spectral’]  
#  
"""  
 

__________________________________________________________________


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