NRAO Home > CASA > CASA Toolkit Reference Manual
table.getvarcol - Function

3.2.1 get a specific column (for variable arrays)


Description

Function getcol can only used if values in the column cells to get have the same shape. Function getvarcol addresses this limitation by returning the values as a record instead of an array. Each field in the record contains the value for a column cell. If the value is undefined (i.e. the cell does not contain a value), the unset value is put in the record. Each field name is the letter r followed by the row number. The length of the record is the number of rows to get.
Note that the function isvarcol tells if a column contains variable shaped arrays.

Arguments





Inputs

columnname

Name of column

allowed:

string

Default:

startrow

First row to read (default 0)

allowed:

int

Default:

0

nrow

Number of rows to read (default -1 means till the end)

allowed:

int

Default:

-1

rowincr

Increment in rows to read (default 1)

allowed:

int

Default:

1

Returns
record

Example

 
 
  tb.open("3C273XC1.MS")  
  gain=tb.getvarcol("DATA")  
  print len(gain)  
# 7669  
 

__________________________________________________________________


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