<casaxml xsi:schemaLocation="http://casa.nrao.edu/schema/casa.xsd file:///opt/casa/code/tools/xml/casa.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://casa.nrao.edu/schema/psetTypes.html">
<tool module="components" name="componentlist">
<include>componentlist_forward.h</include>
<include>componentlist_private.h</include>
<shortdescription>A tool for the manipulation of groups of components</shortdescription>
A componentlist is a tool that contains functions that manipulate
components. A component is a functional representation of the sky
brightness - point source, disk, Gaussian, etc.
Note for those new to CASA: components are not used explicitly in
cleaning, rather the model is stored as an image. Components are
useful for e.g. simulation and modifying images (ia.modify), but one
will not in general have a clean component list associated with
The simplest way to make a componentlist tool is to use cl.addcomponent:
cl.done() # it is safest to close it before beginning
# add a single point source component with
# Stokes I=2.3Jy and other Stokes parameters 0
cl.addcomponent(dir='J2000 10h30m00 -20d00m00.0', flux=[2.3,0,0,0])
cl.rename("myList.cl") # save to disk
One can open a list on disk with cl.open(filename).
Componentlists can be converted to/from records (python dictionaries)
with cl.torecord() and cl.fromrecord(record).
<method name="componentlist" type="constructor">
<shortdescription>Construct an empty componentlist</shortdescription>
Use this constructor to construct a componentlist tool that does not
contain any components. Components can be appended to the list using
the addcomponent or simulate functions,
and the list can be stored to disk by giving it a name with cl.rename
<method name="open" type="function">
<shortdescription>Construct a cl from a table on disk</shortdescription>
Use this constructor to construct a componentlist tool by reading
the data from an table. To ensure that this table contains
all the necessary columns and to allow the table format to be
enhanced in the future, it is highly recommended that the table be