nraonrao
 
 NRAO Home > CASA > CasaDocument
image.remove - Function

1.1.1 Delete the image file associated with this image tool
Description

This function first closes the image tool which detaches it from its underlying image file. It then deletes that image file. If done=F, the image tool is still viable, and can be used with function open to open a new image file. Otherwise the image tool is destroyed.

Arguments





Inputs

done

Destroy this tool after deletion

allowed:

bool

Default:

false

Returns
bool

Example

"""  
#  
print "\t----\t remove Ex 1 \t----"  
ia.maketestimage(’myimage’,overwrite=true)  
ia.close()  
ia.maketestimage(’myotherimage’,overwrite=true)  
ia.close()  
ia.open(’myimage’)          # Attach to ‘myimage’  
ia.remove(F)                # Close imagetool and delete ‘myimage’  
ia.open(’myotherimage’)     # Open new imagefile ‘myotherimage’  
ia.remove()  
print "!!!EXPECT THE FOLLOWING TO GENERATE AN ERROR MESSAGE!!!"  
ia.open(’myimage’)          # ’myimage’ was deleted above  
ia.close()  
#  
"""

Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu

Copyright © 2007 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

Updated daily during alpha development.