flagging

Flagging of the data.

enable

bool

Execute flagging of the data.

label

str, optional, default = ‘ ‘

The label is added to the input .MS file name to define the name of the .MS file that should be flagged, <input>-<label>.ms. Default is an empty string, i.e., the original .MS is flagged.

autoflag_autocorr_powerspectra

Flags antennas based on drifts in the scan average of the auto correlation spectra per field. This doesn’t strictly require any calibration. It is also not field structure dependent, since it is just based on the DC of the field. Compares scan to median power of scans per field per channel. Also compares antenna to median of the array per scan per field per channel. This should catch any antenna with severe temperature problems.

enable

bool, optional, default = False

Enables flagging of antennas based on drifts in the scan average of the auto correlation spectra per field.

scan_to_scan_threshold

int, optional, default = 3

Threshold for flagging in sigma above the rest of the scans per field per channel.

antenna_to_group_threshold

int, optional, default = 5

Threshold for flagging in sigma above array median power spectra per scan per field per channel.

column

str, optional, default = DATA

Data column to flag.

fields

str, optional, default = auto

Fields to flag. Given as ‘auto’ or comma-seperated keys (keys in gcal, bpcal, target).

calibrator_fields

str, optional, default = auto

Calibrator fields. Given as ‘auto’ or comma-seperated keys (keys in gcal, bpcal).

threads

int, optional, default = 8

Number of threads to use.

flag_autocorr

Flag autocorrelations. Through CASA flagdata task.

enable

bool, optional, default = True

Enables flagging of autocorrelations.

quack_flagging

Do quack flagging, i.e. flag the begining and/or end chunks of each scan. Again, through FLAGDATA.

enable

bool, optional, default = False

Enable quack flagging.

quackinterval

float, optional, default = 8.

Time interval (in seconds) to flag.

quackmode

{“beg”, “endb”, “end”, “tail”}, optional, default = beg

Quack flagging mode. Either ‘beg’, which flags scan begining, ‘endb’, which flags end of the scan, ‘end’, which flags everything but the first specified seconds of the scan and ‘tail’ which flags all but the last specified seconds of the scan.

flag_elevation

Flag antennas with pointing elevation outisde the selected range through CASA FLAGDATA.

enable

bool, optional, default = False

Enable flagging based on pointing elevation.

low

float, optional, default = 0

Lower elevation limit. Antennas pointing at elevation below this value are flagged.

high

float, optional, default = 90

Upper elevation limit. Antennas pointing at elevation above this value are flagged.

flag_shadow

Flag shadowed antennas through the CASA task FLAGDATA.

enable

bool, optional, default = False

Enables flagging of shadowed antennas.

tolerance

float, optional, default = 0.

Amounts of shadow allowed (in metres). Default is 0. A positive number allows antennas to overlap in projection. A negative number forces antennas apart in projection.

include_full_mk64

bool, optional, default = False

Consider all MeerKAT-64 antennas in the shadowing calculation even if only a subarray is used. Default is False.

flag_spw

Flag spectral windows/channels. Of course, through FLAGDATA.

enable

bool, optional, default = False

Enable flagging spectral windows/ channels.

channels

str, optional, default = *:856~880MHz , *:1658~1800MHz, *:1419.8~1421.3MHz

Channels to flag. Given as “spectral window index:start channel ~ end channel” e.g. “*:856~880MHz”. End channel not inclusive.

ensure_valid_selection

bool, optional, default = False

Check whether the channel selection returns any data. If it does not FLAGDATA is not executed preventing the pipeline from crashing. This check only works with the following spw formats (multiple, comma-separated selections allowed), “*:firstchan~lastchan”; “firstspw~lastspw:firstchan~lastchan”; “spw:firstchan~lastchan”; “firstchan~lastchan”. Channels are assumed to be in frequency (Hz, kHz, MHz, GHz allowed; if no units are given it assumes Hz).

flag_time

Flag timerange in the data using CASA FLAGDATA task.

enable

bool, optional, default = False

Enabla flagging timeranges.

timerange

str, optional, default = ‘ ‘

