agentflagger

class agentflagger[source]

Tool for manual and automated flagging

The agentflagger tool performs manual as well as automatic synthesis flagging operations within casapy. The agentflagger tool can operate on one measurement set at a time.

Open the Measurement Set or Calibration Table and Attach it to the Tool

The first thing to do is to open the MS or calibration table and attach it to the agentflagger tool. Use the af.open method, which requires the MS name and optionally the time interval, over which to buffer data before running the algorithm. The time interval is set by default to 0.0, which means a ’scan’ length. The ’ntime’ parameter is important for the modes tfcrop, rflag and extend.

af.open('uid\_X002.ms')

Select the Data

Once the MS is open, the next step is to select the data. This step will use the MS selection tool to select the portion of the MS given by the parameters. There are two ways of selecting the data:

  1. Create a Python dictionary which internally will be transformed into a record containing the selection parameters.

# Select the whole MS.
af.selectdata()

Select a portion of the MS using a dictionary.
myrecord={}
myrecord['scan']='1~3'
myrecord['spw']='0:1~10'
af.selectdata(myrecord)
  1. Parse the parameter names directly to the function.

af.selectdata(scan='1~3', spw='0:1~10')

Parse the Parameters for the Flagging Mode(s)

Each flagging mode is called an agent. The available agents are: manual, clip, quack, shadow, elevation, tfcrop, rflag, extend, unflag and summary. Each one of these agents may or may not take configuration parameters and data selection parameters. Once the desired flagging modes are chosen, it is time to give the configuration parameters to the tool. Ommited parameters will take default values as defined in each agent. There are two ways of parsing the agent’s parameters.

  1. Using the general method af.parseagentparameters().

Construct a dictionary with the parameters for each agent. Each agent's
parameters should go to a different 'key' of the dictionary. Example:

# Create a shadow agent:
myagents = {}
myagents['mode'] = 'shadow'
af.parseagentparameters(myagents)

# Add a summary agent to the list.
myagents = {}
myagents['mode'] = 'summary
myagents['spwchan'] = True
af.parseagentparameters(myagents)

# Add a manual agent to the same internal list of agents.
myagents = {}
myagents['mode'] = 'manual'
myagents['scan'] = '1~3,18~20'
af.parseagentparameters(myagents)

# Add a clip agent to flag the zero-value data.
myagents = {}
myagents['mode'] = 'clip'
myagents['clipzeros'] = True
af.parseagentparameters(myagents)

# Add another summary agent to the list.
myagents = {}
myagents['mode'] = 'summary'
myagents['spwchan'] = True
af.parseagentparameters(myagents)
  1. The other way to parse agent’s parameters is to use the convenience functions. The above example would become:

# Create a shadow agent:
af.parseshadowparameters()

# Add a summary agent to the list.
af.parsesummaryparameters(spwchan=True)

# Add a manual agent to the same internal list of agents.
af.parsemanualparameters(scan='1~3,18~20')

# Add a clip agent to flag the zero-value data.
af.parseclipparameters(clipzeros=True)

# Add another summary agent to the list.
af.parsesummaryparameters(spwchan=True)

Initialize the Agents

The above step create a list of the agents that the tool will use to process the data. This step will check several parameters and apply constraints. It will set the iteration approach to COMBINE_SCANS_MAP_ANTENNA_PAIRS_ONLY if the agent is either tfcrop or extend and combinescans is set to True. Otherwise it will set it to COMPLETE_SCAN_MAP_ANTENNA_PAIRS_ONLY.

If the list contains agents that set ntime more than once, this method will get the maximum value of ntime and use it for all agents.

If a tfcrop agent is present, this method will create one agent per each polarization available, if correlation is set to ALL.

In the same way, if an agent tfcrop, rflag or clip is present, the asyncio mechanism will be switched on.

af.init()

Run the tool

Run the tool to apply or unapply the flags. The run method takes two parameters, writeflags and sequential. The parameter writeflags controls whether to write the flags or not to the MS. By default it is set to True. The sequential parameter tells to apply/unapply the flags in parallel or not. By default it is set to True, which means that the agents will run in sequential.

The run method gathers several reports, depending on wich agents are run. The display and summary agents produce reports that can be retrieved from calling the run method. The reports are returned via a Python dictionary.

myreports = af.run(writeflags=True)

The dictionary returned in ’myreports’ will contain four reports from the two summary agents that were added previously. The first report is the normal summary for each selection parameter. The second report gives the antenna positions for plotting.

