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

1.2.1 Remove a component from the list.


Description

The remove function removes the specified component(s) from the list. Components are specified by numbering them from one to the length of the list. So removing component one will remove the first component. After using this function all the remaining components will be shuffled down so that component two becomes component one. You cannot remove components from a list that has been opened read only.

You can specify a vector of indices to remove a number of components at once. For example in a five element list removing elements [1,3,5] will result in a two element list, now indexed as elements one and two, containing what was previously the second and fourth components.

Components that have been deleted using this function are not lost. The recover function can be used to get them back unless the purge function has been executed. Then they are completely gone.

Arguments





Inputs

which

indices of which component(s) to remove a vector containing unique integers between 0 and one less than the length of the list, -1 for all

allowed:

intArray

Default:

-1

log

Send a message to the logger

allowed:

bool

Default:

true

Returns
bool

Example

 
 
      cl.open(’crux.cl’)  
      cl.remove(1)  
 

__________________________________________________________________


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