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

1.1.1 Close the image tool


This function closes the image tool. This means that it detaches the tool from its image file (flushing all the changes first). The image tool is “null” after this change (it is not destroyed) and calling any tool function other than open will result in an error.




print "\t----\t close Ex 1 \t----"  
ia.maketestimage(’myimage’,overwrite=true)  # First create an image and attach the image tool to it.  
ia.close()              # The Image tool is detached from the image using the close tool.  
print "!!!EXPECT ERROR HERE!!!"  
ia.summary()            # The image is not open, so attempting to display summary information on the image results in an error.’myimage’)      # The image tool is reattached to the image using the open tool.  
ia.summary()            # No error - the summary information is now displayed correctly.  
ia.close()              # The Image tool is detached from the image again, using the close tool.  


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