Destroy the tool

Do not forget to destroy and close the tool at the end.

af.done()

Rflag specific actions

Currently the agentflagger does not support the ’calculate’ and ’apply’ actions directly. These actions are distinguished only by the flagdata task. When selecting mode=’rflag’ the agentflagger will run as ’apply’. The ’calculate’ action of the flagdata task can be emulated by setting the tool parameter ’writeflags’ to False as follows:

myagents = {}
myagents['mode'] = 'rflag'
myagents['writeflags'] = False
...
af.parseagentparameters(myagents)

Or, in a more compact example, with the following parameters the agentflagger will run as ’apply’. The default value of writeflags (not given) is True:

af.parseagentparameters({'mode':'rflag', 'extend flags': False})

But here, by setting writeflags to False, the agentflagger will run as ’calculate’. That is, it will not flag the MS, but it will calculate and return the thresholds:

af.parseagentparameters({'mode':'rflag', 'extend flags': False, writeflags=False})

Note that the writeflags parameter needs to be passed in the set of parameters that are parsed initially, before running the agentflagger, for the agentflagger to be able to calculate the RFlag thresholds and return a dictionary with the values calculated.

Methods Summary

agentflagger

Construct a flag tool

deleteflagversion

Delete a saved flag_version.

done

Destroy the flag tool

getflagversionlist

Print out a list of saved flag_versions.

init

Initialize the agents

open

Open the MS or a calibration table and attach it to the tool.

parseagentparameters

Parse the parameters for the agent (flagging mode).

parseantintparameters

Parse data selection parameters and specific parameters for the antint mode.

parseclipparameters

Parse data selection parameters and specific parameters for the clip mode.

parseelevationparameters

Parse data selection parameters and specific parameters for the elevation mode.

parseextendparameters

Parse data selection parameters and specific parameters for the extend mode.

parsemanualparameters

Parse data selection parameters and specific parameters for the manual mode.

parsequackparameters

Parse data selection parameters and specific parameters for the quack mode.

parsesummaryparameters

Parse data selection parameters and specific parameters for the summary mode.

parsetfcropparameters

Parse data selection parameters and specific parameters for the time and frequency mode.

printflagselection

Print out a list of current flag selections.

restoreflagversion

Restore flags from a saved flag_version.

run

Execute a list of flagging agents and write or not to the MS/cal table.

saveflagversion

Save current flags with a version name.

selectdata

Select the data based on the given parameters.

agentflagger()[source]

Construct a flag tool

Create a { t agentflagger} tool, and initialize some variables.

deleteflagversion(versionname=[''])[source]

Delete a saved flag_version.

Parameters

  • versionname (stringArray=['']) - Version name

done()[source]

Destroy the flag tool

getflagversionlist(printflags=True)[source]

Print out a list of saved flag_versions.

Print out the list of flag versions in the MS, unless the parameter printflags=False. The list of names is returned.

Parameters

  • printflags (bool=True) - Print flagversions in logger?

init()[source]

Initialize the agents

This method will initialize the agents and create a list of agents with their specific parameters. It takes no parameters.

open(msname='', ntime=0.0)[source]

Open the MS or a calibration table and attach it to the tool.

Parameters

  • msname (string='') - Measurement set or calibration table to be processed. Default:

  • ntime (double=0.0) - Time interval. If not given, the default will be used. Default:

parseagentparameters(aparams='')[source]

Parse the parameters for the agent (flagging mode).

The specific data selection parameters for the agent (flagging mode) are parsed. These parameters are the data selection and mode-specific parameters. See the example below:

Parameters

  • aparams (record='') - It takes a record (dictionary) with the specific parameters for the flagging mode.

The record may contain any data selection parameters supported by MS Selection, as well as

mode-specific parameters such as:

  1. array,feed,scan,field,spw,intent,correlation,antenna,uvrange,observation

  2. mode (which can be: manual,clip,quack,shadow,elevation,tfcrop,extendflags,unflag or summary)

    For flagging mode=clip, the parameters are: expression, datacolumn, clipminmax, etc.

    See the documentation of the task flagdata for all the available parameters for each mode.

  3. apply: default is true (true for flagging and false for unflagging)

Example:

myrecord={}

myrecord[‘mode’]=’clip’

myrecord[‘scan’]=’1~3’

myrecord[‘clipminmax’]=[0.02,0.3]

myrecord[‘apply’]=True

af.parseagentparameters(myrecord)

