|
|||
NRAO Home > CASA > CASA Toolkit Reference Manual |
|
image.done - Function
1.1.1 Destroy this image tool
Description
When the user no longer needs to use an image tool, calling this function will
free up its resources. That is, it destroys the tool. This means that the user
can no longer call any functions on the tool after it has been done.
If the Image tool is associated with a disk file, then (unlike the close function, the user can also choose to delete that by setting remove=true. By default, any associated disk file is not deleted.
Note that this function is different from the close function because the latter does not destroy the image tool. For example, the user can use the open function straight after the close function on the same tool.
Arguments
Inputs |
| ||
remove |
| Delete the associated disk file as well? | |
| allowed: | bool |
|
| Default: | false |
|
verbose |
| Send a progress report to the logger?
| |
| allowed: | bool |
|
| Default: | true |
|
bool
Example
"""
#
print "\t----\t done Ex 1 \t----"
# Make a test image and create tool subim:
ia.maketestimage(’myfile’,overwrite=true)
subim = ia.subimage(’myfile2’,overwrite=true)
# Check that subim exists as intended by attempting to display its summary:
subim.summary() # This displays a summary of the dataset.
# Use done to destroy the subim tool:
subim.done()
# Check that the subim tool has been detached as intended, by attempting to display its summary:
subim.summary() # This should now throw an error.
ia.summary() # This still works, though, as the ia tool is still open, and the dataset is still available.
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