Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: componentlist.simulate - Function Up: componentlist - Tool Previous: componentlist.sample - Function


componentlist.rename - Function



Package synthesis
Module componentmodels
Tool componentlist


Give the list a name so it can save itself.


Synopsis
rename(filename, log)


Description

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 AIPS++ 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. 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. If a table with the specified name already exists then the user is prompted, using a popup dialog window, to see whether it should be overwritten. In a non-windows environment the file is not overwritten.



Arguments

filename The filename of the table
Allowed: Any valid filename
Default: no default
log Send a message to the logger
Allowed: Boolean
Default: T


Returns
nothing


Example
      include 'componentlist.g'
      cl := emptycomponentlist();
      cl.simulate(1);
      cl.setshape(1, 'gaussian', '35mas', '27mas', '-10d')
      cl.setflux(1, [1.0, 0.2, 0.1, 0.01]);
      cl.rename('smallblob.cl');
      cl.close();
      n := cl.length();
This example creates and 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 AIPS++ 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 n contains zero at the end of this example.



next up previous contents index
Next: componentlist.simulate - Function Up: componentlist - Tool Previous: componentlist.sample - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15