parseantintparameters(field='', spw='', array='', feed='', scan='', antenna='', uvrange='', time='', correlation='', intent='', observation='', antint_ref_antenna='', minchanfrac=0.6, verbose=False, apply=True)[source]

Parse data selection parameters and specific parameters for the antint mode. Data selection follows the MS Selection syntax.

Parameters

  • field (string='') - Field indices or source names. Example: ‘2,3C48’

  • spw (string='') - Spectral Window Indices or names. Example: ‘1,2’

  • array (string='') - Array Indices or names. Example: ‘VLAA’

  • feed (string='') - Feed index or name. Example: ‘1,2’ (not supported yet)

  • scan (string='') - Scan number. Example: ‘1,2,3’

  • antenna (string='') - Baseline number. Example: ‘2,3,4,5’

  • uvrange (string='') - UV-distance range, with a unit. Example: ‘2.0-3000.0 m’

  • time (string='') - Time range, as MJDs or date strings. Example: ‘xx.x.x.x.x~yy.y.y.y.y’

  • correlation (string='') - Correlations/polarizations. Example: ‘RR,LL,RL,LR,XX,YY,XY,YX’

  • intent (string='') - Scan intent. Example: ‘CAL, BAND

  • observation (string='') - Observation Id. Example: ‘2~4’

  • antint_ref_antenna (string='') - Antenna for which the fractions of channels flagged will be checked.

  • minchanfrac (double=0.6) - Minimum fraction of flagged channels required for a baseline to be deemed as flagged. Default:

  • verbose (bool=False) - Print timestamps of flagged integrations to the log. Default:

  • apply (bool=True) - Parameter to flag or unflag the data. Default:

parseclipparameters(field='', spw='', array='', feed='', scan='', antenna='', uvrange='', time='', correlation='', intent='', observation='', datacolumn='DATA', clipminmax=[''], clipoutside=True, channelavg=False, chanbin=1, timeavg=False, timebin='', clipzeros=False, apply=True)[source]

Parse data selection parameters and specific parameters for the clip mode. Data selection follows the MS Selection syntax.

Parameters

  • field (string='') - Field indices or source names. Example: ‘2,3C48’

  • spw (string='') - Spectral Window Indices or names. Example: ‘1,2’

  • array (string='') - Array Indices or names. Example: ‘VLAA’

  • feed (string='') - Feed index or name. Example: ‘1,2’ (not supported yet)

  • scan (string='') - Scan number. Example: ‘1,2,3’

  • antenna (string='') - Baseline number. Example: ‘2,3,4,5’

  • uvrange (string='') - UV-distance range, with a unit. Example: ‘2.0-3000.0 m’

  • time (string='') - Time range, as MJDs or date strings. Example: ‘xx.x.x.x.x~yy.y.y.y.y’

  • correlation (string='') - Correlations/polarizations. Example: ‘RR,LL,RL,LR,XX,YY,XY,YX’

  • intent (string='') - Scan intent. Example: ‘CAL, BAND

  • observation (string='') - Observation Id. Example: ‘2~4’

  • datacolumn (string='DATA') - Data column to use for clipping. Supported columns for cal tables are

    FPARAM,CPARAM,SNR. Example: ‘DATA’. Default:

  • clipminmax (doubleArray=['']) - Range to use for clipping. Example: [100.0,200.0]

  • clipoutside (bool=True) - Clip points outside this range? [True/False]. Default:

  • channelavg (bool=False) - Average data over channels before clipping? [True/False]. Default:

  • chanbin ({int, intArray}=1) - Width (bin) of input channels to average to form an output channel.

  • timeavg (bool=False) - Average data over time ranges. [True/False]. Default:

  • timebin (string='') - Bin width for time average. Example: ‘2s’

  • clipzeros (bool=False) - Clip zero-value data. [True/False]. Default:

  • apply (bool=True) - Parameter to flag or unflag data. Default:

parseelevationparameters(field='', spw='', array='', feed='', scan='', antenna='', uvrange='', time='', correlation='', intent='', observation='', lowerlimit=0.0, upperlimit=90.0, apply=True)[source]

Parse data selection parameters and specific parameters for the elevation mode. Data selection follows the MS Selection syntax.

