NRAO Home > CASA > CASA Cookbook and User Reference Manual
3.4.2.8 Rflag
 
mode                =    ’rflag’        #  Flagging mode (list/manual/clip/shadow/quack/  
                                        #   elevation/tfcrop/rflag/extend/unflag/summary  
                                        #   )  
...  
     ntime          =     ’scan’        #  Time-range to use for each chunk (in seconds  
                                        #   or minutes)  
     combinescans   =      False        #  Accumulate data across scans.  
     datacolumn     =     ’DATA’        #  Data column on which to operate  
                                        #   (data,corrected,model,residual)  
     winsize        =          3        #  Number of timesteps in the sliding time  
                                        #   window [aips:fparm(1)]  
     timedev        =         ’’        #  Time-series noise estimate [aips:noise]  
     freqdev        =         ’’        #  Spectral noise estimate [aips:scutoff]  
     timedevscale   =        5.0        #  Threshold scaling for timedev [aips:fparm(9)]  
     freqdevscale   =        5.0        #  Threshold scaling for freqdev  
                                        #   [aips:fparm(10)]  
     spectralmax    =  1000000.0        #  Flag whole spectrum if freqdev is greater  
                                        #   than spectralmax [aips:fparm(6)]  
     spectralmin    =        0.0        #  Flag whole spectrum if freqdev is less than  
                                        #   spectralmin [aips:fparm(5)]  

RFlag is an autoflag algorithm based on a sliding window statistical filter. The RFlag algorithm was originally developed by Eric Greisen in AIPS (31DEC11). AIPS documentation : Subsection E.5 of the AIPS cookbook (Appendix E : Special Considerations for JVLA data calibration and imaging in AIPS)

In RFlag, the data is iterated-through in chunks of time, statistics are accumulated across time-chunks, thresholds are calculated at the end, and applied during a second pass through the dataset.

The CASA implementation also optionally allows a single-pass operation where statistics and thresholds are computed and also used for flagging, within each time-chunk (defined by ’ntime’ and ’combinescans’).

For each chunk, calculate local statistics, and apply flags based on user supplied (or auto-calculated) thresholds.

  1. Time analysis (for each channel)
    1. Calculate local rms of real and imag visibilities, within a sliding time window
    2. Calculate the median rms across time windows, deviations of local rms from this median, and the median deviation
    3. Flag if local rms is larger than timedevscale x (medianRMS + medianDev)
  2. Spectral analysis (for each time)
    1. Calculate avg of real and imag visibilities and their rms across channels
    2. Calculate the deviation of each channel from this avg, and the median-deviation
    3. Flag if deviation is larger than freqdevscale x medianDev

Again, we would like to refer to the inline help and to http://www.aoc.nrao.edu/\~rurvashi/FlaggerDocs/FlaggerDocs.html for a more comprehensive description with examples.


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