CASA Contributed Script: flag reason stats: Difference between revisions

From CASA Guides
Jump to navigationJump to search
Jott (talk | contribs)
No edit summary
Jott (talk | contribs)
No edit summary
 
Line 2: Line 2:




\Flag_reason_stats.py‎ is a script that can list the statistics of flags in categories of "reason".  
Flag_reason_stats.py‎ is a script that can list the statistics of flags in categories of "reason".  


* Download Script: [[File:Flag_reason_stats.py‎‎]]
* Download Script: [[File:Flag_reason_stats.py‎‎]]

Latest revision as of 14:19, 28 March 2012

List Flag Statistics for each "Reason"

Flag_reason_stats.py‎ is a script that can list the statistics of flags in categories of "reason".

Here is an example, on a small MS where spw=8 is filled with exact zeros, spw='9' has RFI, and I want to clip zeros and run tfcrop, and count zeros and RFI separately.

execfile('flag_reason_stats.py');

CASA <17>: countlist = task_reason_stats(msname='Four_ants_3C286.ms',spw='8,9');
Summary  0 ( Zeros ) :  Flagged :  274944.0  out of  549888.0
Summary  1 ( TFCrop ) :  Flagged :  18633.0  out of  549888.0

CASA <18>: countlist = task_reason_stats(msname='Four_ants_3C286.ms',spw='9');
Summary  0 ( Zeros ) :  Flagged :  0.0  out of  274944.0
Summary  1 ( TFCrop ) :  Flagged :  18633.0  out of  274944.0

CASA <19>: countlist = task_reason_stats(msname='Four_ants_3C286.ms',spw='8');
Summary  0 ( Zeros ) :  Flagged :  274944.0  out of  274944.0
Summary  1 ( TFCrop ) :  Flagged :  0.0  out of  274944.0