Parameters

  • field (string='') - Field indices or source names. Example: ‘2,3C48’

  • spw (string='') - Spectral Window Indices or names. Example: ‘1,2’

  • array (string='') - Array Indices or names. Example: ‘VLAA’

  • feed (string='') - Feed index or name. Example: ‘1,2’ (not supported yet)

  • scan (string='') - Scan number. Example: ‘1,2,3’

  • antenna (string='') - Baseline number. Example: ‘2,3,4,5’

  • uvrange (string='') - UV-distance range, with a unit. Example: ‘2.0-3000.0 m’

  • time (string='') - Time range, as MJDs or date strings. Example: ‘xx.x.x.x.x~yy.y.y.y.y’

  • correlation (string='') - Correlations/polarizations. Example: ‘RR,LL,RL,LR,XX,YY,XY,YX’

  • intent (string='') - Scan intent. Example: ‘CAL, BAND

  • observation (string='') - Observation Id. Example: ‘2~4’

  • lowerlimit (double=0.0) - The limiting elevation in degrees. Data obtained at lower antenna elevations will get flagged. Default:

  • upperlimit (double=90.0) - The limiting elevation in degrees. Data obtained at higher antenna elevations will get flagged. Default:

  • apply (bool=True) - Parameter to flag or unflag the data. Default:

parseextendparameters(field='', spw='', array='', feed='', scan='', antenna='', uvrange='', time='', correlation='', intent='', observation='', ntime=0.0, combinescans=False, extendpols=True, growtime=50.0, growfreq=50.0, growaround=False, flagneartime=False, flagnearfreq=False, apply=True)[source]

Parse data selection parameters and specific parameters for the extend mode. Data selection follows the MS Selection syntax.

Parameters

  • field (string='') - Field indices or source names. Example: ‘2,3C48’

  • spw (string='') - Spectral Window Indices or names. Example: ‘1,2’

  • array (string='') - Array Indices or names. Example: ‘VLAA’

  • feed (string='') - Feed index or name. Example: ‘1,2’ (not supported yet)

  • scan (string='') - Scan number. Example: ‘1,2,3’

  • antenna (string='') - Baseline number. Example: ‘2,3,4,5’

  • uvrange (string='') - UV-distance range, with a unit. Example: ‘2.0-3000.0 m’

  • time (string='') - Time range, as MJDs or date strings. Example: ‘xx.x.x.x.x~yy.y.y.y.y’

  • correlation (string='') - Correlations/polarizations. Example: ‘RR,LL,RL,LR,XX,YY,XY,YX’

  • intent (string='') - Scan intent. Example: ‘CAL, BAND

  • observation (string='') - Observation Id. Example: ‘2~4’

  • ntime (double=0.0) - Time-range to use for each chunk (in seconds or minutes). Default:

  • combinescans (bool=False) - Accumulate data across scans.. Default:

  • extendpols (bool=True) - If any correlation is flagged, flag all correlations. Default:

  • growtime (double=50.0) - Flag all ‘ntime’ integrations if more than X% of the timerange is flagged (0-100). Default:

  • growfreq (double=50.0) - Flag all selected channels if more than X% of the frequency range is flagged(0-100). Default:

  • growaround (bool=False) - Flag data based on surrounding flags. Default:

  • flagneartime (bool=False) - Flag one timestep before and after a flagged one. Default:

  • flagnearfreq (bool=False) - Flag one channel before and after a flagged one. Default:

  • apply (bool=True) - Parameter to flag or unflag the data. Default:

parsemanualparameters(field='', spw='', array='', feed='', scan='', antenna='', uvrange='', time='', correlation='', intent='', observation='', autocorr=False, apply=True)[source]

Parse data selection parameters and specific parameters for the manual mode. Data selection follows the MS Selection syntax.

Parameters

  • field (string='') - Field indices or source names. Example: ‘2,3C48’

  • spw (string='') - Spectral Window Indices or names. Example: ‘1,2’

  • array (string='') - Array Indices or names. Example: ‘VLAA’

  • feed (string='') - Feed index or name. Example: ‘1,2’ (not supported yet)

  • scan (string='') - Scan number. Example: ‘1,2,3’

  • antenna (string='') - Baseline number. Example: ‘2,3,4,5,132’

  • uvrange (string='') - UV-distance range, with a unit. Example: ‘2.0-3000.0 m’

  • time (string='') - Time range, as MJDs or date strings. Example: ‘xx.x.x.x.x~yy.y.y.y.y’

  • correlation (string='') - Correlations/polarizations. Example: ‘RR,LL,RL,LR,XX,YY,XY,YX’

  • intent (string='') - Scan intent. Example: ‘CAL, BAND

  • observation (string='') - Observation Id. Example: ‘2~4’

  • autocorr (bool=False) - Parameter to flag only auto-correlations. Default:

  • apply (bool=True) - Parameter to flag or unflag the data. Default:

