ngcasa.flagging.summary

summary(mxds, xds_idx, flag_varname='FLAG')[source]

Produces a summary with counts of flags from a flag variable of an xarray dataset.The summary is returned as a dictionary with the same structure as the dictionary returned by CASA6/flagdata in summary mode. It includes total counts and partial counts broken down by array, observation, correlation, field, scan, and antenna.

Note: per-SPW counts are not included in this prototype version. Handling of multi-SPWs operations is subject to changes depending on interface design at (or around) the ngCASA layer.

Parameters
  • mxds (xarray.core.dataset.Dataset) – Dataset of xarray datasets

  • xds_idx (int) – Index of the xarray datasets to get counts from (index in the xds’i’ attributes of mxds). This is an oversimplification (early prototyping)

  • flag_varname (str) – Name of the flag variable to summarize

  • - additional counts like 'spwchan' (TBD) –

  • 'spwcorr'

  • etc.

  • - params to filter percentages in report (minrel (TBD) –

  • minabs

  • etc.)

  • - params related to other counts or scores (possibly other functions) (TBD) –

  • Returns

  • -------

  • dict – Dictionary with counts of flags set and total flags, for the whole dataset also broken down (grouped by) by multiple criteria (scan, field, antenna, correlation, etc.)