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

1.2.1 Return a vector of indices. (Not implemented yet)


The indices function returns a vector of non-negative integers that can be used to index through the list. This vector always contains the integers starting at one and increasing sequentially to the length of the list. Its main use is in for loops as is illustrated in the example below.




      include ’componentlist.g’  
      cl := componentlist(’’);  
      allcomp := cl.indices();  
      cl.convertfluxunit(allcomp, ’jy’);  
      cl.convertfluxpol(allcomp, ’stokes’);  
      totalflux := [0,0,0,0];  
      for (i in allcomp) {  
        totalflux +:= cl.getfluxvalue(i);  


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