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


next up previous contents index
Next: autoflag.setfreqmed - Function Up: autoflag - Tool Previous: autoflag.setnewtimemed - Function


autoflag.setdata - Function



Package synthesis
Module autoflag
Tool autoflag


Set the data parameters selection for subsequent processing


Synopsis
setdata(mode, nchan, start, step, mstart, mstep, spwid, fieldid, msselect, async)


Description
This setup function selects which data are to be used subsequently. After invocation of setdata, only the selected subset of data are operated on.

Data can be selected by field ids, spectral window ids, channels, velocities. The selection is controlled by the mode argument:

fieldids
Selection in field ids.
spwids
Selection in spectral window ids.
channel
Selection in channels using the nchan, start and step arguments.
velocity
Selection in radio velocity, using the nchan, mstart and mstep arguments.

Spectral window ids must be specified for the channel and velocity modes. For channel mode, the other fields have the following meaning:

nchan
is the number of output channels. It defaults to 1, or the number of input channels.
start
is the first channel from input dataset that is to be used. It defaults to 1 (i.e. first channel).
step
gives the increment between selected input channels.

The channels are centered on velocities: start, start+step, start+2*step, etc.

Examples for choosing the parameters for setdata.

af.setdata(mode='fieldids',fieldid=1);
af.setdata(mode='spwids',spwid=1);
af.setdata(mode='spwids & fieldids',spwid=1, fieldid=1);
af.setdata(mode='channel', nchan=64, start=1, step=1, spwid=1)
For velocity modes, the mstart and mstep are the start and step velocities as strings.
af.setdata(mode='velocity', nchan=64, mstart='20km/s', mstep='-80m/s', spwid=1)
For multi-spectral window selection, the data can be selected as follows
af.setdata(mode='channel', nchan=[20,30], start=[1,1], step=[1,1],
             spwid=[1,2])
The above means that you would make a data selection of 20 channels (starting from 1 steping 1) from the first spectral window and 30 channels (starting from 1 steping 1) from the second spectral window.

Note:
Current autoflag setdata implementation does not support cumulative set data. For example, instead of doing
af.setdata(mode='spwids', spwid=1) 
af.setdata(mode='fieldids', fieldid=1)
The input should be
af.setdata(mode='spwids & fieldids', spwid=1, fieldid=1)



Arguments

mode Type of processing: fieldids, spwids, channel or velocity
Allowed: 'fieldids'|'spwids'|'channel'|'velocity'
nchan Number of channels to select
Allowed: Vector of Ints
Default: 1
start Start channels (1-relative)
Allowed: Vector of Ints
step Step in channel number
Allowed: Vector of Int
mstart Start velocity (e.g. '20Km/s')
Allowed: Quantity
mstep Step in velocity (e.g. '100m/s'
Allowed: Quantity
spwid Spectral Window Ids (1 relative) to select
Allowed: Vector of Ints
Default: []
fieldid Field Ids (1 relative) to select
Allowed: Vector of Ints
Default: []
msselect TQL select string applied as a logical "and" with the other selections
Allowed: String
async Run asynchronously in the background?
Allowed: Bool
Default: !dowait


Example
af:=autoflag('testdata.ms');
af.setdata(mode='channel',nchan=64,start=1,step=1,spwid=1,msselect=
'SCAN_NUMBER < 5')
af.setselect(quack=[13,2],unflag=T);
af.run();
af.resetall();
af.summary();
af.setuvbin(thr=.01);
af.run();





next up previous contents index
Next: autoflag.setfreqmed - Function Up: autoflag - Tool Previous: autoflag.setnewtimemed - 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-10-15