msuvbinflag

msuvbinflag(binnedvis, method='radial_per_plane', nsigma=5.0, doplot=False)[source]
An algorithm to identify outliers in the UV plane via the UV grid generated by msuvbin.

Both msuvbin and msuvbinflag tasks are experimental

[Description] [Examples] [Development] [Details]

Parameters
  • binnedvis (string) - Name of input binned MS from msuvbin task.

  • method (string=’radial_per_plane’) - Flagging algorithm (radial_per_plane, radial_mean_annular)

    method = radial_per_plane
    • nsigma (double=5.0) - nsigma threshold above which to flag

    method = radial_mean_annular
    • nsigma (double=5.0) - nsigma threshold above which to flag

  • doplot (bool=False) -

Generate plots of the radial profiles, useful for debugging. Warning : This can severely impact runtime performance.

Description

Warning

WARNING: This task is currently experimental.

msuvbinflag An algorithm to identify outliers in the UV plane through a defined uniform grid by msuvbin. Both msuvbin and msuvbinflag tasks are experimental. Msuvbinflag is automatic flagging algorithm for the identification of Radio Frequency Interference (RFI) in the UV plane for experimental purpose. The visibilities in input CASA Measurements Set (MS) is first gridded into an uniformed UV plane with msuvbin task. Then the significant outliers are computed for entire UV grid based on the criterional settings configurable by users for three method options: radian, diffential and regional mean. After computing flags for each visibility in each uniformed UV bin, the visibilities are transformed reverslity back to original order in the MS file with flagging information. The first msuvbinflag release version is for NRAO internal use to evaluate the speed and numarical analysis performance.

Parameter descriptions

vis

Name of input visibility file

field

Field name list; note that this position will define the phase center of the output uv grid

spw

Spectral window selection

taql

TaQl expression for data selection (see Data Selection in a Measurement Set or CASAcore NOTE 199: Table Query Language for more information)

outvis

Name of output grid

phasecenter

Phase center of the grid, to be used when the phase center of the selected field is not the desired output phase center. Example: phasecenter=’J2000 18h03m04 -20d00m45.1’

nx

Number of pixels along the x axis of the grid. Default: 1000

ny

Number of pixels along the y axis of the grid. Default: 1000

cell

Cellsize of the grid (given in sky units). Default: ‘1arcsec’

ncorr

Number of correlation/polarization plane in uv grid (allowed 1, 2, 4). For example, if the input data set has the correlations RR and LL, and ncorr =1, then the output uv grid will be written as Stokes I. If ncorr= 2, then the output grid will have both the RR and LL correlations. Default: 1

nchan

Number of spectral channels in the output uv grid. Default: 1

fstart

Frequency of the first channel. Default: ‘1GHz’ (the user needs to give a useful input here)

fstep

Width of spectral channel. Default: ‘1kHz’

wproject

Do wprojection correction while gridding. Default: False

memfrac

Controls how much of computer’s memory is available for gridding. Default=0.5

Examples

Development

No additional development details

Parameter Details

Detailed descriptions of each function parameter

binnedvis (string) - Name of input binned visibility data (MS) (the output of the msuvbin task).
default: none;
example: binnedvis=’SNR_binnedvis.ms’
method (string='radial_per_plane') - There are currently two algorithm options to identify outliers in the UV domain: radial_per_plane, radial_mean_annular
radial_per_plane: This algorithm works independently
on each plane (channel, polarization) of the binned ms. A mean radial profile is
generated by doing a weighted average of all data at a given
UV-radius. A polynomial is fit to the radially averaged
profile. All the binned UV points that are larger than the
nsigma threshold are flagged. The threshold is calculated as :
originalValue[u,v] > radialfitValue[r]+nsigma*rms
where (u,v) are the UV coordinates, r is the radial distance from the
center, and rms is the rms of the radial profile at radius r.
radial_mean_annular: This algorithm combines all the planes in the
binned MS on to a single UV grid. This combined grid is then
divided into annular circles from 0 through the maximum UV radius
in log-spaced intervals. A radial profile is constructed by
calculating the median values within each annulus, as well as
the median absolute deviation scaled to the standard deviation.
Similar to the radial_per_plane method, each plane is then individually
treated, and a point in the UV plane is flagged if it is greater than
the nsigma threshold. The threshold is calculated as :
originalValue[u,v] > radiatValue[n] + nsigma*rms[n]
where (u,v) are the UV coordinates, and n is the nth annulus.

default: ‘radial_per_plane’
example: method=’radial_mean_annular’
nsigma (double=5.0) - User defined nsigma value for flagging.
The default value is 5.
doplot (bool=False) - Generate plots of the radial profiles calculated prior to flagging. This can be useful to
debug the performance of the algorithm, however it can severely impact runtime performance.
In general you do not need to turn this option on.
The default value is False.