Visibility Statistics

MS statistics (visstat)

The visstat task is provided to obtain simple statistics for a MeasurementSet, useful in regression tests.

The inputs are:

# visstat :: Displays statistical information from a Measurement Set, or from a Multi-MS
vis              = ''          # Name of Measurement Set or Multi-MS
axis             = 'amp'       # Which values to use

     datacolumn  = 'data'      # Which data column to use (data, corrected, model)

useflags         = True        # Take flagging into account?

spw              = ''          # Spectral-window/frequency/channel: '' ==> all, spw='0:17~19'

field            = ''          # Field names or field index numbers: '' ==> all, field='0~2,3C286'

selectdata       = True        # More data selection parameters (antenna, timerange etc)
     antenna     = ''          # Antenna/baselines: '' ==> all, antenna ='3,VA04'
     timerange   = ''          # Time range: '' ==> all,timerange='09:14:0~09:54:0'
     correlation = ''          # Correlation: '' ==> all, correlation='XX,YY'
     scan        = ''          # Scan numbers: '' ==> all
     array       = ''          # (Sub)array numbers: '' ==> all
     uvrange     = ''          # UV range: '' ==> all; uvrange ='0~100klambda', default units=meters
     observation = ''          # Observation ID: '' ==> all

 

Running this task returns a record (Python dictionary) with the statistics, which can be captured in a Python variable. For example,

CASA <42>: mystat = visstat('ngc5921.demo.ms',axis='amp',datacolumn='corrected',field='0') CASA <43>: mystat Out[43]: {'CORRECTED': {'max': 51.938671112060547, 'mean': 14.796444141750133, 'medabsdevmed': 0.28020858764648438, 'median': 14.764373779296875, 'min': 0.81362706422805786, 'npts': 514916.0, 'quartile': 0.56053066253662109, 'rms': 14.829294204711914, 'stddev': 0.98650836609147285, 'sum': 7618925.8316934109, 'sumsq': 113234125.12642419, 'var': 0.97319875636846753}} CASA <44>: print mystat['CORRECTED']['stddev'] 0.986508366091

The options for axis are:

axis='amplitude' # or ('amp') axis='phase' axis='imag' axis='scan_number' axis='flag'

The phase of a complex number is in radians with range (−π, π).