parsequackparameters(field='', spw='', array='', feed='', scan='', antenna='', uvrange='', time='', correlation='', intent='', observation='', quackmode='beg', quackinterval=0.0, quackincrement=False, apply=True)[source]

Parse data selection parameters and specific parameters for the quack mode. Data selection follows the MS Selection syntax.

Parameters

  • field (string='') - Field indices or source names. Example: ‘2,3C48’

  • spw (string='') - Spectral Window Indices or names. Example: ‘1,2’

  • array (string='') - Array Indices or names. Example: ‘VLAA’

  • feed (string='') - Feed index or name. Example: ‘1,2’ (not supported yet)

  • scan (string='') - Scan number. Example: ‘1,2,3’

  • antenna (string='') - Baseline number. Example: ‘2,3,4,5’

  • uvrange (string='') - UV-distance range, with a unit. Example: ‘2.0-3000.0 m’

  • time (string='') - Time range, as MJDs or date strings. Example: ‘xx.x.x.x.x~yy.y.y.y.y’

  • correlation (string='') - Correlations/polarizations. Example: ‘RR,LL,RL,LR,XX,YY,XY,YX’

  • intent (string='') - Scan intent. Example: ‘CAL, BAND

  • observation (string='') - Observation Id. Example: ‘2~4’

  • quackmode (string='beg') - Quack mode. Default:

  • quackinterval (double=0.0) - Quack length in seconds. Default:

  • quackincrement (bool=False) - Increment quack flagging in time taking into account flagged data or not. Default:

  • apply (bool=True) - Parameter to flag or unflag the data. Default:

parsesummaryparameters(field='', spw='', array='', feed='', scan='', antenna='', uvrange='', time='', correlation='', intent='', observation='', spwchan=False, spwcorr=False, basecnt=False, fieldcnt=False, name='')[source]

Parse data selection parameters and specific parameters for the summary mode. Data selection follows the MS Selection syntax.

Parameters

  • field (string='') - Field indices or source names. Example: ‘2,3C48’

  • spw (string='') - Spectral Window Indices or names. Example: ‘1,2’

  • array (string='') - Array Indices or names. Example: ‘VLAA’

  • feed (string='') - Feed index or name. Example: ‘1,2’ (not supported yet)

  • scan (string='') - Scan number. Example: ‘1,2,3’

  • antenna (string='') - Baseline number. Example: ‘2,3,4,5’

  • uvrange (string='') - UV-distance range, with a unit. Example: ‘2.0-3000.0 m’

  • time (string='') - Time range, as MJDs or date strings. Example: ‘xx.x.x.x.x~yy.y.y.y.y’

  • correlation (string='') - Correlations/polarizations. Example: ‘RR,LL,RL,LR,XX,YY,XY,YX’

  • intent (string='') - Scan intent. Example: ‘CAL, BAND

  • observation (string='') - Observation Id. Example: ‘2~4’

  • spwchan (bool=False) - List the number of flags per spw and per channel. Default:

  • spwcorr (bool=False) - List the number of flags per spw and per correlation. Default:

  • basecnt (bool=False) - List the number of flags per baseline. Default:

  • fieldcnt (bool=False) - List the number of flags per field. Default:

  • name (string='') - Name of this summary report. Default: summary

parsetfcropparameters(field='', spw='', array='', feed='', scan='', antenna='', uvrange='', time='', correlation='', intent='', observation='', ntime=0.0, combinescans=False, datacolumn='DATA', timecutoff=4.0, freqcutoff=3.0, timefit='line', freqfit='poly', maxnpieces=7, flagdimension='freqtime', usewindowstats='none', halfwin=1, extendflags=True, apply=True, channelavg=False, chanbin=1, timeavg=False, timebin='')[source]

Parse data selection parameters and specific parameters for the time and frequency mode. Data selection follows the MS Selection syntax.