Timerange to flag. Required in the format ‘YYYY/MM/DD/HH:MM:SS-YYYY/MM/DD/HH:MM:SS’.

ensure_valid_selection

bool, optional, default = False

Check whether the timerange is in the ms being considered. This stops the pipeline from crashing when multiple dataset are being processed.

flag_antennas

Flag bad antennas. Or just the ones you have sworn a vendetta against.

enable

bool, optional, default = False

Enables flagging of bad antennas.

antennas

str, optional, default = 0

Antennas to flag. Follows the CASA Flagdata syntax.

timerange

str, optional, default = ‘ ‘

Timerange to flag. Required in the format ‘YYYY/MM/DD/HH:MM:SS-YYYY/MM/DD/HH:MM:SS’.

ensure_valid_selection

bool, optional, default = False

Check whether the timerange is in the ms being considered. This stops the pipeline from crashing when multiple dataset are being processed.

flag_scan

Flag bad scans. Uses CASA Flagdata task.

enable

bool, optional, default = False

Enables flagging of bad scans.

scans

str, optional, default = 0

Scans to flag. CASA flagdata syntax.

static_mask

Apply static mask to flag out known RFI, Meerkat specific.

enable

bool, optional, default = False

Enables the application of static mask on the data.

mask

str, optional, default = labelled_rfimask.pickle.npy

The mask to apply.

uvrange

str, optional, default = ‘ ‘

UV range to select (CASA style range, e.g. lower~upper) for flagging. Leave blank for entire array.

autoflag_rfi

Flag RFI using AOFlagger software.

enable

bool, optional, default = True

Enable RFI flagging with AOFlagger or tricolour (not active yet)

flagger

{“aoflagger”, “tricolour”, “tfcrop”}, optional, default = aoflagger

Choose flagger for automatic flagging

strategy

str, optional, default = firstpass_QUV.rfis

The AOFlagger strategy file to use.

column

str, optional, default = DATA

Specify column to flag

fields

str, optional, default = auto

comma separated list of (zero-indexed) field ids to process

calibrator_fields

str, optional, default = auto

comma separated list of (zero-indexed) field ids to process

bands

str, optional, default = auto

comma separated list of (zero-indexed) band ids to process

window_backend

{“numpy”, “zarr-disk”}, optional, default = numpy

Visibility and flag data is re-ordered from a MS row ordering into time-frequency windows ordered by baseline.

tricolour_calibrator_strat

str, optional, default = mk_rfi_flagging_calibrator_fields_firstpass.yaml

usewindowstats

{“none”, “sum”, “std”, “both”}, optional, default = std

Calculate additional flags using sliding window statistics

combinescans

bool, optional, default = False

Accumulate data across scans depending on the value of ntime

flagdimension

{“freq”, “time”, “freqtime”, “timefreq”}, optional, default = freqtime

Dimensions along which to calculate fits (freq/time/freqtime/timefreq)

timecutoff

float, optional, default = 4.0

Flagging thresholds in units of deviation from the fit

freqcutoff

float, optional, default = 3.0

Flagging thresholds in units of deviation from the fit

correlation

str, optional, default = ‘ ‘

Correlation

rfinder

A tool to investigate the presence of RFI

enable

bool, optional, default = False

Enable invsetigation of rfi with rfinder

telescope

str, optional, default = MeerKAT

Name of telescope

field

str, optional, default = target

Field to get flag stats. Given as a key (key in [gcal, bpcal, target]).

polarization

{“xx”, “XX”, “yy”, “YY”, “xy”, “XY”, “yx”, “YX”, “q”, “Q”}, optional, default = q

Select polarisation e.g. xx, yy, xy, yx, q (also in CAPS)

spw_enable

bool, optional, default = True

Enable spw for rebinning

spw_width

int, optional, default = 10

Channel width of rebinned output table (MHz)

time_enable

bool, optional, default = True

Enable time chunking

time_step

int, optional, default = 5

Time chunks in minutes

movies_in_report

bool, optional, default = True

Generate movies in a repo

flagging_summary

Write flagging summary at the end of the pre-calibration flagging. Uses CASA FLAGDATA in “summary” mode.

enable

bool, optional, default = True

Enables the writing of flagging summary.