Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: ms.iterinit - Function Up: ms - Tool Previous: ms.concatenate - Function


ms.split - Function



Package general
Module ms
Tool ms


make a new ms from a subset of actual ms


Synopsis
split(outputms, fieldids, spwids, nchan, start, step, timebin, timerange, whichcol)


Arguments

outputms in The name of the measurement split into
    Allowed: String
    Default: no default
fieldids in Field ids to split out 1-based
    Allowed: Vector Int
    Default: -1 (i.e all fields)
spwids in Spectral windows to split 1-based
    Allowed: Vector Int
    Default: -1 (i.e all spws)
nchan in number of channels in output
    Allowed: Vector Int, length 1 or same length as spwids
    Default: -1 (i.e all channels in spws)
start in Start channels in input data
    Allowed: Vector Int, length 1 or same length as spwids
    Default: 1
step in number of input channels to average to make 1 output channel
    Allowed: Vector Int, length 1 or same as spwids
    Default: 1
timebin in Value for time averaging
    Allowed: Quantity
    Default: '-1s'
timerange in Selection of time range to split out; MSSelection syntax
    Allowed: String
    Default: ''
whichcol in 'DATA', 'MODEL_DATA', 'CORRECTED_DATA'
    Allowed: String
    Default: 'DATA'


Returns
Nothing



Description
This function split out part of the MS into a new one. Spectral averaging is available for now 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.

If time averaging is needed the timebin parameter should be set to the requested time integration the visibilities should be in. If timebin is set to a value which is smaller (or just less than 0) than the minimum integration time in the input ms then no time averaging will be done while splitting. Please note that if there are spectral windows of different shapes in the selection to be splitted out then time averaging is not available yet. The way around is to split each spectral window with time averaging seperately into different ms's and then concatenate them together afterwards. The parameter timerange allows for data selection over time. The syntax is defined in the msselection syntax document; the relevant section is quoted here:

timerange = 'YYYY/MM/DD/HH:MM:SS.sss'
     = '< YYYY/MM/DD/HH:MM:SS.sss'
     = '> YYYY/MM/DD/HH:MM:SS.sss'
     = 'ddd/HH:MM:SS.sss'
     = '< ddd/HH:MM:SS.sss'
     = '> ddd/HH:MM:SS.sss'

Examples:
timernage = '2003/11/07/12:58:20'        # selects the timestamp nearest this time

timerange = '2003/11/07/12:58:20-45'     # selects data within this 25s range

timerange = '2003/11/07/12:58:20-59:45'  # selects data within this 1m25s range

timerange = '< 2003/11/07/12:58:20'     # selects data prior to this time

timerange = '13:05:10.005'              # selects timestamp nearest this time
                                   (date defaults to first date in dataset)
timerange = '0/13:05:10.005'            # same as above

timerange = '3/13:05:10.005'            # selects timestamp nearest this time on 4th day in dataset

timerange = '13:05'                     # selects timestamp nearest 13h05m (date defaults to first date in  dataset)

timerange = '< 13:05:10, > 13:06:35'    # all but the 1m25s of data between                                    these times (date defaults to first date in data)


Example
      include 'ms.g'
      myms := ms("multiwin.ms", readonly=F)
      myms.split('subms.ms', fieldids=[1], spwids=[1], nchan=[10],
  start=[1], 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 start at channel 1 and averaging every 5.

      include 'ms.g'
      myms := ms("multiwin.ms", readonly=F)
      myms.split('subms.ms', fieldids=[1], spwids=[1,2,3,4], nchan=[10],
  start=[1], step=[5], whichcol='CORRECTED_DATA')
In this example we split out data from the 1st field and four spectral windows. spectral window. The output data will have 4 spectral windows each of 10 channels which is taken from 50 channels from the input data start at channel 1 and averaging every 5.
      include 'ms.g'
      myms := ms("multiwin.ms", readonly=F)
      myms.split('subms.ms', fieldids=[1], spwids=[1,2,3,4], nchan=[10,10,30,40],
  start=[1,5,10,10], 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, 20, 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 1 with no averaging, of the input spwid 1. The second output spectral window will consists of 10 channels and is formed by picking 100 channels from spwid 2 of the input data, starting at channel 5, and every 10 channels to make one output channel.





next up previous contents index
Next: ms.iterinit - Function Up: ms - Tool Previous: ms.concatenate - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-08-01