NRAO Home > CASA > CASA Cookbook and User Reference Manual

2.2.2 EVLA/JVLA: Filling of Science Data Model (ASDM) data

Under the Hood:
The importevla task is a modified version of the importasdm task, that includes import of online flags from the Flag.xml table into the FLAG_CMD MS table, and a streamlined set of parameters.

The importevla task will fill SDM data from JVLA (or ALMA) into a MS, along with online flagging data contained in the Flag.xml SDM table. Otherwise, it behaves as importasdm but with a streamlined parameter set.

The default inputs are:

#  importevla :: Convert an Science Data Model observation into a CASA Measurement Set  
asdm                =         ’’        #  Name of input asdm directory (on disk)  
vis                 =         ’’        #  Root name of the ms to be created. Note the  
                                        #   .ms is NOT added  
ocorr_mode          =       ’co’        #  Fill correlation mode AUTO_ONLY (ao),  
                                        #   CROSS_ONLY (co) or CROSS_AND_AUTO (ca)  
compression         =      False        #  Flag for turning on data compression  
asis                =         ’’        #  Create verbatim copies of these SDM tables in  
                                        #   the MS.  
scans               =         ’’        #  List of scans to fill (default is all scans).  
switchedpower       =      False        #   The SysPower and CalDevice tables are  
                                        #   processed if and only if this parameter is  
                                        #   set to true, enabling support for switched-  
                                        #   power gain and tsys corrections.  
verbose             =      False        #  Output lots of information while the filler  
                                        #   is working  
overwrite           =       True        #  Over write an existing MS  
online              =       True        #  Create online flags  
     tbuff          =        0.0        #  Time padding buffer (in seconds)  
 
flagzero            =       True        #  Create flag commands for zero points  
     flagpol        =       True        #  Create flag commands for cross-hand  
                                        #   correlations  
 
shadow              =       True        #  Create flag commands for shadowed data  
     tolerance      =        0.0        #  Amount of shadow allowed (in meters)  
     addantenna     =         ’’        #  File name or dictionary with additional  
                                        #   antenna names, positions and diameters  
 
applyflags          =      False        #  Apply flag commands to MS  
savecmds            =      False        #  Save flag commands to an ASCII file  
flagbackup          =       True        #  Back up flag column before applying flags  
async               =      False        #  If true the taskname must be started using  
                                        #   importevla(...)

ALERT: If you want to use your JVLA online flags then you must use importevla rather than importasdm. The flagcmd task will process these flags. Also, if you have run importevla in CASA 3.3 or earlier, the flag syntax will be processed by the task oldflagcmd.

The default action of importevla is to construct the FLAG_CMD MS table based on the settings of online, flagzero, and shadow (and sub-parameters). If applyflags=True then these flags will be applied after filling. We recommend you use the flagcmd task after filling to examine these flags and then apply.

See importasdm (§ 2.2.1) for a description of the common parameters. Some differences:

Note that importevla uses the switchedpower toggle to combine the action of the two related parameters that importasdm uses.

The online parameter controls creation of online flags from the Flag.xml SDM table. The tbuff parameter adds a time “buffer” padding for these flags in both directions to deal with timing mis-matches. ALERT: For JVLA data taken before April 2011, you should set tbuff to a value (in seconds) equal to 1.5× the integration time.

The flagzero parameter controls creation of clipping commands to flag visibilities with amplitudes that are exact zeros. If flagpol=True then it will flag the cross-hands (e.g. RL and LR) as well, which might result in low but correct values of these correlations being thrown out (but can catch erroneous zeros also). ALERT: This facility is provided as the JVLA correlator, particularly in 2010, occasionally produces visibilities with zero or very small values that need to get flagged out.

The shadow parameter turns on creation of flag commands to remove antenna time ranges where they are shadowed by other antennas in the array. By default it will flag based on the antenna diameter, but if you want more lenient or conservative flagging then set the tolerance sub-parameter, where the shadowed antennas are flagged for all baselines that are shorter than radius1 + radius2 - tolerance (the radii are those for the antennas as listed in the ANTENNA subtable). addantenna can be a file that defines the positions of antennas that are on the ground but do not appear in the MS. They can still shadow antennas in the array.

savecmds will save all flagging commands in the flagcmd and tflagdata syntax (§3.4 and 3.5) to a file to be applied later or for bookkeeping.

A flag backup can be performed using the flagbackup parameter. It saves all current flags to the ’*.flagversions’ file of the MS, before all new flags are applied.


More information about CASA may be found at the CASA web page

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