NRAO Home > CASA > CASA Toolkit Reference Manual
componentlist.simulate - Function

1.2.1 Add some simulated components to the list


Description

The simulate function adds simulated components to the list. The simulation criterion is very simple, all the components added are identical! They are point sources at the J2000 north pole with a flux in Stokes I of 1~Jy, and zero in the other polarizations. The spectrum is constant. The ’set’ functions (eg., setflux, setfreq) can be used to change these parameters to desired ones.

The howmany argument indicates how many components to append to the list.

Arguments





Inputs

howmany

How many components to simulate, greater than zero

allowed:

int

Default:

1

log

Send a message to the logger

allowed:

bool

Default:

true

Returns
bool

Example

 
 
      cl.simulate(2)  
      cl.setflux(1, [2.78, 0, 0, 0]);  
      cl.rename(’test.cl’);  
      cl.close();  
 
 
 
    This example creates a componentlist with two components.  The setflux function is used to  
    modify the second component.  The list is then saved on disk.  
    I use short scripts like this a lot during testing.  
 
    I expect bad things will happen if you save the list to disk,  
    using the close  
    function, before having shut down the editor gui (using the done  
    button) or if you modify the same component using any of the set  
    functions while it is being modified by the gui.  
 
 

__________________________________________________________________


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