<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" ?>
<casaxml xmlns="http://casa.nrao.edu/schema/psetTypes.html"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://casa.nrao.edu/schema/casa.xsd
file:///opt/casa/code/xmlcasa/xml/casa.xsd">
<task type="function" name="flagcmd" category="data editing">
<shortdescription>Flagging task based on batches of flag-commands</shortdescription>
The flagcmd task will flag the visibility data or calibration
table based on several batch-operations using flag commands.
Flag commands follow the mode and parameter names from the
The flagcmd task will flag data based on the commands input on
table = input from FLAG_CMD table in MS
list = input from text file or list of strings from inpfile
xml = input from Flag.xml in the MS given by vis
Batch operations include : apply/unapply/list/plot/clear/extract
IMPORTANT: If you use other ways to flag such as interactive
flagging in plotms, the FLAG_CMD will NOT be updated!
NOTE on flagging calibration tables.
-----------------------------------
We recommend using the flagdata task for flagging cal tabels. When
using flagcmd to flag cal tables, only the 'apply' and 'list'
actions are supported. Because cal tables do not have a FLAG_CMD
sub-table, the default inpmode='table' can only be used if an MS
is given in the 'inpfile' parameter so that flags from the MS are
applied to the cal table. Otherwise, the flag commands must be
given using inpmode='list', either from a file(s) or from a list
of strings. Data selection for calibration tables is limited to
field, scan, antenna, time, spw and observation.
<param type="string" name="vis" mustexist="true">
<shortdescription>Name of MS file or calibration table to flag</shortdescription>
<description>Name of input visibility file or calibration table.
example: vis='uid___A002_X2a5c2f_X54.ms'
<param type="string" name="inpmode">
<shortdescription>Input mode for flag commands(table/list/xml)</shortdescription>
<description>Input mode for flag commands(table/list/xml)
options: 'table','list','xml'
default: 'table' (the input commands from
FLAG_CMD table of the MS)
inpmode='xml' inputs online flags from Flag.xml
file in the MS. This mode has become largely
obsolete with the deprecation of the importevla
task (see the flagcmd task pages in CASA Docs for
more information). This mode will not work for
NOTE: You can only apply the flags from a list or
xml; you will not be able to unapply
them. Transfer the flag commands to the FLAG_CMD
table if you want to unapply the flags (see
'inpfile' description below).
<param type="any" name="inpfile" subparam="true">
<shortdescription>Source of flag commands</shortdescription>
<description>Source of flag commands. Subparameter of
Path to MS containing FLAG_CMD (table), or name
of an ASCII file, list of files or a list of
Python strings to apply to MS or cal table
options: [] with flag commands or [] with
filenames or '' with a filename. (String values
must contain quotes around them or the parser