NRAO Home > CASA > CASA Toolkit Reference Manual
ms.partition - Function

1.3.1 make a new ms from a subset of an existing ms, without changing any subtables


Description

This function splits out part of the MS into a new MS. Time averaging can be performed in the process. Unlike split, the subtables and IDs (ANTENNA1, DATA_DESCRIPTION_ID, etc.) are never changed to account for the selection.

As a side effect of that property, partition cannot select by channel or correlation, or average channels. It CAN select by spectral window(s).

Arguments





Inputs

outputms

The name of the resulting measurement set

allowed:

string

Default:

field

Fields to include, by names or 0-based ids. (” => all)

allowed:

variant

Default:

spw

Spectral windows (and :channels) to select

allowed:

variant

Default:

*

baseline

Antenna names or indices to select (” => all)

allowed:

variant

Default:

timebin

Duration for averaging. Defaults to no averaging.

allowed:

variant

Default:

-1s

time

Only use data in the given time range, using the msselection syntax.

allowed:

string

Default:

scan

Only use the scan numbers requested using the msselection syntax.

allowed:

variant

Default:

uvrange

Limit data by uv distance using the msselection syntax.

allowed:

variant

Default:

taql

For the TAQL experts, flexible data selection using the TAQL syntax

allowed:

string

Default:

whichcol

’DATA’, ’MODEL_DATA’, ’CORRECTED_DATA’, ’FLOAT_DATA’, ’LAG_DATA’, and/or ’all’

allowed:

string

Default:

DATA

tileshape

Tile shape of the disk data columns, most users should not need to touch this parameter [0] => normal tiling, [1] => fast mosaic style tile [4,15,351] => a tile shape of 4 pol 15 chan and 351 rows

allowed:

variant

Default:

subarray

Limit data to specific (sub)array numbers.

allowed:

variant

Default:

combine

Ignore changes in these columns (scan, and/or state) when time averaging.

allowed:

string

Default:

intent

Only use the requested scan intents.

allowed:

string

Default:

obs

Only use the requested observation IDs.

allowed:

string

Default:

Returns
bool

Example

 
 
  ms.open("multiwin.ms")  
  ms.partition(’partition.ms’, field=[0], spw=[1], whichcol=’CORRECTED_DATA’)  
 
  In this example we partition out data from the 1st field and 2nd spectral  
  window.  Only the CORRECTED_DATA data column will be copied, and it will be  
  written to the DATA column of partition.ms.  
 
 
  ms.open("multiwin.ms")  
  ms.partition(’partition.ms’, field=[0], spw=[0,1,2,3],  
               whichcol=’CORRECTED_DATA’)  
 
  In this example we partition out calibrated data from the 1st field and four  
  spectral windows.  
 
 
  ms.open("WSRT.ms")  
  ms.partition(’partition.ms’, timebin=’20s’, whichcol=’all’, combine=’scan’)  
  ms.close()  
 
  This example averages a WSRT MS into 20s bins, selecting whichever of DATA,  
  MODEL_DATA, CORRECTED_DATA, or FLOAT_DATA, or LAG_DATA is present.  Normally  
  the bins would not cross scans, but in this MS the scan number goes up with  
  each integration, making it redundant enough with time that it would defeat  
  any time averaging.  Therefore combine parameter forces the SCAN column to be  
  ignored for setting the bins.  
 

__________________________________________________________________


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