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

3.2.1 put a slice into a specific column


Description

In blc and trc, -1 can be used to indicate all values for a dimension (-1 in blc is equivalent to 0, so -1 is especially useful for trc). Note that blc and trc should not contain the row number, only the blc and trc of the arrays in the column.

Arguments





Inputs

columnname

Name of column

allowed:

string

Default:

value

Array

allowed:

any

Default:

variant

blc

Bottom left corner (e.g. [0,0,0] is start of 3D array)

allowed:

intArray

Default:

trc

Top right corner

allowed:

intArray

Default:

incr

Stride (defaults to 1 for all axes)

allowed:

intArray

Default:

1

startrow

First row to put (default 0)

allowed:

int

Default:

0

nrow

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

allowed:

int

Default:

-1

rowincr

Increment in rows to put (default 1)

allowed:

int

Default:

1

Returns
bool

Example

 
 
  tb.open("3C273XC1.MS",nomodify=False)  
  data_all=tb.getcolslice("DATA", [-1,-1], [-1,=1])  
  print data_all.shape  
  # (4, 1, 7669)  
  data=tb.getcolslice("DATA", [0,0],[3,0])  
  # can modify data here  
  tb.putcolslice("DATA", data, [0,0],[3,0])  
  tb.flush()  
 

__________________________________________________________________


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