Parameters

  • field (string='') - Field indices or source names. Example: ‘2,3C48’

  • spw (string='') - Spectral Window Indices or names. Example: ‘1,2’

  • array (string='') - Array Indices or names. Example: ‘VLAA’

  • feed (string='') - Feed index or name. Example: ‘1,2’ (not supported yet)

  • scan (string='') - Scan number. Example: ‘1,2,3’

  • antenna (string='') - Baseline number. Example: ‘2,3,4,5’

  • uvrange (string='') - UV-distance range, with a unit. Example: ‘2.0-3000.0 m’

  • time (string='') - Time range, as MJDs or date strings. Example: ‘xx.x.x.x.x~yy.y.y.y.y’

  • correlation (string='') - Correlations/polarizations. Example: ‘RR,LL,RL,LR,XX,YY,XY,YX’

  • intent (string='') - Scan intent. Example: ‘CAL, BAND

  • observation (string='') - Observation Id. Example: ‘2~4’

  • ntime (double=0.0) - Time-range to use for each chunk (in seconds or minutes). Default:

  • combinescans (bool=False) - Accumulate data across scans depending on the value of ntime. Default:

  • datacolumn (string='DATA') - Data column to use for clipping. Example: ‘DATA’. Default:

  • timecutoff (double=4.0) - Flagging thresholds in units of deviation from the fit. Default:

  • freqcutoff (double=3.0) - Flagging thresholds in units of deviation from the fit. Default:

  • timefit (string='line') - Fitting function for the time direction (poly/line). Default:

  • freqfit (string='poly') - Fitting function for the frequency direction (poly/line). Default:

  • maxnpieces (int=7) - Number of pieces in the polynomial-fits (for ‘freqfit’ or ‘timefit’ = ‘poly’). Default:

  • flagdimension (string='freqtime') - Dimensions along which to calculate fits (freq/time/freqtime/timefreq). Default:

  • usewindowstats (string='none') - Calculate additional flags using sliding window statistics (none,sum,std,both). Default:

  • halfwin (int=1) - Half-width of sliding window to use with ‘usewindowstats’ (1,2,3). Default:

  • extendflags (bool=True) - Extend the flags in time, frequency and correlations. Default:

  • apply (bool=True) - Parameter to flag or unflag the data. Default:

  • channelavg (bool=False) - Average data over channels before clipping? [True/False]. Default:

  • chanbin ({int, intArray}=1) - Width (bin) of input channels to average to form an output channel.

  • timeavg (bool=False) - Average data over time ranges. [True/False]. Default:

  • timebin (string='') - Bin width for time average. Example: ‘2s’

printflagselection()[source]

Print out a list of current flag selections.

restoreflagversion(versionname=[''], merge='')[source]

Restore flags from a saved flag_version.

versionname : name of flag version to restore to main table

merge : Type of operation to perform during restoration.

merge = replace : replaces the main table flags.

merge = and : logical AND with main table flags

merge = or : logical OR with main table flags

Default : replace.

Parameters

  • versionname (stringArray=['']) - Version name

  • merge (string='') - merge type

run(writeflags=True, sequential=True)[source]

Execute a list of flagging agents and write or not to the MS/cal table. The parameter writeflags controls whether or not to write to the MS.

Parameters

  • writeflags (bool=True) - Write flags to MS (default: True)

  • sequential (bool=True) - Run the agents in the order they are inserted in the list or not. Default is True to run in the original order.

saveflagversion(versionname='', comment='', merge='')[source]

Save current flags with a version name.

Parameters

  • versionname (string='') - Version name

  • comment (string='') - Comment for this flag table

  • merge (string='') - merge type

selectdata(config='', field='', spw='', array='', feed='', scan='', antenna='', uvrange='', timerange='', correlation='', intent='', observation='')[source]

Select the data based on the given parameters. For unspecified parameters, the full data range is assumed. All data selection parameters follow the MS Selection syntax.

Parameters

  • config (record='') - The record (dictionary) config may be given or not. If it is not given,

and no specific parameter is given either, the whole MS will be selected. The record

may contain any data selection parameters supported by MS Selection such as:

  • field (string='') - Field indices or source names : example : ‘2,3C48’

  • spw (string='') - Spectral Window Indices or names : example : ‘1,2’

  • array (string='') - Array Indices or names : example : ‘VLAA’

  • feed (string='') - Feed index or name : example : ‘1,2’ (not supported yet)

  • scan (string='') - Scan number : example : ‘1,2,3’

  • antenna (string='') - Baseline number : example : ‘2,3,4,5’

  • uvrange (string='') - UV-distance range, with a unit : example : ‘2.0-3000.0 m’

  • timerange (string='') - Time range, as MJDs or date strings : example : ‘xx.x.x.x.x~yy.y.y.y.y’

  • correlation (string='') - Correlations/polarizations : example : ‘RR,LL,RL,LR,XX,YY,XY,YX,Sol1’

  • intent (string='') - Scan intent : example : ‘CAL, BAND

  • observation (string='') - Observation Id : example : ‘2~4’