|NRAO Home > CASA > CASA Toolkit Reference Manual||
componentlist.rename - Function
1.2.1 Give the list a name so it can save itself. use close to save to disk
The rename function is used to specify the name of the table associated with this componentlist.
When a componentlist is created using the emptycomponentlist constructor it is not associated with an casa table. So when the componentlist is removed from memory its contents are lost. But if a name is attached to the componentlist, using the rename function, then its contents are saved in a table with the specified name when the componentlist is closed
NOTE: that by just using rename the componentlist is not ensured to be on disk; to be sure use close after rename
If the componentlist is created using the componentlist constructor then this function will rename the table associated with the list to the user specified name. You cannot rename a componentlist that has been opened read only.
The filename of the table
Send a message to the logger
cl.setshape(0, ’gaussian’, ’35mas’, ’27mas’, ’-10d’)
cl.setflux(0, [1.0, 0.2, 0.1, 0.01]);
This example starts with an empty componentlist tool and then adds
one component to it. The parameters of this component are then
modified to change the shape and flux and the list saved in the
casa table called ’smallblob.cl’ The data is not written to
disk until the list is closed, and when it is the componentlist is
reset. So you need to reopen it if you want to interact with it.
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