NRAO Home > CASA > CASA Cookbook and User Reference Manual
1.3.7.3 Indexes

As in C, Python indices are 0-based. For example, the first element in a list antlist would be antlist[0]:

CASA <113>: antlist=range(5)  
CASA <114>: antlist  
  Out[114]: [0, 1, 2, 3, 4]  
CASA <115>: antlist[0]  
  Out[115]: 0  
CASA <116>: antlist[4]  
  Out[116]: 4

CASA also uses 0-based indexing internally for elements in the Measurement Set (MS – the basic construct that contains visibility and/or single dish data; see Chapter 2). Thus, we will often talk about Field or Antenna “ID”s which will be start at 0. For example, the first field in an MS would have FIELD_ID==0 in the MSselect syntax, and can be addressed as be indexed as field=’0’ in most tasks, as well as by name field=’0137+331’ (assuming thats the name of the first field). You will see these indices in the MS summary from the task listobs.


More information about CASA may be found at the CASA web page

Copyright © 2010 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