ms.split - Function

1.2.1 make a new ms from a subset of an existing ms
Description

This function splits out part of the MS into a new MS. Spectral averaging is available on splitting. More transformations are in the works (like time averaging).

When splitting multiple spectral windows, the parameters nchan, start, step can be vectors, so that each spectral window has its own selection on averaging and number of output channels. But the option of using only one value for each of these parameters means that it will be replicated for all the spectral windows selected.

Arguments





Inputs

outputms

The name of the measurement split into

allowed:

string

Default:

field

Field ids (0-based) or fieldnames to split out

allowed:

any

Default:

variant

spw

Spectral windows to split

allowed:

any

Default:

variant

nchan

number of channels in output - Vector Int of length 1 or same length as spw

allowed:

intArray

Default:

-1

start

Start channels in input data - Vector Int of length 1 or same length as spw

allowed:

intArray

Default:

0

step

number of input channels to average to make 1 output channel - Vector Int of length 1 or same as spw

allowed:

intArray

Default:

1

baseline

Antenna names or Antenna indices to select

allowed:

any

Default:

variant

timebin

Value to average the data to, 0s means keep the data as is sampled, which is the default

allowed:

any

Default:

variant -1s

time

Limit data selected to be within a given time range. Syntax is defined in the msselection link

allowed:

string

Default:

scan

Limit data selected on scan numbers. Syntax is defined in the msselection link

allowed:

any

Default:

variant

uvrange

Limit data selected on uv distance. Syntax is defined in the msselection link

allowed:

any

Default:

variant

taql

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

allowed:

string

Default:

whichcol

’DATA’, ’MODEL_DATA’, ’CORRECTED_DATA’

allowed:

string

Default:

DATA

Returns
bool

Example

 
  ms.open("multiwin.ms", nomodify=False)  
  ms.split(’subms.ms’, field=[0], spw=[0], nchan=[10],  
           start=[0], step=[5], whichcol=’CORRECTED_DATA’)  
  

In this example we split out data from the 1st field and 1st spectral window. The output data will have 10 channels which is taken from 50 channels from the input data starting at channel 0 and averaging every 5.

 
  ms.open("multiwin.ms", nomodify=False)  
  ms.split(’subms.ms’, field=[0], spw=[0,1,2,3], nchan=[10],  
           start=[0], step=[5], whichcol=’CORRECTED_DATA’)  
 

In this example we split out data from the 1st field and four spectral windows. The output data will have 4 spectral windows each of 10 channels which is taken from 50 channels from the input data starting at channel 0 and averaging every 5.

 
  ms.open("multiwin.ms", nomodify=False)  
  ms.split(’subms.ms’, field=[0], spw=[0,1,2,3], nchan=[10,10,30,40],  
           start=[0,4,9,9], step=[1,10,5,2], whichcol=’CORRECTED_DATA’)

In this example we split out data from the 1st field and four spectral windows. There will be four spectral windows in the output data, with 10, 10, 30 and 40 channels respectively. These are averages of the input spectral windows. The first output spectral window will be formed by picking 10 channels, starting at 0 with no averaging, of the input spwid 0. The second output spectral window will consists of 10 channels and is formed by picking 100 channels from spwid 1 of the input data, starting at channel 4, and every 10 channels to make one output channel.

Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu

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

Updated daily during alpha development.