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

1.1.3 Copy this Coordsys tool


Description

This function returns a copy, not a reference, of the Coordsys tool. It is your responsibility to call the done function on the new tool.

Arguments





Returns
coordsys

Example

 
 
"""  
#  
print "\t----\t copy Ex 1 \t----"  
cs1 = cs.newcoordsys(direction=T, spectral=T)  
cs2 = cs1         # Reference  
print cs1, cs2  
cs1.summary()  
cs2.summary()  
cs1.done()        # done invokes default coordsys tool  
cs1.summary()  
cs2.summary()     # cs2 gets doned when cs1 does  
cs1 = cs.newcoordsys(direction=T, spectral=T)  
cs2 = cs1.copy()  # Copy  
cs1.done()  
cs1.summary()     # cs1 is default coordsys tool  
cs2.summary()     # cs2 is still viable  
cs2.done()  
cs2.summary()     # Now it’s done (done just invokes default constructor)  
#  
"""  
 

__________________________________________________________________


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